summaryrefslogtreecommitdiff
path: root/drivers/hwmon/occ/p8_i2c.c
diff options
context:
space:
mode:
authorEddie James <eajames@linux.ibm.com>2022-04-27 17:04:43 +0300
committerGuenter Roeck <linux@roeck-us.net>2022-05-20 20:57:06 +0300
commit849b0156d9960da628a06756bb920d9571c15e66 (patch)
treed656c69ad3ef83cff6210a356f92804ff1e41495 /drivers/hwmon/occ/p8_i2c.c
parentc3963bc0a0cf9ecb205a9d4976eb92b6df2fa3fd (diff)
downloadlinux-849b0156d9960da628a06756bb920d9571c15e66.tar.xz
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>
Diffstat (limited to 'drivers/hwmon/occ/p8_i2c.c')
-rw-r--r--drivers/hwmon/occ/p8_i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/occ/p8_i2c.c b/drivers/hwmon/occ/p8_i2c.c
index 9e61e1fb5142..da39ea28df31 100644
--- a/drivers/hwmon/occ/p8_i2c.c
+++ b/drivers/hwmon/occ/p8_i2c.c
@@ -223,7 +223,7 @@ static int p8_i2c_occ_probe(struct i2c_client *client)
occ->poll_cmd_data = 0x10; /* P8 OCC poll data */
occ->send_cmd = p8_i2c_occ_send_cmd;
- return occ_setup(occ, "p8_occ");
+ return occ_setup(occ);
}
static int p8_i2c_occ_remove(struct i2c_client *client)