Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 410BC1CAA79 for ; Sat, 16 Aug 2025 07:42:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755330128; cv=none; b=OC1SyJvQBHJvhY0YBi4fv4RF96W7hFUuJv9pbQFwAPlBC0rm+qhHodLrMsi3jumhk3XRD+8lJ9PelcHS9jL1DAcLdp0fDH2WZKdby8dSWeBpZYhY8X0LsBV+Yy5FBPUoIiE5CnLjV3/Sc1nyH56NxjEOypf5UFyyUeMk4+BAUNI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755330128; c=relaxed/simple; bh=PKAy7NKQ9b7GKaJA9EG0psp26OwMGeW61of9HNYBSNM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Ehxjfyfg9DhtFCnXVJ8OijMo7PHQQbRcsQke2FKEh/wohWsriEQ2APYtIizdZr7hDOLZ+QlBIk1WpJ3pQjqRm1fPGHFkaAcA2DSGLWKFhyS0Y1hbdOigynrcQxaOlZ96LpdhpF9UDrid0oBZVW8MqkRqPnVfmToL5VJ4U3d/tqo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=Bx6PgVNm; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="Bx6PgVNm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1755330123; bh=PKAy7NKQ9b7GKaJA9EG0psp26OwMGeW61of9HNYBSNM=; h=From:To:Cc:Subject:Date:From; b=Bx6PgVNm7c9VxTaB4+jaGSdc8xljuobNzzSrwh/iuTRdTbl67xSWyCrnWRPmM04Tu igAcbF+WjRtgQXJqblmMboqn9mAkxiVs9/vT/tiA0zKmf3yNRArxrfH3MpUEo+Qtr5 3v7H9jtYJuxW7roRRqrVZKGlJDtGe9UK2k9Pn/Ww= From: linux@weissschuh.net To: stable@vger.kernel.org Cc: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Tzung-Bi Shih , Tom Vincent , Lee Jones Subject: [PATCH 6.12] mfd: cros_ec: Separate charge-control probing from USB-PD Date: Sat, 16 Aug 2025 09:42:03 +0200 Message-ID: <20250816074203.834081-1-linux@weissschuh.net> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Thomas Weißschuh [ Upstream commit e40fc1160d491c3bcaf8e940ae0dde0a7c5e8e14 ] 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 Reviewed-by: Tzung-Bi Shih Tested-by: Tom Vincent Link: https://lore.kernel.org/r/20250521-cros-ec-mfd-chctl-probe-v1-1-6ebfe3a6efa7@weissschuh.net Signed-off-by: Lee Jones --- drivers/mfd/cros_ec_dev.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c index f3dc812b359f..78c48dc624e8 100644 --- a/drivers/mfd/cros_ec_dev.c +++ b/drivers/mfd/cros_ec_dev.c @@ -87,7 +87,6 @@ static const struct mfd_cell cros_ec_sensorhub_cells[] = { }; static const struct mfd_cell cros_usbpd_charger_cells[] = { - { .name = "cros-charge-control", }, { .name = "cros-usbpd-charger", }, { .name = "cros-usbpd-logger", }, }; @@ -108,6 +107,10 @@ static const struct mfd_cell cros_ec_keyboard_leds_cells[] = { { .name = "cros-keyboard-leds", }, }; +static const struct mfd_cell cros_ec_charge_control_cells[] = { + { .name = "cros-charge-control", }, +}; + static const struct cros_feature_to_cells cros_subdevices[] = { { .id = EC_FEATURE_CEC, @@ -144,6 +147,11 @@ static const struct cros_feature_to_cells cros_subdevices[] = { .mfd_cells = cros_ec_keyboard_leds_cells, .num_cells = ARRAY_SIZE(cros_ec_keyboard_leds_cells), }, + { + .id = EC_FEATURE_CHARGER, + .mfd_cells = cros_ec_charge_control_cells, + .num_cells = ARRAY_SIZE(cros_ec_charge_control_cells), + }, }; static const struct mfd_cell cros_ec_platform_cells[] = { -- 2.50.1