mbox series

[v3,RESEND,0/4] MediaTek Helio X10 MT6795 - MT6331/6332 Regulators

Message ID 20220706100912.200698-1-angelogioacchino.delregno@collabora.com
Headers show
Series MediaTek Helio X10 MT6795 - MT6331/6332 Regulators | expand

Message

AngeloGioacchino Del Regno July 6, 2022, 10:09 a.m. UTC
In an effort to give some love to the apparently forgotten MT6795 SoC,
I am upstreaming more components that are necessary to support platforms
powered by this one apart from a simple boot to serial console.

This series adds support for the regulators found in MT6331 and MT6332
main/companion PMICs.

Adding support to each driver in each subsystem is done in different
patch series as to avoid spamming uninteresting patches to maintainers.

Tested on a MT6795 Sony Xperia M5 (codename "Holly") smartphone.

Changes in v3:
 - Sorry, one of the commits picked both the pre-rename file and
   the new one... the v3 fixes the mt6332 bindings commit.
 - Changed comment style on top for mt633[12]-regulator.c as
   suggested (missed that in v2)

Changes in v2:
 - Refactored description in dt-bindings
 - Simplified get_status() function and removed callback
   where not needed
 - Simplified set_mode()/get_mode() functions and removed
   callback where not needed
 - Added new regulator_ops for no_qi (no .get_status) and
   for no_ms (no .{get, set}_mode)
 - Fixed vsel mask on some regulators and removed pattern of
   repeated voltage entries present in some voltage tables,
   avoiding to set higher bits for safety
 - Reordered regulators (and some formatting fixes) in
   mt6331-regulator.c in per-type alphabetic order

AngeloGioacchino Del Regno (4):
  dt-bindings: regulator: Add bindings for MT6331 regulator
  regulator: Add driver for MT6331 PMIC regulators
  dt-bindings: regulator: Add bindings for MT6332 regulator
  regulator: Add driver for MT6332 PMIC regulators

 .../regulator/mediatek,mt6331-regulator.yaml  | 273 ++++++++++
 .../regulator/mediatek,mt6332-regulator.yaml  | 112 ++++
 drivers/regulator/Kconfig                     |  18 +
 drivers/regulator/Makefile                    |   2 +
 drivers/regulator/mt6331-regulator.c          | 507 ++++++++++++++++++
 drivers/regulator/mt6332-regulator.c          | 422 +++++++++++++++
 include/linux/regulator/mt6331-regulator.h    |  46 ++
 include/linux/regulator/mt6332-regulator.h    |  27 +
 8 files changed, 1407 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/mediatek,mt6331-regulator.yaml
 create mode 100644 Documentation/devicetree/bindings/regulator/mediatek,mt6332-regulator.yaml
 create mode 100644 drivers/regulator/mt6331-regulator.c
 create mode 100644 drivers/regulator/mt6332-regulator.c
 create mode 100644 include/linux/regulator/mt6331-regulator.h
 create mode 100644 include/linux/regulator/mt6332-regulator.h

Comments

Mark Brown July 6, 2022, 12:16 p.m. UTC | #1
On Wed, Jul 06, 2022 at 12:09:08PM +0200, AngeloGioacchino Del Regno wrote:
> In an effort to give some love to the apparently forgotten MT6795 SoC,
> I am upstreaming more components that are necessary to support platforms
> powered by this one apart from a simple boot to serial console.

This previously got 0day failures due to missing dependencies which
need would need a merge with IIRC MFD, I see no reference in the cover
letter to dependencies?
AngeloGioacchino Del Regno July 6, 2022, 12:49 p.m. UTC | #2
Il 06/07/22 14:16, Mark Brown ha scritto:
> On Wed, Jul 06, 2022 at 12:09:08PM +0200, AngeloGioacchino Del Regno wrote:
>> In an effort to give some love to the apparently forgotten MT6795 SoC,
>> I am upstreaming more components that are necessary to support platforms
>> powered by this one apart from a simple boot to serial console.
> 
> This previously got 0day failures due to missing dependencies which
> need would need a merge with IIRC MFD, I see no reference in the cover
> letter to dependencies?

The only blocker for this series was the MFD patch, which got picked and
it's present in next-20220706 (as you suggested me to resend when things
were picked... I decided to wait until they actually landed on -next...)

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20220706&id=ad7f984a6aa9722443c1db9e8f72609bf06a8910

Regards,
Angelo
Mark Brown July 6, 2022, 12:57 p.m. UTC | #3
On Wed, Jul 06, 2022 at 02:49:56PM +0200, AngeloGioacchino Del Regno wrote:
> Il 06/07/22 14:16, Mark Brown ha scritto:

> > This previously got 0day failures due to missing dependencies which
> > need would need a merge with IIRC MFD, I see no reference in the cover
> > letter to dependencies?

> The only blocker for this series was the MFD patch, which got picked and
> it's present in next-20220706 (as you suggested me to resend when things
> were picked... I decided to wait until they actually landed on -next...)

Right, I also said I'd need a pull request - if I apply the patches
without having the MFD bits they depend on in my tree then it will fail
to build.
AngeloGioacchino Del Regno July 6, 2022, 1:38 p.m. UTC | #4
Il 06/07/22 14:57, Mark Brown ha scritto:
> On Wed, Jul 06, 2022 at 02:49:56PM +0200, AngeloGioacchino Del Regno wrote:
>> Il 06/07/22 14:16, Mark Brown ha scritto:
> 
>>> This previously got 0day failures due to missing dependencies which
>>> need would need a merge with IIRC MFD, I see no reference in the cover
>>> letter to dependencies?
> 
>> The only blocker for this series was the MFD patch, which got picked and
>> it's present in next-20220706 (as you suggested me to resend when things
>> were picked... I decided to wait until they actually landed on -next...)
> 
> Right, I also said I'd need a pull request - if I apply the patches
> without having the MFD bits they depend on in my tree then it will fail
> to build.

I remember writing that to Lee... how do we proceed in this case?
Should we add him to the Cc's of this patch to notify him or..?

P.S.: Sorry, this is the first time that I deal with MFD...
Mark Brown July 6, 2022, 1:52 p.m. UTC | #5
On Wed, Jul 06, 2022 at 03:38:34PM +0200, AngeloGioacchino Del Regno wrote:
> Il 06/07/22 14:57, Mark Brown ha scritto:
> > On Wed, Jul 06, 2022 at 02:49:56PM +0200, AngeloGioacchino Del Regno wrote:
> > > Il 06/07/22 14:16, Mark Brown ha scritto:
> > 
> > > > This previously got 0day failures due to missing dependencies which
> > > > need would need a merge with IIRC MFD, I see no reference in the cover
> > > > letter to dependencies?
> > 
> > > The only blocker for this series was the MFD patch, which got picked and
> > > it's present in next-20220706 (as you suggested me to resend when things
> > > were picked... I decided to wait until they actually landed on -next...)
> > 
> > Right, I also said I'd need a pull request - if I apply the patches
> > without having the MFD bits they depend on in my tree then it will fail
> > to build.
> 
> I remember writing that to Lee... how do we proceed in this case?
> Should we add him to the Cc's of this patch to notify him or..?

Lee, Angelo has sent me this series for Helio X10 which needs some MFD
bits (not 100% sure which, I guess Angelo can fill that in) - is there a
tagged branch available to pull in?
AngeloGioacchino Del Regno July 6, 2022, 1:59 p.m. UTC | #6
Il 06/07/22 15:52, Mark Brown ha scritto:
> On Wed, Jul 06, 2022 at 03:38:34PM +0200, AngeloGioacchino Del Regno wrote:
>> Il 06/07/22 14:57, Mark Brown ha scritto:
>>> On Wed, Jul 06, 2022 at 02:49:56PM +0200, AngeloGioacchino Del Regno wrote:
>>>> Il 06/07/22 14:16, Mark Brown ha scritto:
>>>
>>>>> This previously got 0day failures due to missing dependencies which
>>>>> need would need a merge with IIRC MFD, I see no reference in the cover
>>>>> letter to dependencies?
>>>
>>>> The only blocker for this series was the MFD patch, which got picked and
>>>> it's present in next-20220706 (as you suggested me to resend when things
>>>> were picked... I decided to wait until they actually landed on -next...)
>>>
>>> Right, I also said I'd need a pull request - if I apply the patches
>>> without having the MFD bits they depend on in my tree then it will fail
>>> to build.
>>
>> I remember writing that to Lee... how do we proceed in this case?
>> Should we add him to the Cc's of this patch to notify him or..?
> 
> Lee, Angelo has sent me this series for Helio X10 which needs some MFD
> bits (not 100% sure which, I guess Angelo can fill that in) - is there a
> tagged branch available to pull in?


(Thank you, Mark!)

The required bits are all in just one commit:

https://patchwork.kernel.org/project/linux-mediatek/patch/20220627123954.64299-1-angelogioacchino.delregno@collabora.com/

Landed on next-20220706 with ID ad7f984a6aa9722443c1db9e8f72609bf06a8910

...which can be also found here:
https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/log/?h=for-mfd-next