mbox series

[v7,0/5] Add initial support for ATC260x PMICs

Message ID cover.1611653995.git.cristian.ciocaltea@gmail.com (mailing list archive)
Headers show
Series Add initial support for ATC260x PMICs | expand

Message

Cristian Ciocaltea Jan. 26, 2021, 9:55 a.m. UTC
The ATC260x family of PMICs integrates Audio Codec, Power management,
Clock generation and GPIO controller blocks. There are currently 3
variants: ATC2603A, ATC2603C and ATC2609A.

This is re-spin of the v1 patch series submitted some time ago by
Mani, who provided the MFD and regulator drivers for ATC2609A:
https://lore.kernel.org/lkml/20190617155011.15376-1-manivannan.sadhasivam@linaro.org/

Since v2, I added support for ATC2603C, together with some new
functionalities for both chips: power controller and onkey input.
The ATC2603A chip type remains unsupported for the moment.

This has been tested on RoseapplePi, a SBC based on the Actions Semi S500
SoC, which integrates the ATC2603C variant of the PMIC.

Note that enabling the ATC260x PMICs on compatible Actions Semi Owl SoC
based boards depends on:

* the Actions Semi SIRQ driver (for PMIC DTS setup), merged in v5.10:
  https://lore.kernel.org/lkml/cover.1600114378.git.cristian.ciocaltea@gmail.com/

* the atomic transfers in Owl I2C driver (for power controller), merged in v5.11:
  https://lore.kernel.org/lkml/cover.1602190168.git.cristian.ciocaltea@gmail.com/

Additionally, please note that I have taken the authorship for the MFD
and regulator drivers patches, considering the original code has been
modified to a large extent.

Thanks,
Cristi

Changes in v7:
- Dropped the patches already queued for merging:
  * regulator: Add regulator driver for ATC260x PMICs
  * power: reset: Add poweroff driver for ATC260x PMICs
- Rebased patchset on v5.11-rc5

Changes in v6 - MFD driver updates as indicated by Lee:
- Defined a magic number for max chip revision
- Adjusted code formatting around i2c_driver struct initialization
- Dropped the device initialization callback in struct atc260x and instead 
  provided a generic function making use of a new member structure to hold
  the hardware specific register information

Changes in v5:
- Removed an unnecessary '#include' line in the power-off driver,
  as noticed by Sebastian
- Rebased patchset on v5.11-rc3

Changes in v4:
- Updated MFD driver according to Lee's review
- Handled ATC2603C's LDO12 fixed regulator per Mark's suggestion
- Rebased patchset on v5.11-rc1

Changes in v3:
- Integrated feedback from Mani, Rob, Mark, Sebastian, Dmitry
- Fixed issues reported by Lee's kernel test robot
- Added new patch for 'reset-time-sec' DT binding property
- Rebased patchset on v5.10-rc6

Changes in v2:
- Reworked MFD core & I2C driver
  * Integrated Lee's feedback
  * Added support for using the regmap within atomic contexts
  * Added support for ATC2603C chip variant
  * Reorganized KConfig entries
- Improved regulator driver
  * Added support for ATC2603C variant
  * Used helper macros for more compact specification of regulator_desc items
  * Added more regulator capabilities
- Added power controller driver
  * Provides system poweroff/reboot functionalities
  * Depends on atomic transfers in the Owl I2C driver
- Added onkey driver: exposes the power button as an input device
- Added yaml binding doc
- Rebased patchset on kernel v5.9-rc1

Cristian Ciocaltea (4):
  dt-bindings: input: Add reset-time-sec common property
  dt-bindings: mfd: Add Actions Semi ATC260x PMIC binding
  mfd: Add MFD driver for ATC260x PMICs
  input: atc260x: Add onkey driver for ATC260x PMICs

Manivannan Sadhasivam (1):
  MAINTAINERS: Add entry for ATC260x PMIC

 .../devicetree/bindings/input/input.yaml      |   7 +
 .../bindings/mfd/actions,atc260x.yaml         | 183 +++++++++++
 MAINTAINERS                                   |  12 +
 drivers/input/misc/Kconfig                    |  11 +
 drivers/input/misc/Makefile                   |   2 +-
 drivers/input/misc/atc260x-onkey.c            | 305 +++++++++++++++++
 drivers/mfd/Kconfig                           |  18 +
 drivers/mfd/Makefile                          |   3 +
 drivers/mfd/atc260x-core.c                    | 310 ++++++++++++++++++
 drivers/mfd/atc260x-i2c.c                     |  64 ++++
 include/linux/mfd/atc260x/atc2603c.h          | 281 ++++++++++++++++
 include/linux/mfd/atc260x/atc2609a.h          | 308 +++++++++++++++++
 include/linux/mfd/atc260x/core.h              |  58 ++++
 13 files changed, 1561 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/actions,atc260x.yaml
 create mode 100644 drivers/input/misc/atc260x-onkey.c
 create mode 100644 drivers/mfd/atc260x-core.c
 create mode 100644 drivers/mfd/atc260x-i2c.c
 create mode 100644 include/linux/mfd/atc260x/atc2603c.h
 create mode 100644 include/linux/mfd/atc260x/atc2609a.h
 create mode 100644 include/linux/mfd/atc260x/core.h

Comments

Cristian Ciocaltea Feb. 21, 2021, 4:36 p.m. UTC | #1
Hi Lee,

I have just noticed your mfd-next tag for 5.12 doesn't include the
support for the ATC260x PMICs.

I assumed the patchset is ready for merging.. Did I miss something?

Thanks,
Cristi

On Tue, Jan 26, 2021 at 11:55:56AM +0200, Cristian Ciocaltea wrote:
> The ATC260x family of PMICs integrates Audio Codec, Power management,
> Clock generation and GPIO controller blocks. There are currently 3
> variants: ATC2603A, ATC2603C and ATC2609A.
> 
> This is re-spin of the v1 patch series submitted some time ago by
> Mani, who provided the MFD and regulator drivers for ATC2609A:
> https://lore.kernel.org/lkml/20190617155011.15376-1-manivannan.sadhasivam@linaro.org/
> 
> Since v2, I added support for ATC2603C, together with some new
> functionalities for both chips: power controller and onkey input.
> The ATC2603A chip type remains unsupported for the moment.
> 
> This has been tested on RoseapplePi, a SBC based on the Actions Semi S500
> SoC, which integrates the ATC2603C variant of the PMIC.
> 
> Note that enabling the ATC260x PMICs on compatible Actions Semi Owl SoC
> based boards depends on:
> 
> * the Actions Semi SIRQ driver (for PMIC DTS setup), merged in v5.10:
>   https://lore.kernel.org/lkml/cover.1600114378.git.cristian.ciocaltea@gmail.com/
> 
> * the atomic transfers in Owl I2C driver (for power controller), merged in v5.11:
>   https://lore.kernel.org/lkml/cover.1602190168.git.cristian.ciocaltea@gmail.com/
> 
> Additionally, please note that I have taken the authorship for the MFD
> and regulator drivers patches, considering the original code has been
> modified to a large extent.
> 
> Thanks,
> Cristi
> 
> Changes in v7:
> - Dropped the patches already queued for merging:
>   * regulator: Add regulator driver for ATC260x PMICs
>   * power: reset: Add poweroff driver for ATC260x PMICs
> - Rebased patchset on v5.11-rc5
> 
> Changes in v6 - MFD driver updates as indicated by Lee:
> - Defined a magic number for max chip revision
> - Adjusted code formatting around i2c_driver struct initialization
> - Dropped the device initialization callback in struct atc260x and instead 
>   provided a generic function making use of a new member structure to hold
>   the hardware specific register information
> 
> Changes in v5:
> - Removed an unnecessary '#include' line in the power-off driver,
>   as noticed by Sebastian
> - Rebased patchset on v5.11-rc3
> 
> Changes in v4:
> - Updated MFD driver according to Lee's review
> - Handled ATC2603C's LDO12 fixed regulator per Mark's suggestion
> - Rebased patchset on v5.11-rc1
> 
> Changes in v3:
> - Integrated feedback from Mani, Rob, Mark, Sebastian, Dmitry
> - Fixed issues reported by Lee's kernel test robot
> - Added new patch for 'reset-time-sec' DT binding property
> - Rebased patchset on v5.10-rc6
> 
> Changes in v2:
> - Reworked MFD core & I2C driver
>   * Integrated Lee's feedback
>   * Added support for using the regmap within atomic contexts
>   * Added support for ATC2603C chip variant
>   * Reorganized KConfig entries
> - Improved regulator driver
>   * Added support for ATC2603C variant
>   * Used helper macros for more compact specification of regulator_desc items
>   * Added more regulator capabilities
> - Added power controller driver
>   * Provides system poweroff/reboot functionalities
>   * Depends on atomic transfers in the Owl I2C driver
> - Added onkey driver: exposes the power button as an input device
> - Added yaml binding doc
> - Rebased patchset on kernel v5.9-rc1
> 
> Cristian Ciocaltea (4):
>   dt-bindings: input: Add reset-time-sec common property
>   dt-bindings: mfd: Add Actions Semi ATC260x PMIC binding
>   mfd: Add MFD driver for ATC260x PMICs
>   input: atc260x: Add onkey driver for ATC260x PMICs
> 
> Manivannan Sadhasivam (1):
>   MAINTAINERS: Add entry for ATC260x PMIC
> 
>  .../devicetree/bindings/input/input.yaml      |   7 +
>  .../bindings/mfd/actions,atc260x.yaml         | 183 +++++++++++
>  MAINTAINERS                                   |  12 +
>  drivers/input/misc/Kconfig                    |  11 +
>  drivers/input/misc/Makefile                   |   2 +-
>  drivers/input/misc/atc260x-onkey.c            | 305 +++++++++++++++++
>  drivers/mfd/Kconfig                           |  18 +
>  drivers/mfd/Makefile                          |   3 +
>  drivers/mfd/atc260x-core.c                    | 310 ++++++++++++++++++
>  drivers/mfd/atc260x-i2c.c                     |  64 ++++
>  include/linux/mfd/atc260x/atc2603c.h          | 281 ++++++++++++++++
>  include/linux/mfd/atc260x/atc2609a.h          | 308 +++++++++++++++++
>  include/linux/mfd/atc260x/core.h              |  58 ++++
>  13 files changed, 1561 insertions(+), 1 deletion(-)
>  create mode 100644 Documentation/devicetree/bindings/mfd/actions,atc260x.yaml
>  create mode 100644 drivers/input/misc/atc260x-onkey.c
>  create mode 100644 drivers/mfd/atc260x-core.c
>  create mode 100644 drivers/mfd/atc260x-i2c.c
>  create mode 100644 include/linux/mfd/atc260x/atc2603c.h
>  create mode 100644 include/linux/mfd/atc260x/atc2609a.h
>  create mode 100644 include/linux/mfd/atc260x/core.h
> 
> -- 
> 2.30.0
>
Lee Jones Feb. 22, 2021, 9:02 a.m. UTC | #2
On Sun, 21 Feb 2021, Cristian Ciocaltea wrote:

> Hi Lee,
> 
> I have just noticed your mfd-next tag for 5.12 doesn't include the
> support for the ATC260x PMICs.
> 
> I assumed the patchset is ready for merging.. Did I miss something?

The MFD driver needs another review.

For some reason, this didn't register on my TODO list.

In general, if you don't receive a review within ~2 weeks of posting
(and the merge window is not open), you should consider it lost and
submit a [RESEND].

> On Tue, Jan 26, 2021 at 11:55:56AM +0200, Cristian Ciocaltea wrote:
> > The ATC260x family of PMICs integrates Audio Codec, Power management,
> > Clock generation and GPIO controller blocks. There are currently 3
> > variants: ATC2603A, ATC2603C and ATC2609A.
> > 
> > This is re-spin of the v1 patch series submitted some time ago by
> > Mani, who provided the MFD and regulator drivers for ATC2609A:
> > https://lore.kernel.org/lkml/20190617155011.15376-1-manivannan.sadhasivam@linaro.org/
> > 
> > Since v2, I added support for ATC2603C, together with some new
> > functionalities for both chips: power controller and onkey input.
> > The ATC2603A chip type remains unsupported for the moment.
> > 
> > This has been tested on RoseapplePi, a SBC based on the Actions Semi S500
> > SoC, which integrates the ATC2603C variant of the PMIC.
> > 
> > Note that enabling the ATC260x PMICs on compatible Actions Semi Owl SoC
> > based boards depends on:
> > 
> > * the Actions Semi SIRQ driver (for PMIC DTS setup), merged in v5.10:
> >   https://lore.kernel.org/lkml/cover.1600114378.git.cristian.ciocaltea@gmail.com/
> > 
> > * the atomic transfers in Owl I2C driver (for power controller), merged in v5.11:
> >   https://lore.kernel.org/lkml/cover.1602190168.git.cristian.ciocaltea@gmail.com/
Cristian Ciocaltea Feb. 22, 2021, 3:16 p.m. UTC | #3
On Mon, Feb 22, 2021 at 09:02:47AM +0000, Lee Jones wrote:
> On Sun, 21 Feb 2021, Cristian Ciocaltea wrote:
> 
> > Hi Lee,
> > 
> > I have just noticed your mfd-next tag for 5.12 doesn't include the
> > support for the ATC260x PMICs.
> > 
> > I assumed the patchset is ready for merging.. Did I miss something?
> 
> The MFD driver needs another review.
> 
> For some reason, this didn't register on my TODO list.

You have already tagged v6 with 'Acked-for-MFD-by: Lee Jones
<lee.jones@linaro.org>':
https://lore.kernel.org/lkml/20210125142558.GA4903@dell/

I have submitted v7 to drop the patches that had been already picked up,
as previously agreed, but otherwise there are no other changes.

That is why I didn't expect another round of review..

> In general, if you don't receive a review within ~2 weeks of posting
> (and the merge window is not open), you should consider it lost and
> submit a [RESEND].

Thanks,
Cristi

[...]

> -- 
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog
Lee Jones Feb. 22, 2021, 3:30 p.m. UTC | #4
On Mon, 22 Feb 2021, Cristian Ciocaltea wrote:

> On Mon, Feb 22, 2021 at 09:02:47AM +0000, Lee Jones wrote:
> > On Sun, 21 Feb 2021, Cristian Ciocaltea wrote:
> > 
> > > Hi Lee,
> > > 
> > > I have just noticed your mfd-next tag for 5.12 doesn't include the
> > > support for the ATC260x PMICs.
> > > 
> > > I assumed the patchset is ready for merging.. Did I miss something?
> > 
> > The MFD driver needs another review.
> > 
> > For some reason, this didn't register on my TODO list.
> 
> You have already tagged v6 with 'Acked-for-MFD-by: Lee Jones
> <lee.jones@linaro.org>':
> https://lore.kernel.org/lkml/20210125142558.GA4903@dell/
> 
> I have submitted v7 to drop the patches that had been already picked up,
> as previously agreed, but otherwise there are no other changes.
> 
> That is why I didn't expect another round of review..

I see what's happened.  You forgot to:

  "apply this as-is to your sign-off block"

... as requested, which made me think it needs a subsequent review.

> > In general, if you don't receive a review within ~2 weeks of posting
> > (and the merge window is not open), you should consider it lost and
> > submit a [RESEND].

Due to the fragility of email reviews, this is still very important.
Cristian Ciocaltea Feb. 22, 2021, 4:08 p.m. UTC | #5
On Mon, Feb 22, 2021 at 03:30:16PM +0000, Lee Jones wrote:
> On Mon, 22 Feb 2021, Cristian Ciocaltea wrote:
> 
> > On Mon, Feb 22, 2021 at 09:02:47AM +0000, Lee Jones wrote:
> > > On Sun, 21 Feb 2021, Cristian Ciocaltea wrote:
> > > 
> > > > Hi Lee,
> > > > 
> > > > I have just noticed your mfd-next tag for 5.12 doesn't include the
> > > > support for the ATC260x PMICs.
> > > > 
> > > > I assumed the patchset is ready for merging.. Did I miss something?
> > > 
> > > The MFD driver needs another review.
> > > 
> > > For some reason, this didn't register on my TODO list.
> > 
> > You have already tagged v6 with 'Acked-for-MFD-by: Lee Jones
> > <lee.jones@linaro.org>':
> > https://lore.kernel.org/lkml/20210125142558.GA4903@dell/
> > 
> > I have submitted v7 to drop the patches that had been already picked up,
> > as previously agreed, but otherwise there are no other changes.
> > 
> > That is why I didn't expect another round of review..
> 
> I see what's happened.  You forgot to:
> 
>   "apply this as-is to your sign-off block"
> 
> ... as requested, which made me think it needs a subsequent review.

Sorry, I somehow missed that.  Should I resend the patch series?

If yes, I assume I should also increment the revision number, even
though there are no other changes except the addition of the
indicated tag.

> > > In general, if you don't receive a review within ~2 weeks of posting
> > > (and the merge window is not open), you should consider it lost and
> > > submit a [RESEND].
> 
> Due to the fragility of email reviews, this is still very important.

Right, thanks for the hint!

> -- 
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog
Lee Jones Feb. 22, 2021, 4:24 p.m. UTC | #6
On Mon, 22 Feb 2021, Cristian Ciocaltea wrote:

> On Mon, Feb 22, 2021 at 03:30:16PM +0000, Lee Jones wrote:
> > On Mon, 22 Feb 2021, Cristian Ciocaltea wrote:
> > 
> > > On Mon, Feb 22, 2021 at 09:02:47AM +0000, Lee Jones wrote:
> > > > On Sun, 21 Feb 2021, Cristian Ciocaltea wrote:
> > > > 
> > > > > Hi Lee,
> > > > > 
> > > > > I have just noticed your mfd-next tag for 5.12 doesn't include the
> > > > > support for the ATC260x PMICs.
> > > > > 
> > > > > I assumed the patchset is ready for merging.. Did I miss something?
> > > > 
> > > > The MFD driver needs another review.
> > > > 
> > > > For some reason, this didn't register on my TODO list.
> > > 
> > > You have already tagged v6 with 'Acked-for-MFD-by: Lee Jones
> > > <lee.jones@linaro.org>':
> > > https://lore.kernel.org/lkml/20210125142558.GA4903@dell/
> > > 
> > > I have submitted v7 to drop the patches that had been already picked up,
> > > as previously agreed, but otherwise there are no other changes.
> > > 
> > > That is why I didn't expect another round of review..
> > 
> > I see what's happened.  You forgot to:
> > 
> >   "apply this as-is to your sign-off block"
> > 
> > ... as requested, which made me think it needs a subsequent review.
> 
> Sorry, I somehow missed that.  Should I resend the patch series?

No, no need.  It's on my radar now.  I'll see to it when v5.12 is out.

> If yes, I assume I should also increment the revision number, even
> though there are no other changes except the addition of the
> indicated tag.

When resending, you only have to s/PATCH/RESEND/.

> > > > In general, if you don't receive a review within ~2 weeks of posting
> > > > (and the merge window is not open), you should consider it lost and
> > > > submit a [RESEND].
> > 
> > Due to the fragility of email reviews, this is still very important.
> 
> Right, thanks for the hint!

NP.