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: > > > > @@ -651,10 +649,12 @@ stati

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

2018-12-13 Thread Dan Carpenter
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: > > > @@ -651,10 +649,12 @@ static ssize_t > > > adt7316_store_da_high_resolution(struct device *dev, >

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; > > > > + if (chip->id == ID_AD

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

2018-12-12 Thread Dan Carpenter
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; > > + if (chip->id == ID_ADT7318 || chip->id == ID_ADT7519) > + return -EPERM; return

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

2018-12-11 Thread Jeremy Fertic
The dac high resolution option enables or disables 10 bit dac resolution for the adt7316/7 and adt7516/7 when they're set to output voltage proportional to temperature. Remove the "1 (12 bits)" output from the show function since that is not an option for this mode. Return "1 (10 bits)" if the devi