Re: [PATCH v3 2/2] staging: iio: isl29028: move out of staging

2017-04-26 Thread Jonathan Cameron
On 26/04/17 06:49, Joe Perches wrote:
> On Wed, 2017-04-26 at 06:30 +0100, Jonathan Cameron wrote:
>> On 25/04/17 02:34, Brian Masney wrote:
>>> Move ISL29028 ALS / Proximity Sensor out of staging and into mainline.
>>>
>>> Signed-off-by: Brian Masney 
> 
> Hey Brian.
> 
> Next time it's better to use git format-patch -M
> to reduce the patch size and show renames.
My fault :)  For patches doing a move of an IIO driver
out of staging I've asked that people don't
use -M to encourage people to do a 'big picture' review
before we move them out of staging. 

This particular one went pretty smoothly, but in some other
staging move patches it's been a different story!

As Brian has done quite a few of these he is getting pretty
good at it ;)

Jonathan
> 
>> Applied to the togreg branch of iio.git
>>
>> Thanks,
>>
>> Jonathan
>>> ---
>>>  drivers/iio/light/Kconfig|  10 +
>>>  drivers/iio/light/Makefile   |   1 +
>>>  drivers/iio/light/isl29028.c | 723 
>>> +++
>>>  drivers/staging/iio/light/Kconfig|  10 -
>>>  drivers/staging/iio/light/Makefile   |   1 -
>>>  drivers/staging/iio/light/isl29028.c | 723 
>>> ---
>>>  6 files changed, 734 insertions(+), 734 deletions(-)
>>>  create mode 100644 drivers/iio/light/isl29028.c
>>>  delete mode 100644 drivers/staging/iio/light/isl29028.c
> 
> [quoted the entire patch]
> 
> And Jonathan, please trim your replies a bit more.
> 
> Thanks.
> 



Re: [PATCH v3 2/2] staging: iio: isl29028: move out of staging

2017-04-26 Thread Jonathan Cameron
On 26/04/17 06:49, Joe Perches wrote:
> On Wed, 2017-04-26 at 06:30 +0100, Jonathan Cameron wrote:
>> On 25/04/17 02:34, Brian Masney wrote:
>>> Move ISL29028 ALS / Proximity Sensor out of staging and into mainline.
>>>
>>> Signed-off-by: Brian Masney 
> 
> Hey Brian.
> 
> Next time it's better to use git format-patch -M
> to reduce the patch size and show renames.
My fault :)  For patches doing a move of an IIO driver
out of staging I've asked that people don't
use -M to encourage people to do a 'big picture' review
before we move them out of staging. 

This particular one went pretty smoothly, but in some other
staging move patches it's been a different story!

As Brian has done quite a few of these he is getting pretty
good at it ;)

Jonathan
> 
>> Applied to the togreg branch of iio.git
>>
>> Thanks,
>>
>> Jonathan
>>> ---
>>>  drivers/iio/light/Kconfig|  10 +
>>>  drivers/iio/light/Makefile   |   1 +
>>>  drivers/iio/light/isl29028.c | 723 
>>> +++
>>>  drivers/staging/iio/light/Kconfig|  10 -
>>>  drivers/staging/iio/light/Makefile   |   1 -
>>>  drivers/staging/iio/light/isl29028.c | 723 
>>> ---
>>>  6 files changed, 734 insertions(+), 734 deletions(-)
>>>  create mode 100644 drivers/iio/light/isl29028.c
>>>  delete mode 100644 drivers/staging/iio/light/isl29028.c
> 
> [quoted the entire patch]
> 
> And Jonathan, please trim your replies a bit more.
> 
> Thanks.
> 



Re: [PATCH v3 2/2] staging: iio: isl29028: move out of staging

2017-04-25 Thread Joe Perches
On Wed, 2017-04-26 at 06:30 +0100, Jonathan Cameron wrote:
> On 25/04/17 02:34, Brian Masney wrote:
> > Move ISL29028 ALS / Proximity Sensor out of staging and into mainline.
> > 
> > Signed-off-by: Brian Masney 

Hey Brian.

Next time it's better to use git format-patch -M
to reduce the patch size and show renames.

> Applied to the togreg branch of iio.git.
> 
> Thanks,
> 
> Jonathan
> > ---
> >  drivers/iio/light/Kconfig|  10 +
> >  drivers/iio/light/Makefile   |   1 +
> >  drivers/iio/light/isl29028.c | 723 
> > +++
> >  drivers/staging/iio/light/Kconfig|  10 -
> >  drivers/staging/iio/light/Makefile   |   1 -
> >  drivers/staging/iio/light/isl29028.c | 723 
> > ---
> >  6 files changed, 734 insertions(+), 734 deletions(-)
> >  create mode 100644 drivers/iio/light/isl29028.c
> >  delete mode 100644 drivers/staging/iio/light/isl29028.c

[quoted the entire patch]

And Jonathan, please trim your replies a bit more.

Thanks.


Re: [PATCH v3 2/2] staging: iio: isl29028: move out of staging

2017-04-25 Thread Joe Perches
On Wed, 2017-04-26 at 06:30 +0100, Jonathan Cameron wrote:
> On 25/04/17 02:34, Brian Masney wrote:
> > Move ISL29028 ALS / Proximity Sensor out of staging and into mainline.
> > 
> > Signed-off-by: Brian Masney 

Hey Brian.

Next time it's better to use git format-patch -M
to reduce the patch size and show renames.

> Applied to the togreg branch of iio.git.
> 
> Thanks,
> 
> Jonathan
> > ---
> >  drivers/iio/light/Kconfig|  10 +
> >  drivers/iio/light/Makefile   |   1 +
> >  drivers/iio/light/isl29028.c | 723 
> > +++
> >  drivers/staging/iio/light/Kconfig|  10 -
> >  drivers/staging/iio/light/Makefile   |   1 -
> >  drivers/staging/iio/light/isl29028.c | 723 
> > ---
> >  6 files changed, 734 insertions(+), 734 deletions(-)
> >  create mode 100644 drivers/iio/light/isl29028.c
> >  delete mode 100644 drivers/staging/iio/light/isl29028.c

[quoted the entire patch]

And Jonathan, please trim your replies a bit more.

Thanks.


Re: [PATCH v3 2/2] staging: iio: isl29028: move out of staging

2017-04-25 Thread Jonathan Cameron
On 25/04/17 02:34, Brian Masney wrote:
> Move ISL29028 ALS / Proximity Sensor out of staging and into mainline.
> 
> Signed-off-by: Brian Masney 
Applied to the togreg branch of iio.git.

Thanks,

Jonathan
> ---
>  drivers/iio/light/Kconfig|  10 +
>  drivers/iio/light/Makefile   |   1 +
>  drivers/iio/light/isl29028.c | 723 
> +++
>  drivers/staging/iio/light/Kconfig|  10 -
>  drivers/staging/iio/light/Makefile   |   1 -
>  drivers/staging/iio/light/isl29028.c | 723 
> ---
>  6 files changed, 734 insertions(+), 734 deletions(-)
>  create mode 100644 drivers/iio/light/isl29028.c
>  delete mode 100644 drivers/staging/iio/light/isl29028.c
> 
> diff --git a/drivers/iio/light/Kconfig b/drivers/iio/light/Kconfig
> index 33e755d..2356ed9 100644
> --- a/drivers/iio/light/Kconfig
> +++ b/drivers/iio/light/Kconfig
> @@ -172,6 +172,16 @@ config SENSORS_ISL29018
>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"
> + depends on I2C
> + select REGMAP_I2C
> + help
> +  Provides driver for the Intersil's ISL29028 device.
> +  This driver supports the sysfs interface to get the ALS, IR intensity,
> +  Proximity value via iio. The ISL29028 provides the concurrent sensing
> +  of ambient light and proximity.
> +
>  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 681363c..fa32fa4 100644
> --- a/drivers/iio/light/Makefile
> +++ b/drivers/iio/light/Makefile
> @@ -20,6 +20,7 @@ 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_SENSORS_ISL29028)   += isl29028.o
>  obj-$(CONFIG_ISL29125)   += isl29125.o
>  obj-$(CONFIG_JSA1212)+= jsa1212.o
>  obj-$(CONFIG_SENSORS_LM3533) += lm3533-als.o
> diff --git a/drivers/iio/light/isl29028.c b/drivers/iio/light/isl29028.c
> new file mode 100644
> index 000..aeb5082
> --- /dev/null
> +++ b/drivers/iio/light/isl29028.c
> @@ -0,0 +1,723 @@
> +/*
> + * IIO driver for the light sensor ISL29028.
> + * ISL29028 is Concurrent Ambient Light and Proximity Sensor
> + *
> + * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
> + * Copyright (c) 2016-2017 Brian Masney 
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms and conditions of the GNU General Public License,
> + * version 2, as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see .
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define ISL29028_CONV_TIME_MS100
> +
> +#define ISL29028_REG_CONFIGURE   0x01
> +
> +#define ISL29028_CONF_ALS_IR_MODE_ALS0
> +#define ISL29028_CONF_ALS_IR_MODE_IR BIT(0)
> +#define ISL29028_CONF_ALS_IR_MODE_MASK   BIT(0)
> +
> +#define ISL29028_CONF_ALS_RANGE_LOW_LUX  0
> +#define ISL29028_CONF_ALS_RANGE_HIGH_LUX BIT(1)
> +#define ISL29028_CONF_ALS_RANGE_MASK BIT(1)
> +
> +#define ISL29028_CONF_ALS_DIS0
> +#define ISL29028_CONF_ALS_EN BIT(2)
> +#define ISL29028_CONF_ALS_EN_MASKBIT(2)
> +
> +#define ISL29028_CONF_PROX_SLP_SH4
> +#define ISL29028_CONF_PROX_SLP_MASK  (7 << ISL29028_CONF_PROX_SLP_SH)
> +
> +#define ISL29028_CONF_PROX_ENBIT(7)
> +#define ISL29028_CONF_PROX_EN_MASK   BIT(7)
> +
> +#define ISL29028_REG_INTERRUPT   0x02
> +
> +#define ISL29028_REG_PROX_DATA   0x08
> +#define ISL29028_REG_ALSIR_L 0x09
> +#define ISL29028_REG_ALSIR_U 0x0A
> +
> +#define ISL29028_REG_TEST1_MODE  0x0E
> +#define ISL29028_REG_TEST2_MODE  0x0F
> +
> +#define ISL29028_NUM_REGS(ISL29028_REG_TEST2_MODE + 1)
> +
> +#define ISL29028_POWER_OFF_DELAY_MS  2000
> +
> +struct isl29028_prox_data {
> + int sampling_int;
> + int sampling_fract;
> + 

Re: [PATCH v3 2/2] staging: iio: isl29028: move out of staging

2017-04-25 Thread Jonathan Cameron
On 25/04/17 02:34, Brian Masney wrote:
> Move ISL29028 ALS / Proximity Sensor out of staging and into mainline.
> 
> Signed-off-by: Brian Masney 
Applied to the togreg branch of iio.git.

Thanks,

Jonathan
> ---
>  drivers/iio/light/Kconfig|  10 +
>  drivers/iio/light/Makefile   |   1 +
>  drivers/iio/light/isl29028.c | 723 
> +++
>  drivers/staging/iio/light/Kconfig|  10 -
>  drivers/staging/iio/light/Makefile   |   1 -
>  drivers/staging/iio/light/isl29028.c | 723 
> ---
>  6 files changed, 734 insertions(+), 734 deletions(-)
>  create mode 100644 drivers/iio/light/isl29028.c
>  delete mode 100644 drivers/staging/iio/light/isl29028.c
> 
> diff --git a/drivers/iio/light/Kconfig b/drivers/iio/light/Kconfig
> index 33e755d..2356ed9 100644
> --- a/drivers/iio/light/Kconfig
> +++ b/drivers/iio/light/Kconfig
> @@ -172,6 +172,16 @@ config SENSORS_ISL29018
>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"
> + depends on I2C
> + select REGMAP_I2C
> + help
> +  Provides driver for the Intersil's ISL29028 device.
> +  This driver supports the sysfs interface to get the ALS, IR intensity,
> +  Proximity value via iio. The ISL29028 provides the concurrent sensing
> +  of ambient light and proximity.
> +
>  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 681363c..fa32fa4 100644
> --- a/drivers/iio/light/Makefile
> +++ b/drivers/iio/light/Makefile
> @@ -20,6 +20,7 @@ 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_SENSORS_ISL29028)   += isl29028.o
>  obj-$(CONFIG_ISL29125)   += isl29125.o
>  obj-$(CONFIG_JSA1212)+= jsa1212.o
>  obj-$(CONFIG_SENSORS_LM3533) += lm3533-als.o
> diff --git a/drivers/iio/light/isl29028.c b/drivers/iio/light/isl29028.c
> new file mode 100644
> index 000..aeb5082
> --- /dev/null
> +++ b/drivers/iio/light/isl29028.c
> @@ -0,0 +1,723 @@
> +/*
> + * IIO driver for the light sensor ISL29028.
> + * ISL29028 is Concurrent Ambient Light and Proximity Sensor
> + *
> + * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
> + * Copyright (c) 2016-2017 Brian Masney 
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms and conditions of the GNU General Public License,
> + * version 2, as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see .
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define ISL29028_CONV_TIME_MS100
> +
> +#define ISL29028_REG_CONFIGURE   0x01
> +
> +#define ISL29028_CONF_ALS_IR_MODE_ALS0
> +#define ISL29028_CONF_ALS_IR_MODE_IR BIT(0)
> +#define ISL29028_CONF_ALS_IR_MODE_MASK   BIT(0)
> +
> +#define ISL29028_CONF_ALS_RANGE_LOW_LUX  0
> +#define ISL29028_CONF_ALS_RANGE_HIGH_LUX BIT(1)
> +#define ISL29028_CONF_ALS_RANGE_MASK BIT(1)
> +
> +#define ISL29028_CONF_ALS_DIS0
> +#define ISL29028_CONF_ALS_EN BIT(2)
> +#define ISL29028_CONF_ALS_EN_MASKBIT(2)
> +
> +#define ISL29028_CONF_PROX_SLP_SH4
> +#define ISL29028_CONF_PROX_SLP_MASK  (7 << ISL29028_CONF_PROX_SLP_SH)
> +
> +#define ISL29028_CONF_PROX_ENBIT(7)
> +#define ISL29028_CONF_PROX_EN_MASK   BIT(7)
> +
> +#define ISL29028_REG_INTERRUPT   0x02
> +
> +#define ISL29028_REG_PROX_DATA   0x08
> +#define ISL29028_REG_ALSIR_L 0x09
> +#define ISL29028_REG_ALSIR_U 0x0A
> +
> +#define ISL29028_REG_TEST1_MODE  0x0E
> +#define ISL29028_REG_TEST2_MODE  0x0F
> +
> +#define ISL29028_NUM_REGS(ISL29028_REG_TEST2_MODE + 1)
> +
> +#define ISL29028_POWER_OFF_DELAY_MS  2000
> +
> +struct isl29028_prox_data {
> + int sampling_int;
> + int sampling_fract;
> + int sleep_time;
> +};
> +
> +static const struct 

[PATCH v3 2/2] staging: iio: isl29028: move out of staging

2017-04-24 Thread Brian Masney
Move ISL29028 ALS / Proximity Sensor out of staging and into mainline.

Signed-off-by: Brian Masney 
---
 drivers/iio/light/Kconfig|  10 +
 drivers/iio/light/Makefile   |   1 +
 drivers/iio/light/isl29028.c | 723 +++
 drivers/staging/iio/light/Kconfig|  10 -
 drivers/staging/iio/light/Makefile   |   1 -
 drivers/staging/iio/light/isl29028.c | 723 ---
 6 files changed, 734 insertions(+), 734 deletions(-)
 create mode 100644 drivers/iio/light/isl29028.c
 delete mode 100644 drivers/staging/iio/light/isl29028.c

diff --git a/drivers/iio/light/Kconfig b/drivers/iio/light/Kconfig
index 33e755d..2356ed9 100644
--- a/drivers/iio/light/Kconfig
+++ b/drivers/iio/light/Kconfig
@@ -172,6 +172,16 @@ config SENSORS_ISL29018
 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"
+   depends on I2C
+   select REGMAP_I2C
+   help
+Provides driver for the Intersil's ISL29028 device.
+This driver supports the sysfs interface to get the ALS, IR intensity,
+Proximity value via iio. The ISL29028 provides the concurrent sensing
+of ambient light and proximity.
+
 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 681363c..fa32fa4 100644
--- a/drivers/iio/light/Makefile
+++ b/drivers/iio/light/Makefile
@@ -20,6 +20,7 @@ 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_SENSORS_ISL29028) += isl29028.o
 obj-$(CONFIG_ISL29125) += isl29125.o
 obj-$(CONFIG_JSA1212)  += jsa1212.o
 obj-$(CONFIG_SENSORS_LM3533)   += lm3533-als.o
diff --git a/drivers/iio/light/isl29028.c b/drivers/iio/light/isl29028.c
new file mode 100644
index 000..aeb5082
--- /dev/null
+++ b/drivers/iio/light/isl29028.c
@@ -0,0 +1,723 @@
+/*
+ * IIO driver for the light sensor ISL29028.
+ * ISL29028 is Concurrent Ambient Light and Proximity Sensor
+ *
+ * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2016-2017 Brian Masney 
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see .
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define ISL29028_CONV_TIME_MS  100
+
+#define ISL29028_REG_CONFIGURE 0x01
+
+#define ISL29028_CONF_ALS_IR_MODE_ALS  0
+#define ISL29028_CONF_ALS_IR_MODE_IR   BIT(0)
+#define ISL29028_CONF_ALS_IR_MODE_MASK BIT(0)
+
+#define ISL29028_CONF_ALS_RANGE_LOW_LUX0
+#define ISL29028_CONF_ALS_RANGE_HIGH_LUX   BIT(1)
+#define ISL29028_CONF_ALS_RANGE_MASK   BIT(1)
+
+#define ISL29028_CONF_ALS_DIS  0
+#define ISL29028_CONF_ALS_EN   BIT(2)
+#define ISL29028_CONF_ALS_EN_MASK  BIT(2)
+
+#define ISL29028_CONF_PROX_SLP_SH  4
+#define ISL29028_CONF_PROX_SLP_MASK(7 << ISL29028_CONF_PROX_SLP_SH)
+
+#define ISL29028_CONF_PROX_EN  BIT(7)
+#define ISL29028_CONF_PROX_EN_MASK BIT(7)
+
+#define ISL29028_REG_INTERRUPT 0x02
+
+#define ISL29028_REG_PROX_DATA 0x08
+#define ISL29028_REG_ALSIR_L   0x09
+#define ISL29028_REG_ALSIR_U   0x0A
+
+#define ISL29028_REG_TEST1_MODE0x0E
+#define ISL29028_REG_TEST2_MODE0x0F
+
+#define ISL29028_NUM_REGS  (ISL29028_REG_TEST2_MODE + 1)
+
+#define ISL29028_POWER_OFF_DELAY_MS2000
+
+struct isl29028_prox_data {
+   int sampling_int;
+   int sampling_fract;
+   int sleep_time;
+};
+
+static const struct isl29028_prox_data isl29028_prox_data[] = {
+   {   1, 25, 800 },
+   {   2, 50, 400 },
+   {   5,  0, 200 },
+   {  10,  0, 100 },
+   {  13, 30,  75 },
+   {  20,  0,  50 },
+   {  80,  0,  13 }, /*
+  * Note: Data sheet lists 12.5 ms 

[PATCH v3 2/2] staging: iio: isl29028: move out of staging

2017-04-24 Thread Brian Masney
Move ISL29028 ALS / Proximity Sensor out of staging and into mainline.

Signed-off-by: Brian Masney 
---
 drivers/iio/light/Kconfig|  10 +
 drivers/iio/light/Makefile   |   1 +
 drivers/iio/light/isl29028.c | 723 +++
 drivers/staging/iio/light/Kconfig|  10 -
 drivers/staging/iio/light/Makefile   |   1 -
 drivers/staging/iio/light/isl29028.c | 723 ---
 6 files changed, 734 insertions(+), 734 deletions(-)
 create mode 100644 drivers/iio/light/isl29028.c
 delete mode 100644 drivers/staging/iio/light/isl29028.c

diff --git a/drivers/iio/light/Kconfig b/drivers/iio/light/Kconfig
index 33e755d..2356ed9 100644
--- a/drivers/iio/light/Kconfig
+++ b/drivers/iio/light/Kconfig
@@ -172,6 +172,16 @@ config SENSORS_ISL29018
 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"
+   depends on I2C
+   select REGMAP_I2C
+   help
+Provides driver for the Intersil's ISL29028 device.
+This driver supports the sysfs interface to get the ALS, IR intensity,
+Proximity value via iio. The ISL29028 provides the concurrent sensing
+of ambient light and proximity.
+
 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 681363c..fa32fa4 100644
--- a/drivers/iio/light/Makefile
+++ b/drivers/iio/light/Makefile
@@ -20,6 +20,7 @@ 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_SENSORS_ISL29028) += isl29028.o
 obj-$(CONFIG_ISL29125) += isl29125.o
 obj-$(CONFIG_JSA1212)  += jsa1212.o
 obj-$(CONFIG_SENSORS_LM3533)   += lm3533-als.o
diff --git a/drivers/iio/light/isl29028.c b/drivers/iio/light/isl29028.c
new file mode 100644
index 000..aeb5082
--- /dev/null
+++ b/drivers/iio/light/isl29028.c
@@ -0,0 +1,723 @@
+/*
+ * IIO driver for the light sensor ISL29028.
+ * ISL29028 is Concurrent Ambient Light and Proximity Sensor
+ *
+ * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2016-2017 Brian Masney 
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see .
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define ISL29028_CONV_TIME_MS  100
+
+#define ISL29028_REG_CONFIGURE 0x01
+
+#define ISL29028_CONF_ALS_IR_MODE_ALS  0
+#define ISL29028_CONF_ALS_IR_MODE_IR   BIT(0)
+#define ISL29028_CONF_ALS_IR_MODE_MASK BIT(0)
+
+#define ISL29028_CONF_ALS_RANGE_LOW_LUX0
+#define ISL29028_CONF_ALS_RANGE_HIGH_LUX   BIT(1)
+#define ISL29028_CONF_ALS_RANGE_MASK   BIT(1)
+
+#define ISL29028_CONF_ALS_DIS  0
+#define ISL29028_CONF_ALS_EN   BIT(2)
+#define ISL29028_CONF_ALS_EN_MASK  BIT(2)
+
+#define ISL29028_CONF_PROX_SLP_SH  4
+#define ISL29028_CONF_PROX_SLP_MASK(7 << ISL29028_CONF_PROX_SLP_SH)
+
+#define ISL29028_CONF_PROX_EN  BIT(7)
+#define ISL29028_CONF_PROX_EN_MASK BIT(7)
+
+#define ISL29028_REG_INTERRUPT 0x02
+
+#define ISL29028_REG_PROX_DATA 0x08
+#define ISL29028_REG_ALSIR_L   0x09
+#define ISL29028_REG_ALSIR_U   0x0A
+
+#define ISL29028_REG_TEST1_MODE0x0E
+#define ISL29028_REG_TEST2_MODE0x0F
+
+#define ISL29028_NUM_REGS  (ISL29028_REG_TEST2_MODE + 1)
+
+#define ISL29028_POWER_OFF_DELAY_MS2000
+
+struct isl29028_prox_data {
+   int sampling_int;
+   int sampling_fract;
+   int sleep_time;
+};
+
+static const struct isl29028_prox_data isl29028_prox_data[] = {
+   {   1, 25, 800 },
+   {   2, 50, 400 },
+   {   5,  0, 200 },
+   {  10,  0, 100 },
+   {  13, 30,  75 },
+   {  20,  0,  50 },
+   {  80,  0,  13 }, /*
+  * Note: Data sheet lists 12.5 ms sleep time.
+  *