[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YX7ZTXbD0F+n3M36@kunai>
Date: Sun, 31 Oct 2021 18:58:37 +0100
From: Wolfram Sang <wsa@...-dreams.de>
To: Hans de Goede <hdegoede@...hat.com>
Cc: Mark Gross <markgross@...nel.org>,
Andy Shevchenko <andy@...radead.org>,
Sebastian Reichel <sre@...nel.org>,
MyungJoo Ham <myungjoo.ham@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
Ard Biesheuvel <ardb@...nel.org>,
Yauhen Kharuzhy <jekhor@...il.com>,
Tsuchiya Yuto <kitakar@...il.com>,
platform-driver-x86@...r.kernel.org, linux-i2c@...r.kernel.org,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-efi@...r.kernel.org
Subject: Re: [PATCH 11/13] i2c: cht-wc: Add support for devices using a
bq25890 charger
On Sat, Oct 30, 2021 at 08:28:11PM +0200, Hans de Goede wrote:
> The i2c-controller on the Cherry Trail - Whiskey Cove PMIC is special
> in that it is always connected to the I2C charger IC of the board on
> which the PMIC is used; and the charger IC is not described in ACPI,
> so the i2c-cht-wc code needs to instantiate an i2c-client for it itself.
>
> So far there has been a rudimentary check to make sure the ACPI tables
> are at least somewhat as expected by checking for the presence of an
> INT33FE device and sofar the code has assumed that if this INT33FE
> device is present that the used charger then is a bq24290i.
>
> But some boards with an INT33FE device in their ACPI tables use a
> different charger IC and some boards don't have an INT33FE device at all.
>
> Since the information about the used charger + fuel-gauge + other chips is
> necessary in other places too, the kernel now adds a "intel,cht-wc-setup"
> string property to the Whiskey Cove PMIC i2c-client based on DMI matching,
> which reliably describes the board's setup of the PMIC.
>
> Switch to using the "intel,cht-wc-setup" property and add support for
> instantiating an i2c-client for either a bq24292i or a bq25890 charger.
>
> This has been tested on a GPD pocket (which uses the old bq24292i setup)
> and on a Xiaomi Mi Pad 2 with a bq25890 charger.
>
> Signed-off-by: Hans de Goede <hdegoede@...hat.com>
In general, fine with me from the I2C side:
Acked-by: Wolfram Sang <wsa@...nel.org>
> + else if (!strcmp(str, "bq24292i,max17047,fusb302,pi3usb30532"))
> + board_info = &bq24190_board_info;
> + else if (!strcmp(str, "bq25890,bq27520"))
> + board_info = &bq25890_board_info;
Very minor nit: I prefer 'strcmp() == 0' because the above could be read
as 'if not strcmp()' which is sadly misleading. But I am not strict with
it.
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists