diff options
author | Eddie James <eajames@linux.vnet.ibm.com> | 2018-11-09 00:05:27 +0300 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2018-12-17 02:13:09 +0300 |
commit | c10e753d43ebd1d17e1c62bcee20c6124c2c7cca (patch) | |
tree | 2aadb1d0e38e86b937483bee2f8921f6535c9caf /drivers/hwmon/occ/p9_sbe.c | |
parent | aa195fe49b033db545ad986cdb2c431c37bea557 (diff) | |
download | linux-c10e753d43ebd1d17e1c62bcee20c6124c2c7cca.tar.xz |
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/p9_sbe.c')
-rw-r--r-- | drivers/hwmon/occ/p9_sbe.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwmon/occ/p9_sbe.c b/drivers/hwmon/occ/p9_sbe.c index 0ed5e22143ae..b33f4fe63fbb 100644 --- a/drivers/hwmon/occ/p9_sbe.c +++ b/drivers/hwmon/occ/p9_sbe.c @@ -69,6 +69,7 @@ static int p9_sbe_occ_probe(struct platform_device *pdev) occ->bus_dev = &pdev->dev; platform_set_drvdata(pdev, occ); + occ->powr_sample_time_us = 500; occ->poll_cmd_data = 0x20; /* P9 OCC poll data */ occ->send_cmd = p9_sbe_occ_send_cmd; |