[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

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

[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 <eraret...@gmail.com> --- drivers/iio/adc/Kconfig| 34 ++ drivers/i

[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
. (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 | 3 + drivers

[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 <eraret...@gmail.com> --- drivers/iio/adc/Kconfig| 34 ++ drivers/i

[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=147689684332118=2 Change in v2: * Address the incorrect way of implementing the scale. (Pointed out by Lars) Eva Rachel Retuya (2): staging: iio: ad7606: replace

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. > >

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

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 <eraret...@gmail.com> > wrote: > > The name passed to devm_regulator_get() should match the name of the > > supply as specified in the devi

[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 <eraret...@gmail.com> --- drivers/staging/iio/adc/ad7192.c | 22 +++--- 1 file changed, 11 insertions(

[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: Eva Rachel Retuya <era

[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 <l...@metafoo.de> Signed-off-by: Eva Rachel Retuya &

[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 <l...@metafoo.de> Signed-off-by: Eva Rachel R

[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 <l...@metafoo.de> Signed-off-by: Eva

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

2016-10-31 Thread Eva Rachel Retuya
lowercase version of the datasheet name to specify the supply voltage. Suggested-by: Lars-Peter Clausen <l...@metafoo.de> Signed-off-by: Eva Rachel Retuya <eraret...@gmail.com> --- drivers/staging/iio/adc/ad7192.c| 2 +- drivers/staging/iio/adc/ad7780.c| 2

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

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

[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 <eraret...@gmail.com> --- This patch might cause a conflict with this patch: staging: iio: cdc/ad7746: fix m

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: > > > >