[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260122-adamant-stereotyped-bird-e7deec@quoll>
Date: Thu, 22 Jan 2026 09:13:23 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Almog Ben Shaul <almogbs@...zon.com>
Cc: linux-hwmon@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org, itamark@...zon.com, talel@...zon.com,
farbere@...zon.com, ayalstei@...zon.com, dwmw@...zon.com
Subject: Re: [PATCH 2/2] hwmon: Add JEDEC PMIC50x0 driver
On Wed, Jan 21, 2026 at 03:19:47PM +0000, Almog Ben Shaul wrote:
> Add hardware monitoring driver for JEDEC PMIC50x0 compliant I2C DDR5
> PMICs.
>
> The driver provides monitoring for voltage, current, power, and
> temperature across multiple channels, along with comprehensive error
> reporting.
>
> Signed-off-by: Almog Ben Shaul <almogbs@...zon.com>
> Tested-by: Almog Ben Shaul <almogbs@...zon.com>
Drop. You cannot send it untested, read submitting patches. The tag is
for OTHER people to test, not create impression that all code is
untested but here you did some testing.
> ---
...
> +
> +static int pmic50x0_panic_callback(struct notifier_block *nb,
> + unsigned long action, void *data)
> +{
> + struct pmic50x0 *pmic50x0 = container_of(nb, struct pmic50x0, panic_notifier);
> +
> + dev_emerg(pmic50x0->dev, "volt(mV): A=%ld, B=%ld, C=%ld, D=%ld\n",
> + pmic50x0->last_voltage[0], pmic50x0->last_voltage[1],
> + pmic50x0->last_voltage[2], pmic50x0->last_voltage[3]);
You did not Cc any maintainers, so maybe one of your 5 CCs from Amazon
can explain me why exactly random hwmon driver should receive panic
callbacks? Do you see such pattern in hwmon?
> +
> + return NOTIFY_DONE;
> +}
> +
> +static void pmic50x0_panic_notifier_unregister(void *data)
> +{
> + struct pmic50x0 *pmic50x0 = data;
> +
> + atomic_notifier_chain_unregister(&panic_notifier_list, &pmic50x0->panic_notifier);
> +}
> +
> +static int pmic50x0_panic_notifier_register(struct pmic50x0 *pmic50x0)
> +{
> + struct notifier_block *panic_notifier = &pmic50x0->panic_notifier;
> + struct device *dev = pmic50x0->dev;
> + int ret;
> +
> + panic_notifier->notifier_call = pmic50x0_panic_callback;
> + panic_notifier->priority = 0;
> +
> + ret = atomic_notifier_chain_register(&panic_notifier_list, panic_notifier);
> + if (ret) {
> + dev_err(dev, "failed to register panic notifier (%d)\n", ret);
> + return ret;
> + }
> +
> + return devm_add_action_or_reset(dev, pmic50x0_panic_notifier_unregister, pmic50x0);
> +}
Best regards,
Krzysztof
Powered by blists - more mailing lists