* [PATCH v2 1/3] regulator: max14577: Add proper dt-compatible strings [not found] <CGME20200522064806eucas1p120fc21b6e3ae5783e627a3da3761def3@eucas1p1.samsung.com> @ 2020-05-22 6:47 ` Marek Szyprowski [not found] ` <CGME20200522064807eucas1p2665d6b3928b2ad515abe54513cbd7fd8@eucas1p2.samsung.com> [not found] ` <CGME20200522064807eucas1p2db9a6fe5599cc9d58ea1fb2d9acc36c7@eucas1p2.samsung.com> 0 siblings, 2 replies; 6+ messages in thread From: Marek Szyprowski @ 2020-05-22 6:47 UTC (permalink / raw) To: linux-pm, linux-kernel Cc: Marek Szyprowski, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Chanwoo Choi, MyungJoo Ham, Sebastian Reichel, Mark Brown Add device tree compatible strings and create proper modalias structures to let this driver load automatically if compiled as module, because max14577 MFD driver creates MFD cells with such compatible strings. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- v2: - added .of_match_table pointer --- drivers/regulator/max14577-regulator.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/max14577-regulator.c b/drivers/regulator/max14577-regulator.c index 07a150c9bbf2..4c9ae52b9e87 100644 --- a/drivers/regulator/max14577-regulator.c +++ b/drivers/regulator/max14577-regulator.c @@ -238,10 +238,20 @@ static const struct platform_device_id max14577_regulator_id[] = { }; MODULE_DEVICE_TABLE(platform, max14577_regulator_id); +static const struct of_device_id of_max14577_regulator_dt_match[] = { + { .compatible = "maxim,max77836-regulator", + .data = (void *)MAXIM_DEVICE_TYPE_MAX77836, }, + { .compatible = "maxim,max14577-regulator", + .data = (void *)MAXIM_DEVICE_TYPE_MAX14577, }, + { }, +}; +MODULE_DEVICE_TABLE(of, of_max14577_regulator_dt_match); + static struct platform_driver max14577_regulator_driver = { .driver = { - .name = "max14577-regulator", - }, + .name = "max14577-regulator", + .of_match_table = of_max14577_regulator_dt_match, + }, .probe = max14577_regulator_probe, .id_table = max14577_regulator_id, }; -- 2.17.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <CGME20200522064807eucas1p2665d6b3928b2ad515abe54513cbd7fd8@eucas1p2.samsung.com>]
* [PATCH v2 2/3] extcon: max14577: Add proper dt-compatible strings [not found] ` <CGME20200522064807eucas1p2665d6b3928b2ad515abe54513cbd7fd8@eucas1p2.samsung.com> @ 2020-05-22 6:48 ` Marek Szyprowski 2020-05-22 7:08 ` Chanwoo Choi 0 siblings, 1 reply; 6+ messages in thread From: Marek Szyprowski @ 2020-05-22 6:48 UTC (permalink / raw) To: linux-pm, linux-kernel Cc: Marek Szyprowski, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Chanwoo Choi, MyungJoo Ham, Sebastian Reichel, Mark Brown Add device tree compatible strings and create proper modalias structures to let this driver load automatically if compiled as module, because max14577 MFD driver creates MFD cells with such compatible strings. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- v2: - added .of_match_table pointer --- drivers/extcon/extcon-max14577.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c index 32f663436e6e..03af678ddeba 100644 --- a/drivers/extcon/extcon-max14577.c +++ b/drivers/extcon/extcon-max14577.c @@ -782,9 +782,19 @@ static const struct platform_device_id max14577_muic_id[] = { }; MODULE_DEVICE_TABLE(platform, max14577_muic_id); +static const struct of_device_id of_max14577_muic_dt_match[] = { + { .compatible = "maxim,max77836-muic", + .data = (void *)MAXIM_DEVICE_TYPE_MAX77836, }, + { .compatible = "maxim,max14577-muic", + .data = (void *)MAXIM_DEVICE_TYPE_MAX14577, }, + { }, +}; +MODULE_DEVICE_TABLE(of, of_max14577_muic_dt_match); + static struct platform_driver max14577_muic_driver = { .driver = { .name = "max14577-muic", + .of_match_table = of_max14577_muic_dt_match, }, .probe = max14577_muic_probe, .remove = max14577_muic_remove, -- 2.17.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/3] extcon: max14577: Add proper dt-compatible strings 2020-05-22 6:48 ` [PATCH v2 2/3] extcon: " Marek Szyprowski @ 2020-05-22 7:08 ` Chanwoo Choi 2020-05-22 8:30 ` Marek Szyprowski 0 siblings, 1 reply; 6+ messages in thread From: Chanwoo Choi @ 2020-05-22 7:08 UTC (permalink / raw) To: Marek Szyprowski, linux-pm, linux-kernel Cc: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, MyungJoo Ham, Sebastian Reichel, Mark Brown On 5/22/20 3:48 PM, Marek Szyprowski wrote: > Add device tree compatible strings and create proper modalias structures > to let this driver load automatically if compiled as module, because > max14577 MFD driver creates MFD cells with such compatible strings. > > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> > --- > v2: > - added .of_match_table pointer > --- > drivers/extcon/extcon-max14577.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c > index 32f663436e6e..03af678ddeba 100644 > --- a/drivers/extcon/extcon-max14577.c > +++ b/drivers/extcon/extcon-max14577.c > @@ -782,9 +782,19 @@ static const struct platform_device_id max14577_muic_id[] = { > }; > MODULE_DEVICE_TABLE(platform, max14577_muic_id); > > +static const struct of_device_id of_max14577_muic_dt_match[] = { > + { .compatible = "maxim,max77836-muic", > + .data = (void *)MAXIM_DEVICE_TYPE_MAX77836, }, > + { .compatible = "maxim,max14577-muic", > + .data = (void *)MAXIM_DEVICE_TYPE_MAX14577, }, > + { }, How about changing the order between max77836 and max14577 as already added structure like platform_device_id if there are no specific reason as following:? static const struct of_device_id of_max14577_muic_dt_match[] = { { .compatible = "maxim,max14577-muic", .data = (void *)MAXIM_DEVICE_TYPE_MAX14577, }, { .compatible = "maxim,max77836-muic", .data = (void *)MAXIM_DEVICE_TYPE_MAX77836, }, { }, > +}; > +MODULE_DEVICE_TABLE(of, of_max14577_muic_dt_match); > + > static struct platform_driver max14577_muic_driver = { > .driver = { > .name = "max14577-muic", > + .of_match_table = of_max14577_muic_dt_match, > }, > .probe = max14577_muic_probe, > .remove = max14577_muic_remove, > -- Best Regards, Chanwoo Choi Samsung Electronics ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/3] extcon: max14577: Add proper dt-compatible strings 2020-05-22 7:08 ` Chanwoo Choi @ 2020-05-22 8:30 ` Marek Szyprowski 2020-05-22 9:20 ` Marek Szyprowski 0 siblings, 1 reply; 6+ messages in thread From: Marek Szyprowski @ 2020-05-22 8:30 UTC (permalink / raw) To: Chanwoo Choi, linux-pm, linux-kernel Cc: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, MyungJoo Ham, Sebastian Reichel, Mark Brown Hi Chanwoo, On 22.05.2020 09:08, Chanwoo Choi wrote: > On 5/22/20 3:48 PM, Marek Szyprowski wrote: >> Add device tree compatible strings and create proper modalias structures >> to let this driver load automatically if compiled as module, because >> max14577 MFD driver creates MFD cells with such compatible strings. >> >> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> >> --- >> v2: >> - added .of_match_table pointer >> --- >> drivers/extcon/extcon-max14577.c | 10 ++++++++++ >> 1 file changed, 10 insertions(+) >> >> diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c >> index 32f663436e6e..03af678ddeba 100644 >> --- a/drivers/extcon/extcon-max14577.c >> +++ b/drivers/extcon/extcon-max14577.c >> @@ -782,9 +782,19 @@ static const struct platform_device_id max14577_muic_id[] = { >> }; >> MODULE_DEVICE_TABLE(platform, max14577_muic_id); >> >> +static const struct of_device_id of_max14577_muic_dt_match[] = { >> + { .compatible = "maxim,max77836-muic", >> + .data = (void *)MAXIM_DEVICE_TYPE_MAX77836, }, >> + { .compatible = "maxim,max14577-muic", >> + .data = (void *)MAXIM_DEVICE_TYPE_MAX14577, }, >> + { }, > How about changing the order between max77836 and max14577 as already added structure > like platform_device_id if there are no specific reason as following:? > > > static const struct of_device_id of_max14577_muic_dt_match[] = { > { .compatible = "maxim,max14577-muic", > .data = (void *)MAXIM_DEVICE_TYPE_MAX14577, }, > { .compatible = "maxim,max77836-muic", > .data = (void *)MAXIM_DEVICE_TYPE_MAX77836, }, > { }, Sure. I will swap them and send updated patch. This order comes from drivers/power/supply/max14577_charger.c, which also lacks .of_match_table, so I will also fix it. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/3] extcon: max14577: Add proper dt-compatible strings 2020-05-22 8:30 ` Marek Szyprowski @ 2020-05-22 9:20 ` Marek Szyprowski 0 siblings, 0 replies; 6+ messages in thread From: Marek Szyprowski @ 2020-05-22 9:20 UTC (permalink / raw) To: Chanwoo Choi, linux-pm, linux-kernel Cc: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, MyungJoo Ham, Sebastian Reichel, Mark Brown Hi On 22.05.2020 10:30, Marek Szyprowski wrote: > Hi Chanwoo, > > On 22.05.2020 09:08, Chanwoo Choi wrote: >> On 5/22/20 3:48 PM, Marek Szyprowski wrote: >>> Add device tree compatible strings and create proper modalias >>> structures >>> to let this driver load automatically if compiled as module, because >>> max14577 MFD driver creates MFD cells with such compatible strings. >>> >>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> >>> --- >>> v2: >>> - added .of_match_table pointer >>> --- >>> drivers/extcon/extcon-max14577.c | 10 ++++++++++ >>> 1 file changed, 10 insertions(+) >>> >>> diff --git a/drivers/extcon/extcon-max14577.c >>> b/drivers/extcon/extcon-max14577.c >>> index 32f663436e6e..03af678ddeba 100644 >>> --- a/drivers/extcon/extcon-max14577.c >>> +++ b/drivers/extcon/extcon-max14577.c >>> @@ -782,9 +782,19 @@ static const struct platform_device_id >>> max14577_muic_id[] = { >>> }; >>> MODULE_DEVICE_TABLE(platform, max14577_muic_id); >>> +static const struct of_device_id of_max14577_muic_dt_match[] = { >>> + { .compatible = "maxim,max77836-muic", >>> + .data = (void *)MAXIM_DEVICE_TYPE_MAX77836, }, >>> + { .compatible = "maxim,max14577-muic", >>> + .data = (void *)MAXIM_DEVICE_TYPE_MAX14577, }, >>> + { }, >> How about changing the order between max77836 and max14577 as already >> added structure >> like platform_device_id if there are no specific reason as following:? >> >> >> static const struct of_device_id of_max14577_muic_dt_match[] = { >> { .compatible = "maxim,max14577-muic", >> .data = (void *)MAXIM_DEVICE_TYPE_MAX14577, }, >> { .compatible = "maxim,max77836-muic", >> .data = (void *)MAXIM_DEVICE_TYPE_MAX77836, }, >> { }, > > Sure. I will swap them and send updated patch. This order comes from > drivers/power/supply/max14577_charger.c, which also lacks > .of_match_table, so I will also fix it. It looks that I've checked a wrong tree. I will send v3 with of_match_table sorted. I have no idea why the order is reversed. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CGME20200522064807eucas1p2db9a6fe5599cc9d58ea1fb2d9acc36c7@eucas1p2.samsung.com>]
* [PATCH v2 3/3] power: charger: max14577: Add proper dt-compatible strings [not found] ` <CGME20200522064807eucas1p2db9a6fe5599cc9d58ea1fb2d9acc36c7@eucas1p2.samsung.com> @ 2020-05-22 6:48 ` Marek Szyprowski 0 siblings, 0 replies; 6+ messages in thread From: Marek Szyprowski @ 2020-05-22 6:48 UTC (permalink / raw) To: linux-pm, linux-kernel Cc: Marek Szyprowski, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Chanwoo Choi, MyungJoo Ham, Sebastian Reichel, Mark Brown Add device tree compatible strings and create proper modalias structures to let this driver load automatically if compiled as module, because max14577 MFD driver creates MFD cells with such compatible strings. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- v2: - added .of_match_table pointer --- drivers/power/supply/max14577_charger.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/power/supply/max14577_charger.c b/drivers/power/supply/max14577_charger.c index 8a59feac6468..96f4cd1941b2 100644 --- a/drivers/power/supply/max14577_charger.c +++ b/drivers/power/supply/max14577_charger.c @@ -623,9 +623,19 @@ static const struct platform_device_id max14577_charger_id[] = { }; MODULE_DEVICE_TABLE(platform, max14577_charger_id); +static const struct of_device_id of_max14577_charger_dt_match[] = { + { .compatible = "maxim,max77836-charger", + .data = (void *)MAXIM_DEVICE_TYPE_MAX77836, }, + { .compatible = "maxim,max14577-charger", + .data = (void *)MAXIM_DEVICE_TYPE_MAX14577, }, + { }, +}; +MODULE_DEVICE_TABLE(of, of_max14577_charger_dt_match); + static struct platform_driver max14577_charger_driver = { .driver = { .name = "max14577-charger", + .of_match_table = of_max14577_charger_dt_match, }, .probe = max14577_charger_probe, .remove = max14577_charger_remove, -- 2.17.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-05-22 9:20 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20200522064806eucas1p120fc21b6e3ae5783e627a3da3761def3@eucas1p1.samsung.com> 2020-05-22 6:47 ` [PATCH v2 1/3] regulator: max14577: Add proper dt-compatible strings Marek Szyprowski [not found] ` <CGME20200522064807eucas1p2665d6b3928b2ad515abe54513cbd7fd8@eucas1p2.samsung.com> 2020-05-22 6:48 ` [PATCH v2 2/3] extcon: " Marek Szyprowski 2020-05-22 7:08 ` Chanwoo Choi 2020-05-22 8:30 ` Marek Szyprowski 2020-05-22 9:20 ` Marek Szyprowski [not found] ` <CGME20200522064807eucas1p2db9a6fe5599cc9d58ea1fb2d9acc36c7@eucas1p2.samsung.com> 2020-05-22 6:48 ` [PATCH v2 3/3] power: charger: " Marek Szyprowski
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).