staging: iio: light: use regmap in isl29018 for register access
Subsystems (3)
v2 cover staging: iio: light: use regmap in isl29018 for register access
This is patch series for using regmap framework for accessing device register. THe first patch is for using tab for ndenting and second patch is for using regmap apis for register accesses.
Laxman Dewangan (2):
staging: iio: light: convert multiple spaces to tab
staging: iio: light: isl29018: use regmap for register access
drivers/staging/iio/light/Kconfig | 19 ++-- drivers/staging/iio/light/isl29018.c | 176 +++++++++++++++++----------------- 2 files changed, 99 insertions(+), 96 deletions(-)
PATCH v2 1/2 staging: iio: light: convert multiple spaces to tab
Using tab inplace of multiple spaces for indenting.
---
As per Jonathan's feedback, creating this patch for only indenting cleanups.
drivers/staging/iio/light/Kconfig | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)
drivers/staging/iio/light/Kconfig +9 -9
@@ -4,15 +4,15 @@ menu "Light sensors" config SENSORS_ISL29018 - tristate "ISL 29018 light and proximity sensor" - depends on I2C - default n - help - If you say yes here you get support for ambient light sensing and - proximity infrared sensing from Intersil ISL29018. - This driver will provide the measurements of ambient light intensity - in lux, proximity infrared sensing and normal infrared sensing. - Data from sensor is accessible via sysfs. + tristate "ISL 29018 light and proximity sensor" + depends on I2C + default n + help + If you say yes here you get support for ambient light sensing and + proximity infrared sensing from Intersil ISL29018. + This driver will provide the measurements of ambient light intensity + in lux, proximity infrared sensing and normal infrared sensing. + Data from sensor is accessible via sysfs. config SENSORS_ISL29028 tristate "Intersil ISL29028 Concurrent Light and Proximity Sensor"
Signature · 1 line
1.7.1.1
Re: [PATCHi V2 1/2] staging: iio: light: convert multiple spaces to tab
Quoted 3 lines · Laxman Dewangan
Using tab inplace of multiple spaces for indenting.
Signed-off-by Laxman Dewangan<[email protected]>
See I remembered my name this time ;)
Quoted 36 lines
---
As per Jonathan's feedback, creating this patch for only indenting cleanups.drivers/staging/iio/light/Kconfig | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)drivers/staging/iio/light/Kconfig +9
-9@@ -4,15 +4,15 @@ menu "Light sensors" config SENSORS_ISL29018 - tristate "ISL 29018 light and proximity sensor" - depends on I2C - default n - help - If you say yes here you get support for ambient light sensing and - proximity infrared sensing from Intersil ISL29018. - This driver will provide the measurements of ambient light intensity - in lux, proximity infrared sensing and normal infrared sensing. - Data from sensor is accessible via sysfs. + tristate "ISL 29018 light and proximity sensor" + depends on I2C + default n + help + If you say yes here you get support for ambient light sensing and + proximity infrared sensing from Intersil ISL29018. + This driver will provide the measurements of ambient light intensity + in lux, proximity infrared sensing and normal infrared sensing. + Data from sensor is accessible via sysfs. config SENSORS_ISL29028 tristate "Intersil ISL29028 Concurrent Light and Proximity Sensor"
Greg KH
maintainerRe: [PATCHi V2 1/2] staging: iio: light: convert multiple spaces to tab
Quoted 7 lines · Jonathan Cameron
Quoted 3 lines · Laxman Dewangan
Using tab inplace of multiple spaces for indenting.
Signed-off-by Laxman Dewangan<[email protected]>Acked-by Jonathan Cameron <[email protected]>See I remembered my name this time ;)
Thanks, that makes it easier for me to cut and paste :)
PATCH v2 2/2 staging: iio: light: isl29018: use regmap for register access
In reply to Laxman DewanganUsing regmap for accessing register through i2c bus. This will remove the code for caching registers, read-modify-write logics. Also it will provide the debugfs feature to dump register through regmap debugfs.
---
Change from V1:
- Spliting the changes in two patches.
- Separate patch for indenting cleanups.
- Rebased the code on top of -next which have Jonathan's recent changes.
drivers/staging/iio/light/Kconfig | 1 + drivers/staging/iio/light/isl29018.c | 176 +++++++++++++++++----------------- 2 files changed, 90 insertions(+), 87 deletions(-)
drivers/staging/iio/light/Kconfig +1 -0
@@ -6,6 +6,7 @@ menu "Light sensors" config SENSORS_ISL29018 tristate "ISL 29018 light and proximity sensor" depends on I2C + select REGMAP_I2C default n help If you say yes here you get support for ambient light sensing and
drivers/staging/iio/light/isl29018.c +89 -87
365 lines not on this page · raw message
Signature · 1 line
1.7.1.1
Re: [PATCH V2 2/2] staging: iio: light: isl29018: use regmap for register access
drivers/staging/iio/light/isl29018.c static int isl29018_set_resolution(struct i2c_client *client, · line 138
Quoted 11 lines · Laxman Dewangan
[...]
drivers/staging/iio/light/isl29018.c +5
-2-static int isl29018_read_sensor_input (struct i2c_client *client,int mode) +static int isl29018_read_sensor_input (struct isl29018_chip *chip,int mode) { -dev_err (&client->dev,"Error in reading MSB DATA\n" ); + status =regmap_read (chip->regmap,ISL29018_REG_ADD_DATA_MSB , &msb); +if (status <0 ) { +dev_err (chip->dev, +"Error in reading MSB DATA with error %d\n" , status);return msb;
should return status instead of msb.
Quoted 1 line
[...]