devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: mathieu.dubois-briand@bootlin.com, "Lee Jones" <lee@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Kamel Bouhara" <kamel.bouhara@bootlin.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Bartosz Golaszewski" <brgl@bgdev.pl>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Uwe Kleine-König" <ukleinek@kernel.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-input@vger.kernel.org,
	linux-pwm@vger.kernel.org,
	"Grégory Clement" <gregory.clement@bootlin.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH 4/8] pwm: max7360: Add MAX7360 PWM support
Date: Sat, 21 Dec 2024 21:35:22 +0100	[thread overview]
Message-ID: <45f6e5e0-c145-40d9-8f0a-ffb25ecffb28@kernel.org> (raw)
In-Reply-To: <20241219-mdb-max7360-support-v1-4-8e8317584121@bootlin.com>

On 19/12/2024 17:21, mathieu.dubois-briand@bootlin.com wrote:
> From: Kamel Bouhara <kamel.bouhara@bootlin.com>
> 
> Add driver for Maxim Integrated MAX7360 PWM controller, supporting up to
> 8 independent PWM outputs.
> 


...

> +
> +#ifdef CONFIG_OF
> +static const struct of_device_id max7360_pwm_of_match[] = {
> +	{ .compatible = "maxim,max7360-pwm", },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(of, max7360_pwm_of_match);
> +#endif
> +
> +static struct platform_driver max7360_pwm_driver = {
> +	.driver = {
> +		.name = "max7360-pwm",
> +		.of_match_table = of_match_ptr(max7360_pwm_of_match),

Better to drop of_match_ptr and #ifdef earlier, so ACPI could use it.

> +	},
> +	.probe = max7360_pwm_probe,
> +};
> +module_platform_driver(max7360_pwm_driver);
> +
> +MODULE_DESCRIPTION("MAX7360 PWM driver");
> +MODULE_AUTHOR("Kamel BOUHARA <kamel.bouhara@bootlin.com>");
> +MODULE_ALIAS("platform:max7360-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.

Maybe you need it because OF table will get dropped, then it would be
fine. But in current code it's unnecessary and copy-pasta from other
drivers.


Best regards,
Krzysztof

  parent reply	other threads:[~2024-12-21 20:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-19 16:21 [PATCH 0/8] Add support for MAX7360 multifunction device Mathieu Dubois-Briand
2024-12-19 16:21 ` [PATCH 1/8] dt-bindings: Add MAX7360 MFD device Mathieu Dubois-Briand
2024-12-21 20:28   ` Krzysztof Kozlowski
2024-12-19 16:21 ` [PATCH 2/8] dt-bindings: Add MAX7360 subdevices Mathieu Dubois-Briand
2024-12-19 21:54   ` Uwe Kleine-König
2024-12-21 20:34   ` Krzysztof Kozlowski
2024-12-23 15:20     ` Mathieu Dubois-Briand
2024-12-24  9:00       ` Krzysztof Kozlowski
2024-12-24 12:10         ` Mathieu Dubois-Briand
2024-12-19 16:21 ` [PATCH 3/8] mfd: Add max7360 support mathieu.dubois-briand
2024-12-20 23:01   ` kernel test robot
2024-12-19 16:21 ` [PATCH 4/8] pwm: max7360: Add MAX7360 PWM support mathieu.dubois-briand
2024-12-19 21:53   ` Uwe Kleine-König
2024-12-23 15:26     ` Mathieu Dubois-Briand
2024-12-20  5:51   ` Uwe Kleine-König
2024-12-21 20:35   ` Krzysztof Kozlowski [this message]
2024-12-19 16:21 ` [PATCH 5/8] gpio: max7360: Add MAX7360 gpio support Mathieu Dubois-Briand
2024-12-20 15:54   ` kernel test robot
2024-12-20 16:39   ` kernel test robot
2024-12-19 16:21 ` [PATCH 6/8] input: keyboard: Add support for MAX7360 keypad Mathieu Dubois-Briand
2024-12-19 19:35   ` Dmitry Torokhov
2024-12-23 15:38     ` Mathieu Dubois-Briand
2024-12-20 17:12   ` kernel test robot
2024-12-19 16:21 ` [PATCH 7/8] input: misc: Add support for MAX7360 rotary Mathieu Dubois-Briand
2024-12-19 16:21 ` [PATCH 8/8] MAINTAINERS: Add entry on MAX7360 driver Mathieu Dubois-Briand

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=45f6e5e0-c145-40d9-8f0a-ffb25ecffb28@kernel.org \
    --to=krzk@kernel.org \
    --cc=brgl@bgdev.pl \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregory.clement@bootlin.com \
    --cc=kamel.bouhara@bootlin.com \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=mathieu.dubois-briand@bootlin.com \
    --cc=robh@kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=ukleinek@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).