Re: [PATCH v6] hwmon: add OneXPlayer mini AMD sensors driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/13/22 12:41, Armin Wolf wrote:
Am 04.11.22 um 15:07 schrieb Joaquín Ignacio Aramendía:

Sensors driver for OXP Handhelds from One-Netbook that expose fan reading
and control via hwmon sysfs.

As far as I could gather all OXP boards have the same DMI strings and
they can be told appart only by the boot cpu vendor (Intel/AMD).
Currently only AMD boards are supported since Intel have different EC
registers and values to read/write.

Fan control is provided via pwm interface in the range [0-255]. AMD
boards have [0-100] as range in the EC, the written value is scaled to
accommodate for that.

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@xxxxxxxxx>

...

+/*
+ * module_platform_driver() may be used here but somehow it breaks the module
+ * either by preventing it from loading or not exposing hwmon attributes.
+ * Either way I'm not smart enough to figure it out so I'll leave init/exit
+ * macros for now.
+ */
+module_init(oxp_platform_init);
+module_exit(oxp_platform_exit);
+

Hello,

i know i am a bit late to point that out, but AFAIK module_platform_driver() only registers a platform driver,
not the corresponding platform device. With the platform device missing, the platform driver will never load.
This is the reason why platform_create_bundle() exists, it basically registers a platform driver and
a platform device together.

Should i send a separate patch to remove the comment?.


Thanks for the note. I dropped the comment; no further action needed.

Guenter

Armin Wolf

+MODULE_AUTHOR("Joaquín Ignacio Aramendía <samsagax@xxxxxxxxx>");
+MODULE_DESCRIPTION("Platform driver that handles EC sensors of OneXPlayer devices");
+MODULE_LICENSE("GPL");
--
2.38.1





[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux