[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241118-add_charger_state-v1-3-94997079f35a@chromium.org>
Date: Mon, 18 Nov 2024 17:33:48 +0800
From: "Sung-Chi, Li" <lschyi@...omium.org>
To: Benson Leung <bleung@...omium.org>, Tzung-Bi Shih <tzungbi@...nel.org>,
Guenter Roeck <groeck@...omium.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Lee Jones <lee@...nel.org>
Cc: linux-kernel@...r.kernel.org, chrome-platform@...ts.linux.dev,
devicetree@...r.kernel.org
Subject: [PATCH 3/3] mfd: cros_ec: Add charge state control cell
The driver of controlling the charge chip connected on the ChromeOS
Embedded Controller (EC) is added in the commit "platform/chrome:
cros_ec_charge_state: add new driver to control charge". To register
the charge state sub-devices, add mfd cells in the cros-ec-dev mfd
driver, and register charge state sub-devices based on whether the EC
supports battery feature.
Signed-off-by: Sung-Chi, Li <lschyi@...omium.org>
---
drivers/mfd/cros_ec_dev.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
index 9f84a52b48d6..fcb4deac3bf3 100644
--- a/drivers/mfd/cros_ec_dev.c
+++ b/drivers/mfd/cros_ec_dev.c
@@ -112,6 +112,10 @@ static const struct mfd_cell cros_ec_ucsi_cells[] = {
{ .name = "cros_ec_ucsi", },
};
+static const struct mfd_cell cros_ec_charge_state_cells[] = {
+ { .name = "cros-ec-charge-state", },
+};
+
static const struct cros_feature_to_cells cros_subdevices[] = {
{
.id = EC_FEATURE_CEC,
@@ -148,6 +152,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_BATTERY,
+ .mfd_cells = cros_ec_charge_state_cells,
+ .num_cells = ARRAY_SIZE(cros_ec_charge_state_cells),
+ },
};
static const struct mfd_cell cros_ec_platform_cells[] = {
--
2.47.0.338.g60cca15819-goog
Powered by blists - more mailing lists