[PATCH linux dev-4.10 0/2] drivers: hwmon: occ: sysfs_notify and presence detect

Eddie James eajames at linux.vnet.ibm.com
Thu Oct 12 07:59:01 AEDT 2017



On 10/11/2017 01:01 AM, Andrew Jeffery wrote:
> On Fri, 2017-10-06 at 15:42 -0500, Eddie James wrote:
>>> From: "Edward A. James" <eajames at us.ibm.com>
>> This patch set removes the error checking for the number of OCCs present.
> I'm interested in the back-story here. Why are we making this change in
> behaviour?

Sure, basically two reasons:

1) userspace app was having trouble handling this error code, since if 
you bind the master OCC device first, you'll immediately get an error 
that we haven't bound the same number of OCCs as the OCC reports are 
available.

2) This error checking for "number of OCC devices bound" isn't designed 
well anyway, and makes more sense in userspace. The original intent was 
to implement all of the OCC requirements in the driver, but we have an 
application running on top that can pick up the slack, as it were.

Thanks,
Eddie

>
> Cheers,
>
> Andrew
>
>> Instead, export a new sysfs attribute to indicate the number of OCCs present
>> from the master poll response. In addition, add sysfs_notify both to the new
>> occs_present attribute and the throttling attributes.
>>
>> Edward A. James (2):
>>    drivers: hwmon: occ: Add occs_present attribute
>>    drivers: hwmon: occ: Add sysfs_notify to throttling attributes
>>
>>   drivers/hwmon/occ/common.c | 49 ++++++++++++++++++++++++++++++++++------------
>>   drivers/hwmon/occ/common.h |  3 ---
>>   drivers/hwmon/occ/p8_i2c.c |  4 ----
>>   drivers/hwmon/occ/p9_sbe.c |  4 ----
>>   4 files changed, 37 insertions(+), 23 deletions(-)



More information about the openbmc mailing list