]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hwmon: (max1111) Change sysfs interface to in[0-3]_input in millivolts
authorEric Miao <eric.y.miao@gmail.com>
Tue, 22 Nov 2011 00:08:52 +0000 (11:08 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 22 Nov 2011 00:08:52 +0000 (11:08 +1100)
commitee96504b8af67c9bff431f2d9f93a621453764d0
tree8934b73a75a9f3438d12555666e25a1d03b395ab
parentcfcfc9eca2bcbd26a8e206baeb005b055dbf8e37
hwmon: (max1111) Change sysfs interface to in[0-3]_input in millivolts

This patch fixed the inconsistent max1111 sysfs interface as pointed
out by Jean Delvare:

    It was pointed to me that the max1111 driver doesn't implement the
    standard sysfs interface for hwmon drivers (as described in
    Documentation/hwmon/sysfs-interface). It exports files adc[0-3]_in,
    which
    aren't part of the standard interface. Presumably these should be
    renamed to in[0-3]_input. Renaming them is probably not sufficient
    though, as I see no scaling done in the driver. As the MAX1111 chip has
    a documented full scale of 2.048V, I take it that the LSB of the ADC
    has a weight of 8 mV. Exporting raw register values to user-space is
    not OK.

Reported-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/hwmon/max1111.c