linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] max44000: Remove scale from proximity
@ 2016-05-20 14:44 Crestez Dan Leonard
  2016-05-21 19:21 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Crestez Dan Leonard @ 2016-05-20 14:44 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio
  Cc: linux-kernel, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Daniel Baluta, Crestez Dan Leonard

This is not implemented and doesn't really make sense because IIO
proximity is unit-less.

Remove IIO_CHAN_INFO_SCALE from info_mask because so that the _scale
sysfs entry won't appear. This fixes userspace tools like generic_buffer
which abort when reads returns an error.

Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
---
 drivers/iio/light/max44000.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/iio/light/max44000.c b/drivers/iio/light/max44000.c
index e01e58a..f17cb2e 100644
--- a/drivers/iio/light/max44000.c
+++ b/drivers/iio/light/max44000.c
@@ -147,7 +147,6 @@ static const struct iio_chan_spec max44000_channels[] = {
 	{
 		.type = IIO_PROXIMITY,
 		.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
-		.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
 		.scan_index = MAX44000_SCAN_INDEX_PRX,
 		.scan_type = {
 			.sign		= 'u',
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] max44000: Remove scale from proximity
  2016-05-20 14:44 [PATCH] max44000: Remove scale from proximity Crestez Dan Leonard
@ 2016-05-21 19:21 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2016-05-21 19:21 UTC (permalink / raw)
  To: Crestez Dan Leonard, linux-iio
  Cc: linux-kernel, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Daniel Baluta

On 20/05/16 15:44, Crestez Dan Leonard wrote:
> This is not implemented and doesn't really make sense because IIO
> proximity is unit-less.
> 
> Remove IIO_CHAN_INFO_SCALE from info_mask because so that the _scale
> sysfs entry won't appear. This fixes userspace tools like generic_buffer
> which abort when reads returns an error.
> 
Applied to the fixes-togreg-post-rc1 branch of iio.git.

Thanks,

Jonathan
> Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
> ---
>  drivers/iio/light/max44000.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/iio/light/max44000.c b/drivers/iio/light/max44000.c
> index e01e58a..f17cb2e 100644
> --- a/drivers/iio/light/max44000.c
> +++ b/drivers/iio/light/max44000.c
> @@ -147,7 +147,6 @@ static const struct iio_chan_spec max44000_channels[] = {
>  	{
>  		.type = IIO_PROXIMITY,
>  		.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
> -		.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
>  		.scan_index = MAX44000_SCAN_INDEX_PRX,
>  		.scan_type = {
>  			.sign		= 'u',
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-21 19:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-20 14:44 [PATCH] max44000: Remove scale from proximity Crestez Dan Leonard
2016-05-21 19:21 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).