]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
hwmon: (raspberrypi) Add voltage input support
authorShubham Chakraborty <chakrabortyshubham66@gmail.com>
Sun, 17 May 2026 08:04:44 +0000 (13:34 +0530)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 9 Jun 2026 15:23:00 +0000 (08:23 -0700)
commit78a3e36eec06a0dc4a205c753e7754e9f9408fba
tree3100eb79799281fe8bd47a8bd1837d8c2fa7e53f
parent3b7f59ffacb131037f592d3a4a7342c6773249a4
hwmon: (raspberrypi) Add voltage input support

Extend the raspberrypi-hwmon driver to expose firmware-provided
voltage measurements through the hwmon subsystem.

The driver now exports the following voltage inputs:

  - in0_input (core)
  - in1_input (sdram_c)
  - in2_input (sdram_i)
  - in3_input (sdram_p)

Voltage values returned by firmware are converted from microvolts
to millivolts as expected by the hwmon subsystem.

Update the documentation related to it.

The existing undervoltage sticky alarm handling is preserved and
associated with the first voltage channel.

Tested in -
- Raspberry Pi 3b+ (Linux raspberrypi 6.12.75+rpt-rpi-v8 #1 SMP PREEMPT
  Debian 1:6.12.75-1+rpt1 (2026-03-11) aarch64 GNU/Linux)

Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20260517080445.103962-3-chakrabortyshubham66@gmail.com
[groeck: Added missing empty line after declaration]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/raspberrypi-hwmon.rst
drivers/hwmon/raspberrypi-hwmon.c