Commit 89c49138 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'tag-chrome-platform-for-v6.11' of...

Merge tag 'tag-chrome-platform-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux

Pull chrome platform updates from Tzung-Bi Shih:
 "New code:

   - Add "cros_ec_hwmon" driver to expose fan speed and temperature

   - Add "cros_charge-control" driver to control charge thresholds and
     behaviour

   - Add module parameter "log_poll_period_ms" in cros_ec_debugfs for
     tuning the poll period

   - Support version 3 of EC_CMD_GET_NEXT_EVENT and keyboard matrix

  Fixes:

   - Fix a race condition in accessing MEC (Microchip EC) memory between
     ACPI and kernel. Serialize the memory access by an AML (ACPI
     Machine Language) mutex

   - Fix an issue of wrong EC message version in cros_ec_debugfs

  Misc:

   - Fix kernel-doc errors and cleanups"

* tag 'tag-chrome-platform-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: (28 commits)
  power: supply: cros_charge-control: Fix signedness bug in charge_behaviour_store()
  power: supply: cros_charge-control: Avoid accessing attributes out of bounds
  power: supply: cros_charge-control: don't load if Framework control is present
  power: supply: add ChromeOS EC based charge control driver
  platform/chrome: cros_ec_proto: Introduce cros_ec_get_cmd_versions()
  platform/chrome: Update binary interface for EC-based charge control
  ACPI: battery: add devm_battery_hook_register()
  dt-bindings: input: cros-ec-keyboard: Add keyboard matrix v3.0
  platform/chrome: cros_ec_lpc: Handle zero length read/write
  platform/chrome: cros_ec_lpc: Fix error code in cros_ec_lpc_mec_read_bytes()
  platform/chrome: cros_ec_debugfs: fix wrong EC message version
  platform/chrome: cros_ec_proto: update Kunit test for get_next_data_v3
  platform/chrome: cros_ec_proto: add missing MODULE_DESCRIPTION() macro
  hwmon: (cros_ec) Fix access to restricted __le16
  hwmon: (cros_ec) Prevent read overflow in probe()
  platform/chrome: cros_ec_lpc: Add quirks for Framework Laptop
  platform/chrome: cros_ec_lpc: Add a new quirk for AML mutex
  platform/chrome: cros_ec_lpc: Add a new quirk for ACPI id
  platform/chrome: cros_ec_lpc: MEC access can use an AML mutex
  platform/chrome: cros_ec_lpc: MEC access can return error code
  ...
parents d8764c19 4baf1cc5
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
+14 −0
Original line number Diff line number Diff line
@@ -5128,11 +5128,25 @@ S: Maintained
F:	Documentation/devicetree/bindings/sound/google,cros-ec-codec.yaml
F:	sound/soc/codecs/cros_ec_codec.*
CHROMEOS EC CHARGE CONTROL
M:	Thomas Weißschuh <thomas@weissschuh.net>
S:	Maintained
F:	drivers/power/supply/cros_charge-control.c
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>
L:	chrome-platform@lists.linux.dev
S:	Maintained
F:	drivers/power/supply/cros_charge-control.c
F:	drivers/power/supply/cros_usbpd-charger.c
N:	cros_ec
N:	cros-ec
+15 −0
Original line number Diff line number Diff line
@@ -756,6 +756,21 @@ void battery_hook_register(struct acpi_battery_hook *hook)
}
EXPORT_SYMBOL_GPL(battery_hook_register);

static void devm_battery_hook_unregister(void *data)
{
	struct acpi_battery_hook *hook = data;

	battery_hook_unregister(hook);
}

int devm_battery_hook_register(struct device *dev, struct acpi_battery_hook *hook)
{
	battery_hook_register(hook);

	return devm_add_action_or_reset(dev, devm_battery_hook_unregister, hook);
}
EXPORT_SYMBOL_GPL(devm_battery_hook_register);

/*
 * This function gets called right after the battery sysfs
 * attributes have been added, so that the drivers that
+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
Loading