[PATCH linux] hwmon: power8_occ_i2c: Add more hwmon sysfs attribute definition to s…

OpenBMC Patches openbmc-patches at stwcx.xyz
Tue Mar 22 19:10:28 AEDT 2016


…upport more sensors

This patch fixes issue: https://github.com/openbmc/skeleton/issues/58

The hwmon sys attributes are created using statically defined arrays.
Some POWER CPU has 10-core, while some POWER CPU has 12-core.
The more cores, the more OCC sensors. E.g, for 12-core CPU,
there will be 28 temperature sensors. The statically defined
array will overflow in this case.

This is a temporary fix. Will need to generate the hwmon sysfs attributes
dynamically based on sensor number.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/openbmc/linux/65)
<!-- Reviewable:end -->


https://github.com/openbmc/linux/pull/65

Yi Li (1):
  hwmon: power8_occ_i2c: Add more hwmon sysfs attribute definition to
    support more sensors

 drivers/hwmon/power8_occ_i2c.c | 52 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 51 insertions(+), 1 deletion(-)

-- 
2.7.1




More information about the openbmc mailing list