Files
linux/drivers/staging
Jeremy Fertic 78accaea11 staging: iio: adt7316: fix the dac write calculation
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 the
register. Shift the lsb value before storing it in a new variable lsb_reg,
and write this variable to the lsb register.

Fixes: 35f6b6b86e ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver")
Signed-off-by: Jeremy Fertic <jeremyfertic@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-01-05 17:57:06 +00:00
..
2018-12-12 11:30:05 +01:00
2018-11-12 14:43:15 -08:00
2018-12-10 09:23:50 +01:00
2018-12-10 09:23:50 +01:00
2018-11-07 13:07:26 +01:00
2018-10-02 15:14:14 -07:00
2018-10-02 15:14:14 -07:00