Bug 85476 - add device/name to /sys/class/hwmon/hwmonX/ to better follow hwmon practices
Summary: add device/name to /sys/class/hwmon/hwmonX/ to better follow hwmon practices
Status: RESOLVED MOVED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium enhancement
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-26 09:53 UTC by Henrik Asp
Modified: 2019-11-19 08:58 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
possible fix (937 bytes, patch)
2014-10-26 18:40 UTC, Alex Deucher
no flags Details | Splinter Review

Description Henrik Asp 2014-10-26 09:53:20 UTC
Hope this is the right place to post this.. If not would you kindly point me to the right place?

Toying around in /sys/class/hwmon while writing pwm controller script i noticed my radeonhd 7970 doesnt expose /sys/class/hwmon/hwmonX/device/name like all my other devices does. Seems like a bug?

Using kernel 3.17.1, mesa 10.3.1.
Comment 1 Alex Deucher 2014-10-26 18:08:29 UTC
It does provide a name via /sys/class/hwmon/hwmonX/name.  The driver calls hwmon_device_register_with_groups() and passes the name to hwmon.
Comment 2 Henrik Asp 2014-10-26 18:21:19 UTC
Oh yeah, it does, didnt notice that. That'll work =)

None of my other devices do though. They all place name in the device folder.
Comment 3 Alex Deucher 2014-10-26 18:40:09 UTC
Created attachment 108466 [details] [review]
possible fix

(In reply to Henrik Asp from comment #2)
> Oh yeah, it does, didnt notice that. That'll work =)
> 
> None of my other devices do though. They all place name in the device folder.

I'm not entirely sure how that's done off hand.  I guess it may take the name from the device structure passed in.  Does the attached patch fix it?
Comment 4 Henrik Asp 2014-10-26 21:20:32 UTC
Doesnt seem to have made any difference.

Since i had to recompile i also upgraded from linux 3.16 to 3.17, and it seems fam15h_power moved hwmonX/device/name to hwmonX/name. dunno what to make of that...
Comment 5 Alex Deucher 2014-10-27 01:02:53 UTC
Might be worth asking the hwmon people.  I'm not sure how hwmon decides where to hang the name element in the sysfs tree.
Comment 6 Martin Peres 2019-11-19 08:58:07 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/552.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.