Re: [PATCH v2] iio: light: Add support for ROHM RPR0521 sensor

2015-06-11 Thread jic23
Daniel Baluta writes: On Sun, Jun 7, 2015 at 12:08 AM, Jonathan Cameron wrote: On 06/03/2015 09:56 AM, Daniel Baluta wrote: On Thu, May 28, 2015 at 5:17 PM, Daniel Baluta wrote: +static const struct iio_chan_spec rpr0521_channels[] = { + { + .type = IIO_INTENSITY, +

Re: [PATCH v2] iio: light: Add support for ROHM RPR0521 sensor

2015-06-11 Thread Daniel Baluta
On Sun, Jun 7, 2015 at 12:08 AM, Jonathan Cameron wrote: > > > On 06/03/2015 09:56 AM, Daniel Baluta wrote: >> >> On Thu, May 28, 2015 at 5:17 PM, Daniel Baluta >> wrote: >>> >>> >>> >>> +static const struct iio_chan_spec rpr0521_channels[] = { >>> + { >>> + .type = I

Re: [PATCH v2] iio: light: Add support for ROHM RPR0521 sensor

2015-06-06 Thread Jonathan Cameron
On 06/03/2015 09:56 AM, Daniel Baluta wrote: On Thu, May 28, 2015 at 5:17 PM, Daniel Baluta wrote: +static const struct iio_chan_spec rpr0521_channels[] = { + { + .type = IIO_INTENSITY, + .modified = 1, + .address = RPR0521_CHAN_ALS_DATA0, +

Re: [PATCH v2] iio: light: Add support for ROHM RPR0521 sensor

2015-06-03 Thread Daniel Baluta
On Thu, May 28, 2015 at 5:17 PM, Daniel Baluta wrote: > > >>> >> +static const struct iio_chan_spec rpr0521_channels[] = { >>> >> + { >>> >> + .type = IIO_INTENSITY, >>> >> + .modified = 1, >>> >> + .address = RPR0521_CHAN_ALS_DATA0, >>> >> + .c

Re: [PATCH v2] iio: light: Add support for ROHM RPR0521 sensor

2015-05-28 Thread Daniel Baluta
>> >> +static const struct iio_chan_spec rpr0521_channels[] = { >> >> + { >> >> + .type = IIO_INTENSITY, >> >> + .modified = 1, >> >> + .address = RPR0521_CHAN_ALS_DATA0, >> >> + .channel2 = IIO_MOD_LIGHT_BOTH, >> >> + .info_mask_sep

Re: [PATCH v2] iio: light: Add support for ROHM RPR0521 sensor

2015-05-28 Thread Peter Meerwald
> >> +static const struct rpr0521_gain_info { > >> + u8 reg; > >> + u8 mask; > >> + u8 shift; > >> + int *gain; > > > > why not const int *? > > Correct. Will fix. > > > > >> + int size; > >> +} rpr0521_gain[] = { > >> + [RPR0521_CHAN_ALS_DATA0] = { > >> + .re

Re: [PATCH v2] iio: light: Add support for ROHM RPR0521 sensor

2015-05-28 Thread Daniel Baluta
On Thu, May 28, 2015 at 2:35 PM, Peter Meerwald wrote: > On Thu, 28 May 2015, Daniel Baluta wrote: > >> This patch adds support for ROHM RPR0521 ambient light and proximity >> sensor. It offers raw readings for intensity and proximity. > > comments below > >> Signed-off-by: Daniel Baluta >> --- >

Re: [PATCH v2] iio: light: Add support for ROHM RPR0521 sensor

2015-05-28 Thread Peter Meerwald
On Thu, 28 May 2015, Daniel Baluta wrote: > This patch adds support for ROHM RPR0521 ambient light and proximity > sensor. It offers raw readings for intensity and proximity. comments below > Signed-off-by: Daniel Baluta > --- > Changes since v1: (after Jonathan's review) > * add static

[PATCH v2] iio: light: Add support for ROHM RPR0521 sensor

2015-05-28 Thread Daniel Baluta
This patch adds support for ROHM RPR0521 ambient light and proximity sensor. It offers raw readings for intensity and proximity. Signed-off-by: Daniel Baluta --- Changes since v1: (after Jonathan's review) * add static const to some structures * make some local functions static