ARM: dts: axp209: Add iio-hwmon node for internal temperature
authorJonathan McDowell <noodles@earth.li>
Wed, 10 May 2023 12:02:28 +0000 (13:02 +0100)
committerJernej Skrabec <jernej.skrabec@gmail.com>
Wed, 31 May 2023 21:15:24 +0000 (23:15 +0200)
This adds a DT node to hook up the internal temperature ADC to the
iio-hwmon driver. The various voltage + current ADCs are consumed and
exposed by their respective drivers, but this is not and is always
available. Naming chosen to match the axp20x_ prefix the power sensors
use.

Signed-off-by: Jonathan McDowell <noodles@earth.li>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/2a9bd53a65c4a154cccba622c60cbffcdceaeb95.1683719613.git.noodles@earth.li
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
arch/arm/boot/dts/axp209.dtsi

index ca240cd..469d0f7 100644 (file)
  * http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf
  */
 
+/ {
+       pmic-temp {
+               compatible = "iio-hwmon";
+               io-channels = <&axp_adc 4>; /* Internal temperature */
+       };
+};
+
 &axp209 {
        compatible = "x-powers,axp209";
        interrupt-controller;