lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f5b46109-ad53-4d03-937e-ac4fc868755f@baylibre.com>
Date: Tue, 29 Jul 2025 13:51:48 -0500
From: David Lechner <dlechner@...libre.com>
To: Dixit Parmar <dixitparmar19@...il.com>
Cc: Jonathan Cameron <jic23@...nel.org>, Nuno Sá
 <nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>,
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>, linux-kernel@...r.kernel.org,
 linux-iio@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH 1/2] iio: magnetometer: add support for Infineon TLV493D
 3D Magentic sensor

On 7/28/25 10:26 PM, Dixit Parmar wrote:

...

>>> +	case IIO_CHAN_INFO_SCALE:
>>> +		switch (chan->type) {
>>> +		case IIO_MAGN:
>>> +			/*
>>> +			 * Magnetic field scale: 0.0098 mTesla (i.e. 9.8 µT)
>>> +			 * Expressed as fractional: 98/10 = 9.8 µT.
>>> +			 */
>>> +			*val = 98;
>>> +			*val2 = 10;
>> We use SI units, so this needs to be gauss, not tesela.
>>
> Sure, Is there any documentation/reference this details are mentioned?
>>> +			return IIO_VAL_FRACTIONAL;


Most of the sysfs attribute documentation is in 
Documentation/ABI/testing/sysfs-bus-iio. Specifically for this
case, it says:


What:		/sys/bus/iio/devices/iio:deviceX/in_magn_x_raw
What:		/sys/bus/iio/devices/iio:deviceX/in_magn_y_raw
What:		/sys/bus/iio/devices/iio:deviceX/in_magn_z_raw
KernelVersion:	2.6.35
Contact:	linux-iio@...r.kernel.org
Description:
		Magnetic field along axis x, y or z (may be arbitrarily
		assigned).  Data converted by application of offset
		then scale to Gauss.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ