From: Krzysztof Kozlowski <krzk@kernel.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>, linux-pwm@vger.kernel.org
Cc: ukleinek@kernel.org, lorenzo.bianconi83@gmail.com,
krzk+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, upstream@airoha.com,
angelogioacchino.delregno@collabora.com,
benjamin.larsson@genexis.eu, conor+dt@kernel.org,
ansuelsmth@gmail.com
Subject: Re: [PATCH 2/2] pwm: airoha: Add support for EN7581 SoC
Date: Sat, 10 Aug 2024 13:34:18 +0200 [thread overview]
Message-ID: <1f8905b0-aff6-4932-b936-191aa5529f0e@kernel.org> (raw)
In-Reply-To: <a03f5ea9291e39eab303696eb03fdd44cf04e8d9.1723264979.git.lorenzo@kernel.org>
On 10/08/2024 06:48, Lorenzo Bianconi wrote:
> From: Benjamin Larsson <benjamin.larsson@genexis.eu>
>
> Introduce driver for PWM module available on EN7581 SoC.
>
> Signed-off-by: Benjamin Larsson <benjamin.larsson@genexis.eu>
> Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
...
> +
> +static void airoha_pwm_config_flash_map(struct airoha_pwm *pc,
> + unsigned int hwpwm, int index)
> +{
> + u32 addr, mask, val;
> +
> + if (hwpwm < PWM_NUM_GPIO) {
> + addr = REG_GPIO_FLASH_MAP(hwpwm / 8);
> + } else {
> + addr = REG_SIPO_FLASH_MAP(hwpwm / 8);
> + hwpwm -= PWM_NUM_GPIO;
> + }
> +
> + if (index < 0) {
> + /* Change of waveform takes effect immediately but
This and other comments should be not netdev-style but general Linux style.
> + * disabling has some delay so to prevent glitching
> + * only the enable bit is touched when disabling
> + */
> + airoha_pwm_flash_clear(pc, addr, GPIO_FLASH_EN(hwpwm % 8));
> + return;
...
> +
> +static const struct of_device_id airoha_pwm_of_match[] = {
> + { .compatible = "airoha,en7581-pwm" },
> + { /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(of, airoha_pwm_of_match);
> +
> +static struct platform_driver airoha_pwm_driver = {
> + .driver = {
> + .name = "airoha-pwm",
> + .of_match_table = airoha_pwm_of_match,
> + },
> + .probe = airoha_pwm_probe,
> +};
> +module_platform_driver(airoha_pwm_driver);
> +
> +MODULE_ALIAS("platform:airoha-pwm");
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.
Especially that it does not match compatible, so you cannot use excuse
module autoloading does not work for given OF node...
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-08-10 11:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-10 4:48 [PATCH 0/2] Add PWM support to EN7581 Lorenzo Bianconi
2024-08-10 4:48 ` [PATCH 1/2] dt-bindings: pwm: Document Airoha EN7581 PWM Lorenzo Bianconi
2024-08-10 11:36 ` Krzysztof Kozlowski
2024-08-10 17:18 ` Lorenzo Bianconi
2024-08-11 12:26 ` Krzysztof Kozlowski
2024-08-10 4:48 ` [PATCH 2/2] pwm: airoha: Add support for EN7581 SoC Lorenzo Bianconi
2024-08-10 11:34 ` Krzysztof Kozlowski [this message]
2024-08-10 17:02 ` Lorenzo Bianconi
2024-08-10 19:35 ` kernel test robot
2024-08-11 1:15 ` kernel test robot
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=1f8905b0-aff6-4932-b936-191aa5529f0e@kernel.org \
--to=krzk@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=ansuelsmth@gmail.com \
--cc=benjamin.larsson@genexis.eu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pwm@vger.kernel.org \
--cc=lorenzo.bianconi83@gmail.com \
--cc=lorenzo@kernel.org \
--cc=robh@kernel.org \
--cc=ukleinek@kernel.org \
--cc=upstream@airoha.com \
/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