mbox series

[v6,00/13] Add support for AXP192 PMIC

Message ID 20221016234335.904212-1-aidanmacdonald.0x0@gmail.com
Headers show
Series Add support for AXP192 PMIC | expand

Message

Aidan MacDonald Oct. 16, 2022, 11:43 p.m. UTC
This series adds support for the AXP192 PMIC to the AXP20x MFD driver
framework, including support for regulators, ADCs, and AC/USB/battery
power supplies.

v6 is a resend of v5 from July -- the patches haven't changed at all
but I've rebased them on the latest git master branch.

Aidan MacDonald (13):
  dt-bindings: mfd: add bindings for AXP192 MFD device
  dt-bindings: iio: adc: axp209: Add AXP192 compatible
  dt-bindings: power: supply: axp20x: Add AXP192 compatible
  dt-bindings: power: axp20x-battery: Add AXP192 compatible
  mfd: axp20x: Add support for AXP192
  regulator: axp20x: Add support for AXP192
  iio: adc: axp20x_adc: Minor code cleanups
  iio: adc: axp20x_adc: Replace adc_en2 flag with adc_en2_mask field
  iio: adc: axp20x_adc: Add support for AXP192
  power: supply: axp20x_usb_power: Add support for AXP192
  power: axp20x_battery: Add constant charge current table
  power: axp20x_battery: Support battery status without fuel gauge
  power: axp20x_battery: Add support for AXP192

 .../bindings/iio/adc/x-powers,axp209-adc.yaml |  18 +
 .../bindings/mfd/x-powers,axp152.yaml         |   1 +
 .../x-powers,axp20x-battery-power-supply.yaml |   1 +
 .../x-powers,axp20x-usb-power-supply.yaml     |   1 +
 drivers/iio/adc/axp20x_adc.c                  | 356 ++++++++++++++++--
 drivers/mfd/axp20x-i2c.c                      |   2 +
 drivers/mfd/axp20x.c                          | 141 +++++++
 drivers/power/supply/axp20x_battery.c         | 142 ++++++-
 drivers/power/supply/axp20x_usb_power.c       |  84 ++++-
 drivers/regulator/axp20x-regulator.c          | 100 ++++-
 include/linux/mfd/axp20x.h                    |  84 +++++
 11 files changed, 856 insertions(+), 74 deletions(-)

Comments

Aidan MacDonald Oct. 17, 2022, 10:21 p.m. UTC | #1
Jonathan Cameron <jic23@kernel.org> writes:

> On Mon, 17 Oct 2022 00:43:22 +0100
> Aidan MacDonald <aidanmacdonald.0x0@gmail.com> wrote:
>
>> This series adds support for the AXP192 PMIC to the AXP20x MFD driver
>> framework, including support for regulators, ADCs, and AC/USB/battery
>> power supplies.
>>
>> v6 is a resend of v5 from July -- the patches haven't changed at all
>> but I've rebased them on the latest git master branch.
>
> Hi Aidan,
>
> Lee has recently expressed that he keen to take as much of these sorts
> of series as possible via the various subsystem trees.
>
> As such, it is useful to call out in the cover letter of such a series
> if this can be done.  For example, patch 9 (last IIO one) can't be
> applied without defines in patch 6 (I think).  Thus I'm assuming Lee
> will do an immutable branch with at least those patches on it.
>
> Perhaps worth expressing if that is also the case for the power
> and regulator subsystem patches?
>
> Thanks,
>
> Jonathan

Yep, the IIO, regulator, and power subsystem patches all depend on
the MFD patch. Specifically, patches 6, 9, and 10 depend on patch 5.
I can't get rid of this dependency because the variant ID (AXP192_ID)
has to be defined centrally in the MFD patch.

The axp20x_battery patches (last three of the whole series) don't
depend on the variant ID or other defines, so they could be taken
independently through the power subsystem.

Even though the IIO cleanups (7 and 8) don't depend on anything else
I imagine it'd cause problems to take those via IIO because patch 9
depends on them.

IOW: Lee probably needs to take patches 5-10.

- Aidan

>>
>> Aidan MacDonald (13):
>>   dt-bindings: mfd: add bindings for AXP192 MFD device
>>   dt-bindings: iio: adc: axp209: Add AXP192 compatible
>>   dt-bindings: power: supply: axp20x: Add AXP192 compatible
>>   dt-bindings: power: axp20x-battery: Add AXP192 compatible
>>   mfd: axp20x: Add support for AXP192
>>   regulator: axp20x: Add support for AXP192
>>   iio: adc: axp20x_adc: Minor code cleanups
>>   iio: adc: axp20x_adc: Replace adc_en2 flag with adc_en2_mask field
>>   iio: adc: axp20x_adc: Add support for AXP192
>>   power: supply: axp20x_usb_power: Add support for AXP192
>>   power: axp20x_battery: Add constant charge current table
>>   power: axp20x_battery: Support battery status without fuel gauge
>>   power: axp20x_battery: Add support for AXP192
>>
>>  .../bindings/iio/adc/x-powers,axp209-adc.yaml |  18 +
>>  .../bindings/mfd/x-powers,axp152.yaml         |   1 +
>>  .../x-powers,axp20x-battery-power-supply.yaml |   1 +
>>  .../x-powers,axp20x-usb-power-supply.yaml     |   1 +
>>  drivers/iio/adc/axp20x_adc.c                  | 356 ++++++++++++++++--
>>  drivers/mfd/axp20x-i2c.c                      |   2 +
>>  drivers/mfd/axp20x.c                          | 141 +++++++
>>  drivers/power/supply/axp20x_battery.c         | 142 ++++++-
>>  drivers/power/supply/axp20x_usb_power.c       |  84 ++++-
>>  drivers/regulator/axp20x-regulator.c          | 100 ++++-
>>  include/linux/mfd/axp20x.h                    |  84 +++++
>>  11 files changed, 856 insertions(+), 74 deletions(-)
>>
Andy Shevchenko Oct. 18, 2022, 12:18 p.m. UTC | #2
On Tue, Oct 18, 2022 at 2:06 AM Aidan MacDonald
<aidanmacdonald.0x0@gmail.com> wrote:
> Jonathan Cameron <jic23@kernel.org> writes:
> > On Mon, 17 Oct 2022 00:43:22 +0100
> > Aidan MacDonald <aidanmacdonald.0x0@gmail.com> wrote:

...

> > Lee has recently expressed that he keen to take as much of these sorts
> > of series as possible via the various subsystem trees.
> >
> > As such, it is useful to call out in the cover letter of such a series
> > if this can be done.  For example, patch 9 (last IIO one) can't be
> > applied without defines in patch 6 (I think).  Thus I'm assuming Lee
> > will do an immutable branch with at least those patches on it.
> >
> > Perhaps worth expressing if that is also the case for the power
> > and regulator subsystem patches?

> Yep, the IIO, regulator, and power subsystem patches all depend on
> the MFD patch.

There are two types of dependencies: compile and functional.

> Specifically, patches 6, 9, and 10 depend on patch 5.
> I can't get rid of this dependency because the variant ID (AXP192_ID)
> has to be defined centrally in the MFD patch.

It's not clear which one you are talking about. If it's functional,
then each driver can be taken separately via each concerned subsystem.

> The axp20x_battery patches (last three of the whole series) don't
> depend on the variant ID or other defines, so they could be taken
> independently through the power subsystem.
>
> Even though the IIO cleanups (7 and 8) don't depend on anything else
> I imagine it'd cause problems to take those via IIO because patch 9
> depends on them.
>
> IOW: Lee probably needs to take patches 5-10.
Aidan MacDonald Oct. 18, 2022, 3:15 p.m. UTC | #3
Andy Shevchenko <andy.shevchenko@gmail.com> writes:

> On Tue, Oct 18, 2022 at 2:06 AM Aidan MacDonald
> <aidanmacdonald.0x0@gmail.com> wrote:
>> Jonathan Cameron <jic23@kernel.org> writes:
>> > On Mon, 17 Oct 2022 00:43:22 +0100
>> > Aidan MacDonald <aidanmacdonald.0x0@gmail.com> wrote:
>
> ...
>
>> > Lee has recently expressed that he keen to take as much of these sorts
>> > of series as possible via the various subsystem trees.
>> >
>> > As such, it is useful to call out in the cover letter of such a series
>> > if this can be done.  For example, patch 9 (last IIO one) can't be
>> > applied without defines in patch 6 (I think).  Thus I'm assuming Lee
>> > will do an immutable branch with at least those patches on it.
>> >
>> > Perhaps worth expressing if that is also the case for the power
>> > and regulator subsystem patches?
>
>> Yep, the IIO, regulator, and power subsystem patches all depend on
>> the MFD patch.
>
> There are two types of dependencies: compile and functional.
>
>> Specifically, patches 6, 9, and 10 depend on patch 5.
>> I can't get rid of this dependency because the variant ID (AXP192_ID)
>> has to be defined centrally in the MFD patch.
>
> It's not clear which one you are talking about. If it's functional,
> then each driver can be taken separately via each concerned subsystem.

Johnathan was talking about compile dependencies -- the defines he's
mentioning -- so what I mean is compile dependencies. Patches 6/9/10
do not compile unless they are applied after patch 5, because of a new
enumerator AXP192_ID defined in patch 5.

Regards,
Aidan