Re: [PATCH v3 0/3] adt7316 regmap implementation

2019-01-25 Thread Jeremy Fertic
On Sun, Jan 20, 2019 at 09:06:30PM +0530, Shreeya Patel wrote: > This patchset consist of some initial patches for heading > towards the regmap implementation and also the final patch > which enables the driver to use regmap API thus removing > the redundant and common code. > > Changes in v3 >

Re: [PATCH] Staging: iio: adt7316: Add regmap support

2019-01-05 Thread Jeremy Fertic
On Sat, Jan 05, 2019 at 05:20:37PM +, Jonathan Cameron wrote: > +CC Jeremy who is also working with this device. > > On Sun, 23 Dec 2018 19:32:24 +0530 > Shreeya Patel wrote: > > > Both i2c and spi drivers have functions for reading and writing > > to/from registers. Remove this redundant

[PATCH v2 3/4] staging: iio: adt7316: fix the dac read calculation

2018-12-22 Thread Jeremy Fertic
with data. Fixes: 35f6b6b86ede ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver") Signed-off-by: Jeremy Fertic --- drivers/staging/iio/addac/adt7316.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging

[PATCH v2 2/4] staging: iio: adt7316: fix handling of dac high resolution option

2018-12-22 Thread Jeremy Fertic
n in the driver when an attribute is a boolean. Fixes: 35f6b6b86ede ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver") Signed-off-by: Jeremy Fertic --- drivers/staging/iio/addac/adt7316.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/

[PATCH v2 0/4] staging: iio: adt7316: dac fixes

2018-12-22 Thread Jeremy Fertic
Changes in v2: - Patches 1-2: reworded commit messages and added Fixes tags - Patches 3-4: added Fixes tags Jeremy Fertic (4): staging: iio: adt7316: fix dac_bits assignment staging: iio: adt7316: fix handling of dac high resolution option staging: iio: adt7316: fix the dac read

[PATCH v2 4/4] staging: iio: adt7316: fix the dac write calculation

2018-12-22 Thread Jeremy Fertic
er end of the register. Shift the lsb value before storing it in a new variable lsb_reg, and write this variable to the lsb register. Fixes: 35f6b6b86ede ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver") Signed-off-by: Jeremy Fertic --- drivers/staging/iio/addac/adt7316.c | 10 ++

[PATCH v2 1/4] staging: iio: adt7316: fix dac_bits assignment

2018-12-22 Thread Jeremy Fertic
and available to userspace. Fixes: 35f6b6b86ede ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver") Signed-off-by: Jeremy Fertic --- drivers/staging/iio/addac/adt7316.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/iio/addac/ad

Re: [PATCH 03/11] staging: iio: adt7316: fix dac_bits assignment

2018-12-17 Thread Jeremy Fertic
On Sun, Dec 16, 2018 at 11:37:56AM +, Jonathan Cameron wrote: > On Tue, 11 Dec 2018 17:54:55 -0700 > Jeremy Fertic wrote: > > > The only assignment to dac_bits is in adt7316_store_da_high_resolution(). > > This function enables or disables 10 bit dac resolut

Re: [PATCH 04/11] staging: iio: adt7316: fix handling of dac high resolution option

2018-12-14 Thread Jeremy Fertic
On Fri, Dec 14, 2018 at 09:26:18AM +0300, Dan Carpenter wrote: > On Thu, Dec 13, 2018 at 03:01:46PM -0700, Jeremy Fertic wrote: > > On Wed, Dec 12, 2018 at 11:23:16AM +0300, Dan Carpenter wrote: > > > On Tue, Dec 11, 2018 at 05:54:56PM -0700, Jeremy Fertic wrote: > >

Re: [PATCH 02/11] staging: iio: adt7316: invert the logic of the check for an ldac pin

2018-12-13 Thread Jeremy Fertic
On Wed, Dec 12, 2018 at 11:19:49AM +0300, Dan Carpenter wrote: > On Tue, Dec 11, 2018 at 05:54:54PM -0700, Jeremy Fertic wrote: > > ADT7316_DA_EN_VIA_DAC_LDCA is set when the dac and ldac registers are being > > used to update the dacs instead of the ldac pin. ADT7516_SEL_AIN3 is a

Re: [PATCH 04/11] staging: iio: adt7316: fix handling of dac high resolution option

2018-12-13 Thread Jeremy Fertic
On Wed, Dec 12, 2018 at 11:23:16AM +0300, Dan Carpenter wrote: > On Tue, Dec 11, 2018 at 05:54:56PM -0700, Jeremy Fertic wrote: > > @@ -651,10 +649,12 @@ static ssize_t > > adt7316_store_da_high_resolution(struct device *dev, > > u8 config3; > > int ret;

[PATCH 01/11] staging: iio: adt7316: fix register and bit definitions

2018-12-11 Thread Jeremy Fertic
Change two register addresses and one bit definition to match the datasheet. Signed-off-by: Jeremy Fertic --- drivers/staging/iio/addac/adt7316.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c

[PATCH 02/11] staging: iio: adt7316: invert the logic of the check for an ldac pin

2018-12-11 Thread Jeremy Fertic
ADT7316_DA_EN_VIA_DAC_LDCA is set when the dac and ldac registers are being used to update the dacs instead of the ldac pin. ADT7516_SEL_AIN3 is an adc input that shares the ldac pin. Only set these bits if an ldac pin is not being used. Signed-off-by: Jeremy Fertic --- drivers/staging/iio

[PATCH 09/11] staging: iio: adt7316: remove dac vref buffer bypass from adt751x

2018-12-11 Thread Jeremy Fertic
The option to allow the external vref to bypass the reference buffer is only available for adt7316/7/8. Remove the attributes for adt751x as well as the chip->id checks from the show and store functions. Signed-off-by: Jeremy Fertic --- drivers/staging/iio/addac/adt7316.c | 14 --

[PATCH 10/11] staging: iio: adt7316: change interpretation of write to dac update mode

2018-12-11 Thread Jeremy Fertic
, choosing option 3 would require a write of 0x30 (actually 48 since it expects base 10). To address this inconsistency, create a shift macro to be used in the valid input check as well as the calculation for the register write. Signed-off-by: Jeremy Fertic --- I'm not sure if this patch

[PATCH 06/11] staging: iio: adt7316: fix the dac write calculation

2018-12-11 Thread Jeremy Fertic
er end of the register. Shift the lsb value before storing it in a new variable lsb_reg, and write this variable to the lsb register. Signed-off-by: Jeremy Fertic --- drivers/staging/iio/addac/adt7316.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/stagi

[PATCH 05/11] staging: iio: adt7316: fix the dac read calculation

2018-12-11 Thread Jeremy Fertic
with data. Signed-off-by: Jeremy Fertic --- drivers/staging/iio/addac/adt7316.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c index eee7c04f93f4..b7d12d003ddc 100644 --- a/drivers/staging/iio

[PATCH 03/11] staging: iio: adt7316: fix dac_bits assignment

2018-12-11 Thread Jeremy Fertic
resolution functionality. Instead, assign a value to dac_bits in adt7316_probe() since the number of dac bits might be needed as soon as the device is registered and available to userspace. Signed-off-by: Jeremy Fertic --- drivers/staging/iio/addac/adt7316.c | 18 +- 1 file changed

[PATCH 11/11] staging: iio: adt7316: correct spelling of ADT7316_DA_EN_VIA_DAC_LDCA

2018-12-11 Thread Jeremy Fertic
Change LDCA to LDAC. Signed-off-by: Jeremy Fertic --- drivers/staging/iio/addac/adt7316.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c index 58b462ad0c83..020d695ded97 100644

[PATCH 00/11] staging: iio: adt7316: dac fixes

2018-12-11 Thread Jeremy Fertic
Here are some dac related fixes for adt7316. I'm testing with an adt7516 over i2c to an orange pi pc. I've attempted to test any functionality that these patches are touching. Jeremy Fertic (11): staging: iio: adt7316: fix register and bit definitions staging: iio: adt7316: invert the logic

[PATCH 08/11] staging: iio: adt7316: allow adt751x to use internal vref for all dacs

2018-12-11 Thread Jeremy Fertic
With adt7516/7/9, internal vref is available for dacs a and b, dacs c and d, or all dacs. The driver doesn't currently support internal vref for all dacs. Change the else if to an if so both bits are checked rather than just one or the other. Signed-off-by: Jeremy Fertic --- drivers/staging/iio

[PATCH 07/11] staging: iio: adt7316: use correct variable in DAC_internal_Vref read

2018-12-11 Thread Jeremy Fertic
The dac internal vref settings are part of the ldac config register rather than the dac config register. Change the variable being used so the read returns the correct result. Signed-off-by: Jeremy Fertic --- drivers/staging/iio/addac/adt7316.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 04/11] staging: iio: adt7316: fix handling of dac high resolution option

2018-12-11 Thread Jeremy Fertic
quot;1 (10 bits)" if the device is one of the above mentioned chips and the dac high resolution mode is enabled. In the store function, return an error if the device does not support this mode. Signed-off-by: Jeremy Fertic --- drivers/staging/iio/addac/adt7316.c | 12 ++-- 1 file changed

Re: [PATCH] Revert "Staging: iio: adt7316: Add an extra check for 'ret' equals to 0"

2018-12-05 Thread Jeremy Fertic
On Thu, Dec 06, 2018 at 01:25:55AM +0530, Shreeya Patel wrote: > On Tue, 2018-12-04 at 18:49 -0700, Jeremy Fertic wrote: > > This reverts commit 00426e99789357dbff7e719a092ce36a3ce49d94. > > > > i2c_smbus_read_byte() returns 0 when a byte with the value 0 is read &g

[PATCH] Revert "Staging: iio: adt7316: Add an extra check for 'ret' equals to 0"

2018-12-04 Thread Jeremy Fertic
This reverts commit 00426e99789357dbff7e719a092ce36a3ce49d94. i2c_smbus_read_byte() returns 0 when a byte with the value 0 is read from the device. This is a valid read so revert the check for 0. Signed-off-by: Jeremy Fertic --- drivers/staging/iio/addac/adt7316-i2c.c | 4 1 file changed

[PATCH] staging: vt6655: remove unnecessary blank lines

2018-02-23 Thread Jeremy Fertic
Remove unnecessary blank lines found using checkpatch.pl script. Signed-off-by: Jeremy Fertic <jeremyfer...@gmail.com> --- drivers/staging/vt6655/rxtx.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index bea0b7