summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/occ/p8_i2c.c
diff options
context:
space:
mode:
authorEddie James <eajames@linux.vnet.ibm.com>2018-11-08 15:05:27 -0600
committerGuenter Roeck <linux@roeck-us.net>2018-12-16 15:13:09 -0800
commitc10e753d43ebd1d17e1c62bcee20c6124c2c7cca (patch)
tree2aadb1d0e38e86b937483bee2f8921f6535c9caf /drivers/hwmon/occ/p8_i2c.c
parentaa195fe49b033db545ad986cdb2c431c37bea557 (diff)
downloadlinux-stable-c10e753d43ebd1d17e1c62bcee20c6124c2c7cca.tar.gz
linux-stable-c10e753d43ebd1d17e1c62bcee20c6124c2c7cca.tar.bz2
linux-stable-c10e753d43ebd1d17e1c62bcee20c6124c2c7cca.zip
hwmon (occ): Add sensor types and versions
Add structures to define all sensor types and versions. Add sysfs show and store functions for each sensor type. Add a method to construct the "set user power cap" command and send it to the OCC. Add rate limit to polling the OCC (in case user-space reads our hwmon entries rapidly). Signed-off-by: Eddie James <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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwmon/occ/p8_i2c.c b/drivers/hwmon/occ/p8_i2c.c
index e3326ff869c5..e4c2c047b99c 100644
--- a/drivers/hwmon/occ/p8_i2c.c
+++ b/drivers/hwmon/occ/p8_i2c.c
@@ -216,6 +216,7 @@ static int p8_i2c_occ_probe(struct i2c_client *client,
occ->bus_dev = &client->dev;
dev_set_drvdata(&client->dev, occ);
+ occ->powr_sample_time_us = 250;
occ->poll_cmd_data = 0x10; /* P8 OCC poll data */
occ->send_cmd = p8_i2c_occ_send_cmd;