hwmon: (adt7475) Add support for pin configuration
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Wed, 23 Mar 2022 03:40:55 +0000 (16:40 +1300)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 22 May 2022 18:32:31 +0000 (11:32 -0700)
commit7b8664f126e90d1d2129b8653c587bf230dd800c
tree31cb0043eb9b92e102babf15cd81a628a9a8fecb
parent4fc1b113624784cf1a3b5b1ea813afca2a0b9dcc
hwmon: (adt7475) Add support for pin configuration

The adt7473, adt7475, adt7476 and adt7490 have pins that can be used for
different functions. On the adt7473 and  adt7475 this is pins 5 and 9.
On the adt7476 and adt7490 this is pins 10 and 14.

The first pin can either be PWM2(default) or SMBALERT#. The second pin
can be TACH4(default), THERM#, SMBALERT# or GPIO.

The adt7475 driver has always been able to detect the configuration if
it had been done by an earlier boot stage. Add support for configuring
the pins based on the hardware description in the device tree.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220323034056.260455-3-chris.packham@alliedtelesis.co.nz
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/adt7475.c