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

2019-01-05 Thread Jonathan Cameron
On Sat, 22 Dec 2018 21:57:43 -0700 Jeremy Fertic wrote: > The lsb calculation is not masking the correct bits from the user input. > Subtract 1 from (1 << offset) to correctly set up the mask to be applied > to user input. > > The lsb register stores its value starting at the bit 7 position. >

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

2018-12-22 Thread Jeremy Fertic
The lsb calculation is not masking the correct bits from the user input. Subtract 1 from (1 << offset) to correctly set up the mask to be applied to user input. The lsb register stores its value starting at the bit 7 position. adt7316_store_DAC() currently assumes the value is at the other end of