Devicetree functions are stubbed out if CONFIG_OF is undefined.
Therefore, conditional compilation is unnecessary and can be removed.
Signed-off-by: Guenter Roeck <[email protected]>
Reviewed-by: Jean Delvare <[email protected]>
The debug messages in this driver have little if any value. Drop them.
Signed-off-by: Guenter Roeck <[email protected]>
Reviewed-by: Jean Delvare <[email protected]>
Fix:
ERROR: Macros with complex values should be enclosed in parenthesis
by unwinding the problematic macros.
Signed-off-by: Guenter Roeck <[email protected]>
Many hwmon drivers use jiffies but omit the inclusion of the header
file. Fix that, and also fix one driver which was including the header
file but didn't need it.
Signed-off-by: Jean Delvare <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
Acked-by: Luca Tettamanti <[email protected]>
Cc: Marc Hulsman <[email protected]>
Cc: Rudolf Marek <[email protected]>
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Ira W. Snyder <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Add support for exposing all GPIO pins as analog voltages. Though this is
not an ideal use of the chip, some hardware engineers may decide that the
LTC4245 meets their design requirements when studying the datasheet.
The GPIO pins are sampled in round-robin fashion, meaning that a slow
reader will see stale data. A userspace application can detect this,
because it will get -EAGAIN when reading from a sysfs file which contains
stale data.
Users can choose to use this feature on a per-chip basis by using either
platform data or the OF device tree (where applicable).
Signed-off-by: Ira W. Snyder <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Read only one of the GPIO pins as an analog voltage. The ADC can be
switched to a different GPIO pin at runtime, but this is not supported.
Previously, this driver would report the analog voltage of the currently
selected GPIO pin as all three GPIO voltages: in9_input, in10_input and
in11_input.
Signed-off-by: Ira W. Snyder <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Cc: [email protected]
There is no point in implementing a detect callback for the LTC4215
and LTC4245, as these devices can't be detected. It was there solely
to handle "force" module parameters to instantiate devices, but now
we have a better sysfs interface that can do the same.
So we can get rid of the ugly module parameters and the detect
callbacks. This shrinks the binary module sizes by 36% and 46%,
respectively.
Signed-off-by: Jean Delvare <[email protected]>
Cc: Ira W. Snyder <[email protected]>
When power is applied to the ltc4245 chip it sometimes reports spurious
faults, which are exposed as alarms in the hwmon output. Clear the fault
register when the driver is installed to clear the alarms.
Signed-off-by: Ira W. Snyder <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Add Linux support for the Linear Technology LTC4245 Multiple Supply Hot
Swap controller I2C monitoring interface.
Signed-off-by: Ira W. Snyder <[email protected]>
Acked-by: Hans de Goede <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>