Re: [PATCH 11/12] staging: iio: tsl2x7x: remove unnecessary sysfs attribute

2018-03-10 Thread Jonathan Cameron
On Sat,  3 Mar 2018 20:49:41 -0500
Brian Masney  wrote:

> The tsl2771 and tmd2771 devices create the
> in_proximity0_calibscale_available sysfs attribute. These two particular
> devices do not support changing the proximity gain value on the
> chip so this patch removes that sysfs attribute. As expected, these two
> devices already did not create the IIO_CHAN_INFO_CALIBSCALE channel and
> proximity0_calibrate sysfs attribute.
> 
> Page 38 of the tsl2772 data sheet shows that the proximity gain can be
> adjusted with bits 2-3 on the control register:
> https://ams.com/eng/content/download/291503/1066377/file/TSL2772_DS000181_2-00.pdf
> 
> Page 35 of the tsl2771 and tmd2771 data sheets shows that bits 2-3 on
> the control register are reserved and changing the proximity gain is
> not supported:
> https://ams.com/eng/content/download/250264/976045/file/TSL2771_DS000105_3-00.pdf
> https://ams.com/eng/content/download/250283/976077/file/TMD2771_DS000177_2-00.pdf
> 
> Signed-off-by: Brian Masney 
This one applied without the previous so I have done so.

Applied.

Thanks,

Jonathan

> ---
>  drivers/staging/iio/light/tsl2x7x.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/light/tsl2x7x.c 
> b/drivers/staging/iio/light/tsl2x7x.c
> index fb91c46c8747..8c29a52153c1 100644
> --- a/drivers/staging/iio/light/tsl2x7x.c
> +++ b/drivers/staging/iio/light/tsl2x7x.c
> @@ -1477,7 +1477,6 @@ static struct attribute *tsl2x7x_ALSPRX_device_attrs[] 
> = {
>   _attr_in_illuminance0_target_input.attr,
>   _attr_in_illuminance0_calibrate.attr,
>   _attr_in_illuminance0_lux_table.attr,
> - _const_attr_in_proximity0_calibscale_available.dev_attr.attr,
>   NULL
>  };
>  



Re: [PATCH 11/12] staging: iio: tsl2x7x: remove unnecessary sysfs attribute

2018-03-10 Thread Jonathan Cameron
On Sat,  3 Mar 2018 20:49:41 -0500
Brian Masney  wrote:

> The tsl2771 and tmd2771 devices create the
> in_proximity0_calibscale_available sysfs attribute. These two particular
> devices do not support changing the proximity gain value on the
> chip so this patch removes that sysfs attribute. As expected, these two
> devices already did not create the IIO_CHAN_INFO_CALIBSCALE channel and
> proximity0_calibrate sysfs attribute.
> 
> Page 38 of the tsl2772 data sheet shows that the proximity gain can be
> adjusted with bits 2-3 on the control register:
> https://ams.com/eng/content/download/291503/1066377/file/TSL2772_DS000181_2-00.pdf
> 
> Page 35 of the tsl2771 and tmd2771 data sheets shows that bits 2-3 on
> the control register are reserved and changing the proximity gain is
> not supported:
> https://ams.com/eng/content/download/250264/976045/file/TSL2771_DS000105_3-00.pdf
> https://ams.com/eng/content/download/250283/976077/file/TMD2771_DS000177_2-00.pdf
> 
> Signed-off-by: Brian Masney 
This one applied without the previous so I have done so.

Applied.

Thanks,

Jonathan

> ---
>  drivers/staging/iio/light/tsl2x7x.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/light/tsl2x7x.c 
> b/drivers/staging/iio/light/tsl2x7x.c
> index fb91c46c8747..8c29a52153c1 100644
> --- a/drivers/staging/iio/light/tsl2x7x.c
> +++ b/drivers/staging/iio/light/tsl2x7x.c
> @@ -1477,7 +1477,6 @@ static struct attribute *tsl2x7x_ALSPRX_device_attrs[] 
> = {
>   _attr_in_illuminance0_target_input.attr,
>   _attr_in_illuminance0_calibrate.attr,
>   _attr_in_illuminance0_lux_table.attr,
> - _const_attr_in_proximity0_calibscale_available.dev_attr.attr,
>   NULL
>  };
>  



[PATCH 11/12] staging: iio: tsl2x7x: remove unnecessary sysfs attribute

2018-03-03 Thread Brian Masney
The tsl2771 and tmd2771 devices create the
in_proximity0_calibscale_available sysfs attribute. These two particular
devices do not support changing the proximity gain value on the
chip so this patch removes that sysfs attribute. As expected, these two
devices already did not create the IIO_CHAN_INFO_CALIBSCALE channel and
proximity0_calibrate sysfs attribute.

Page 38 of the tsl2772 data sheet shows that the proximity gain can be
adjusted with bits 2-3 on the control register:
https://ams.com/eng/content/download/291503/1066377/file/TSL2772_DS000181_2-00.pdf

Page 35 of the tsl2771 and tmd2771 data sheets shows that bits 2-3 on
the control register are reserved and changing the proximity gain is
not supported:
https://ams.com/eng/content/download/250264/976045/file/TSL2771_DS000105_3-00.pdf
https://ams.com/eng/content/download/250283/976077/file/TMD2771_DS000177_2-00.pdf

Signed-off-by: Brian Masney 
---
 drivers/staging/iio/light/tsl2x7x.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/iio/light/tsl2x7x.c 
b/drivers/staging/iio/light/tsl2x7x.c
index fb91c46c8747..8c29a52153c1 100644
--- a/drivers/staging/iio/light/tsl2x7x.c
+++ b/drivers/staging/iio/light/tsl2x7x.c
@@ -1477,7 +1477,6 @@ static struct attribute *tsl2x7x_ALSPRX_device_attrs[] = {
_attr_in_illuminance0_target_input.attr,
_attr_in_illuminance0_calibrate.attr,
_attr_in_illuminance0_lux_table.attr,
-   _const_attr_in_proximity0_calibscale_available.dev_attr.attr,
NULL
 };
 
-- 
2.14.3



[PATCH 11/12] staging: iio: tsl2x7x: remove unnecessary sysfs attribute

2018-03-03 Thread Brian Masney
The tsl2771 and tmd2771 devices create the
in_proximity0_calibscale_available sysfs attribute. These two particular
devices do not support changing the proximity gain value on the
chip so this patch removes that sysfs attribute. As expected, these two
devices already did not create the IIO_CHAN_INFO_CALIBSCALE channel and
proximity0_calibrate sysfs attribute.

Page 38 of the tsl2772 data sheet shows that the proximity gain can be
adjusted with bits 2-3 on the control register:
https://ams.com/eng/content/download/291503/1066377/file/TSL2772_DS000181_2-00.pdf

Page 35 of the tsl2771 and tmd2771 data sheets shows that bits 2-3 on
the control register are reserved and changing the proximity gain is
not supported:
https://ams.com/eng/content/download/250264/976045/file/TSL2771_DS000105_3-00.pdf
https://ams.com/eng/content/download/250283/976077/file/TMD2771_DS000177_2-00.pdf

Signed-off-by: Brian Masney 
---
 drivers/staging/iio/light/tsl2x7x.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/iio/light/tsl2x7x.c 
b/drivers/staging/iio/light/tsl2x7x.c
index fb91c46c8747..8c29a52153c1 100644
--- a/drivers/staging/iio/light/tsl2x7x.c
+++ b/drivers/staging/iio/light/tsl2x7x.c
@@ -1477,7 +1477,6 @@ static struct attribute *tsl2x7x_ALSPRX_device_attrs[] = {
_attr_in_illuminance0_target_input.attr,
_attr_in_illuminance0_calibrate.attr,
_attr_in_illuminance0_lux_table.attr,
-   _const_attr_in_proximity0_calibscale_available.dev_attr.attr,
NULL
 };
 
-- 
2.14.3