linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/2] Add support for SM5703 MUIC unit
@ 2022-03-12 18:41 Markuss Broks
  2022-03-12 18:41 ` [PATCH v1 1/2] dt-bindings: extcon: bindings for SM5703 Markuss Broks
  2022-03-12 18:41 ` [PATCH v1 2/2] extcon: sm5502: Add support " Markuss Broks
  0 siblings, 2 replies; 4+ messages in thread
From: Markuss Broks @ 2022-03-12 18:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: phone-devel, ~postmarketos-upstreaming, Markuss Broks,
	MyungJoo Ham, Chanwoo Choi, Rob Herring, Krzysztof Kozlowski,
	devicetree

This series adds support for MUIC unit of Silicon Mitus SM5703 MFD.
The MUIC unit re-uses the register map of SM5502's MUIC unit.

Markuss Broks (2):
  dt-bindings: extcon: bindings for SM5703
  extcon: sm5502: Add support for SM5703

 .../devicetree/bindings/extcon/siliconmitus,sm5502-muic.yaml | 5 +++--
 drivers/extcon/Kconfig                                       | 2 +-
 drivers/extcon/extcon-sm5502.c                               | 2 ++
 3 files changed, 6 insertions(+), 3 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v1 1/2] dt-bindings: extcon: bindings for SM5703
  2022-03-12 18:41 [PATCH v1 0/2] Add support for SM5703 MUIC unit Markuss Broks
@ 2022-03-12 18:41 ` Markuss Broks
  2022-03-13  9:28   ` Krzysztof Kozlowski
  2022-03-12 18:41 ` [PATCH v1 2/2] extcon: sm5502: Add support " Markuss Broks
  1 sibling, 1 reply; 4+ messages in thread
From: Markuss Broks @ 2022-03-12 18:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: phone-devel, ~postmarketos-upstreaming, Markuss Broks,
	MyungJoo Ham, Chanwoo Choi, Rob Herring, Krzysztof Kozlowski,
	devicetree

This patch adds device-tree bindings for Silicon Mitus SM5703 MUIC.

Signed-off-by: Markuss Broks <markuss.broks@gmail.com>
---
 .../devicetree/bindings/extcon/siliconmitus,sm5502-muic.yaml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/extcon/siliconmitus,sm5502-muic.yaml b/Documentation/devicetree/bindings/extcon/siliconmitus,sm5502-muic.yaml
index fd2e55088888..7a224b2f0977 100644
--- a/Documentation/devicetree/bindings/extcon/siliconmitus,sm5502-muic.yaml
+++ b/Documentation/devicetree/bindings/extcon/siliconmitus,sm5502-muic.yaml
@@ -20,11 +20,12 @@ properties:
     enum:
       - siliconmitus,sm5502-muic
       - siliconmitus,sm5504-muic
+      - siliconmitus,sm5703-muic
 
   reg:
     maxItems: 1
-    description: I2C slave address of the device. Usually 0x25 for SM5502,
-      0x14 for SM5504.
+    description: I2C slave address of the device. Usually 0x25 for SM5502
+      and SM5703, 0x14 for SM5504.
 
   interrupts:
     maxItems: 1
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v1 2/2] extcon: sm5502: Add support for SM5703
  2022-03-12 18:41 [PATCH v1 0/2] Add support for SM5703 MUIC unit Markuss Broks
  2022-03-12 18:41 ` [PATCH v1 1/2] dt-bindings: extcon: bindings for SM5703 Markuss Broks
@ 2022-03-12 18:41 ` Markuss Broks
  1 sibling, 0 replies; 4+ messages in thread
From: Markuss Broks @ 2022-03-12 18:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: phone-devel, ~postmarketos-upstreaming, Markuss Broks,
	MyungJoo Ham, Chanwoo Choi, Rob Herring, Krzysztof Kozlowski,
	devicetree

SM5703 is another MFD from Silicon Mitus which has a very similar MUIC
unit to the one in SM5502. The only difference I've noticed is slightly different
configuration only enables the interrupts which are exactly the same as on SM5502.
If we make use of different interrupts in the future, this can be improved by having
a separate struct for SM5703, but the main functionality (detecting cable or OTG adapter)
is working properly.

Signed-off-by: Markuss Broks <markuss.broks@gmail.com>
---
 drivers/extcon/Kconfig         | 2 +-
 drivers/extcon/extcon-sm5502.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig
index 0d42e49105dd..88a8b3d7d78a 100644
--- a/drivers/extcon/Kconfig
+++ b/drivers/extcon/Kconfig
@@ -156,7 +156,7 @@ config EXTCON_RT8973A
 	  from abnormal high input voltage (up to 28V).
 
 config EXTCON_SM5502
-	tristate "Silicon Mitus SM5502/SM5504 EXTCON support"
+	tristate "Silicon Mitus SM5502/SM5504/SM5703 EXTCON support"
 	depends on I2C
 	select IRQ_DOMAIN
 	select REGMAP_I2C
diff --git a/drivers/extcon/extcon-sm5502.c b/drivers/extcon/extcon-sm5502.c
index 93da2d8379b1..17a40c3782ee 100644
--- a/drivers/extcon/extcon-sm5502.c
+++ b/drivers/extcon/extcon-sm5502.c
@@ -798,6 +798,7 @@ static const struct sm5502_type sm5504_data = {
 static const struct of_device_id sm5502_dt_match[] = {
 	{ .compatible = "siliconmitus,sm5502-muic", .data = &sm5502_data },
 	{ .compatible = "siliconmitus,sm5504-muic", .data = &sm5504_data },
+	{ .compatible = "siliconmitus,sm5703-muic", .data = &sm5502_data },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, sm5502_dt_match);
@@ -830,6 +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 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, sm5502_i2c_id);
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/2] dt-bindings: extcon: bindings for SM5703
  2022-03-12 18:41 ` [PATCH v1 1/2] dt-bindings: extcon: bindings for SM5703 Markuss Broks
@ 2022-03-13  9:28   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-13  9:28 UTC (permalink / raw)
  To: Markuss Broks, linux-kernel
  Cc: phone-devel, ~postmarketos-upstreaming, MyungJoo Ham,
	Chanwoo Choi, Rob Herring, Krzysztof Kozlowski, devicetree

On 12/03/2022 19:41, Markuss Broks wrote:
> This patch adds device-tree bindings for Silicon Mitus SM5703 MUIC.
> 
> Signed-off-by: Markuss Broks <markuss.broks@gmail.com>
> ---
>  .../devicetree/bindings/extcon/siliconmitus,sm5502-muic.yaml | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)


Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-13  9:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-12 18:41 [PATCH v1 0/2] Add support for SM5703 MUIC unit Markuss Broks
2022-03-12 18:41 ` [PATCH v1 1/2] dt-bindings: extcon: bindings for SM5703 Markuss Broks
2022-03-13  9:28   ` Krzysztof Kozlowski
2022-03-12 18:41 ` [PATCH v1 2/2] extcon: sm5502: Add support " Markuss Broks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).