Re: Re: [PATCH v13 3/5] pwm: dwc: add of/platform support
"Xuyang Dong" <[email protected]>
| Newsgroups | dev.linux.lists.sashiko-reviews,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pwm |
|---|---|
| Message-ID | <[email protected]> |
> > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: > - [Medium] Module autoloading for non-OF setups will fail due to a module alias mismatch. > -- > > --- Patch [3]: [PATCH v13 3/5] pwm: dwc: add of/platform support --- > commit efa310f451f843a8ed2f095d6d6d3c443510ca1a > Author: Xuyang Dong <[email protected]> > > pwm: dwc: add of/platform support > > This commit adds platform and OF-based probing support for the dwc PWM > controller, allowing it to be used in non-PCI systems. It implements polarity > control using the timer's dual load registers and updates clock and runtime > PM state management. > > > diff --git a/drivers/pwm/pwm-dwc-of.c b/drivers/pwm/pwm-dwc-of.c > > new file mode 100644 > > index 0000000000000..4956dd36f93ad > > --- /dev/null > > +++ b/drivers/pwm/pwm-dwc-of.c > > [ ... ] > > > +static struct platform_driver dwc_pwm_plat_driver = { > > + .driver = { > > + .name = "dwc-pwm", > > + .pm = pm_ptr(&dwc_pwm_pm_ops), > > + .of_match_table = dwc_pwm_dt_ids, > > + }, > > + .probe = dwc_pwm_plat_probe, > > + .remove = dwc_pwm_plat_remove, > > +}; > > + > > +module_platform_driver(dwc_pwm_plat_driver); > > + > > +MODULE_ALIAS("platform:dwc-pwm-of"); > > [Severity: Medium] > Does this module alias mismatch prevent automatic module loading on non-OF > setups? > > The platform driver registers its name as "dwc-pwm", which means a system > without Device Tree will emit a uevent with MODALIAS=platform:dwc-pwm. Since > the provided MODULE_ALIAS is "platform:dwc-pwm-of", udev will likely fail to > find and load this module automatically. > Hi Sashiko, Remove MODULE_ALIAS() in the next version. Best regards, Xuyang Dong > > +MODULE_AUTHOR("Ben Dooks <[email protected]>"); > > +MODULE_DESCRIPTION("DesignWare PWM Controller"); > > +MODULE_LICENSE("GPL"); > > -- > Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3