iio:light:ltr501: fix variable in ltr501_init
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 iio:light:ltr501: fix regmap dependency
The use of regmap in commit [1] requires REGMAP_I2C to be selected, in order to meet all dependencies.
[1] 2f2c96338afc9f90aa5a0fca04ece1a5c389ee31
"iio: ltr501: Add regmap support."
--- drivers/iio/light/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/iio/light/Kconfig +1 -0
@@ -199,6 +199,7 @@ config SENSORS_LM3533 config LTR501 tristate "LTR-501ALS-01 light sensor" depends on I2C + select REGMAP_I2C select IIO_BUFFER select IIO_TRIGGERED_BUFFER help
Signature · 1 line
2.3.6
Re: [PATCH 1/2] iio:light:ltr501: fix regmap dependency
Quoted 5 lines · Hartmut Knaack
The use of regmap in commit [1] requires
REGMAP_I2Cto be selected, in order to meet all dependencies.[1]
2f2c96338afc9f90aa5a0fca04ece1a5c389ee31
"iio: ltr501: Add regmap support."
The standard way to do this is:
Quoted 2 lines
Signed-off-by Hartmut Knaack <[email protected]>
Otherwise,
Quoted 23 lines
--- drivers/iio/light/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/iio/light/Kconfig +1
-1@@ -199,6 +199,7 @@ config SENSORS_LM3533 config LTR501 tristate "LTR-501ALS-01 light sensor" depends on I2C + select REGMAP_I2C select IIO_BUFFER select IIO_TRIGGERED_BUFFER help --2.3.6
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jonathan Cameron
maintainerRe: [PATCH 1/2] iio:light:ltr501: fix regmap dependency
Quoted 9 lines · Daniel Baluta
Quoted 5 lines · Hartmut Knaack
The use of regmap in commit [1] requires
REGMAP_I2Cto be selected, in order to meet all dependencies.[1]
2f2c96338afc9f90aa5a0fca04ece1a5c389ee31
"iio: ltr501: Add regmap support."The standard way to do this is:
Quoted 8 lines
Fixes 2f2c96338afc ("iio: ltr501: Add regmap support.")Quoted 2 lines
Signed-off-by Hartmut Knaack <[email protected]>Otherwise,
Acked-by Daniel Baluta <[email protected]>
Hmm. My filters had eaten this patch for some reason...
Anyhow, dug it out and applied.
Hopefully nothing else has gone missing!
Jonathan
Quoted 29 lines
Quoted 20 lines
--- drivers/iio/light/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/iio/light/Kconfig +1
-1@@ -199,6 +199,7 @@ config SENSORS_LM3533 config LTR501 tristate "LTR-501ALS-01 light sensor" depends on I2C + select REGMAP_I2C select IIO_BUFFER select IIO_TRIGGERED_BUFFER help --2.3.6
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/2 iio:light:ltr501: fix variable in ltr501_init
In reply to a message not in the archiveWhen filling data->als_contr, the register content read into status needs to be used, instead of the return status value of regmap_read.
This fixes: 8592a7eefa540303dd9e60fa49340d09ca9376b4
"iio: ltr501: Add support for ltr559 chip"
--- drivers/iio/light/ltr501.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/light/ltr501.c +1 -1
@@ -1302,7 +1302,7 @@ static int ltr501_init(struct ltr501_data *data)if (ret <0 )return ret; - data->als_contr = ret | data->chip_info->als_mode_active; + data->als_contr = status | data->chip_info->als_mode_active; ret =regmap_read (data->regmap,LTR501_PS_CONTR , &status);if (ret <0 )
Signature · 1 line
2.3.6
Quoted 6 lines · Hartmut Knaack
When filling
data->als_contr, the register content read into status needs to be used, instead of the return status value ofregmap_read.This fixes:
8592a7eefa540303dd9e60fa49340d09ca9376b4
"iio: ltr501: Add support for ltr559 chip"
Ditto, as per previous patch:
Also, I'm pretty sure that checkpatch.pl should have warned you about this.
Quoted 25 lines
Signed-off-by Hartmut Knaack <[email protected]>--- drivers/iio/light/ltr501.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/light/ltr501.c +1
-2@@ -1302,7 +1302,7 @@ static int ltr501_init(struct ltr501_data *data)if (ret <0 )return ret; - data->als_contr = ret | data->chip_info->als_mode_active; + data->als_contr = status | data->chip_info->als_mode_active; ret =regmap_read (data->regmap,LTR501_PS_CONTR , &status);if (ret <0 ) --2.3.6
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Daniel Baluta schrieb am 29.06.2015 um 09:57:
Quoted 8 lines · Hartmut Knaack
Quoted 6 lines
When filling
data->als_contr, the register content read into status needs to be used, instead of the return status value ofregmap_read.This fixes:
8592a7eefa540303dd9e60fa49340d09ca9376b4
"iio: ltr501: Add support for ltr559 chip"
Quoted 7 lines
Ditto, as per previous patch:
Fixes 8592a7eefa540 ("iio: ltr501: Add support for ltr559 chip")Also, I'm pretty sure that checkpatch.pl should have warned you about this.
Unfortunately it doesn't. But I will keep it in mind.
Quoted 30 lines
Quoted 21 lines
Signed-off-by Hartmut Knaack <[email protected]>--- drivers/iio/light/ltr501.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/light/ltr501.c +1
-2@@ -1302,7 +1302,7 @@ static int ltr501_init(struct ltr501_data *data)if (ret <0 )return ret; - data->als_contr = ret | data->chip_info->als_mode_active; + data->als_contr = status | data->chip_info->als_mode_active; ret =regmap_read (data->regmap,LTR501_PS_CONTR , &status);if (ret <0 ) --2.3.6
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html