hwmon: add OneXPlayer mini AMD sensors driver
authorJoaquín Ignacio Aramendía <samsagax@gmail.com>
Fri, 4 Nov 2022 14:07:00 +0000 (11:07 -0300)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 5 Dec 2022 00:45:02 +0000 (16:45 -0800)
commited264e8a7d18c5fec2587ed750c87b75d5348210
tree9b7ac6bcac868b9ce2dbb68355fc062068f0efd4
parentd5d896b838222fcd037c91c9e0e8f6ab719db05f
hwmon: add OneXPlayer mini AMD sensors driver

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@gmail.com>
Link: https://lore.kernel.org/r/20221104140659.593608-1-samsagax@gmail.com
[groeck: Removed misleading comment about module_platform_driver()]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/index.rst
Documentation/hwmon/oxp-sensors.rst [new file with mode: 0644]
MAINTAINERS
drivers/hwmon/Kconfig
drivers/hwmon/Makefile
drivers/hwmon/oxp-sensors.c [new file with mode: 0644]