mirror of
https://github.com/torvalds/linux.git
synced 2024-12-05 10:32:35 +00:00
e9de475723
The value of dac_bits is used in adt7316_show_DAC() and adt7316_store_DAC(),
and it should be either 8, 10, or 12 bits depending on the device in use. The
driver currently only assigns a value to dac_bits in
adt7316_store_da_high_resolution(). The purpose of the dac high resolution
option is not to change dac resolution for normal operation. Instead, it
is specific to an optional feature where one or two of the four dacs can
be set to output voltage proportional to temperature. If the user chooses
to set dac a and/or dac b to output voltage proportional to temperature,
the da_high_resolution attribute can optionally be enabled to use 10 bit
resolution rather than the default 8 bits. This is only available on the
10 and 12 bit dac devices. If the user attempts to read or write dacs a
or b under these settings, the driver's current behaviour is to return an
error. Dacs c and d continue to operate normally under these conditions.
With the above in mind, remove the dac_bits assignments from this function
since the value of dac_bits as used in the driver is not dependent on this
dac high resolution option.
Since the dac_bits assignments discussed above are currently the only ones
in this driver, the default value of dac_bits is 0. This results in incorrect
calculations when the dacs are read or written in adt7316_show_DAC() and
adt7316_store_DAC(). To correct this, assign a value to dac_bits in
adt7316_probe() to ensure correct operation as soon as the device is
registered and available to userspace.
Fixes:
|
||
---|---|---|
.. | ||
android | ||
axis-fifo | ||
board | ||
clocking-wizard | ||
comedi | ||
emxx_udc | ||
erofs | ||
fbtft | ||
fsl-dpaa2 | ||
fwserial | ||
gasket | ||
gdm724x | ||
goldfish | ||
greybus | ||
gs_fpgaboot | ||
iio | ||
ks7010 | ||
media | ||
most | ||
mt29f_spinand | ||
mt7621-dma | ||
mt7621-dts | ||
mt7621-eth | ||
mt7621-mmc | ||
mt7621-pci | ||
mt7621-pinctrl | ||
mt7621-spi | ||
netlogic | ||
nvec | ||
octeon | ||
octeon-usb | ||
olpc_dcon | ||
pi433 | ||
rtl8188eu | ||
rtl8192e | ||
rtl8192u | ||
rtl8712 | ||
rtl8723bs | ||
rtlwifi | ||
rts5208 | ||
sm750fb | ||
speakup | ||
unisys | ||
vboxvideo | ||
vc04_services | ||
vme | ||
vt6655 | ||
vt6656 | ||
wilc1000 | ||
wlan-ng | ||
xgifb | ||
Kconfig | ||
Makefile |