Skip to contentSkip to conversation

i2c: Hookup typec power-negotation to the PMIC and charger

PATCH Superseded Hans de Goede 3 participants 9 messages Sep 3, 2017 – Sep 4, 2017

Subsystems (4)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v4 cover i2c: Hookup typec power-negotation to the PMIC and charger

Hi Wolfram,

Almost all patches from my patch series for hooking up typec power-negotation to the PMIC and charger drivers have been queued for merging into 4.14, leaving only the 3 patches of the v4 of this series.

The first 2 patches are i2c patches, if you could review and merge these (preferably for 4.14, but 4.15 is fine too) that would be great.

Darren, Andy, the single platform/x86 patch in here should only
be merged after the 2 i2c patches are in place, otherwise users
of the board(s) in question will end up not having any battery monitoring. Also note that this patch applies on top of the
"[PATCH v2] platform/x86: intel_cht_int33fe: Work around BIOS bug on some devices" patch I send out yesterday.

Regards,

Hans

#1 lore raw

PATCH v4 1/3 i2c: Allow overriding dev_name through board_info

For devices not instantiated through ACPI the i2c-client's device-name gets set to <busnr>-<addr> by default, e.g. "0-0022" this means that the device-name is dependent on the order in which the i2c-busses are enumerated.

In some cases having a predictable constant device-name is desirable, for example on non device-tree platforms the link between a regulator and its consumers is specified by the platform code by setting regulator_init_data.consumers. This array identifies the regulator's consumers by dev_name and supply(-name). Which requires a constant dev_name.

This commit adds a dev_name field to i2c_board_info allowing platform code to set a contstant dev_name so that the device can be identified by its dev_name in other platform code.

---
 drivers/i2c/i2c-core-base.c | 10 ++++++++--
 include/linux/i2c.h         |  2 ++
 2 files changed, 10 insertions(+), 2 deletions(-)
drivers/i2c/i2c-core-base.c +8 -2
index 45fafcc88b93..5cdf3b947c23 100644
@@ -672,10 +672,16 @@ static void i2c_adapter_unlock_bus(struct i2c_adapter *adapter,
 }
 
 static void i2c_dev_set_name(struct i2c_adapter *adap,
-			     struct i2c_client *client)
+			     struct i2c_client *client,
+			     struct i2c_board_info const *info)
 {
 	struct acpi_device *adev = ACPI_COMPANION(&client->dev);
 
+	if (info && info->dev_name) {
+		dev_set_name(&client->dev, "i2c-%s", info->dev_name);
+		return;
+	}
+
 	if (adev) {
 		dev_set_name(&client->dev, "i2c-%s", acpi_dev_name(adev));
 		return;
@@ -772,7 +778,7 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
 	client->dev.of_node = info->of_node;
 	client->dev.fwnode = info->fwnode;
 
-	i2c_dev_set_name(adap, client);
+	i2c_dev_set_name(adap, client, info);
 
 	if (info->properties) {
 		status = device_add_properties(&client->dev, info->properties);
include/linux/i2c.h +2 -0
index 701ad26fa6b4..d3655cfe9a3e 100644
@@ -310,6 +310,7 @@ static inline bool i2c_detect_slave_mode(struct device *dev) { return false; }
  * @type: chip type, to initialize i2c_client.name
  * @flags: to initialize i2c_client.flags
  * @addr: stored in i2c_client.addr
+ * @dev_name: Overrides the default <busnr>-<addr> dev_name if set
  * @platform_data: stored in i2c_client.dev.platform_data
  * @archdata: copied into i2c_client.dev.archdata
  * @of_node: pointer to OpenFirmware device node
@@ -334,6 +335,7 @@ struct i2c_board_info {
 	char		type[I2C_NAME_SIZE];
 	unsigned short	flags;
 	unsigned short	addr;
+	const char	*dev_name;
 	void		*platform_data;
 	struct dev_archdata	*archdata;
 	struct device_node *of_node;
Signature · 1 line
2.13.4
#2 lore raw

PATCH v4 2/3 i2c-cht-wc: Add device-properties for fusb302 integration

In reply to Hans de Goede

Add device-properties to make the bq24292i charger connected to the bus get its input-current-limit from the fusb302 Type-C port controller which is used on boards with the cht-wc PMIC, as well as regulator_init_data for the 5V boost converter on the bq24292i.

Since this means we now hook-up the bq24292i to the fusb302 Type-C port controller add a check for the ACPI device which instantiates the fusb302.

---
Changes in v2:
-Set board_info.dev_name
-Define and pass regulator_init_data for the bq24292i
-Add a check for the ACPI device which instantiates the fusb302 Changes in v4:
-Drop the ti,input-current-limit-from-supplier property on the bq24292i
this is the default now

---
 drivers/i2c/busses/Kconfig      |  5 ++++
 drivers/i2c/busses/i2c-cht-wc.c | 51 +++++++++++++++++++++++++++++++++++------
 2 files changed, 49 insertions(+), 7 deletions(-)
drivers/i2c/busses/Kconfig +5 -0
index 79c33817e412..272ef10fb629 100644
@@ -197,6 +197,11 @@ config I2C_CHT_WC
 	  SMBus controller found in the Intel Cherry Trail Whiskey Cove PMIC
 	  found on some Intel Cherry Trail systems.
 
+	  Note this controller is hooked up to a TI bq24292i charger-IC,
+	  combined with a FUSB302 Type-C port-controller as such it is advised
+	  to also select CONFIG_CHARGER_BQ24190=m and CONFIG_TYPEC_FUSB302=m
+	  (the fusb302 driver currently is in drivers/staging).
+
 config I2C_NFORCE2
 	tristate "Nvidia nForce2, nForce3 and nForce4"
 	depends on PCI
drivers/i2c/busses/i2c-cht-wc.c +44 -7

94 lines not on this page · raw message

Signature · 1 line
2.13.4
#3 lore raw

PATCH v4 3/3 platform/x86: intel_cht_int33fe: Update fusb302 type string, add properties

In reply to Hans de Goede

The fusb302 driver as merged in staging uses "typec_fusb302" as i2c-id rather then just "fusb302" and needs us to set a number of device- properties, adjust the intel_cht_int33fe driver accordingly.

One of the properties set is max-snk-mv which makes the fusb302 driver negotiate up to 12V charging voltage, which is a bad idea on boards which are not setup to handle this, so this commit also adds 2 extra sanity checks to make sure that the expected Whiskey Cove PMIC + TI bq24292i charger combo, which can handle 12V, is present.

---
Changes in v2:
-Set board_info.dev_name
-Adjust for changes in other patches in this patch-set

---
 drivers/platform/x86/Kconfig             |  6 ++++-
 drivers/platform/x86/intel_cht_int33fe.c | 44 +++++++++++++++++++++++++++++++-
 2 files changed, 48 insertions(+), 2 deletions(-)
drivers/platform/x86/Kconfig +5 -1
index 80b87954f6dd..c5554577681a 100644
@@ -793,7 +793,7 @@ config ACPI_CMPC
 
 config INTEL_CHT_INT33FE
 	tristate "Intel Cherry Trail ACPI INT33FE Driver"
-	depends on X86 && ACPI && I2C
+	depends on X86 && ACPI && I2C && REGULATOR
 	---help---
 	  This driver add support for the INT33FE ACPI device found on
 	  some Intel Cherry Trail devices.
@@ -804,6 +804,10 @@ config INTEL_CHT_INT33FE
 	  This driver instantiates i2c-clients for these, so that standard
 	  i2c drivers for these chips can bind to the them.
 
+	  If you enable this driver it is advised to also select
+	  CONFIG_CHARGER_BQ24190=m, CONFIG_BATTERY_MAX17042=m and
+	  CONFIG_TYPEC_FUSB302=m (currently in drivers/staging).
+
 config INTEL_INT0002_VGPIO
 	tristate "Intel ACPI INT0002 Virtual GPIO driver"
 	depends on GPIOLIB && ACPI
drivers/platform/x86/intel_cht_int33fe.c +43 -1

86 lines not on this page · raw message

Signature · 1 line
2.13.4
Acked-by on v4 3/3
#4 lore raw

Re: [PATCH v4 3/3] platform/x86: intel_cht_int33fe: Update fusb302 type string, add properties

Quoted 9 lines · Hans de Goede

The fusb302 driver as merged in staging uses "typec_fusb302" as i2c-id rather then just "fusb302" and needs us to set a number of device- properties, adjust the intel_cht_int33fe driver accordingly.

One of the properties set is max-snk-mv which makes the fusb302 driver negotiate up to 12V charging voltage, which is a bad idea on boards which are not setup to handle this, so this commit also adds 2 extra sanity checks to make sure that the expected Whiskey Cove PMIC + TI bq24292i charger combo, which can handle 12V, is present.

(in case Wolfram would like to take it)

See comments below.

Quoted 25 lines

---
Changes in v2:

(quoted diff) +0 -3
-Set board_info.dev_name
-Adjust for changes in other patches in this patch-set
---
 drivers/platform/x86/Kconfig             |  6 ++++-
 drivers/platform/x86/intel_cht_int33fe.c | 44 +++++++++++++++++++++++++++++++-
 2 files changed, 48 insertions(+), 2 deletions(-)
drivers/platform/x86/Kconfig +1 -1
index 80b87954f6dd..c5554577681a 100644
@@ -793,7 +793,7 @@ config ACPI_CMPC
 
 config INTEL_CHT_INT33FE
        tristate "Intel Cherry Trail ACPI INT33FE Driver"
-       depends on X86 && ACPI && I2C
+       depends on X86 && ACPI && I2C && REGULATOR
        ---help---
          This driver add support for the INT33FE ACPI device found on
          some Intel Cherry Trail devices.

drivers/platform/x86/Kconfig config INTEL_CHT_INT33FE · line 810

Quoted 7 lines
drivers/platform/x86/Kconfig +4 -0
@@ -804,6 +804,10 @@ config INTEL_CHT_INT33FE
          This driver instantiates i2c-clients for these, so that standard
          i2c drivers for these chips can bind to the them.
 
+         If you enable this driver it is advised to also select
+         CONFIG_CHARGER_BQ24190=m, CONFIG_BATTERY_MAX17042=m and
+         CONFIG_TYPEC_FUSB302=m (currently in drivers/staging).
+

I would put FUSB302 first since it's not obvious now that remark in parens is related only to it. And might be better rephase the path in terms of make menuconfig rather than pathname in the source tree.

Quoted 102 lines
drivers/platform/x86/Kconfig +0 -0
 config INTEL_INT0002_VGPIO
        tristate "Intel ACPI INT0002 Virtual GPIO driver"
        depends on GPIOLIB && ACPI
drivers/platform/x86/intel_cht_int33fe.c +43 -2
index a9cbc4b8ca63..b2925d996613 100644
@@ -24,6 +24,7 @@
 #include <linux/i2c.h>
 #include <linux/interrupt.h>
 #include <linux/module.h>
+#include <linux/regulator/consumer.h>
 #include <linux/slab.h>
 
 #define EXPECTED_PTYPE         4
@@ -77,12 +78,21 @@ static const struct property_entry max17047_props[] = {
        { }
 };
 
+static const struct property_entry fusb302_props[] = {
+       PROPERTY_ENTRY_STRING("fcs,extcon-name", "cht_wcove_pwrsrc"),
+       PROPERTY_ENTRY_U32("fcs,max-sink-microvolt", 12000000),
+       PROPERTY_ENTRY_U32("fcs,max-sink-microamp",   3000000),
+       PROPERTY_ENTRY_U32("fcs,max-sink-microwatt", 36000000),
+       { }
+};
+
 static int cht_int33fe_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct i2c_board_info board_info;
        struct cht_int33fe_data *data;
        struct i2c_client *max17047;
+       struct regulator *regulator;
        unsigned long long ptyp;
        acpi_status status;
        int ret, fusb302_irq;
@@ -100,6 +110,34 @@ static int cht_int33fe_probe(struct i2c_client *client)
        if (ptyp != EXPECTED_PTYPE)
                return -ENODEV;
 
+       /* Check presence of INT34D3 (hardware-rev 3) expected for ptype == 4 */
+       if (!acpi_dev_present("INT34D3", "1", 3)) {
+               dev_err(dev, "Error PTYPE == %d, but no INT34D3 device\n",
+                       EXPECTED_PTYPE);
+               return -ENODEV;
+       }
+
+       /*
+        * We expect the WC PMIC to be paired with a TI bq24292i charger-IC.
+        * We check for the bq24292i vbus regulator here, this has 2 purposes:
+        * 1) The bq24292i allows charging with up to 12V, setting the fusb302's
+        *    max-snk voltage to 12V with another charger-IC is not good.
+        * 2) For the fusb302 driver to get the bq24292i vbus regulator, the
+        *    regulator-map, which is part of the bq24292i regulator_init_data,
+        *    must be registered before the fusb302 is instantiated, otherwise
+        *    it will end up with a dummy-regulator.
+        * Note "cht_wc_usb_typec_vbus" comes from the regulator_init_data
+        * which is defined in i2c-cht-wc.c from where the bq24292i i2c-client
+        * gets instantiated. We use regulator_get_optional here so that we
+        * don't end up getting a dummy-regulator ourselves.
+        */
+       regulator = regulator_get_optional(dev, "cht_wc_usb_typec_vbus");
+       if (IS_ERR(regulator)) {
+               ret = PTR_ERR(regulator);
+               return (ret == -ENODEV) ? -EPROBE_DEFER : ret;
+       }
+       regulator_put(regulator);
+
        /* The FUSB302 uses the irq at index 1 and is the only irq user */
        fusb302_irq = acpi_dev_gpio_irq_get(ACPI_COMPANION(dev), 1);
        if (fusb302_irq < 0) {
@@ -126,6 +164,7 @@ static int cht_int33fe_probe(struct i2c_client *client)
        } else {
                memset(&board_info, 0, sizeof(board_info));
                strlcpy(board_info.type, "max17047", I2C_NAME_SIZE);
+               board_info.dev_name = "max17047";
                board_info.properties = max17047_props;
                data->max17047 = i2c_acpi_new_device(dev, 1, &board_info);
                if (!data->max17047)
@@ -133,7 +172,9 @@ static int cht_int33fe_probe(struct i2c_client *client)
        }
 
        memset(&board_info, 0, sizeof(board_info));
-       strlcpy(board_info.type, "fusb302", I2C_NAME_SIZE);
+       strlcpy(board_info.type, "typec_fusb302", I2C_NAME_SIZE);
+       board_info.dev_name = "fusb302";
+       board_info.properties = fusb302_props;
        board_info.irq = fusb302_irq;
 
        data->fusb302 = i2c_acpi_new_device(dev, 2, &board_info);
@@ -141,6 +182,7 @@ static int cht_int33fe_probe(struct i2c_client *client)
                goto out_unregister_max17047;
 
        memset(&board_info, 0, sizeof(board_info));
+       board_info.dev_name = "pi3usb30532";
        strlcpy(board_info.type, "pi3usb30532", I2C_NAME_SIZE);
 
        data->pi3usb30532 = i2c_acpi_new_device(dev, 3, &board_info);
--

2.13.4

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#5 lore raw

Re: [PATCH v4 3/3] platform/x86: intel_cht_int33fe: Update fusb302 type string, add properties

Hi,

Quoted 45 lines · Andy Shevchenko
Quoted 9 lines · Hans de Goede

The fusb302 driver as merged in staging uses "typec_fusb302" as i2c-id rather then just "fusb302" and needs us to set a number of device- properties, adjust the intel_cht_int33fe driver accordingly.

One of the properties set is max-snk-mv which makes the fusb302 driver negotiate up to 12V charging voltage, which is a bad idea on boards which are not setup to handle this, so this commit also adds 2 extra sanity checks to make sure that the expected Whiskey Cove PMIC + TI bq24292i charger combo, which can handle 12V, is present.

(in case Wolfram would like to take it)

See comments below.

Quoted 28 lines

---
Changes in v2:

(quoted diff) +0 -3
-Set board_info.dev_name
-Adjust for changes in other patches in this patch-set
---
  drivers/platform/x86/Kconfig             |  6 ++++-
  drivers/platform/x86/intel_cht_int33fe.c | 44 +++++++++++++++++++++++++++++++-
  2 files changed, 48 insertions(+), 2 deletions(-)
drivers/platform/x86/Kconfig +1 -1
index 80b87954f6dd..c5554577681a 100644
@@ -793,7 +793,7 @@ config ACPI_CMPC
 
  config INTEL_CHT_INT33FE
         tristate "Intel Cherry Trail ACPI INT33FE Driver"
-       depends on X86 && ACPI && I2C
+       depends on X86 && ACPI && I2C && REGULATOR
         ---help---
           This driver add support for the INT33FE ACPI device found on
           some Intel Cherry Trail devices.
@@ -804,6 +804,10 @@ config INTEL_CHT_INT33FE
           This driver instantiates i2c-clients for these, so that standard
           i2c drivers for these chips can bind to the them.
 
Quoted 8 lines

drivers/platform/x86/Kconfig config INTEL_CHT_INT33FE · line 810

Quoted 4 lines
drivers/platform/x86/Kconfig +4 -0
+         If you enable this driver it is advised to also select
+         CONFIG_CHARGER_BQ24190=m, CONFIG_BATTERY_MAX17042=m and
+         CONFIG_TYPEC_FUSB302=m (currently in drivers/staging).
+

I would put FUSB302 first since it's not obvious now that remark in parens is related only to it. And might be better rephase the path in terms of make menuconfig rather than pathname in the source tree.

Ok, fixed for v5, which I will send right away.

Regards,

Hans

Quoted 105 lines
Quoted 102 lines
drivers/platform/x86/Kconfig +0 -0
  config INTEL_INT0002_VGPIO
         tristate "Intel ACPI INT0002 Virtual GPIO driver"
         depends on GPIOLIB && ACPI
drivers/platform/x86/intel_cht_int33fe.c +43 -2
index a9cbc4b8ca63..b2925d996613 100644
@@ -24,6 +24,7 @@
  #include <linux/i2c.h>
  #include <linux/interrupt.h>
  #include <linux/module.h>
+#include <linux/regulator/consumer.h>
  #include <linux/slab.h>
 
  #define EXPECTED_PTYPE         4
@@ -77,12 +78,21 @@ static const struct property_entry max17047_props[] = {
         { }
  };
 
+static const struct property_entry fusb302_props[] = {
+       PROPERTY_ENTRY_STRING("fcs,extcon-name", "cht_wcove_pwrsrc"),
+       PROPERTY_ENTRY_U32("fcs,max-sink-microvolt", 12000000),
+       PROPERTY_ENTRY_U32("fcs,max-sink-microamp",   3000000),
+       PROPERTY_ENTRY_U32("fcs,max-sink-microwatt", 36000000),
+       { }
+};
+
  static int cht_int33fe_probe(struct i2c_client *client)
  {
         struct device *dev = &client->dev;
         struct i2c_board_info board_info;
         struct cht_int33fe_data *data;
         struct i2c_client *max17047;
+       struct regulator *regulator;
         unsigned long long ptyp;
         acpi_status status;
         int ret, fusb302_irq;
@@ -100,6 +110,34 @@ static int cht_int33fe_probe(struct i2c_client *client)
         if (ptyp != EXPECTED_PTYPE)
                 return -ENODEV;
 
+       /* Check presence of INT34D3 (hardware-rev 3) expected for ptype == 4 */
+       if (!acpi_dev_present("INT34D3", "1", 3)) {
+               dev_err(dev, "Error PTYPE == %d, but no INT34D3 device\n",
+                       EXPECTED_PTYPE);
+               return -ENODEV;
+       }
+
+       /*
+        * We expect the WC PMIC to be paired with a TI bq24292i charger-IC.
+        * We check for the bq24292i vbus regulator here, this has 2 purposes:
+        * 1) The bq24292i allows charging with up to 12V, setting the fusb302's
+        *    max-snk voltage to 12V with another charger-IC is not good.
+        * 2) For the fusb302 driver to get the bq24292i vbus regulator, the
+        *    regulator-map, which is part of the bq24292i regulator_init_data,
+        *    must be registered before the fusb302 is instantiated, otherwise
+        *    it will end up with a dummy-regulator.
+        * Note "cht_wc_usb_typec_vbus" comes from the regulator_init_data
+        * which is defined in i2c-cht-wc.c from where the bq24292i i2c-client
+        * gets instantiated. We use regulator_get_optional here so that we
+        * don't end up getting a dummy-regulator ourselves.
+        */
+       regulator = regulator_get_optional(dev, "cht_wc_usb_typec_vbus");
+       if (IS_ERR(regulator)) {
+               ret = PTR_ERR(regulator);
+               return (ret == -ENODEV) ? -EPROBE_DEFER : ret;
+       }
+       regulator_put(regulator);
+
         /* The FUSB302 uses the irq at index 1 and is the only irq user */
         fusb302_irq = acpi_dev_gpio_irq_get(ACPI_COMPANION(dev), 1);
         if (fusb302_irq < 0) {
@@ -126,6 +164,7 @@ static int cht_int33fe_probe(struct i2c_client *client)
         } else {
                 memset(&board_info, 0, sizeof(board_info));
                 strlcpy(board_info.type, "max17047", I2C_NAME_SIZE);
+               board_info.dev_name = "max17047";
                 board_info.properties = max17047_props;
                 data->max17047 = i2c_acpi_new_device(dev, 1, &board_info);
                 if (!data->max17047)
@@ -133,7 +172,9 @@ static int cht_int33fe_probe(struct i2c_client *client)
         }
 
         memset(&board_info, 0, sizeof(board_info));
-       strlcpy(board_info.type, "fusb302", I2C_NAME_SIZE);
+       strlcpy(board_info.type, "typec_fusb302", I2C_NAME_SIZE);
+       board_info.dev_name = "fusb302";
+       board_info.properties = fusb302_props;
         board_info.irq = fusb302_irq;
 
         data->fusb302 = i2c_acpi_new_device(dev, 2, &board_info);
@@ -141,6 +182,7 @@ static int cht_int33fe_probe(struct i2c_client *client)
                 goto out_unregister_max17047;
 
         memset(&board_info, 0, sizeof(board_info));
+       board_info.dev_name = "pi3usb30532";
         strlcpy(board_info.type, "pi3usb30532", I2C_NAME_SIZE);
 
         data->pi3usb30532 = i2c_acpi_new_device(dev, 3, &board_info);
--

2.13.4

#6 lore raw
In reply to Hans de Goede

Hi,

Quoted 3 lines

The first 2 patches are i2c patches, if you could review and merge these (preferably for 4.14, but 4.15 is fine too) that would be great.

Definately for v4.15 and I very likely won't be able to review them before rc1 or rc2 time, if even that. Sorry, but I2C core changes need extra careful review and I2C maintenance is largely done in my limited spare time. If you could get other people to review/tag the patches, this would be very helpful.

Quoted 6 lines

Darren, Andy, the single platform/x86 patch in here should only
be merged after the 2 i2c patches are in place, otherwise users
of the board(s) in question will end up not having any battery monitoring. Also note that this patch applies on top of the
"[PATCH v2] platform/x86: intel_cht_int33fe: Work around BIOS bug on some devices" patch I send out yesterday.

Is that dependency for v4.14? Would it be an idea if I take the platform patch via the i2c tree then?

Regards,

Wolfram

#7 lore raw

Hi,

Quoted 10 lines · Wolfram Sang

Hi,

Quoted 3 lines

The first 2 patches are i2c patches, if you could review and merge these (preferably for 4.14, but 4.15 is fine too) that would be great.

Definately for v4.15 and I very likely won't be able to review them before rc1 or rc2 time, if even that. Sorry, but I2C core changes need extra careful review and I2C maintenance is largely done in my limited spare time.

Ok, I understand.

Quoted 2 lines

If you could get other people to review/tag the patches, this would be very helpful.

FWIW althought the first patch is a core change it is not really a big one and won't impact any existing drivers, but I fully understand you still want to take your time to review it.

Andy (Shevchenko) can you perhaps take a look at the first patch in this series and give your opinion on it ?

Quoted 8 lines
Quoted 6 lines

Darren, Andy, the single platform/x86 patch in here should only
be merged after the 2 i2c patches are in place, otherwise users
of the board(s) in question will end up not having any battery monitoring. Also note that this patch applies on top of the
"[PATCH v2] platform/x86: intel_cht_int33fe: Work around BIOS bug on some devices" patch I send out yesterday.

Is that dependency for v4.14?

Yes that dep should make 4.14.

Quoted 2 lines

Would it be an idea if I take the platform
patch via the i2c tree then?

I've some other patches pending which require further changes to the intel_cht_int33fe driver (*), so I think it would be best if the last patch got merged through the platform/x86 tree. The dependencies between patch 2-3 are runtime only (and not fatal if missing, just inconvenient) so merging this to 2 separate trees should be fine as long as both patches get merged for 4.15.

Regards,

Hans

*) The intel_cht_int33fe and i2c/busses/i2c-cht-wc drivers together instantiate 4 i2c devices which together make all the "magic" behind the Type-C connector on these boards happen. The patch-series completed by these 3 patches ties 3 of the 4 drivers together so that charging and battery monitoring fully works. Ideally all 4 i2c-clients would be instantiated from a single place, e.g. intel_cht_int33fe.c, but the charger is hooked up through a "child" i2c bus on the pmic, which is where i2c/busses/i2c-cht-wc.c comes into play.

The next series adds support for the 4th chip, the type-c cross-switch/ mux which is necessary to get superspeed usb and/or displayport working over the Type-C connector.

#8 lore raw
Quoted 7 lines

I've some other patches pending which require further changes to the intel_cht_int33fe driver (*), so I think it would be best if the last patch got merged through the platform/x86 tree. The dependencies between patch 2-3 are runtime only (and not fatal if missing, just inconvenient) so merging this to 2 separate trees should be fine as long as both patches get merged for 4.15.

OK. So, I'll just look at the first two patches. You'll know when I done this.