Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sander Speetjens" <sander.speetjens@gmail.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v3 1/2] hwmon: add Raspberry Pi PMIC driver
Date: Thu, 19 Nov 2026 19:51:27 +0000	[thread overview]
Message-ID: <sashiko-outbox-223976@kernel.org> (raw)
In-Reply-To: <20261119-hwmon-da9091-v3-1-15956035d7b5@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] hwmon: raspberrypi-pmic-hwmon: invalid hyphenated name in
  rpi_pmic_probe()
--

commit bf488e2ad9a7e713389ee9ed507b4faae9e4ba88
Author: Sander Speetjens <sander.speetjens@gmail.com>

hwmon: add Raspberry Pi PMIC driver

This commit adds a hwmon driver for the Raspberry Pi 5 PMIC that reads
voltages, currents and temperatures via the VideoCore firmware mailbox
interface.

> diff --git a/drivers/hwmon/raspberrypi-pmic-hwmon.c b/drivers/hwmon/raspberrypi-pmic-hwmon.c
> new file mode 100644
> index 0000000000000..cb6ddb5b7d4fb
> --- /dev/null
> +++ b/drivers/hwmon/raspberrypi-pmic-hwmon.c

[ ... ]

> +static int rpi_pmic_probe(struct platform_device *pdev)
> +{
> +	struct device *dev = &pdev->dev;
> +	struct rpi_pmic_data *data;
> +	struct rpi_firmware *fw;
> +	struct device *hwmon_dev;
> +	int ret;
> +
> +	fw = devm_rpi_firmware_get(dev, dev->parent->of_node);
> +	if (!fw)
> +		return -EPROBE_DEFER;
> +
> +	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
> +	if (!data)
> +		return -ENOMEM;
> +
> +	data->fw = fw;
> +
> +	ret = rpi_pmic_update(data);
> +	if (ret)
> +		return -ENODEV;
> +
> +	hwmon_dev =
> +		devm_hwmon_device_register_with_info(dev,
> +						     "rpi-pmic", data, &rpi_pmic_chip_info, NULL);

[Severity: Medium]
Should the hwmon chip name use an underscore ("rpi_pmic") instead of a
hyphen?

__hwmon_device_register() rejects '-' in the name attribute with a
dev_warn() ("hwmon: 'rpi-pmic' is not a valid name attribute, please
fix") because userspace tools such as libsensors use '-' as a delimiter
when parsing chip names.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261119-hwmon-da9091-v3-0-15956035d7b5@gmail.com?part=1

  reply	other threads:[~2026-11-19 19:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 19:41 [PATCH v3 0/2] hwmon: add Raspberry Pi 5 PMIC driver Sander Speetjens
2026-11-19 19:41 ` [PATCH v3 1/2] hwmon: add Raspberry Pi " Sander Speetjens
2026-11-19 19:51   ` sashiko-bot [this message]
2026-11-19 19:41 ` [PATCH v3 2/2] firmware: raspberrypi: Register PMIC hwmon driver on Pi 5 Sander Speetjens
2026-11-19 19:51   ` sashiko-bot

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=sashiko-outbox-223976@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=sander.speetjens@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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