From: Krzysztof Kozlowski <krzk@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Stefan Wahren" <wahrenst@gmx.net>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Conor Dooley" <conor+dt@kernel.org>,
andy.shevchenko@gmail.com,
"Angelo Compagnucci" <angelo.compagnucci@gmail.com>,
"Philip Howard" <phil@gadgetoid.com>,
linux-pwm@vger.kernel.org, devicetree@vger.kernel.org,
linux-gpio@vger.kernel.org,
"Vincent Whitchurch" <vincent.whitchurch@axis.com>
Subject: Re: [PATCH V3 2/2] pwm: Add GPIO PWM driver
Date: Tue, 30 Jan 2024 09:36:01 +0100 [thread overview]
Message-ID: <ed4c188d-025f-446f-8ab1-68c89dac5782@kernel.org> (raw)
In-Reply-To: <CACRpkdZ=wikdPVtC0KnOX7ZAg2obwALqnKARxS3uyTmhKeCuxw@mail.gmail.com>
On 29/01/2024 14:55, Linus Walleij wrote:
> On Mon, Jan 29, 2024 at 10:40 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>> On 28/01/2024 17:36, Stefan Wahren wrote:
>
>>> +MODULE_ALIAS("platform:pwm-gpio");
>>
>> You should not need MODULE_ALIAS() in normal cases. If you need it,
>> usually it means your device ID table is wrong (e.g. misses either
>> entries or MODULE_DEVICE_TABLE()). MODULE_ALIAS() is not a substitute
>> for incomplete ID table.
>
> I was under the impression that MODULE_ALIAS
> was something people put in to make platforms using
> udev behave better by default, e.g. autoprobing these
> devices better (on coldplug for "platform:*").
>
> For example:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4f46d6e7e5ffbce0ee1d1a80767fdf45e56cc863
>
> But I might have got it all wrong :/
That was 2008 :), but answering to the problem: people put MODULE_ALIAS
because they (do not have / forgot / don't want to add)* proper id table
for platform devices with MODULE_DEVICE_TABLE.
While it works, it does not offer the same scalability as proper ID
table and is confusing, because it suggests that driver should be
autoloaded by a platform ID, but not matched/bound by platform ID! Such
situation is very rare and would deserve a comment anyway.
* choose appropriate
See also:
https://lore.kernel.org/all/?q=f%3Akozlowski+drop+unneeded+module_alias
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-01-30 8:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-28 16:36 [PATCH V3 0/2] pwm: Add GPIO PWM driver Stefan Wahren
2024-01-28 16:36 ` [PATCH V3 1/2] dt-bindings: pwm: Add pwm-gpio Stefan Wahren
2024-01-28 17:08 ` Conor Dooley
2024-01-28 16:36 ` [PATCH V3 2/2] pwm: Add GPIO PWM driver Stefan Wahren
2024-01-29 9:40 ` Krzysztof Kozlowski
2024-01-29 13:55 ` Linus Walleij
2024-01-30 8:36 ` Krzysztof Kozlowski [this message]
2024-01-30 9:08 ` Sean Young
2024-01-30 11:21 ` Stefan Wahren
2024-02-02 13:19 ` [PATCH V3 0/2] " Phil Howard
2024-02-02 20:13 ` Stefan Wahren
2024-02-04 19:21 ` Phil Howard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ed4c188d-025f-446f-8ab1-68c89dac5782@kernel.org \
--to=krzk@kernel.org \
--cc=andy.shevchenko@gmail.com \
--cc=angelo.compagnucci@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=phil@gadgetoid.com \
--cc=robh+dt@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=vincent.whitchurch@axis.com \
--cc=wahrenst@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox