diff mbox series

iio: documentation: light: Add as73211 sysfs documentation

Message ID 20200809074335.23734-1-ceggers@arri.de
State New
Headers show
Series iio: documentation: light: Add as73211 sysfs documentation | expand

Commit Message

Christian Eggers Aug. 9, 2020, 7:43 a.m. UTC
The driver for the as73211 light sensor provides the following not yet
documented sysfs entries:
- in_intensity_(x|y|z)_raw
- in_intensity_(x|y|z)_scale
- in_intensity_sampling_frequency(_available)
- in_intensity_hardwaregain(_available)
- in_intensity_integration_time

Signed-off-by: Christian Eggers <ceggers@arri.de>
---

On Thursday, 6 August 2020, 19:44:51 CEST, Jonathan Cameron wrote:
Hi Jonathan,

> Hi Christian,
> 
> I'll take this, but please send a follow up patch to add documentation
> for in_intensity_x_raw and all the other new ABI this adds in
> Documentation/ABI/testing/sysfs-bus-iio
> I should have mentioned that earlier, but kind of assumed we already
> had these documented for some reason!  
> [...]
> Insert them into the relevant groups that already exist.  In some cases
> it will just be adding an entry with no specific explanation.
> For the _raw attribute add a bit more info about what x, y and z are
> (basically just say they are from cie1931 (I think?)

I added all sysfs entries which were not present in 5.8-rc6.

Best regards
Christian

 Documentation/ABI/testing/sysfs-bus-iio | 26 ++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

Comments

Jonathan Cameron Aug. 9, 2020, 11:30 a.m. UTC | #1
On Sun, 9 Aug 2020 09:43:35 +0200
Christian Eggers <ceggers@arri.de> wrote:

> The driver for the as73211 light sensor provides the following not yet
> documented sysfs entries:
> - in_intensity_(x|y|z)_raw
> - in_intensity_(x|y|z)_scale
> - in_intensity_sampling_frequency(_available)
> - in_intensity_hardwaregain(_available)
> - in_intensity_integration_time
> 
> Signed-off-by: Christian Eggers <ceggers@arri.de>

Hi Christian,

Just one tiny nitpick.  Otherwise looks good to me!

Thanks for doing this,

Jonathan

> ---
> 
> On Thursday, 6 August 2020, 19:44:51 CEST, Jonathan Cameron wrote:
> Hi Jonathan,
> 
> > Hi Christian,
> > 
> > I'll take this, but please send a follow up patch to add documentation
> > for in_intensity_x_raw and all the other new ABI this adds in
> > Documentation/ABI/testing/sysfs-bus-iio
> > I should have mentioned that earlier, but kind of assumed we already
> > had these documented for some reason!  
> > [...]
> > Insert them into the relevant groups that already exist.  In some cases
> > it will just be adding an entry with no specific explanation.
> > For the _raw attribute add a bit more info about what x, y and z are
> > (basically just say they are from cie1931 (I think?)  
> 
> I added all sysfs entries which were not present in 5.8-rc6.
> 
> Best regards
> Christian
> 
>  Documentation/ABI/testing/sysfs-bus-iio | 26 ++++++++++++++++++++++++-
>  1 file changed, 25 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> index d3e53a6d8331..14ae4bf053c5 100644
> --- a/Documentation/ABI/testing/sysfs-bus-iio
> +++ b/Documentation/ABI/testing/sysfs-bus-iio
> @@ -40,6 +40,7 @@ Description:
>  		buffered samples and events for device X.
>  
>  What:		/sys/bus/iio/devices/iio:deviceX/sampling_frequency
> +What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_sampling_frequency
>  What:		/sys/bus/iio/devices/iio:deviceX/buffer/sampling_frequency
>  What:		/sys/bus/iio/devices/triggerX/sampling_frequency
>  KernelVersion:	2.6.35
> @@ -55,6 +56,7 @@ Description:
>  		then it is to be found in the base device directory.
>  
>  What:		/sys/bus/iio/devices/iio:deviceX/sampling_frequency_available
> +What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_sampling_frequency_available
>  What:		/sys/bus/iio/devices/iio:deviceX/in_proximity_sampling_frequency_available
>  What:		/sys/.../iio:deviceX/buffer/sampling_frequency_available
>  What:		/sys/bus/iio/devices/triggerX/sampling_frequency_available
> @@ -374,6 +376,9 @@ What:		/sys/bus/iio/devices/iio:deviceX/in_velocity_sqrt(x^2+y^2+z^2)_scale
>  What:		/sys/bus/iio/devices/iio:deviceX/in_illuminance_scale
>  What:		/sys/bus/iio/devices/iio:deviceX/in_countY_scale
>  What:		/sys/bus/iio/devices/iio:deviceX/in_angl_scale
> +What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_x_scale
> +What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_y_scale
> +What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_z_scale
>  KernelVersion:	2.6.35
>  Contact:	linux-iio@vger.kernel.org
>  Description:
> @@ -484,6 +489,7 @@ Description:
>  		are listed in this attribute.
>  
>  What		/sys/bus/iio/devices/iio:deviceX/out_voltageY_hardwaregain
> +What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_hardwaregain
>  What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_red_hardwaregain
>  What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_green_hardwaregain
>  What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_blue_hardwaregain
> @@ -494,6 +500,13 @@ Description:
>  		Hardware applied gain factor. If shared across all channels,
>  		<type>_hardwaregain is used.
>  
> +What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_hardwaregain_available
> +KernelVersion:	5.10
> +Contact:	linux-iio@vger.kernel.org
> +Description:
> +		Lists all available hardware applied gain factors. Shared across all
> +		channels.
> +
>  What:		/sys/.../in_accel_filter_low_pass_3db_frequency
>  What:		/sys/.../in_magn_filter_low_pass_3db_frequency
>  What:		/sys/.../in_anglvel_filter_low_pass_3db_frequency
> @@ -1333,6 +1346,7 @@ Description:
>  		standardised CIE Erythemal Action Spectrum. UV index values range
>  		from 0 (low) to >=11 (extreme).
>  
> +What:		/sys/.../iio:deviceX/in_intensity_integration_time
>  What:		/sys/.../iio:deviceX/in_intensity_red_integration_time
>  What:		/sys/.../iio:deviceX/in_intensity_green_integration_time
>  What:		/sys/.../iio:deviceX/in_intensity_blue_integration_time
> @@ -1342,7 +1356,8 @@ KernelVersion:	3.12
>  Contact:	linux-iio@vger.kernel.org
>  Description:
>  		This attribute is used to get/set the integration time in
> -		seconds.
> +		seconds. If shared across all channels, <type>_integration_time
> +		is used.

If it is shared across 'ALL' channels then it will be just integration_time
If it is shared across all channels of a given type, it will be <type>_integration_time.

>  
>  What:		/sys/.../iio:deviceX/in_velocity_sqrt(x^2+y^2+z^2)_integration_time
>  KernelVersion:	4.0
> @@ -1739,3 +1754,12 @@ KernelVersion:	5.5
>  Contact:	linux-iio@vger.kernel.org
>  Description:
>  		One of the following thermocouple types: B, E, J, K, N, R, S, T.
> +
> +What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_x_raw
> +What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_y_raw
> +What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_z_raw
> +KernelVersion:	5.10
> +Contact:	linux-iio@vger.kernel.org
> +Description:
> +		Unscaled light intensity according to CIE 1931/DIN 5033 color space.
> +		Units after application of scale are nano nanowatts per square meter.
Pavel Machek Aug. 10, 2020, 9 a.m. UTC | #2
Hi!

> The driver for the as73211 light sensor provides the following not yet
> documented sysfs entries:
> - in_intensity_(x|y|z)_raw
> - in_intensity_(x|y|z)_scale
> - in_intensity_sampling_frequency(_available)
> - in_intensity_hardwaregain(_available)

Should that be hardware_gain ?
							Pavel



--
Christian Eggers Aug. 10, 2020, 9:57 a.m. UTC | #3
On Monday, 10 August 2020, 11:00:54 CEST, Pavel Machek wrote:
> Hi!
> 
> > The driver for the as73211 light sensor provides the following not yet
> > documented sysfs entries:
> > - in_intensity_(x|y|z)_raw
> > - in_intensity_(x|y|z)_scale
> > - in_intensity_sampling_frequency(_available)
> > - in_intensity_hardwaregain(_available)
> 
> Should that be hardware_gain ?
drivers/iio/industrialio-core.c:
[IIO_CHAN_INFO_HARDWAREGAIN] = "hardwaregain",

> 							
Pavel
regards
Christian
Pavel Machek Aug. 10, 2020, 12:35 p.m. UTC | #4
On Mon 2020-08-10 11:57:46, Christian Eggers wrote:
> On Monday, 10 August 2020, 11:00:54 CEST, Pavel Machek wrote:
> > Hi!
> >
> > > The driver for the as73211 light sensor provides the following not yet
> > > documented sysfs entries:
> > > - in_intensity_(x|y|z)_raw
> > > - in_intensity_(x|y|z)_scale
> > > - in_intensity_sampling_frequency(_available)
> > > - in_intensity_hardwaregain(_available)
> >
> > Should that be hardware_gain ?
> drivers/iio/industrialio-core.c:
> [IIO_CHAN_INFO_HARDWAREGAIN] = "hardwaregain",

Yep. Fix that before people start to really use it.
									Pavel
Christian Eggers Aug. 10, 2020, 1:24 p.m. UTC | #5
Hi Pavel,

On Monday, 10 August 2020, 14:35:40 CEST, Pavel Machek wrote:
> On Mon 2020-08-10 11:57:46, Christian Eggers wrote:
> > On Monday, 10 August 2020, 11:00:54 CEST, Pavel Machek wrote:
> > > Hi!
> > > 
> > > > The driver for the as73211 light sensor provides the following not yet
> > > > documented sysfs entries:
> > > > - in_intensity_(x|y|z)_raw
> > > > - in_intensity_(x|y|z)_scale
> > > > - in_intensity_sampling_frequency(_available)
> > > > - in_intensity_hardwaregain(_available)
> > > 
> > > Should that be hardware_gain ?
> > 
> > drivers/iio/industrialio-core.c:
> > [IIO_CHAN_INFO_HARDWAREGAIN] = "hardwaregain",
> 
> Yep. Fix that before people start to really use it.
it's too late! IIO_CHAN_INFO_HARDWAREGAIN was introduced back in 2012. My 
patch only adds "hardwaregain" in a new context (of "intensity").

> 								
	Pavel

regards
Christian
Jonathan Cameron Aug. 16, 2020, 9:18 a.m. UTC | #6
On Mon, 10 Aug 2020 15:24:39 +0200
Christian Eggers <ceggers@arri.de> wrote:

> Hi Pavel,
> 
> On Monday, 10 August 2020, 14:35:40 CEST, Pavel Machek wrote:
> > On Mon 2020-08-10 11:57:46, Christian Eggers wrote:  
> > > On Monday, 10 August 2020, 11:00:54 CEST, Pavel Machek wrote:  
> > > > Hi!
> > > >  
> > > > > The driver for the as73211 light sensor provides the following not yet
> > > > > documented sysfs entries:
> > > > > - in_intensity_(x|y|z)_raw
> > > > > - in_intensity_(x|y|z)_scale
> > > > > - in_intensity_sampling_frequency(_available)
> > > > > - in_intensity_hardwaregain(_available)  
> > > >
> > > > Should that be hardware_gain ?  
> > >
> > > drivers/iio/industrialio-core.c:
> > > [IIO_CHAN_INFO_HARDWAREGAIN] = "hardwaregain",  
> >
> > Yep. Fix that before people start to really use it.  
> it's too late! IIO_CHAN_INFO_HARDWAREGAIN was introduced back in 2012. My
> patch only adds "hardwaregain" in a new context (of "intensity").

Why do you think that is broken?

It was a deliberate decision to try and stop putting _'s into new
elements because it was making userspace parsing harder.  hardwaregain
is a single 'token' in that file name.

We are stuck with some older forms that predate that decision
and a few that are closely related to existing elements and hence
had to maintain the 'spacing'.  Those have to be special cased
in tokenizing code. We don't want to introduced any more though.

One or two may have snuck through when we weren't awake of course.

Jonathan

> 
> >  
>         Pavel
> 
> regards
> Christian
> 
> 
> 
> 
> ________________________________
>  [http://assets.arri.com/media/sign/2020-04-03-E-mail-signature-Stellar2_V1.jpg] <https://microsites.arri.com/stellar/>
> 
> Get all the latest information from www.arri.com<https://www.arri.com/>, Facebook<https://www.facebook.com/TeamARRI>, Twitter<https://twitter.com/ARRIChannel>, Instagram<https://instagram.com/arri> and YouTube<https://www.youtube.com/user/ARRIChannel>.
> 
> Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
> Sitz: München - Registergericht: Amtsgericht München - Handelsregisternummer: HRA 57918
> Persönlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
> Sitz: München - Registergericht: Amtsgericht München - Handelsregisternummer: HRB 54477
> Geschäftsführer: Dr. Michael Neuhäuser; Stephan Schenk; Walter Trauninger; Markus Zeiler
diff mbox series

Patch

diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index d3e53a6d8331..14ae4bf053c5 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -40,6 +40,7 @@  Description:
 		buffered samples and events for device X.
 
 What:		/sys/bus/iio/devices/iio:deviceX/sampling_frequency
+What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_sampling_frequency
 What:		/sys/bus/iio/devices/iio:deviceX/buffer/sampling_frequency
 What:		/sys/bus/iio/devices/triggerX/sampling_frequency
 KernelVersion:	2.6.35
@@ -55,6 +56,7 @@  Description:
 		then it is to be found in the base device directory.
 
 What:		/sys/bus/iio/devices/iio:deviceX/sampling_frequency_available
+What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_sampling_frequency_available
 What:		/sys/bus/iio/devices/iio:deviceX/in_proximity_sampling_frequency_available
 What:		/sys/.../iio:deviceX/buffer/sampling_frequency_available
 What:		/sys/bus/iio/devices/triggerX/sampling_frequency_available
@@ -374,6 +376,9 @@  What:		/sys/bus/iio/devices/iio:deviceX/in_velocity_sqrt(x^2+y^2+z^2)_scale
 What:		/sys/bus/iio/devices/iio:deviceX/in_illuminance_scale
 What:		/sys/bus/iio/devices/iio:deviceX/in_countY_scale
 What:		/sys/bus/iio/devices/iio:deviceX/in_angl_scale
+What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_x_scale
+What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_y_scale
+What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_z_scale
 KernelVersion:	2.6.35
 Contact:	linux-iio@vger.kernel.org
 Description:
@@ -484,6 +489,7 @@  Description:
 		are listed in this attribute.
 
 What		/sys/bus/iio/devices/iio:deviceX/out_voltageY_hardwaregain
+What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_hardwaregain
 What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_red_hardwaregain
 What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_green_hardwaregain
 What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_blue_hardwaregain
@@ -494,6 +500,13 @@  Description:
 		Hardware applied gain factor. If shared across all channels,
 		<type>_hardwaregain is used.
 
+What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_hardwaregain_available
+KernelVersion:	5.10
+Contact:	linux-iio@vger.kernel.org
+Description:
+		Lists all available hardware applied gain factors. Shared across all
+		channels.
+
 What:		/sys/.../in_accel_filter_low_pass_3db_frequency
 What:		/sys/.../in_magn_filter_low_pass_3db_frequency
 What:		/sys/.../in_anglvel_filter_low_pass_3db_frequency
@@ -1333,6 +1346,7 @@  Description:
 		standardised CIE Erythemal Action Spectrum. UV index values range
 		from 0 (low) to >=11 (extreme).
 
+What:		/sys/.../iio:deviceX/in_intensity_integration_time
 What:		/sys/.../iio:deviceX/in_intensity_red_integration_time
 What:		/sys/.../iio:deviceX/in_intensity_green_integration_time
 What:		/sys/.../iio:deviceX/in_intensity_blue_integration_time
@@ -1342,7 +1356,8 @@  KernelVersion:	3.12
 Contact:	linux-iio@vger.kernel.org
 Description:
 		This attribute is used to get/set the integration time in
-		seconds.
+		seconds. If shared across all channels, <type>_integration_time
+		is used.
 
 What:		/sys/.../iio:deviceX/in_velocity_sqrt(x^2+y^2+z^2)_integration_time
 KernelVersion:	4.0
@@ -1739,3 +1754,12 @@  KernelVersion:	5.5
 Contact:	linux-iio@vger.kernel.org
 Description:
 		One of the following thermocouple types: B, E, J, K, N, R, S, T.
+
+What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_x_raw
+What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_y_raw
+What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_z_raw
+KernelVersion:	5.10
+Contact:	linux-iio@vger.kernel.org
+Description:
+		Unscaled light intensity according to CIE 1931/DIN 5033 color space.
+		Units after application of scale are nano nanowatts per square meter.