mbox series

[v2,0/9] add support for pf1550 PMIC MFD-based drivers

Message ID cover.1747409892.git.samuel.kayode@savoirfairelinux.com
Headers show
Series add support for pf1550 PMIC MFD-based drivers | expand

Message

Samuel Kayode May 16, 2025, 6:29 p.m. UTC
This series adds support for pf1550 PMIC. It provides the core mfd driver and a
set of three sub-drivers for the regulator, power supply and input subsystems.

Patches 1-4 add the DT binding documents. Patches 5-8 add all drivers. Last
patch adds a MAINTAINERS entry for this device.

Changes since v1 [1]:
   1. DT bindings for all devices included
   2. Add onkey driver
   3. Add driver for the regulators
   4. Ensure charger is activated as some variants have it off by default
   5. Update mfd and charger driver per feedback from eballetbo@gmail.com
   6. Add myself as maintainer for these drivers

[1]: v1: https://lore.kernel.org/1523974819-8711-1-git-send-email-abel.vesa@nxp.com/

Samuel Kayode (9):
  dt-bindings: power: supply: add pf1550
  dt-bindings: regulator: add pf1550
  dt-bindings: input: add pf1550
  dt-bindings: mfd: add pf1550
  mfd: pf1550: add core mfd driver
  regulator: pf1550: add support for regulator
  input: pf1550: add onkey support
  power: supply: pf1550: add battery charger support
  MAINTAINERS: add an entry for pf1550 mfd driver

 .../bindings/input/pf1550_onkey.yaml          |  31 +
 .../devicetree/bindings/mfd/pf1550.yaml       | 122 ++++
 .../bindings/power/supply/pf1550_charger.yaml |  44 ++
 .../devicetree/bindings/regulator/pf1550.yaml |  35 +
 MAINTAINERS                                   |  11 +
 drivers/input/keyboard/Kconfig                |   8 +
 drivers/input/keyboard/Makefile               |   1 +
 drivers/input/keyboard/pf1550_onkey.c         | 200 ++++++
 drivers/mfd/Kconfig                           |  14 +
 drivers/mfd/Makefile                          |   2 +
 drivers/mfd/pf1550.c                          | 254 +++++++
 drivers/power/supply/Kconfig                  |   6 +
 drivers/power/supply/Makefile                 |   1 +
 drivers/power/supply/pf1550_charger.c         | 656 ++++++++++++++++++
 drivers/regulator/Kconfig                     |   7 +
 drivers/regulator/Makefile                    |   1 +
 drivers/regulator/pf1550.c                    | 380 ++++++++++
 include/linux/mfd/pf1550.h                    | 246 +++++++
 18 files changed, 2019 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/pf1550_onkey.yaml
 create mode 100644 Documentation/devicetree/bindings/mfd/pf1550.yaml
 create mode 100644 Documentation/devicetree/bindings/power/supply/pf1550_charger.yaml
 create mode 100644 Documentation/devicetree/bindings/regulator/pf1550.yaml
 create mode 100644 drivers/input/keyboard/pf1550_onkey.c
 create mode 100644 drivers/mfd/pf1550.c
 create mode 100644 drivers/power/supply/pf1550_charger.c
 create mode 100644 drivers/regulator/pf1550.c
 create mode 100644 include/linux/mfd/pf1550.h


base-commit: b1d8766052eb0534b27edda8af1865d53621bd6a

Comments

Krzysztof Kozlowski May 21, 2025, 4:22 p.m. UTC | #1
On 21/05/2025 18:16, Samuel Kayode wrote:
> On Sat, May 17, 2025 at 01:16:38PM +0200, Krzysztof Kozlowski wrote:
>>> +    maxItems: 1
>>> +
>>> +  interrupts:
>>> +    maxItems: 1
>>> +
>>> +  regulators:
>>> +    $ref: /schemas/regulator/pf1550.yaml
>>> +
>>> +  charger:
>>> +    $ref: /schemas/power/supply/pf1550_charger.yaml
>>> +
>>> +  onkey:
>>> +    $ref: /schemas/input/pf1550_onkey.yaml
>>
>> This makes merging via separate trees not possible...
>>
>> Just fold everything here, drop compatibles and then put binding in the
>> regulator. Unless children are re-usable which would justify
>> compatibles, but then please provide arguments for that.
> 
> Yes, compatibles are not needed for the children. For adding binding to the
> regulator, did you mean for all children: charger and onkey included? So,
> replacing the separate yaml for all children with bindings in the mfd yaml?

Up to you. Onkey looks small so could be folded for sure, but other
bindings are not big either, so I would personally fold everything.
Otherwise you will need to be sure MFD is not applied before they reach
mainline.

Due to lack of testing I did not review charger patch, but just after
quick glance I see already that you miss power supply ref, thus it seems
you duplicate some of the existing properties from monitored-battery.

Best regards,
Krzysztof