2021-06-03 08:57:04

by Stephan Gerhold

[permalink] [raw]
Subject: [PATCH v4 0/3] extcon: sm5502: Add support for SM5504

This patch series adds support for SM5504 to the existing extcon-sm5502
driver. SM5502 and SM5504 are fairly similar so support for SM5504 can
be added with a few simple changes to the code.

I tested this patch series on both SM5502 (Samsung Galaxy A5 2015)
and SM5504 (Samsung Galaxy S4 Mini Value Edition) and it seems to work
just fine for both.

---
Changes in v4:
- Add NULL check for .parse_irq (suggested by Chanwoo Choi)
- Add Rob's Acked-by: on the dt-bindings patch
Changes in v3:
- Drop patch 1-4 (already applied)
- Avoid if (type == TYPE_SM5504) everywhere in the code, instead
introduce a struct sm5502_type that encodes chip-specific information.
Changes in v2: Fix compile warning in last patch

v3: https://lore.kernel.org/lkml/[email protected]/
v2: https://lore.kernel.org/lkml/[email protected]/
v1: https://lore.kernel.org/lkml/[email protected]/

Stephan Gerhold (3):
dt-bindings: extcon: sm5502: Document siliconmitus,sm5504-muic
extcon: sm5502: Refactor driver to use chip-specific struct
extcon: sm5502: Add support for SM5504

.../extcon/siliconmitus,sm5502-muic.yaml | 6 +-
drivers/extcon/Kconfig | 2 +-
drivers/extcon/extcon-sm5502.c | 200 +++++++++++++++---
drivers/extcon/extcon-sm5502.h | 82 ++++++-
4 files changed, 252 insertions(+), 38 deletions(-)

--
2.31.1


2021-06-03 08:57:21

by Stephan Gerhold

[permalink] [raw]
Subject: [PATCH v4 1/3] dt-bindings: extcon: sm5502: Document siliconmitus,sm5504-muic

Document support for SM5504 with the new siliconmitus,sm5504-muic
compatible.

Signed-off-by: Stephan Gerhold <[email protected]>
Acked-by: Rob Herring <[email protected]>
---
Changes in v4: Added Rob's Acked-by
---
.../bindings/extcon/siliconmitus,sm5502-muic.yaml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/extcon/siliconmitus,sm5502-muic.yaml b/Documentation/devicetree/bindings/extcon/siliconmitus,sm5502-muic.yaml
index 0432b0502e0b..fd2e55088888 100644
--- a/Documentation/devicetree/bindings/extcon/siliconmitus,sm5502-muic.yaml
+++ b/Documentation/devicetree/bindings/extcon/siliconmitus,sm5502-muic.yaml
@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/extcon/siliconmitus,sm5502-muic.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

-title: SM5502 MUIC (Micro-USB Interface Controller) device
+title: SM5502/SM5504 MUIC (Micro-USB Interface Controller) device

maintainers:
- Chanwoo Choi <[email protected]>
@@ -19,10 +19,12 @@ properties:
compatible:
enum:
- siliconmitus,sm5502-muic
+ - siliconmitus,sm5504-muic

reg:
maxItems: 1
- description: I2C slave address of the device. Usually 0x25 for SM5502.
+ description: I2C slave address of the device. Usually 0x25 for SM5502,
+ 0x14 for SM5504.

interrupts:
maxItems: 1
--
2.31.1

2021-06-04 01:47:44

by Chanwoo Choi

[permalink] [raw]
Subject: Re: [PATCH v4 0/3] extcon: sm5502: Add support for SM5504

On 6/3/21 5:52 PM, Stephan Gerhold wrote:
> This patch series adds support for SM5504 to the existing extcon-sm5502
> driver. SM5502 and SM5504 are fairly similar so support for SM5504 can
> be added with a few simple changes to the code.
>
> I tested this patch series on both SM5502 (Samsung Galaxy A5 2015)
> and SM5504 (Samsung Galaxy S4 Mini Value Edition) and it seems to work
> just fine for both.
>
> ---
> Changes in v4:
> - Add NULL check for .parse_irq (suggested by Chanwoo Choi)
> - Add Rob's Acked-by: on the dt-bindings patch
> Changes in v3:
> - Drop patch 1-4 (already applied)
> - Avoid if (type == TYPE_SM5504) everywhere in the code, instead
> introduce a struct sm5502_type that encodes chip-specific information.
> Changes in v2: Fix compile warning in last patch
>
> v3: https://lore.kernel.org/lkml/[email protected]/
> v2: https://lore.kernel.org/lkml/[email protected]/
> v1: https://lore.kernel.org/lkml/[email protected]/
>
> Stephan Gerhold (3):
> dt-bindings: extcon: sm5502: Document siliconmitus,sm5504-muic
> extcon: sm5502: Refactor driver to use chip-specific struct
> extcon: sm5502: Add support for SM5504
>
> .../extcon/siliconmitus,sm5502-muic.yaml | 6 +-
> drivers/extcon/Kconfig | 2 +-
> drivers/extcon/extcon-sm5502.c | 200 +++++++++++++++---
> drivers/extcon/extcon-sm5502.h | 82 ++++++-
> 4 files changed, 252 insertions(+), 38 deletions(-)
>

Applied them. Thanks.

--
Best Regards,
Chanwoo Choi
Samsung Electronics