Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mfd: cros_ec: Separate charge-control probing from USB-PD

The charge-control subsystem in the ChromeOS EC is not strictly tied to
its USB-PD subsystem.

Since commit 7613bc0d116a ("mfd: cros_ec: Don't load charger with UCSI")
the presence of EC_FEATURE_UCSI_PPM would inhibit the probing of the
charge-control driver.

Furthermore recent versions of the EC firmware in Framework laptops
hard-disable EC_FEATURE_USB_PD to avoid probing cros-usbpd-charger,
which then also breaks cros-charge-control.

Instead use the dedicated EC_FEATURE_CHARGER.

Cc: stable@vger.kernel.org
Link: https://github.com/FrameworkComputer/EmbeddedController/commit/1d7bcf1d50137c8c01969eb65880bc83e424597e
Fixes: 555b5fcdb844 ("mfd: cros_ec: Register charge control subdevice")
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Tested-by: Tom Vincent <linux@tlvince.com>
Link: https://lore.kernel.org/r/20250521-cros-ec-mfd-chctl-probe-v1-1-6ebfe3a6efa7@weissschuh.net
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Thomas Weißschuh and committed by
Lee Jones
e40fc116 6f27d26e

+9 -1
+9 -1
drivers/mfd/cros_ec_dev.c
··· 87 87 }; 88 88 89 89 static const struct mfd_cell cros_usbpd_charger_cells[] = { 90 - { .name = "cros-charge-control", }, 91 90 { .name = "cros-usbpd-charger", }, 92 91 { .name = "cros-usbpd-logger", }, 93 92 }; ··· 109 110 110 111 static const struct mfd_cell cros_ec_ucsi_cells[] = { 111 112 { .name = "cros_ec_ucsi", }, 113 + }; 114 + 115 + static const struct mfd_cell cros_ec_charge_control_cells[] = { 116 + { .name = "cros-charge-control", }, 112 117 }; 113 118 114 119 static const struct cros_feature_to_cells cros_subdevices[] = { ··· 150 147 .id = EC_FEATURE_PWM_KEYB, 151 148 .mfd_cells = cros_ec_keyboard_leds_cells, 152 149 .num_cells = ARRAY_SIZE(cros_ec_keyboard_leds_cells), 150 + }, 151 + { 152 + .id = EC_FEATURE_CHARGER, 153 + .mfd_cells = cros_ec_charge_control_cells, 154 + .num_cells = ARRAY_SIZE(cros_ec_charge_control_cells), 153 155 }, 154 156 }; 155 157