2023-10-06 10:05:14

by Marek Szyprowski

[permalink] [raw]
Subject: [PATCH v2 1/2] extcon: max77693: add device-tree compatible string

Commit 57f706bf7307 ("ARM: dts: samsung: exynos4412-midas: add USB
connector and USB OTG") added a 'muic' node to the MAX77693 PMIC
definition in various device-tree files. Since that commit, the newly
created MFD cell gained its own of_node and compatible string. This
changed its modalias, what in turn broke automated loading of the driver
module, because the new modalias is based on the of_node compatible
string, not the platform device name.

Fix this by adding the needed device-tree compatible string.

Signed-off-by: Marek Szyprowski <[email protected]>
---
drivers/extcon/extcon-max77693.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
index 1f1d9ab0c5c7..2c567e0b7b7f 100644
--- a/drivers/extcon/extcon-max77693.c
+++ b/drivers/extcon/extcon-max77693.c
@@ -1258,9 +1258,16 @@ static int max77693_muic_probe(struct platform_device *pdev)
return ret;
}

+static const struct of_device_id of_max77693_muic_dt_match[] = {
+ { .compatible = "maxim,max77693-muic", },
+ { /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, of_max77693_muic_dt_match);
+
static struct platform_driver max77693_muic_driver = {
.driver = {
.name = DEV_NAME,
+ .of_match_table = of_max77693_muic_dt_match,
},
.probe = max77693_muic_probe,
};
--
2.34.1


2023-10-06 10:05:23

by Marek Szyprowski

[permalink] [raw]
Subject: [PATCH v2 2/2] extcon: max77843: add device-tree compatible string

Add the needed device-tree compatible string to the MAX77843 extcon
driver, so it can be automatically loaded when compiled as a kernel
module and given device-tree contains separate 'muic' node under the main
MAX77843 PMIC node.

Signed-off-by: Marek Szyprowski <[email protected]>
---
drivers/extcon/extcon-max77843.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/extcon/extcon-max77843.c b/drivers/extcon/extcon-max77843.c
index 1bc0426ce3f1..acb11a54f875 100644
--- a/drivers/extcon/extcon-max77843.c
+++ b/drivers/extcon/extcon-max77843.c
@@ -946,9 +946,16 @@ static const struct platform_device_id max77843_muic_id[] = {
};
MODULE_DEVICE_TABLE(platform, max77843_muic_id);

+static const struct of_device_id of_max77843_muic_dt_match[] = {
+ { .compatible = "maxim,max77843-muic", },
+ { /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, of_max77843_muic_dt_match);
+
static struct platform_driver max77843_muic_driver = {
.driver = {
.name = "max77843-muic",
+ .of_match_table = of_max77843_muic_dt_match,
},
.probe = max77843_muic_probe,
.remove = max77843_muic_remove,
--
2.34.1

2023-10-06 10:05:26

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] extcon: max77693: add device-tree compatible string

On 06/10/2023 12:04, Marek Szyprowski wrote:
> Commit 57f706bf7307 ("ARM: dts: samsung: exynos4412-midas: add USB
> connector and USB OTG") added a 'muic' node to the MAX77693 PMIC
> definition in various device-tree files. Since that commit, the newly
> created MFD cell gained its own of_node and compatible string. This
> changed its modalias, what in turn broke automated loading of the driver
> module, because the new modalias is based on the of_node compatible
> string, not the platform device name.
>
> Fix this by adding the needed device-tree compatible string.
>
> Signed-off-by: Marek Szyprowski <[email protected]>

Changelog would be nice :)


Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-10-06 10:05:32

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] extcon: max77843: add device-tree compatible string

On 06/10/2023 12:04, Marek Szyprowski wrote:
> Add the needed device-tree compatible string to the MAX77843 extcon
> driver, so it can be automatically loaded when compiled as a kernel
> module and given device-tree contains separate 'muic' node under the main
> MAX77843 PMIC node.
>
> Signed-off-by: Marek Szyprowski <[email protected]>
> ---


Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-10-06 15:11:45

by Chanwoo Choi

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] extcon: max77693: add device-tree compatible string

On 23. 10. 6. 19:04, Marek Szyprowski wrote:
> Commit 57f706bf7307 ("ARM: dts: samsung: exynos4412-midas: add USB
> connector and USB OTG") added a 'muic' node to the MAX77693 PMIC
> definition in various device-tree files. Since that commit, the newly
> created MFD cell gained its own of_node and compatible string. This
> changed its modalias, what in turn broke automated loading of the driver
> module, because the new modalias is based on the of_node compatible
> string, not the platform device name.
>
> Fix this by adding the needed device-tree compatible string.
>
> Signed-off-by: Marek Szyprowski <[email protected]>
> ---
> drivers/extcon/extcon-max77693.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
> index 1f1d9ab0c5c7..2c567e0b7b7f 100644
> --- a/drivers/extcon/extcon-max77693.c
> +++ b/drivers/extcon/extcon-max77693.c
> @@ -1258,9 +1258,16 @@ static int max77693_muic_probe(struct platform_device *pdev)
> return ret;
> }
>
> +static const struct of_device_id of_max77693_muic_dt_match[] = {
> + { .compatible = "maxim,max77693-muic", },
> + { /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(of, of_max77693_muic_dt_match);
> +
> static struct platform_driver max77693_muic_driver = {
> .driver = {
> .name = DEV_NAME,
> + .of_match_table = of_max77693_muic_dt_match,
> },
> .probe = max77693_muic_probe,
> };


Applied it. Thanks.

--
Best Regards,
Samsung Electronics
Chanwoo Choi

2023-10-06 15:15:23

by Chanwoo Choi

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] extcon: max77843: add device-tree compatible string

On 23. 10. 6. 19:04, Marek Szyprowski wrote:
> Add the needed device-tree compatible string to the MAX77843 extcon
> driver, so it can be automatically loaded when compiled as a kernel
> module and given device-tree contains separate 'muic' node under the main
> MAX77843 PMIC node.
>
> Signed-off-by: Marek Szyprowski <[email protected]>
> ---
> drivers/extcon/extcon-max77843.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/extcon/extcon-max77843.c b/drivers/extcon/extcon-max77843.c
> index 1bc0426ce3f1..acb11a54f875 100644
> --- a/drivers/extcon/extcon-max77843.c
> +++ b/drivers/extcon/extcon-max77843.c
> @@ -946,9 +946,16 @@ static const struct platform_device_id max77843_muic_id[] = {
> };
> MODULE_DEVICE_TABLE(platform, max77843_muic_id);
>
> +static const struct of_device_id of_max77843_muic_dt_match[] = {
> + { .compatible = "maxim,max77843-muic", },
> + { /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(of, of_max77843_muic_dt_match);
> +
> static struct platform_driver max77843_muic_driver = {
> .driver = {
> .name = "max77843-muic",
> + .of_match_table = of_max77843_muic_dt_match,
> },
> .probe = max77843_muic_probe,
> .remove = max77843_muic_remove,

Applied it. Thanks.

--
Best Regards,
Samsung Electronics
Chanwoo Choi