[PATCH v3] iwlwifi: dvm: use alloc_ordered_workqueue()

2016-03-18 Thread Eva Rachel Retuya
trict execution ordering of a single threaded (ST) workqueue by switching to alloc_ordered_workqueue(). WQ_MEM_RECLAIM flag is not needed since the worker is not depended during memory reclaim. Signed-off-by: Eva Rachel Retuya Acked-by: Tejun Heo --- Changes in v3: * revise commit message about WQ_MEM_RE

[PATCH v2] iio: accel: Add driver for the Analog Devices ADXL345 3-axis accelerometer

2017-01-30 Thread Eva Rachel Retuya
Add basic IIO support for the Analog Devices ADXL345 3-axis accelerometer. The datasheet can be found here: http://www.analog.com/media/en/technical-documentation/data-sheets/ADXL345.pdf Signed-off-by: Eva Rachel Retuya Cc: Michael Hennerich Cc: Daniel Baluta Cc: Alison Schofield --- v1

[PATCH v4] staging: iio: ad7606: replace range/range_available with corresponding scale

2017-01-07 Thread Eva Rachel Retuya
Eliminate the non-standard attributes in_voltage_range and in_voltage_range_available. Implement in_voltage_scale_available in place of these attributes and update the SCALE accordingly. The array scale_avail is introduced to hold the available scale values. Signed-off-by: Eva Rachel Retuya

[PATCH v3] staging: iio: cdc: ad7746: add additional config defines

2016-10-28 Thread Eva Rachel Retuya
Introduce defines for shifting and mask under the config register for better readability. Also, introduce helper variables for index calculation. Signed-off-by: Eva Rachel Retuya --- This patch might cause a conflict with this patch: staging: iio: cdc/ad7746: fix missing return value https

Re: [PATCH] staging: iio: ad9832: allocate data before using

2016-11-08 Thread Eva Rachel Retuya
On Tue, Nov 08, 2016 at 03:00:49PM +0100, Arnd Bergmann wrote: > The regulator changes assigned data to an uninitialized pointer: > > drivers/staging/iio/frequency/ad9832.c: In function 'ad9832_probe': > drivers/staging/iio/frequency/ad9832.c:214:11: error: 'st' may be used > uninitialized in thi

[PATCH 1/2] staging: iio: ad7606: replace range/range_available with corresponding scale

2016-11-10 Thread Eva Rachel Retuya
-by: Lars-Peter Clausen Signed-off-by: Eva Rachel Retuya --- drivers/staging/iio/adc/ad7606.c | 56 1 file changed, 16 insertions(+), 40 deletions(-) diff --git a/drivers/staging/iio/adc/ad7606.c b/drivers/staging/iio/adc/ad7606.c index 4531908..cceb18c

[PATCH 2/2] staging: iio: ad7606: move out of staging

2016-11-10 Thread Eva Rachel Retuya
Move the ad7606 driver from staging/iio/adc to iio/adc. Also, update the corresponding Makefile and Kconfig associated with the change. Signed-off-by: Eva Rachel Retuya --- drivers/iio/adc/Kconfig | 34 +++ drivers/iio/adc/Makefile | 3 + drivers/iio/adc/ad7606.c

[PATCH 0/2] staging: iio: ad7606: move driver out of staging

2016-11-10 Thread Eva Rachel Retuya
Address the last remaining TODO [1] for this driver and move it from staging into mainline. [1] https://marc.info/?l=linux-iio&m=147689684332118&w=2 Eva Rachel Retuya (2): staging: iio: ad7606: replace range/range_available with corresponding scale staging: iio: ad7606: mov

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

2016-11-12 Thread Eva Rachel Retuya
On Sat, Nov 12, 2016 at 02:26:51PM +, Jonathan Cameron wrote: > On 11/11/16 14:22, Lars-Peter Clausen wrote: > > On 11/11/2016 07:34 AM, Eva Rachel Retuya wrote: > >> Move the ad7606 driver from staging/iio/adc to iio/adc. Also, update the > >> corresponding Make

Re: [PATCH 1/2] staging: iio: ad7606: replace range/range_available with corresponding scale

2016-11-12 Thread Eva Rachel Retuya
Hello, Thanks for explaining it. Now I understand better why read_raw is formatted in that manner. I have some questions in-line: On Fri, Nov 11, 2016 at 03:18:37PM +0100, Lars-Peter Clausen wrote: > On 11/11/2016 07:34 AM, Eva Rachel Retuya wrote: > > Eliminate the non-standard

Re: [PATCH v3] staging: iio: cdc: ad7746: add additional config defines

2016-10-31 Thread Eva Rachel Retuya
On Sun, Oct 30, 2016 at 06:49:00PM +, Jonathan Cameron wrote: > On 30/10/16 17:46, Lars-Peter Clausen wrote: > > On 10/30/2016 06:41 PM, Jonathan Cameron wrote: > >> On 28/10/16 09:26, Eva Rachel Retuya wrote: > >>> Introduce defines for shifting and mask

Re: [PATCH v3] staging: iio: cdc: ad7746: add additional config defines

2016-10-31 Thread Eva Rachel Retuya
On Mon, Oct 31, 2016 at 03:49:01PM +0800, Eva Rachel Retuya wrote: > On Sun, Oct 30, 2016 at 06:49:00PM +, Jonathan Cameron wrote: > > On 30/10/16 17:46, Lars-Peter Clausen wrote: > > > On 10/30/2016 06:41 PM, Jonathan Cameron wrote: > > >> On 28/10/16

[PATCH 0/6] staging: iio: regulator clean-up

2016-10-31 Thread Eva Rachel Retuya
)) { ... PTR_ERR(reg) ... } @@ position p != r1.p; @@ * \(devm_regulator_get@p\|regulator_get@p\)(...) Eva Rachel Retuya (6): staging: iio: set proper supply name to devm_regulator_get() staging: iio: rework regulator handling staging: iio: ad7192: add DVdd regulator

[PATCH 2/6] staging: iio: rework regulator handling

2016-10-31 Thread Eva Rachel Retuya
ator_get_voltage(reg); ) @r2@ expression arg; @@ - if (!IS_ERR(arg)) regulator_disable(arg); + regulator_disable(arg); Hand-edit the debugging prints with the supply name to become more specific. Suggested-by: Lars-Peter Clausen Signed-off-by: Eva Rachel Retuya --- drivers/stag

[PATCH 4/6] staging: iio: ad7192: rename regulator 'reg' to 'avdd'

2016-10-31 Thread Eva Rachel Retuya
Rename regulator 'reg' to 'avdd' so as to be clear what regulator it stands for specifically. Also, update the goto label accordingly. Signed-off-by: Eva Rachel Retuya --- drivers/staging/iio/adc/ad7192.c | 22 +++--- 1 file changed, 11 insertions(+), 11 dele

[PATCH 6/6] staging: iio: ad9832: clean-up regulator 'reg'

2016-10-31 Thread Eva Rachel Retuya
Rename regulator 'reg' to 'avdd' so as to be clear what regulator it stands for specifically. Additionally, get rid of local variable 'reg' and use direct assignment instead. Update also the goto label pertaining to the avdd regulator during disable. Signed-off-by: E

[PATCH 5/6] staging: iio: ad9832: add DVDD regulator

2016-10-31 Thread Eva Rachel Retuya
The AD9832/AD9835 is supplied with two power sources: AVDD as analog supply voltage and DVDD as digital supply voltage. Attempt to fetch and enable the regulator 'dvdd'. Bail out if any error occurs. Suggested-by: Lars-Peter Clausen Signed-off-by: Eva Rachel Retuya --- drivers/s

[PATCH 1/6] staging: iio: set proper supply name to devm_regulator_get()

2016-10-31 Thread Eva Rachel Retuya
#x27;. Use lowercase version of the datasheet name to specify the supply voltage. Suggested-by: Lars-Peter Clausen Signed-off-by: Eva Rachel Retuya --- drivers/staging/iio/adc/ad7192.c| 2 +- drivers/staging/iio/adc/ad7780.c| 2 +- drivers/staging/iio/frequency/ad9832.c

[PATCH 3/6] staging: iio: ad7192: add DVdd regulator

2016-10-31 Thread Eva Rachel Retuya
The AD7190/AD7192/AD7193/AD7195 is supplied with two power sources: AVdd as analog supply voltage and DVdd as digital supply voltage. Attempt to fetch and enable the regulator 'dvdd'. Bail out if any error occurs. Suggested-by: Lars-Peter Clausen Signed-off-by: Eva Rachel Retuya --

Re: [PATCH] staging: iio: cdc/ad7746: fix missing return value

2016-10-26 Thread Eva Rachel Retuya
On Tue, Oct 25, 2016 at 05:27:07PM +0100, Jonathan Cameron wrote: > On 25/10/16 16:56, Arnd Bergmann wrote: > > As found by "gcc -Wmaybe-uninitialized", the latest change to the > > driver lacked an initalization for the return code in one of the > > added cases: > > > > drivers/staging/iio/cdc/ad

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

2017-01-04 Thread Eva Rachel Retuya
On Fri, Dec 30, 2016 at 08:16:02PM +, Jonathan Cameron wrote: > On 11/12/16 02:47, Eva Rachel Retuya wrote: > > Move the ad7606 driver from staging/iio/adc to iio/adc. Also, update the > > corresponding Makefile and Kconfig associated with the change. > > > > Signe

Re: [PATCH] staging: iio: ad9832:

2016-11-19 Thread Eva Rachel Retuya
On Sat, Nov 19, 2016 at 12:08:34PM +0100, Christophe JAILLET wrote: > Commit a98461d79ba5 ("staging: iio: ad9832: add DVDD regulator") and > commit 43a07e48af44 ("staging: iio: ad9832: clean-up regulator 'reg'") add > some dereference of 'st' which is an un-initialized pointer at this point. > > R

[PATCH v2 2/2] staging: iio: ad7606: move out of staging

2016-12-09 Thread Eva Rachel Retuya
Move the ad7606 driver from staging/iio/adc to iio/adc. Also, update the corresponding Makefile and Kconfig associated with the change. Signed-off-by: Eva Rachel Retuya --- drivers/iio/adc/Kconfig| 34 ++ drivers/iio/adc/Makefile

[PATCH v2 1/2] staging: iio: ad7606: replace range/range_available with corresponding scale

2016-12-09 Thread Eva Rachel Retuya
Eliminate the non-standard attributes in_voltage_range and in_voltage_range_available. Implement in_voltage_scale_available in place of these attributes and update the SCALE accordingly. The array scale_avail is introduced to hold the available scale values. Signed-off-by: Eva Rachel Retuya

[PATCH v2 0/2] staging: iio: ad7606: move driver out of staging

2016-12-09 Thread Eva Rachel Retuya
Address the last remaining TODO [1] for this driver and move it from staging into mainline. [1] https://marc.info/?l=linux-iio&m=147689684332118&w=2 Change in v2: * Address the incorrect way of implementing the scale. (Pointed out by Lars) Eva Rachel Retuya (2): staging: iio: ad7606:

[PATCH v3 1/2] staging: iio: ad7606: replace range/range_available with corresponding scale

2016-12-10 Thread Eva Rachel Retuya
Eliminate the non-standard attributes in_voltage_range and in_voltage_range_available. Implement in_voltage_scale_available in place of these attributes and update the SCALE accordingly. The array scale_avail is introduced to hold the available scale values. Signed-off-by: Eva Rachel Retuya

[PATCH v3 0/2] staging: iio: ad7606: move driver out of staging

2016-12-10 Thread Eva Rachel Retuya
f implementing the scale. (Pointed out by Lars) Eva Rachel Retuya (2): staging: iio: ad7606: replace range/range_available with corresponding scale staging: iio: ad7606: move out of staging drivers/iio/adc/Kconfig| 34 ++ drivers/iio/adc/Makefile

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

2016-12-10 Thread Eva Rachel Retuya
Move the ad7606 driver from staging/iio/adc to iio/adc. Also, update the corresponding Makefile and Kconfig associated with the change. Signed-off-by: Eva Rachel Retuya --- drivers/iio/adc/Kconfig| 34 ++ drivers/iio/adc/Makefile

[PATCH] staging: iio: tsl2x7x_core: Fix standard deviation calculation

2017-03-20 Thread Eva Rachel Retuya
d-by: Abhiram Balasubramanian Signed-off-by: Eva Rachel Retuya --- drivers/staging/iio/light/tsl2x7x_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/drivers/staging/iio/light/tsl2x7x_core.c index ea15bc1..197201a 100644 --- a/drivers/stag

Re: [PATCH 4/4] iio: accel: adxl345: Add support for triggered buffer

2017-03-21 Thread Eva Rachel Retuya
On Mon, Mar 20, 2017 at 08:46:11PM +0100, Lars-Peter Clausen wrote: > On 03/15/2017 10:50 PM, Jonathan Cameron wrote: > > On 13/03/17 12:16, Andy Shevchenko wrote: > >> On Mon, Mar 13, 2017 at 1:11 PM, Eva Rachel Retuya > >> wrote: > >>> Provide a

Re: [PATCH 3/4] iio: accel: adxl345: Setup DATA_READY trigger

2017-03-15 Thread Eva Rachel Retuya
On Mon, Mar 13, 2017 at 02:12:54PM +0200, Andy Shevchenko wrote: > On Mon, Mar 13, 2017 at 1:11 PM, Eva Rachel Retuya > wrote: > Hello Andy, Thanks for the review. > Missed commit message is no-no! > > > Signed-off-by: Eva Rachel Retuya > > > -int adxl345

[PATCH 0/4] iio: accel: adxl345: Add support for buffered readings

2017-03-13 Thread Eva Rachel Retuya
1489395044005969376 0.383000 1.110700 9.575000 1489395044026535007 Disabling: in_accel_y_en Disabling: in_accel_x_en Disabling: in_timestamp_en Disabling: in_accel_z_en ~ # Eva Rachel Retuya (4): dt-bindings: iio: accel: adxl345: Add optional interrupt-names support iio: accel: adxl345_core: Introduce

[PATCH 1/4] dt-bindings: iio: accel: adxl345: Add optional interrupt-names support

2017-03-13 Thread Eva Rachel Retuya
Add interrupt-names property in order to specify interrupt pin in use. Signed-off-by: Eva Rachel Retuya --- Documentation/devicetree/bindings/iio/accel/adxl345.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/accel/adxl345.txt b/Documentation

[PATCH 3/4] iio: accel: adxl345: Setup DATA_READY trigger

2017-03-13 Thread Eva Rachel Retuya
Signed-off-by: Eva Rachel Retuya --- drivers/iio/accel/adxl345.h | 4 +- drivers/iio/accel/adxl345_core.c | 113 +-- drivers/iio/accel/adxl345_i2c.c | 10 +++- drivers/iio/accel/adxl345_spi.c | 10 +++- 4 files changed, 130 insertions(+), 7

[PATCH 4/4] iio: accel: adxl345: Add support for triggered buffer

2017-03-13 Thread Eva Rachel Retuya
Provide an all-axes read for triggered buffering. Signed-off-by: Eva Rachel Retuya --- drivers/iio/accel/Kconfig| 2 + drivers/iio/accel/adxl345_core.c | 124 +++ drivers/iio/accel/adxl345_i2c.c | 4 ++ 3 files changed, 119 insertions(+), 11

[PATCH 2/4] iio: accel: adxl345_core: Introduce set_mode, drdy & get_triple functions

2017-03-13 Thread Eva Rachel Retuya
function will come in handy when buffered reading is introduced. Signed-off-by: Eva Rachel Retuya --- drivers/iio/accel/adxl345_core.c | 116 +-- 1 file changed, 88 insertions(+), 28 deletions(-) diff --git a/drivers/iio/accel/adxl345_core.c b/drivers/iio/accel

Re: [PATCH v5 2/4] iio: accel: adxl345: Use I2C regmap instead of direct I2C access

2017-03-03 Thread Eva Rachel Retuya
On Fri, Mar 03, 2017 at 06:44:27PM +0200, Andy Shevchenko wrote: > On Tue, Feb 28, 2017 at 4:37 AM, Eva Rachel Retuya > wrote: > > Convert the driver to use regmap instead of I2C-specific functions. This > > is done in preparation for splitting this driver into core and > &

Re: [PATCH v5 4/4] iio: accel: adxl345: Add SPI support

2017-03-03 Thread Eva Rachel Retuya
On Fri, Mar 03, 2017 at 06:55:26PM +0200, Andy Shevchenko wrote: > On Tue, Feb 28, 2017 at 4:37 AM, Eva Rachel Retuya > wrote: > > Add SPI driver that initializes SPI regmap for the adxl345 core driver. > > The driver supports the same functionality as I2C namely the x,

Re: [PATCH v5 3/4] iio: accel: adxl345: Split driver into core and I2C

2017-03-03 Thread Eva Rachel Retuya
On Fri, Mar 03, 2017 at 06:51:28PM +0200, Andy Shevchenko wrote: > On Tue, Feb 28, 2017 at 4:37 AM, Eva Rachel Retuya > wrote: > > Move I2C-specific code into its own file and rely on regmap to access > > registers. The core code provides access to x, y, z and scale reading

[PATCH v6 4/4] iio: accel: adxl345: Add SPI support

2017-03-04 Thread Eva Rachel Retuya
Add SPI driver that initializes SPI regmap for the adxl345 core driver. The driver supports the same functionality as I2C namely the x, y, z and scale readings. Signed-off-by: Eva Rachel Retuya Reviewed-by: Andy Shevchenko --- Changes from v5: * Simplify configuration dependency to "depen

[PATCH v6 1/4] dt-bindings: iio: accel: Document ADXL345 accelerometer binding

2017-03-04 Thread Eva Rachel Retuya
Add the device tree binding documentation for the ADXL345 3-axis digital accelerometer. Signed-off-by: Eva Rachel Retuya Acked-by: Rob Herring --- Change from v5: * Add Rob's Acked-by tag .../devicetree/bindings/iio/accel/adxl345.txt | 38 ++ 1 file change

[PATCH v6 2/4] iio: accel: adxl345: Use I2C regmap instead of direct I2C access

2017-03-04 Thread Eva Rachel Retuya
Convert the driver to use regmap instead of I2C-specific functions. This is done in preparation for splitting this driver into core and I2C-specific code as well as introduction of SPI driver. Signed-off-by: Eva Rachel Retuya Reviewed-by: Andy Shevchenko --- Changes from v5: * Re-order local

[PATCH v6 0/4] iio: accel: adxl345: Split driver into core and I2C then add SPI support

2017-03-04 Thread Eva Rachel Retuya
e. [PATCH 2/4] * Update Kconfig to Jonathan's preferred style * Improve similarity index from 78% to 100% (rename detection) [PATCH 4/4] * Correct acpi_device_id: ADX0345 -> ADS0345 Eva Rachel Retuya (4): dt-bindings: iio: accel: Document ADXL345 accelerometer binding iio: accel: adxl345:

[PATCH v6 3/4] iio: accel: adxl345: Split driver into core and I2C

2017-03-04 Thread Eva Rachel Retuya
Move I2C-specific code into its own file and rely on regmap to access registers. The core code provides access to x, y, z and scale readings. Signed-off-by: Eva Rachel Retuya Reviewed-by: Andy Shevchenko --- Changes from v5: * Simplify configuration dependency to "depends on INPUT_ADXL

Re: [PATCH 1/6] staging: iio: set proper supply name to devm_regulator_get()

2016-11-04 Thread Eva Rachel Retuya
Hello Matt, On Mon, Oct 31, 2016 at 09:03:57PM -0700, Matt Ranostay wrote: > On Mon, Oct 31, 2016 at 10:04 AM, Eva Rachel Retuya > wrote: > > The name passed to devm_regulator_get() should match the name of the > > supply as specified in the device datasheet. This makes it cl

Re: [PATCH v5 0/4] iio: accel: adxl345: Split driver into core and I2C then add SPI support

2017-03-01 Thread Eva Rachel Retuya
On Thu, Mar 02, 2017 at 01:22:11AM +0200, Andy Shevchenko wrote: > On Tue, Feb 28, 2017 at 4:37 AM, Eva Rachel Retuya > wrote: > > This patchset modifies the adxl345 to use regmap. In doing so, we can > > easily introduce SPI support and let regmap handle the rest. >

Re: [PATCH v2 0/4] iio: accel: adxl345: Split driver into core and I2C then add SPI support

2017-02-21 Thread Eva Rachel Retuya
On Mon, Feb 20, 2017 at 05:25:39PM +0800, Eva Rachel Retuya wrote: > This patchset modifies the adxl345 to use regmap. In doing so, we can > easily introduce SPI support and let regmap handle the rest. > > Recap of basic features: read_raw for x, y and z axes, scale. After > apply

Re: [PATCH 4/4] iio: accel: adxl345: Add ACPI support

2017-02-21 Thread Eva Rachel Retuya
On Mon, Feb 20, 2017 at 01:07:38PM +0100, Lars-Peter Clausen wrote: > On 02/19/2017 01:15 PM, Eva Rachel Retuya wrote: > > On Sun, Feb 19, 2017 at 11:01:23AM +0100, Lars-Peter Clausen wrote: > >> On 02/16/2017 11:02 AM, Eva Rachel Retuya wrote: > >> [...] > >&

[PATCH v3 0/4] iio: accel: adxl345: Split driver into core and I2C then add SPI support

2017-02-22 Thread Eva Rachel Retuya
lid device ID in probe. iio: accel: adxl345: Split driver into core and I2C * Update Kconfig to Jonathan's preferred style * Improve similarity index from 78% to 100% (rename detection) iio: accel: adxl345: Add ACPI support * Correct acpi_device_id: ADX0345 -> ADS0345 Eva Rachel Retuya (4

[PATCH v3 2/4] iio: accel: adxl345: Use I2C regmap instead of direct I2C access

2017-02-22 Thread Eva Rachel Retuya
ned-off-by: Eva Rachel Retuya --- Change from v2: * None Changes from v1: * Move other deletions from patch 2 in here -- make it clear what got deleted and/or modified that is hard to see previously * Introduce the driver header file "adxl345.h" here instead of doing it in the next pat

[PATCH v3 1/4] Documentation: dt-bindings: Document ADXL345 accelerometer binding

2017-02-22 Thread Eva Rachel Retuya
Add the device tree binding documentation for the ADXL345 3-axis digital accelerometer. Signed-off-by: Eva Rachel Retuya --- Change from v2: * Add OF match table on both I2C and SPI files and document them .../devicetree/bindings/iio/accel/adxl345.txt | 38 ++ 1 file

[PATCH v3 4/4] iio: accel: adxl345: Add SPI support

2017-02-22 Thread Eva Rachel Retuya
Add SPI driver that initializes SPI regmap for the adxl345 core driver. The driver supports the same functionality as I2C namely the x, y, z and scale readings. Signed-off-by: Eva Rachel Retuya --- Change from v2: * Add OF match table on both I2C and SPI files and document them drivers/iio

[PATCH v3 3/4] iio: accel: adxl345: Split driver into core and I2C

2017-02-22 Thread Eva Rachel Retuya
Move I2C-specific code into its own file and rely on regmap to access registers. The core code provides access to x, y, z and scale readings. Signed-off-by: Eva Rachel Retuya --- Change from v2: * Add OF match table on both I2C and SPI files and document them Changes from v1: * Update Kconfig

Re: [PATCH v3 2/4] iio: accel: adxl345: Use I2C regmap instead of direct I2C access

2017-02-24 Thread Eva Rachel Retuya
On Thu, Feb 23, 2017 at 06:27:52PM +0200, Andy Shevchenko wrote: > On Wed, Feb 22, 2017 at 12:22 PM, Eva Rachel Retuya > wrote: > > Convert the driver to use regmap instead of I2C-specific functions. > > Also, introduce the header file "adxl345.h" and export the pr

Re: [PATCH v3 3/4] iio: accel: adxl345: Split driver into core and I2C

2017-02-24 Thread Eva Rachel Retuya
On Thu, Feb 23, 2017 at 06:36:42PM +0200, Andy Shevchenko wrote: > On Wed, Feb 22, 2017 at 12:23 PM, Eva Rachel Retuya > wrote: > > Move I2C-specific code into its own file and rely on regmap to access > > registers. The core code provides access to x, y, z and scale readin

Re: [PATCH v3 4/4] iio: accel: adxl345: Add SPI support

2017-02-24 Thread Eva Rachel Retuya
On Thu, Feb 23, 2017 at 06:58:12PM +0200, Andy Shevchenko wrote: > On Thu, Feb 23, 2017 at 6:47 PM, Lars-Peter Clausen wrote: > > On 02/23/2017 05:43 PM, Andy Shevchenko wrote: > >> On Wed, Feb 22, 2017 at 12:23 PM, Eva Rachel Retuya > >> wrote: > >>> Add

[PATCH 1/4] iio: accel: adxl345: Use I2C regmap instead of direct I2C access

2017-02-16 Thread Eva Rachel Retuya
Convert the driver to use regmap instead of I2C-specific functions. This is done in preparation for splitting this driver into core and I2C-specific code as well as introduction of SPI driver. Signed-off-by: Eva Rachel Retuya --- drivers/iio/accel/Kconfig | 1 + drivers/iio/accel/adxl345.c

[PATCH 2/4] iio: accel: adxl345: Split driver into core and I2C

2017-02-16 Thread Eva Rachel Retuya
Move I2C-specific code into its own file and rely on regmap to access registers. The core code provides access to x, y, z and scale readings. Signed-off-by: Eva Rachel Retuya --- drivers/iio/accel/Kconfig| 8 +- drivers/iio/accel/Makefile | 3 +- drivers/iio/accel/adxl345.c

[PATCH 0/4] iio: accel: adxl345: Split driver into core and I2C then add SPI support

2017-02-16 Thread Eva Rachel Retuya
. Eva Rachel Retuya (4): iio: accel: adxl345: Use I2C regmap instead of direct I2C access iio: accel: adxl345: Split driver into core and I2C iio: accel: adxl345: Add SPI support iio: accel: adxl345: Add ACPI support drivers/iio/accel/Kconfig| 22 - drivers/iio/accel/Makefile

[PATCH 3/4] iio: accel: adxl345: Add SPI support

2017-02-16 Thread Eva Rachel Retuya
Add SPI driver for initializing spi regmap for the adxl345 core driver. The driver supports the same functionality as I2C namely the x, y, z and scale readings. Signed-off-by: Eva Rachel Retuya --- drivers/iio/accel/Kconfig | 13 +++ drivers/iio/accel/Makefile | 1 + drivers/iio

[PATCH 4/4] iio: accel: adxl345: Add ACPI support

2017-02-16 Thread Eva Rachel Retuya
Allow probing the adxl345 on both I2C and SPI protocols using ACPI. Signed-off-by: Eva Rachel Retuya --- drivers/iio/accel/adxl345_i2c.c | 9 + drivers/iio/accel/adxl345_spi.c | 9 + 2 files changed, 18 insertions(+) diff --git a/drivers/iio/accel/adxl345_i2c.c b/drivers/iio

Re: [PATCH 4/4] iio: accel: adxl345: Add ACPI support

2017-02-19 Thread Eva Rachel Retuya
On Sun, Feb 19, 2017 at 11:01:23AM +0100, Lars-Peter Clausen wrote: > On 02/16/2017 11:02 AM, Eva Rachel Retuya wrote: > [...] > > @@ -54,9 +55,17 @@ static const struct i2c_device_id adxl345_i2c_id[] = { > > > > MODULE_DEVICE_TABLE(i2c, adxl345_i2c_id); > &

Re: [PATCH 2/4] iio: accel: adxl345: Split driver into core and I2C

2017-02-19 Thread Eva Rachel Retuya
On Sun, Feb 19, 2017 at 01:11:29PM +, Jonathan Cameron wrote: > On 16/02/17 10:02, Eva Rachel Retuya wrote: > > Move I2C-specific code into its own file and rely on regmap to access > > registers. The core code provides access to x, y, z and scale readings. > > > >

Re: [PATCH 3/4] iio: accel: adxl345: Add SPI support

2017-02-19 Thread Eva Rachel Retuya
On Sun, Feb 19, 2017 at 01:12:50PM +, Jonathan Cameron wrote: > On 16/02/17 10:02, Eva Rachel Retuya wrote: > > Add SPI driver for initializing spi regmap for the adxl345 core driver. > > The driver supports the same functionality as I2C namely the x, y, z and >

[PATCH v2 1/4] iio: accel: adxl345: Use I2C regmap instead of direct I2C access

2017-02-20 Thread Eva Rachel Retuya
ned-off-by: Eva Rachel Retuya --- Changes from v1: * Move other deletions from patch 2 in here -- make it clear what got deleted and/or modified that is hard to see previously * Introduce the driver header file "adxl345.h" here instead of doing it in the next patch * Completely omit trac

[PATCH v2 4/4] iio: accel: adxl345: Add ACPI support

2017-02-20 Thread Eva Rachel Retuya
Allow probing the adxl345 on both I2C and SPI protocols using ACPI. Signed-off-by: Eva Rachel Retuya --- Change from v1: * Correct acpi_device_id: ADX0345 -> ADS0345 drivers/iio/accel/adxl345_i2c.c | 9 + drivers/iio/accel/adxl345_spi.c | 9 + 2 files changed, 18 inserti

[PATCH v2 0/4] iio: accel: adxl345: Split driver into core and I2C then add SPI support

2017-02-20 Thread Eva Rachel Retuya
-> ADS0345 Eva Rachel Retuya (4): iio: accel: adxl345: Use I2C regmap instead of direct I2C access iio: accel: adxl345: Split driver into core and I2C iio: accel: adxl345: Add SPI support iio: accel: adxl345: Add ACPI support drivers/iio/accel/Kconfig| 18 +++- drivers/

[PATCH v2 3/4] iio: accel: adxl345: Add SPI support

2017-02-20 Thread Eva Rachel Retuya
Add SPI driver that initializes SPI regmap for the adxl345 core driver. The driver supports the same functionality as I2C namely the x, y, z and scale readings. Signed-off-by: Eva Rachel Retuya --- drivers/iio/accel/Kconfig | 8 - drivers/iio/accel/Makefile | 1 + drivers/iio

[PATCH v2 2/4] iio: accel: adxl345: Split driver into core and I2C

2017-02-20 Thread Eva Rachel Retuya
Move I2C-specific code into its own file and rely on regmap to access registers. The core code provides access to x, y, z and scale readings. Signed-off-by: Eva Rachel Retuya --- Changes from v1: * Update Kconfig to Jonathan's preferred style * Improve similarity index from 78% to 100% (r

Re: [PATCH 2/4] iio: accel: adxl345: Split driver into core and I2C

2017-02-20 Thread Eva Rachel Retuya
On Mon, Feb 20, 2017 at 02:41:12PM +0800, Eva Rachel Retuya wrote: > On Sun, Feb 19, 2017 at 01:11:29PM +, Jonathan Cameron wrote: > > On 16/02/17 10:02, Eva Rachel Retuya wrote: > > > Move I2C-specific code into its own file and rely on regmap to access > > > regist

Re: [PATCH v3 4/4] iio: accel: adxl345: Add SPI support

2017-02-24 Thread Eva Rachel Retuya
On Fri, Feb 24, 2017 at 01:48:39PM +0200, Andy Shevchenko wrote: > On Fri, Feb 24, 2017 at 11:22 AM, Lars-Peter Clausen wrote: > > On 02/24/2017 10:12 AM, Eva Rachel Retuya wrote: > >> On Thu, Feb 23, 2017 at 06:58:12PM +0200, Andy Shevchenko wrote: > >>> On Thu,

[PATCH v4 1/4] Documentation: dt-bindings: Document ADXL345 accelerometer binding

2017-02-26 Thread Eva Rachel Retuya
Add the device tree binding documentation for the ADXL345 3-axis digital accelerometer. Signed-off-by: Eva Rachel Retuya --- .../devicetree/bindings/iio/accel/adxl345.txt | 38 ++ 1 file changed, 38 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio

[PATCH v4 0/4] iio: accel: adxl345: Split driver into core and I2C then add SPI support

2017-02-26 Thread Eva Rachel Retuya
. [PATCH 2/4] * Update Kconfig to Jonathan's preferred style * Improve similarity index from 78% to 100% (rename detection) [PATCH 4/4] * Correct acpi_device_id: ADX0345 -> ADS0345 Eva Rachel Retuya (4): Documentation: dt-bindings: Document ADXL345 accelerometer binding iio: accel: adxl

[PATCH v4 2/4] iio: accel: adxl345: Use I2C regmap instead of direct I2C access

2017-02-26 Thread Eva Rachel Retuya
Convert the driver to use regmap instead of I2C-specific functions. This is done in preparation for splitting this driver into core and I2C-specific code as well as introduction of SPI driver. Signed-off-by: Eva Rachel Retuya --- Changes from v3: * Keep intact I2C client structure which was

[PATCH v4 3/4] iio: accel: adxl345: Split driver into core and I2C

2017-02-26 Thread Eva Rachel Retuya
Move I2C-specific code into its own file and rely on regmap to access registers. The core code provides access to x, y, z and scale readings. Signed-off-by: Eva Rachel Retuya --- Changes from v3: * Revert to explicit and separate I2C and SPI configuration * Add OF match table, make it enumerable

[PATCH v4 4/4] iio: accel: adxl345: Add SPI support

2017-02-26 Thread Eva Rachel Retuya
Add SPI driver that initializes SPI regmap for the adxl345 core driver. The driver supports the same functionality as I2C namely the x, y, z and scale readings. Signed-off-by: Eva Rachel Retuya --- Changes from v3: * Revert to explicit and separate I2C and SPI configuration * Add OF match table

[PATCH v5 0/4] iio: accel: adxl345: Split driver into core and I2C then add SPI support

2017-02-27 Thread Eva Rachel Retuya
Kconfig to Jonathan's preferred style * Improve similarity index from 78% to 100% (rename detection) [PATCH 4/4] * Correct acpi_device_id: ADX0345 -> ADS0345 Eva Rachel Retuya (4): dt-bindings: iio: accel: Document ADXL345 accelerometer binding iio: accel: adxl345: Use I2C regmap in

[PATCH v5 1/4] dt-bindings: iio: accel: Document ADXL345 accelerometer binding

2017-02-27 Thread Eva Rachel Retuya
Add the device tree binding documentation for the ADXL345 3-axis digital accelerometer. Signed-off-by: Eva Rachel Retuya --- Changes from v4: * Update subject-prefix * Update node name from "adxl345@unit-address" to "accelerometer@unit-address" .../devicetree/bindings/i

[PATCH v5 2/4] iio: accel: adxl345: Use I2C regmap instead of direct I2C access

2017-02-27 Thread Eva Rachel Retuya
Convert the driver to use regmap instead of I2C-specific functions. This is done in preparation for splitting this driver into core and I2C-specific code as well as introduction of SPI driver. Signed-off-by: Eva Rachel Retuya Reviewed-by: Andy Shevchenko --- Changes from v4: * Add Andy&#

Re: [PATCH v4 0/4] iio: accel: adxl345: Split driver into core and I2C then add SPI support

2017-02-27 Thread Eva Rachel Retuya
On Tue, Feb 28, 2017 at 12:41:50AM +0200, Andy Shevchenko wrote: [...] > I did couple of rounds of review and found no major issues with the > series (though, I would amend some style there and minor things). So, > for moving forward FWIW: > > Reviewed-by: Andy Shevchenko Hello Andy, thank you f

[PATCH v5 3/4] iio: accel: adxl345: Split driver into core and I2C

2017-02-27 Thread Eva Rachel Retuya
Move I2C-specific code into its own file and rely on regmap to access registers. The core code provides access to x, y, z and scale readings. Signed-off-by: Eva Rachel Retuya Reviewed-by: Andy Shevchenko --- Changes from v4: * Add Andy's Reviewed-by tag Changes from v3: * Revert to exp

[PATCH v5 4/4] iio: accel: adxl345: Add SPI support

2017-02-27 Thread Eva Rachel Retuya
Add SPI driver that initializes SPI regmap for the adxl345 core driver. The driver supports the same functionality as I2C namely the x, y, z and scale readings. Signed-off-by: Eva Rachel Retuya Reviewed-by: Andy Shevchenko --- Changes from v4: * Add Andy's Reviewed-by tag Changes fr

Re: [PATCH v2] iio: accel: Add driver for the Analog Devices ADXL345 3-axis accelerometer

2017-02-05 Thread Eva Rachel Retuya
On Sat, Feb 04, 2017 at 12:34:57PM +, Jonathan Cameron wrote: > On 31/01/17 07:12, Eva Rachel Retuya wrote: > > Add basic IIO support for the Analog Devices ADXL345 3-axis accelerometer. > > The datasheet can be found here: > > http://www.analog.com/media/en/technical-docu

[PATCH] iwlwifi: dvm: convert create_singlethread_workqueue() to alloc_workqueue()

2016-03-19 Thread Eva Rachel Retuya
astly, guarantee forward progress for work items depended upon during memory reclaim by the addition of the WQ_MEM_RECLAIM flag. Signed-off-by: Eva Rachel Retuya --- To the maintainers: Just to confirm, are work items depended upon during memory reclaim? If not, the WQ_MEM_RECLAIM flag will be dropped. I

[PATCH v2] iwlwifi: dvm: use alloc_ordered_workqueue()

2016-03-20 Thread Eva Rachel Retuya
trict execution ordering of a single threaded (ST) workqueue by switching to alloc_ordered_workqueue(). WQ_MEM_RECLAIM flag is not needed since the worker is not supposed to free memory. Signed-off-by: Eva Rachel Retuya --- Changes in v2: * switch from alloc_workqueue() to alloc_ordered_workqueue() * r

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(s

Re: [PATCH v2 3/4] iio: accel: adxl345: Setup DATA_READY trigger

2017-05-10 Thread Eva Rachel Retuya
On Wed, May 03, 2017 at 12:05:00AM +0300, Andy Shevchenko wrote: > On Tue, May 2, 2017 at 3:15 PM, Eva Rachel Retuya wrote: > > On Mon, May 01, 2017 at 02:31:00PM +0300, Andy Shevchenko wrote: > > [...] > >> > -int adxl345_core_probe(struct device *dev, struct

Re: [PATCH v2 3/4] iio: accel: adxl345: Setup DATA_READY trigger

2017-05-10 Thread Eva Rachel Retuya
On Fri, May 05, 2017 at 07:26:06PM +0100, Jonathan Cameron wrote: > On 02/05/17 13:15, Eva Rachel Retuya wrote: > > On Mon, May 01, 2017 at 02:31:00PM +0300, Andy Shevchenko wrote: > > [...] > >>> -int adxl345_core_probe(struct device *dev, struct regmap *regmap, &g

Re: [PATCH v2 3/4] iio: accel: adxl345: Setup DATA_READY trigger

2017-05-10 Thread Eva Rachel Retuya
On Tue, May 02, 2017 at 04:59:12PM +0100, Jonathan Cameron wrote: > On 02/05/17 04:01, Rob Herring wrote: > > On Sun, Apr 30, 2017 at 7:32 PM, Jonathan Cameron wrote: > >> On 29/04/17 08:49, Eva Rachel Retuya wrote: > >>> The ADXL345 provides a DATA_READ

[PATCH v2 1/4] dt-bindings: iio: accel: adxl345: Add optional interrupt-names support

2017-04-29 Thread Eva Rachel Retuya
Add interrupt-names property in order to specify interrupt pin in use. Signed-off-by: Eva Rachel Retuya Acked-by: Rob Herring --- Change in v2: * Add Rob's Acked-by tag Documentation/devicetree/bindings/iio/accel/adxl345.txt | 4 1 file changed, 4 insertions(+) diff --

[PATCH v2 0/4] iio: accel: adxl345: Add support for buffered readings

2017-04-29 Thread Eva Rachel Retuya
eady() call before performing a bulk read * Since get_triple() is scrapped, place a direct bulk read here * Move mutex unlocking below goto label * Remove i2c_check_functionality() that could introduce regression Eva Rachel Retuya (4): dt-bindings: iio: accel: adxl345: Add optional interrupt-n

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

2017-04-29 Thread Eva Rachel Retuya
bit is always set if the corresponding event occurs. Introduce the data_ready function that monitors the INT_SOURCE register of this bit. This is done to ensure consistent readings. Signed-off-by: Eva Rachel Retuya --- Changes in v2: * Make function naming more clear: drdy -> data_ready * Swi

[PATCH v2 4/4] iio: accel: adxl345: Add support for triggered buffer

2017-04-29 Thread Eva Rachel Retuya
initiate capturing of data and placing said data in the buffer. The trigger handler performs an all-axes read with timestamp. Signed-off-by: Eva Rachel Retuya --- Changes in v2: * Provide a more detailed commit message * adxl345_trigger_handler() * if using external trigger, place a

[PATCH v2 3/4] iio: accel: adxl345: Setup DATA_READY trigger

2017-04-29 Thread Eva Rachel Retuya
, two output pins INT1 and INT2 are available for driving interrupts. Allow mapping to either pins by specifying the interrupt-names property in device tree. Signed-off-by: Eva Rachel Retuya --- Changes in v2: * Provide a detailed commit message * Move the of_irq_get_byname() check in core file in

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, ADXL345_R

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 = regmap_get_device(data->regmap);

Re: [PATCH v2 3/4] iio: accel: adxl345: Setup DATA_READY trigger

2017-05-02 Thread Eva Rachel Retuya
On Mon, May 01, 2017 at 01:32:00AM +0100, Jonathan Cameron wrote: [...] > Coming together nicely, but a few more bits and pieces inline... > > One slight worry is that the irq names stuff is to restrictive > as we want to direct different interrupts to different pins if > both are supported! > >

Re: [PATCH v2 3/4] iio: accel: adxl345: Setup DATA_READY trigger

2017-05-02 Thread Eva Rachel Retuya
On Mon, May 01, 2017 at 02:31:00PM +0300, Andy Shevchenko wrote: [...] > > -int adxl345_core_probe(struct device *dev, struct regmap *regmap, > > +int adxl345_core_probe(struct device *dev, struct regmap *regmap, int irq, > >const char *name); > > I think I commented this o

Re: [PATCH v2 4/4] iio: accel: adxl345: Add support for triggered buffer

2017-05-02 Thread Eva Rachel Retuya
On Mon, May 01, 2017 at 01:42:29AM +0100, Jonathan Cameron wrote: [...] > Few minor bits inline... I'm a little bit in two minds about the > holding up waiting for new data when using another trigger... > > Jonathan [...] > > static int adxl345_read_raw(struct iio_dev *indio_dev, > > @@ -127,6

Re: [PATCH v2 4/4] iio: accel: adxl345: Add support for triggered buffer

2017-05-02 Thread Eva Rachel Retuya
On Mon, May 01, 2017 at 02:24:27PM +0300, Andy Shevchenko wrote: [...] > One nit below. > FWIW: > Reviewed-by: Andy Shevchenko > > > +static irqreturn_t adxl345_trigger_handler(int irq, void *p) > > +{ > > + struct iio_poll_func *pf = p; > > + struct iio_dev *indio_dev = pf->indio_dev

  1   2   >