mbox series

[v5,0/5] Add support for Silicon Mitus SM5703 MFD

Message ID 20220423085319.483524-1-markuss.broks@gmail.com
Headers show
Series Add support for Silicon Mitus SM5703 MFD | expand

Message

Markuss Broks April 23, 2022, 8:53 a.m. UTC
This series adds support for Silicon Mitus SM5703 MFD and the
appropriate device-tree bindings. This only adds support for the
regulator module, leaving room for other modules implemented in
future (code for other modules is really not ready for submission
right now). Silicon Mitus SM5703 is used on various mobile phones,
mostly Samsung Galaxy (J5 (2015, 2016), On7, J7 (2015, 2016) ...).

Cc: Matti Vaittinen <mazziesaccount@gmail.com>

v2:
- mfd bindings: add "SM5703" to the title
- mfd bindings: indent the example
- regulators/Makefile: sort alphabetically
v3:
- mfd bindings: fix an error in example: there should be no
  newline between #size-cells and #address-cells and the node
v4:
mfd bindings:
- drop the -mfd in the compatible
- change reference path to the regulator yaml to an absolute one
- use -gpios for the reset GPIO
- make reset-gpios a required property
- correct the example node name
- correct the example compatible
regulator bindings:
- add unevaluatedProperties: false to all four types of regulators
v5:
mfd driver:
- depend on OF for the SM5703 MFD (Kconfig)
- correct the compatible in the MFD driver
- remove the compatible of -regulators in the struct mfd_cell*
mfd bindings:
- adjust the example for regulators {} node
- include GPIO header in the example
- indent the example properly
- adjust the example for the voltage regulators being fixed
regulator bindings:
- remove the compatible
- refer to regulators.yaml
regulator driver:
- add a separate ops for fixed voltage regulators (to avoid kernel WARN)
- set the config.dev to dev->parent to probe from parent OF node
- (Kconfig) SM5703_MFD -> MFD_SM5703 fix typo

- Add a patch to avoid driver name conflicts in SM5502 extcon driver

Markuss Broks (4):
  dt-bindings: regulator: Add bindings for Silicon Mitus SM5703
    regulators
  dt-bindings: mfd: Add bindings for Silicon Mitus SM5703 MFD
  mfd: sm5703: Add support for SM5703 MFD
  regulator: sm5703-regulator: Add regulators support for SM5703 MFD

 .../bindings/mfd/siliconmitus,sm5703.yaml     |  91 ++++++++++
 .../siliconmitus,sm5703-regulator.yaml        |  48 ++++++
 MAINTAINERS                                   |   8 +
 drivers/mfd/Kconfig                           |  12 ++
 drivers/mfd/Makefile                          |   1 +
 drivers/mfd/sm5703.c                          |  81 +++++++++
 drivers/regulator/Kconfig                     |   7 +
 drivers/regulator/Makefile                    |   1 +
 drivers/regulator/sm5703-regulator.c          | 162 ++++++++++++++++++
 include/linux/mfd/sm5703.h                    | 105 ++++++++++++
 10 files changed, 516 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml
 create mode 100644 Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml
 create mode 100644 drivers/mfd/sm5703.c
 create mode 100644 drivers/regulator/sm5703-regulator.c
 create mode 100644 include/linux/mfd/sm5703.h

Comments

Chanwoo Choi April 26, 2022, 3:44 p.m. UTC | #1
On 22. 4. 23. 17:53, Markuss Broks wrote:
> While SM5502 and SM5504 are purely micro USB switching
> circuits, SM5703 is a multi-function device which has multiple
> modules in it. Change the i2c_device_id of it to avoid conflict
> with MFD driver.
> 
> Signed-off-by: Markuss Broks <markuss.broks@gmail.com>
> ---
>   drivers/extcon/extcon-sm5502.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/extcon/extcon-sm5502.c b/drivers/extcon/extcon-sm5502.c
> index 17a40c3782ee..f706f5288257 100644
> --- a/drivers/extcon/extcon-sm5502.c
> +++ b/drivers/extcon/extcon-sm5502.c
> @@ -831,7 +831,7 @@ static SIMPLE_DEV_PM_OPS(sm5502_muic_pm_ops,
>   static const struct i2c_device_id sm5502_i2c_id[] = {
>   	{ "sm5502", (kernel_ulong_t)&sm5502_data },
>   	{ "sm5504", (kernel_ulong_t)&sm5504_data },
> -	{ "sm5703", (kernel_ulong_t)&sm5502_data },
> +	{ "sm5703-muic", (kernel_ulong_t)&sm5502_data },
>   	{ }
>   };
>   MODULE_DEVICE_TABLE(i2c, sm5502_i2c_id);

Applied it because this patch depends on already merged patch
on extcon-next branch.
Mark Brown April 26, 2022, 3:51 p.m. UTC | #2
On Sat, 23 Apr 2022 11:53:13 +0300, Markuss Broks wrote:
> This series adds support for Silicon Mitus SM5703 MFD and the
> appropriate device-tree bindings. This only adds support for the
> regulator module, leaving room for other modules implemented in
> future (code for other modules is really not ready for submission
> right now). Silicon Mitus SM5703 is used on various mobile phones,
> mostly Samsung Galaxy (J5 (2015, 2016), On7, J7 (2015, 2016) ...).
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[2/5] dt-bindings: regulator: Add bindings for Silicon Mitus SM5703 regulators
      commit: d496d68d6ba6debcc135794edb5fdc5a5b4531f1
[5/5] regulator: sm5703-regulator: Add regulators support for SM5703 MFD
      commit: e8858ba89ca377064da130d09648c99683f8bd90

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark