Devicetree
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <ukleinek@kernel.org>
To: Petar Stepanovic <pstepanovic@axiado.com>
Cc: Akhila Kavi <akavi@axiado.com>,
	 Prasad Bolisetty <pbolisetty@axiado.com>,
	Guenter Roeck <linux@roeck-us.net>,
	 Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Harshit Shah <hshah@axiado.com>, Tzu-Hao Wei <twei@axiado.com>,
	 Karthikeyan Mitran <kmitran@axiado.com>,
	Jonathan Corbet <corbet@lwn.net>,
	 Shuah Khan <skhan@linuxfoundation.org>,
	linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org,
	 linux-doc@vger.kernel.org
Subject: Re: [PATCH 2/2] hwmon: add Axiado AX3000 and AX3005 PWM fan controller driver
Date: Thu, 6 Aug 2026 12:04:33 +0200	[thread overview]
Message-ID: <anRaB--HAHoWFkDo@monoceros> (raw)
In-Reply-To: <20260806-axiado-ax3000-pwm-fan-v1-2-f6db4cf2166b@axiado.com>

[-- Attachment #1: Type: text/plain, Size: 1671 bytes --]

On Thu, Aug 06, 2026 at 02:01:30AM -0700, Petar Stepanovic wrote:
> +#define PWM_MAX	255

That define has a name that looks much more generic than it actually is.
Please call it AX_TACH_PWM_VAL_MAX or something similar.

> [...]
> +static int axiado_pwm_fan_read(struct device *dev, enum hwmon_sensor_types type,
> +			       u32 attr, int channel, long *val)
> +{
> +	struct axiado_pwm_fan_ctx *ctx = dev_get_drvdata(dev);
> +
> +	switch (type) {
> +	case hwmon_pwm:
> +		if (attr != hwmon_pwm_input)
> +			return -EOPNOTSUPP;
> +
> +		scoped_guard(mutex, &ctx->pwm_lock)
> +			*val = ctx->pwm_value;

If there is a hwmon lock that serializes calls to hwmon_ops::read and
hwmon_ops::write, .pwm_lock isn't needed. (Unless I miss something,
please double check. Also I'm unsure if there is such a hwmon
serialization.)

> [...]
> +static const struct of_device_id axiado_pwm_fan_match[] = {
> +	{ .compatible = "axiado,ax3000-pwm-fan" },
> +	{ },

No trailing , after the list terminator please.

> +};
> +MODULE_DEVICE_TABLE(of, axiado_pwm_fan_match);
> +
> +static struct platform_driver axiado_pwm_fan_driver = {
> +	.probe		= axiado_pwm_fan_probe,
> +	.shutdown	= axiado_pwm_fan_shutdown,
> +	.driver	= {
> +		.name		= "axiado-pwm-fan",
> +		.pm		= pm_sleep_ptr(&axiado_pwm_fan_pm),
> +		.of_match_table	= axiado_pwm_fan_match,
> +	},
> +};
> +
> +module_platform_driver(axiado_pwm_fan_driver);

Typically `module_platform_driver` follows the struct platform_driver
without a newline.

> +MODULE_AUTHOR("Axiado Corporation");
> +MODULE_DESCRIPTION("Axiado PWM fan controller driver");
> +MODULE_LICENSE("GPL");
> +

Trailing newline at end of file.

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2026-08-06 10:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06  9:01 [PATCH 0/2] hwmon: add Axiado AX3000 and AX3005 PWM fan support Petar Stepanovic
2026-08-06  9:01 ` [PATCH 1/2] dt-bindings: hwmon: add Axiado AX3000 and AX3005 PWM fan controller Petar Stepanovic
2026-08-06  9:13   ` sashiko-bot
2026-08-06 10:41   ` Rob Herring (Arm)
2026-08-06 13:16   ` Rob Herring
2026-08-06  9:01 ` [PATCH 2/2] hwmon: add Axiado AX3000 and AX3005 PWM fan controller driver Petar Stepanovic
2026-08-06  9:20   ` sashiko-bot
2026-08-06 10:04   ` Uwe Kleine-König [this message]
2026-08-06 15:34     ` Guenter Roeck

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=anRaB--HAHoWFkDo@monoceros \
    --to=ukleinek@kernel.org \
    --cc=akavi@axiado.com \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=hshah@axiado.com \
    --cc=kmitran@axiado.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=pbolisetty@axiado.com \
    --cc=pstepanovic@axiado.com \
    --cc=robh@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=twei@axiado.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