Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-10 Thread Eva Rachel Retuya
On Tue, May 02, 2017 at 05:32:07PM +0100, Jonathan Cameron wrote: > On 02/05/17 12:39, Eva Rachel Retuya wrote: > > On Mon, May 01, 2017 at 01:22:52AM +0100, Jonathan Cameron wrote: > > Hello Jonathan, > > [...] > >>> +static int adxl345_set_mode(struct adxl345_data *data, u8 mode) > >>> +{ > >>>

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-10 Thread Eva Rachel Retuya
On Tue, May 02, 2017 at 05:32:07PM +0100, Jonathan Cameron wrote: > On 02/05/17 12:39, Eva Rachel Retuya wrote: > > On Mon, May 01, 2017 at 01:22:52AM +0100, Jonathan Cameron wrote: > > Hello Jonathan, > > [...] > >>> +static int adxl345_set_mode(struct adxl345_data *data, u8 mode) > >>> +{ > >>>

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-02 Thread Jonathan Cameron
On 02/05/17 12:39, Eva Rachel Retuya wrote: > On Mon, May 01, 2017 at 01:22:52AM +0100, Jonathan Cameron wrote: > Hello Jonathan, > [...] >>> +static int adxl345_set_mode(struct adxl345_data *data, u8 mode) >>> +{ >>> + struct device *dev = regmap_get_device(data->regmap); >>> + int ret; >>> +

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-02 Thread Jonathan Cameron
On 02/05/17 12:39, Eva Rachel Retuya wrote: > On Mon, May 01, 2017 at 01:22:52AM +0100, Jonathan Cameron wrote: > Hello Jonathan, > [...] >>> +static int adxl345_set_mode(struct adxl345_data *data, u8 mode) >>> +{ >>> + struct device *dev = regmap_get_device(data->regmap); >>> + int ret; >>> +

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-02 Thread Eva Rachel Retuya
On Mon, May 01, 2017 at 02:21:02PM +0300, Andy Shevchenko wrote: [...] > Couple of minors below. > Otherwise, FWIW: > Reviewed-by: Andy Shevchenko > Hello Andy, > > +static int adxl345_data_ready(struct adxl345_data *data) > > +{ > > + struct device *dev =

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-02 Thread Eva Rachel Retuya
On Mon, May 01, 2017 at 02:21:02PM +0300, Andy Shevchenko wrote: [...] > Couple of minors below. > Otherwise, FWIW: > Reviewed-by: Andy Shevchenko > Hello Andy, > > +static int adxl345_data_ready(struct adxl345_data *data) > > +{ > > + struct device *dev =

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-02 Thread Eva Rachel Retuya
On Mon, May 01, 2017 at 01:22:52AM +0100, Jonathan Cameron wrote: Hello Jonathan, [...] > > +static int adxl345_set_mode(struct adxl345_data *data, u8 mode) > > +{ > > + struct device *dev = regmap_get_device(data->regmap); > > + int ret; > > + > > + ret = regmap_write(data->regmap,

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-02 Thread Eva Rachel Retuya
On Mon, May 01, 2017 at 01:22:52AM +0100, Jonathan Cameron wrote: Hello Jonathan, [...] > > +static int adxl345_set_mode(struct adxl345_data *data, u8 mode) > > +{ > > + struct device *dev = regmap_get_device(data->regmap); > > + int ret; > > + > > + ret = regmap_write(data->regmap,

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-01 Thread Jonathan Cameron
On 1 May 2017 21:07:44 BST, Andy Shevchenko wrote: >On Mon, May 1, 2017 at 10:48 PM, Jonathan Cameron > wrote: >> On 1 May 2017 20:42:08 BST, Andy Shevchenko > wrote: >>>On Mon, May 1, 2017 at 3:22 AM, Jonathan

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-01 Thread Jonathan Cameron
On 1 May 2017 21:07:44 BST, Andy Shevchenko wrote: >On Mon, May 1, 2017 at 10:48 PM, Jonathan Cameron > wrote: >> On 1 May 2017 20:42:08 BST, Andy Shevchenko > wrote: >>>On Mon, May 1, 2017 at 3:22 AM, Jonathan Cameron >>>wrote: On 29/04/17 08:48, Eva Rachel Retuya wrote: >>> >

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-01 Thread Andy Shevchenko
On Mon, May 1, 2017 at 10:48 PM, Jonathan Cameron wrote: > On 1 May 2017 20:42:08 BST, Andy Shevchenko wrote: >>On Mon, May 1, 2017 at 3:22 AM, Jonathan Cameron >>wrote: >>> On 29/04/17 08:48, Eva Rachel Retuya wrote: >>

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-01 Thread Andy Shevchenko
On Mon, May 1, 2017 at 10:48 PM, Jonathan Cameron wrote: > On 1 May 2017 20:42:08 BST, Andy Shevchenko wrote: >>On Mon, May 1, 2017 at 3:22 AM, Jonathan Cameron >>wrote: >>> On 29/04/17 08:48, Eva Rachel Retuya wrote: >> +static int adxl345_set_mode(struct adxl345_data *data, u8 mode)

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-01 Thread Jonathan Cameron
On 1 May 2017 20:42:08 BST, Andy Shevchenko wrote: >On Mon, May 1, 2017 at 3:22 AM, Jonathan Cameron >wrote: >> On 29/04/17 08:48, Eva Rachel Retuya wrote: > >>> +static int adxl345_set_mode(struct adxl345_data *data, u8 mode) >>> +{ >>> +

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-01 Thread Jonathan Cameron
On 1 May 2017 20:42:08 BST, Andy Shevchenko wrote: >On Mon, May 1, 2017 at 3:22 AM, Jonathan Cameron >wrote: >> On 29/04/17 08:48, Eva Rachel Retuya wrote: > >>> +static int adxl345_set_mode(struct adxl345_data *data, u8 mode) >>> +{ >>> + struct device *dev =

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-01 Thread Andy Shevchenko
On Mon, May 1, 2017 at 3:22 AM, Jonathan Cameron wrote: > On 29/04/17 08:48, Eva Rachel Retuya wrote: >> +static int adxl345_set_mode(struct adxl345_data *data, u8 mode) >> +{ >> + struct device *dev = regmap_get_device(data->regmap); >> + int ret; >> + >> + ret =

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-01 Thread Andy Shevchenko
On Mon, May 1, 2017 at 3:22 AM, Jonathan Cameron wrote: > On 29/04/17 08:48, Eva Rachel Retuya wrote: >> +static int adxl345_set_mode(struct adxl345_data *data, u8 mode) >> +{ >> + struct device *dev = regmap_get_device(data->regmap); >> + int ret; >> + >> + ret =

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-01 Thread Andy Shevchenko
On Sat, Apr 29, 2017 at 10:48 AM, Eva Rachel Retuya wrote: > Move code that enables measurement/standby mode into its own function > and call that function when appropriate. Previously, we set the sensor > to measurement in probe and back to standby during remove. Change it >

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-05-01 Thread Andy Shevchenko
On Sat, Apr 29, 2017 at 10:48 AM, Eva Rachel Retuya wrote: > Move code that enables measurement/standby mode into its own function > and call that function when appropriate. Previously, we set the sensor > to measurement in probe and back to standby during remove. Change it > here to only enter

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-04-30 Thread Jonathan Cameron
On 29/04/17 08:48, Eva Rachel Retuya wrote: > Move code that enables measurement/standby mode into its own function > and call that function when appropriate. Previously, we set the sensor > to measurement in probe and back to standby during remove. Change it > here to only enter measurement mode

Re: [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-04-30 Thread Jonathan Cameron
On 29/04/17 08:48, Eva Rachel Retuya wrote: > Move code that enables measurement/standby mode into its own function > and call that function when appropriate. Previously, we set the sensor > to measurement in probe and back to standby during remove. Change it > here to only enter measurement mode

[PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-04-29 Thread Eva Rachel Retuya
Move code that enables measurement/standby mode into its own function and call that function when appropriate. Previously, we set the sensor to measurement in probe and back to standby during remove. Change it here to only enter measurement mode when request for data is initiated. The DATA_READY

[PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions

2017-04-29 Thread Eva Rachel Retuya
Move code that enables measurement/standby mode into its own function and call that function when appropriate. Previously, we set the sensor to measurement in probe and back to standby during remove. Change it here to only enter measurement mode when request for data is initiated. The DATA_READY