|
|
88f3771 |
From 99c44df299d96db6a170ccce9b8108fc2e7f8bae Mon Sep 17 00:00:00 2001
|
|
|
88f3771 |
From: Hans de Goede <hdegoede@redhat.com>
|
|
|
88f3771 |
Date: Tue, 2 May 2017 13:40:44 +0200
|
|
|
88f3771 |
Subject: [PATCH 04/16] platform/x86: intel_cht_int33fe: Set supplied-from
|
|
|
88f3771 |
property on max17047 dev
|
|
|
88f3771 |
|
|
|
88f3771 |
Devices with the intel_cht_int33fe ACPI device use a max17047 fuel-gauge
|
|
|
88f3771 |
combined with a bq24272i charger, in order for the fuel-gauge driver to
|
|
|
88f3771 |
correctly display charging / discharging status it needs to know which
|
|
|
88f3771 |
charger is supplying the battery.
|
|
|
88f3771 |
|
|
|
88f3771 |
This commit sets the supplied-from device property to the name of the
|
|
|
88f3771 |
bq24272i charger for this.
|
|
|
88f3771 |
|
|
|
88f3771 |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
88f3771 |
---
|
|
|
88f3771 |
drivers/platform/x86/intel_cht_int33fe.c | 8 ++++++++
|
|
|
88f3771 |
1 file changed, 8 insertions(+)
|
|
|
88f3771 |
|
|
|
88f3771 |
diff --git a/drivers/platform/x86/intel_cht_int33fe.c b/drivers/platform/x86/intel_cht_int33fe.c
|
|
|
88f3771 |
index 6a1b2ca5b6fe..da706e2c4232 100644
|
|
|
88f3771 |
--- a/drivers/platform/x86/intel_cht_int33fe.c
|
|
|
88f3771 |
+++ b/drivers/platform/x86/intel_cht_int33fe.c
|
|
|
88f3771 |
@@ -34,6 +34,13 @@ struct cht_int33fe_data {
|
|
|
88f3771 |
struct i2c_client *pi3usb30532;
|
|
|
88f3771 |
};
|
|
|
88f3771 |
|
|
|
88f3771 |
+static const char * const max17047_suppliers[] = { "bq24190-charger" };
|
|
|
88f3771 |
+
|
|
|
88f3771 |
+static const struct property_entry max17047_props[] = {
|
|
|
88f3771 |
+ PROPERTY_ENTRY_STRING_ARRAY("supplied-from", max17047_suppliers),
|
|
|
88f3771 |
+ { }
|
|
|
88f3771 |
+};
|
|
|
88f3771 |
+
|
|
|
88f3771 |
static int cht_int33fe_probe(struct i2c_client *client)
|
|
|
88f3771 |
{
|
|
|
88f3771 |
struct device *dev = &client->dev;
|
|
|
88f3771 |
@@ -70,6 +77,7 @@ static int cht_int33fe_probe(struct i2c_client *client)
|
|
|
88f3771 |
|
|
|
88f3771 |
memset(&board_info, 0, sizeof(board_info));
|
|
|
88f3771 |
strlcpy(board_info.type, "max17047", I2C_NAME_SIZE);
|
|
|
88f3771 |
+ board_info.properties = max17047_props;
|
|
|
88f3771 |
|
|
|
88f3771 |
data->max17047 = i2c_acpi_new_device(dev, 1, &board_info);
|
|
|
88f3771 |
if (!data->max17047)
|
|
|
88f3771 |
--
|
|
|
88f3771 |
2.13.0
|
|
|
88f3771 |
|