Re: [PATCH v2 8/8] staging: iio: isl29018: move out of staging

2016-10-15 Thread Brian Masney
On Sat, Oct 15, 2016 at 04:15:57PM +0100, Jonathan Cameron wrote:
> On 10/10/16 08:20, Brian Masney wrote:
> > Move ISL29018/ISL29023/ISL29035 driver out of staging into mainline.
> > 
> > Signed-off-by: Brian Masney 
> Applied to the togreg branch of iio.git and pushed out as testing
> for the autobuilders to play with it.
> 
> Thanks Brian for taking this one on and your hard work on getting
> these last few little issues sorted so it can graduate from staging.

Thanks, Jonathan for all of your feedback. I'm going to send you a patch
set sometime this week against the light/tsl2583.c driver to work
towards eventually moving it out of staging.

I also looked at the light/isl29028.c driver. It doesn't look like it
needs much to move out of staging. A few very minor code style cleanups,
and the device tree documentation. If you have time, could you take a
brief look to see if it needs any major changes? I'll be glad to take on
the grunt work to clean up that driver as well.

Brian

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 8/8] staging: iio: isl29018: move out of staging

2016-10-15 Thread Jonathan Cameron
On 10/10/16 08:20, Brian Masney wrote:
> Move ISL29018/ISL29023/ISL29035 driver out of staging into mainline.
> 
> Signed-off-by: Brian Masney 
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Thanks Brian for taking this one on and your hard work on getting
these last few little issues sorted so it can graduate from staging.

Jonathan
> ---
>  drivers/iio/light/Kconfig|  12 +
>  drivers/iio/light/Makefile   |   1 +
>  drivers/iio/light/isl29018.c | 847 
> +++
>  drivers/staging/iio/light/Kconfig|  12 -
>  drivers/staging/iio/light/Makefile   |   1 -
>  drivers/staging/iio/light/isl29018.c | 847 
> ---
>  6 files changed, 860 insertions(+), 860 deletions(-)
>  create mode 100644 drivers/iio/light/isl29018.c
>  delete mode 100644 drivers/staging/iio/light/isl29018.c
> 
> diff --git a/drivers/iio/light/Kconfig b/drivers/iio/light/Kconfig
> index ba2e64d..d011720 100644
> --- a/drivers/iio/light/Kconfig
> +++ b/drivers/iio/light/Kconfig
> @@ -140,6 +140,18 @@ config GP2AP020A00F
> To compile this driver as a module, choose M here: the
> module will be called gp2ap020a00f.
>  
> +config SENSORS_ISL29018
> + tristate "Intersil 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
> +  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 ISL29125
>   tristate "Intersil ISL29125 digital color light sensor"
>   depends on I2C
> diff --git a/drivers/iio/light/Makefile b/drivers/iio/light/Makefile
> index c5768df..15f24c5 100644
> --- a/drivers/iio/light/Makefile
> +++ b/drivers/iio/light/Makefile
> @@ -17,6 +17,7 @@ obj-$(CONFIG_CM36651)   += cm36651.o
>  obj-$(CONFIG_GP2AP020A00F)   += gp2ap020a00f.o
>  obj-$(CONFIG_HID_SENSOR_ALS) += hid-sensor-als.o
>  obj-$(CONFIG_HID_SENSOR_PROX)+= hid-sensor-prox.o
> +obj-$(CONFIG_SENSORS_ISL29018)   += isl29018.o
>  obj-$(CONFIG_ISL29125)   += isl29125.o
>  obj-$(CONFIG_JSA1212)+= jsa1212.o
>  obj-$(CONFIG_SENSORS_LM3533) += lm3533-als.o
> diff --git a/drivers/iio/light/isl29018.c b/drivers/iio/light/isl29018.c
> new file mode 100644
> index 000..917dd8b
> --- /dev/null
> +++ b/drivers/iio/light/isl29018.c
> @@ -0,0 +1,847 @@
> +/*
> + * A iio driver for the light sensor ISL 29018/29023/29035.
> + *
> + * IIO driver for monitoring ambient light intensity in luxi, proximity
> + * sensing and infrared sensing.
> + *
> + * Copyright (c) 2010, NVIDIA Corporation.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful, but 
> WITHOUT
> + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
> + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
> + * more details.
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define ISL29018_CONV_TIME_MS100
> +
> +#define ISL29018_REG_ADD_COMMAND10x00
> +#define ISL29018_CMD1_OPMODE_SHIFT   5
> +#define ISL29018_CMD1_OPMODE_MASK(7 << ISL29018_CMD1_OPMODE_SHIFT)
> +#define ISL29018_CMD1_OPMODE_POWER_DOWN  0
> +#define ISL29018_CMD1_OPMODE_ALS_ONCE1
> +#define ISL29018_CMD1_OPMODE_IR_ONCE 2
> +#define ISL29018_CMD1_OPMODE_PROX_ONCE   3
> +
> +#define ISL29018_REG_ADD_COMMAND20x01
> +#define ISL29018_CMD2_RESOLUTION_SHIFT   2
> +#define ISL29018_CMD2_RESOLUTION_MASK(0x3 << 
> ISL29018_CMD2_RESOLUTION_SHIFT)
> +
> +#define ISL29018_CMD2_RANGE_SHIFT0
> +#define ISL29018_CMD2_RANGE_MASK (0x3 << ISL29018_CMD2_RANGE_SHIFT)
> +
> +#define ISL29018_CMD2_SCHEME_SHIFT   7
> +#define ISL29018_CMD2_SCHEME_MASK(0x1 << ISL29018_CMD2_SCHEME_SHIFT)
> +
> +#define ISL29018_REG_ADD_DATA_LSB0x02
> +#define ISL29018_REG_ADD_DATA_MSB0x03
> +
> +#define ISL29018_REG_TEST0x08
> +#define ISL29018_TEST_SHIFT  0
> +#define ISL29018_TEST_MASK   (0xFF << ISL29018_TEST_SHIFT)
> +
> +#define ISL29035_REG_DEVICE_ID   0x0F
> +#define ISL29035_DEVICE_ID_SHIFT 0x03
> +#define ISL29035_DEVICE_ID_MASK  (0x7 << 
> ISL29035_DEVICE_ID_SHIFT)
> +#define ISL29035_DEVICE_ID   0x5
> +#define ISL29035_BOUT_SHIFT  0x07
> +#define ISL29035_BOU