Commit bc3e4525 authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Tzung-Bi Shih
Browse files

hwmon: add ChromeOS EC driver



The ChromeOS Embedded Controller exposes fan speed and temperature
readings.
Expose this data through the hwmon subsystem.

The driver is designed to be probed via the cros_ec mfd device.

Signed-off-by: default avatarThomas Weißschuh <linux@weissschuh.net>
Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20240529-cros_ec-hwmon-v4-2-5cdf0c5db50a@weissschuh.net


[tzungbi: Fixed typo in MAINTAINERS: "chros_ec_hwmon" -> "cros_ec_hwmon"]
Signed-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
parent a14a569a
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
.. SPDX-License-Identifier: GPL-2.0-or-later

Kernel driver cros_ec_hwmon
===========================

Supported chips:

  * ChromeOS embedded controllers.

    Prefix: 'cros_ec'

    Addresses scanned: -

Author:

  - Thomas Weißschuh <linux@weissschuh.net>

Description
-----------

This driver implements support for hardware monitoring commands exposed by the
ChromeOS embedded controller used in Chromebooks and other devices.

The channel labels exposed via hwmon are retrieved from the EC itself.

Fan and temperature readings are supported.
+1 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ Hardware Monitoring Kernel Drivers
   coretemp
   corsair-cpro
   corsair-psu
   cros_ec_hwmon
   da9052
   da9055
   dell-smm-hwmon
+8 −0
Original line number Diff line number Diff line
@@ -5135,6 +5135,14 @@ S: Maintained
F:	Documentation/devicetree/bindings/sound/google,cros-ec-codec.yaml
F:	sound/soc/codecs/cros_ec_codec.*
CHROMEOS EC HARDWARE MONITORING
M:	Thomas Weißschuh <thomas@weissschuh.net>
L:	chrome-platform@lists.linux.dev
L:	linux-hwmon@vger.kernel.org
S:	Maintained
F:	Documentation/hwmon/cros_ec_hwmon.rst
F:	drivers/hwmon/cros_ec_hwmon.c
CHROMEOS EC SUBDRIVERS
M:	Benson Leung <bleung@chromium.org>
R:	Guenter Roeck <groeck@chromium.org>
+11 −0
Original line number Diff line number Diff line
@@ -506,6 +506,17 @@ config SENSORS_CORSAIR_PSU
	  This driver can also be built as a module. If so, the module
	  will be called corsair-psu.

config SENSORS_CROS_EC
	tristate "ChromeOS Embedded Controller sensors"
	depends on MFD_CROS_EC_DEV
	default MFD_CROS_EC_DEV
	help
	  If you say yes here you get support for ChromeOS Embedded Controller
	  sensors.

	  This driver can also be built as a module. If so, the module
	  will be called cros_ec_hwmon.

config SENSORS_DRIVETEMP
	tristate "Hard disk drives with temperature sensors"
	depends on SCSI && ATA
+1 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ obj-$(CONFIG_SENSORS_CHIPCAP2) += chipcap2.o
obj-$(CONFIG_SENSORS_CORETEMP)	+= coretemp.o
obj-$(CONFIG_SENSORS_CORSAIR_CPRO) += corsair-cpro.o
obj-$(CONFIG_SENSORS_CORSAIR_PSU) += corsair-psu.o
obj-$(CONFIG_SENSORS_CROS_EC)	+= cros_ec_hwmon.o
obj-$(CONFIG_SENSORS_DA9052_ADC)+= da9052-hwmon.o
obj-$(CONFIG_SENSORS_DA9055)+= da9055-hwmon.o
obj-$(CONFIG_SENSORS_DELL_SMM)	+= dell-smm-hwmon.o
Loading