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

2019-01-05 Thread Jonathan Cameron
On Sat, 22 Dec 2018 21:57:42 -0700 Jeremy Fertic wrote: > The calculation of the current dac value is using the wrong bits of the > dac lsb register. Create two macros to shift the lsb register value into > lsb position, depending on whether the dac is 10 or 12 bit. Initialize > data to 0 so,

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

2018-12-22 Thread Jeremy Fertic
The calculation of the current dac value is using the wrong bits of the dac lsb register. Create two macros to shift the lsb register value into lsb position, depending on whether the dac is 10 or 12 bit. Initialize data to 0 so, with an 8 bit dac, the msb register value can be bitwise ORed with