hwmon: (occ) Delay hwmon registration until user request
authorEddie James <eajames@linux.ibm.com>
Wed, 27 Apr 2022 14:04:43 +0000 (09:04 -0500)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 20 May 2022 17:57:06 +0000 (10:57 -0700)
commit849b0156d9960da628a06756bb920d9571c15e66
treed656c69ad3ef83cff6210a356f92804ff1e41495
parentc3963bc0a0cf9ecb205a9d4976eb92b6df2fa3fd
hwmon: (occ) Delay hwmon registration until user request

Instead of registering the hwmon device at probe time, use the
existing "occ_active" sysfs file to control when the driver polls
the OCC for sensor data and registers with hwmon. The reason for
this change is that the SBE, which is the device by which the
driver communicates with the OCC, cannot handle communications
during certain system state transitions, resulting in
unrecoverable system errors.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20220427140443.11428-1-eajames@linux.ibm.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/occ/common.c
drivers/hwmon/occ/common.h
drivers/hwmon/occ/p8_i2c.c
drivers/hwmon/occ/p9_sbe.c
drivers/hwmon/occ/sysfs.c