* [PATCH -next 1/2] pwm: atmel-hlcdc: Enable module autoloading
2024-08-31 7:50 [PATCH -next 0/2] pwm: atmel-hlcdc: workaround Liao Chen
@ 2024-08-31 7:50 ` Liao Chen
2024-08-31 7:50 ` [PATCH -next 2/2] pwm: atmel-hlcdc: Drop trailing comma Liao Chen
2024-09-04 10:25 ` [PATCH -next 0/2] pwm: atmel-hlcdc: workaround Uwe Kleine-König
2 siblings, 0 replies; 4+ messages in thread
From: Liao Chen @ 2024-08-31 7:50 UTC (permalink / raw)
To: linux-pwm, linux-arm-kernel, linux-kernel
Cc: ukleinek, nicolas.ferre, alexandre.belloni, claudiu.beznea,
liaochen4
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based
on the alias from of_device_id table.
Signed-off-by: Liao Chen <liaochen4@huawei.com>
---
drivers/pwm/pwm-atmel-hlcdc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pwm/pwm-atmel-hlcdc.c b/drivers/pwm/pwm-atmel-hlcdc.c
index 2afb302be02c..02660bd811c4 100644
--- a/drivers/pwm/pwm-atmel-hlcdc.c
+++ b/drivers/pwm/pwm-atmel-hlcdc.c
@@ -290,6 +290,7 @@ static const struct of_device_id atmel_hlcdc_pwm_dt_ids[] = {
{ .compatible = "atmel,hlcdc-pwm" },
{ /* sentinel */ },
};
+MODULE_DEVICE_TABLE(of, atmel_hlcdc_pwm_dt_ids);
static struct platform_driver atmel_hlcdc_pwm_driver = {
.driver = {
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH -next 2/2] pwm: atmel-hlcdc: Drop trailing comma
2024-08-31 7:50 [PATCH -next 0/2] pwm: atmel-hlcdc: workaround Liao Chen
2024-08-31 7:50 ` [PATCH -next 1/2] pwm: atmel-hlcdc: Enable module autoloading Liao Chen
@ 2024-08-31 7:50 ` Liao Chen
2024-09-04 10:25 ` [PATCH -next 0/2] pwm: atmel-hlcdc: workaround Uwe Kleine-König
2 siblings, 0 replies; 4+ messages in thread
From: Liao Chen @ 2024-08-31 7:50 UTC (permalink / raw)
To: linux-pwm, linux-arm-kernel, linux-kernel
Cc: ukleinek, nicolas.ferre, alexandre.belloni, claudiu.beznea,
liaochen4
Drop the trailing comma in the terminator entry for the ID table to make
code robust against misrebases.
Signed-off-by: Liao Chen <liaochen4@huawei.com>
---
drivers/pwm/pwm-atmel-hlcdc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pwm/pwm-atmel-hlcdc.c b/drivers/pwm/pwm-atmel-hlcdc.c
index 02660bd811c4..eb39955a6d77 100644
--- a/drivers/pwm/pwm-atmel-hlcdc.c
+++ b/drivers/pwm/pwm-atmel-hlcdc.c
@@ -234,7 +234,7 @@ static const struct of_device_id atmel_hlcdc_dt_ids[] = {
.data = &atmel_hlcdc_pwm_sama5d3_errata,
},
{ .compatible = "microchip,sam9x60-hlcdc", },
- { /* sentinel */ },
+ { /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, atmel_hlcdc_dt_ids);
@@ -288,7 +288,7 @@ static void atmel_hlcdc_pwm_remove(struct platform_device *pdev)
static const struct of_device_id atmel_hlcdc_pwm_dt_ids[] = {
{ .compatible = "atmel,hlcdc-pwm" },
- { /* sentinel */ },
+ { /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, atmel_hlcdc_pwm_dt_ids);
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH -next 0/2] pwm: atmel-hlcdc: workaround
2024-08-31 7:50 [PATCH -next 0/2] pwm: atmel-hlcdc: workaround Liao Chen
2024-08-31 7:50 ` [PATCH -next 1/2] pwm: atmel-hlcdc: Enable module autoloading Liao Chen
2024-08-31 7:50 ` [PATCH -next 2/2] pwm: atmel-hlcdc: Drop trailing comma Liao Chen
@ 2024-09-04 10:25 ` Uwe Kleine-König
2 siblings, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2024-09-04 10:25 UTC (permalink / raw)
To: Liao Chen
Cc: linux-pwm, linux-arm-kernel, linux-kernel, nicolas.ferre,
alexandre.belloni, claudiu.beznea
[-- Attachment #1: Type: text/plain, Size: 569 bytes --]
Hello,
On Sat, Aug 31, 2024 at 07:50:57AM +0000, Liao Chen wrote:
> This patch enables the autoloading feature of atmel-hlcdc module. By
> registering MDT, the kernel is allowed to automatically bind modules to
> devices that match the specified compatible strings. This patch also
> drops trailing comma from definitions of device table arrays, which
> makes the code robust against misrebases.
Applied this series to
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next
Best regards and thanks for your contribution,
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread