All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] thermal/drivers/mediatek/lvts_thermal: Register thermal zones as hwmon sensors
@ 2023-03-15  3:44 ` Chen-Yu Tsai
  0 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2023-03-15  3:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui
  Cc: Chen-Yu Tsai, Matthias Brugger, AngeloGioacchino Del Regno,
	Balsam CHIHI, linux-pm, linux-arm-kernel, linux-mediatek,
	linux-kernel

Register thermal zones as hwmon sensors to let userspace read
temperatures using standard hwmon interface.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
Resending due to lists.infradead.org outage yesterday.

 drivers/thermal/mediatek/lvts_thermal.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
index 0557d1c61b9e..15f317c42718 100644
--- a/drivers/thermal/mediatek/lvts_thermal.c
+++ b/drivers/thermal/mediatek/lvts_thermal.c
@@ -19,6 +19,8 @@
 #include <linux/thermal.h>
 #include <dt-bindings/thermal/mediatek,lvts-thermal.h>
 
+#include "../thermal_hwmon.h"
+
 #define LVTS_MONCTL0(__base)	(__base + 0x0000)
 #define LVTS_MONCTL1(__base)	(__base + 0x0004)
 #define LVTS_MONCTL2(__base)	(__base + 0x0008)
@@ -996,6 +998,9 @@ static int lvts_ctrl_start(struct device *dev, struct lvts_ctrl *lvts_ctrl)
 			return PTR_ERR(tz);
 		}
 
+		if (devm_thermal_add_hwmon_sysfs(dev, chip->tz_dev))
+			dev_warn(dev, "zone %d: Failed to add hwmon sysfs attributes\n", dt_id);
+
 		/*
 		 * The thermal zone pointer will be needed in the
 		 * interrupt handler, we store it in the sensor
-- 
2.40.0.rc1.284.g88254d51c5-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH RESEND] thermal/drivers/mediatek/lvts_thermal: Register thermal zones as hwmon sensors
@ 2023-03-15  3:44 ` Chen-Yu Tsai
  0 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2023-03-15  3:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui
  Cc: Chen-Yu Tsai, Matthias Brugger, AngeloGioacchino Del Regno,
	Balsam CHIHI, linux-pm, linux-arm-kernel, linux-mediatek,
	linux-kernel

Register thermal zones as hwmon sensors to let userspace read
temperatures using standard hwmon interface.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
Resending due to lists.infradead.org outage yesterday.

 drivers/thermal/mediatek/lvts_thermal.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
index 0557d1c61b9e..15f317c42718 100644
--- a/drivers/thermal/mediatek/lvts_thermal.c
+++ b/drivers/thermal/mediatek/lvts_thermal.c
@@ -19,6 +19,8 @@
 #include <linux/thermal.h>
 #include <dt-bindings/thermal/mediatek,lvts-thermal.h>
 
+#include "../thermal_hwmon.h"
+
 #define LVTS_MONCTL0(__base)	(__base + 0x0000)
 #define LVTS_MONCTL1(__base)	(__base + 0x0004)
 #define LVTS_MONCTL2(__base)	(__base + 0x0008)
@@ -996,6 +998,9 @@ static int lvts_ctrl_start(struct device *dev, struct lvts_ctrl *lvts_ctrl)
 			return PTR_ERR(tz);
 		}
 
+		if (devm_thermal_add_hwmon_sysfs(dev, chip->tz_dev))
+			dev_warn(dev, "zone %d: Failed to add hwmon sysfs attributes\n", dt_id);
+
 		/*
 		 * The thermal zone pointer will be needed in the
 		 * interrupt handler, we store it in the sensor
-- 
2.40.0.rc1.284.g88254d51c5-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH RESEND] thermal/drivers/mediatek/lvts_thermal: Register thermal zones as hwmon sensors
  2023-03-15  3:44 ` Chen-Yu Tsai
@ 2023-03-16 18:02   ` kernel test robot
  -1 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2023-03-16 18:02 UTC (permalink / raw)
  To: Chen-Yu Tsai, Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria,
	Zhang Rui
  Cc: oe-kbuild-all, Chen-Yu Tsai, Matthias Brugger,
	AngeloGioacchino Del Regno, Balsam CHIHI, linux-pm,
	linux-arm-kernel, linux-mediatek, linux-kernel

Hi Chen-Yu,

I love your patch! Yet something to improve:

[auto build test ERROR on rafael-pm/thermal]
[also build test ERROR on linus/master v6.3-rc2 next-20230316]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Chen-Yu-Tsai/thermal-drivers-mediatek-lvts_thermal-Register-thermal-zones-as-hwmon-sensors/20230315-114601
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git thermal
patch link:    https://lore.kernel.org/r/20230315034449.2604197-1-wenst%40chromium.org
patch subject: [PATCH RESEND] thermal/drivers/mediatek/lvts_thermal: Register thermal zones as hwmon sensors
config: parisc-allmodconfig (https://download.01.org/0day-ci/archive/20230317/202303170104.d4JG4Rmo-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/1f9bbeb9645230bb309c589d8bea6bf066628b44
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Chen-Yu-Tsai/thermal-drivers-mediatek-lvts_thermal-Register-thermal-zones-as-hwmon-sensors/20230315-114601
        git checkout 1f9bbeb9645230bb309c589d8bea6bf066628b44
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash drivers/misc/ drivers/net/mdio/ drivers/pci/controller/ drivers/rtc/ drivers/thermal/mediatek/ drivers/tty/serial/ drivers/usb/host/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303170104.d4JG4Rmo-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/thermal/mediatek/lvts_thermal.c: In function 'lvts_ctrl_start':
>> drivers/thermal/mediatek/lvts_thermal.c:997:55: error: 'chip' undeclared (first use in this function)
     997 |                 if (devm_thermal_add_hwmon_sysfs(dev, chip->tz_dev))
         |                                                       ^~~~
   drivers/thermal/mediatek/lvts_thermal.c:997:55: note: each undeclared identifier is reported only once for each function it appears in


vim +/chip +997 drivers/thermal/mediatek/lvts_thermal.c

   971	
   972	static int lvts_ctrl_start(struct device *dev, struct lvts_ctrl *lvts_ctrl)
   973	{
   974		struct lvts_sensor *lvts_sensors = lvts_ctrl->sensors;
   975		struct thermal_zone_device *tz;
   976		u32 sensor_map = 0;
   977		int i;
   978	
   979		for (i = 0; i < lvts_ctrl->num_lvts_sensor; i++) {
   980	
   981			int dt_id = lvts_sensors[i].dt_id;
   982	
   983			tz = devm_thermal_of_zone_register(dev, dt_id, &lvts_sensors[i],
   984							   &lvts_ops);
   985			if (IS_ERR(tz)) {
   986				/*
   987				 * This thermal zone is not described in the
   988				 * device tree. It is not an error from the
   989				 * thermal OF code POV, we just continue.
   990				 */
   991				if (PTR_ERR(tz) == -ENODEV)
   992					continue;
   993	
   994				return PTR_ERR(tz);
   995			}
   996	
 > 997			if (devm_thermal_add_hwmon_sysfs(dev, chip->tz_dev))
   998				dev_warn(dev, "zone %d: Failed to add hwmon sysfs attributes\n", dt_id);
   999	
  1000			/*
  1001			 * The thermal zone pointer will be needed in the
  1002			 * interrupt handler, we store it in the sensor
  1003			 * structure. The thermal domain structure will be
  1004			 * passed to the interrupt handler private data as the
  1005			 * interrupt is shared for all the controller
  1006			 * belonging to the thermal domain.
  1007			 */
  1008			lvts_sensors[i].tz = tz;
  1009	
  1010			/*
  1011			 * This sensor was correctly associated with a thermal
  1012			 * zone, let's set the corresponding bit in the sensor
  1013			 * map, so we can enable the temperature monitoring in
  1014			 * the hardware thermal controller.
  1015			 */
  1016			sensor_map |= BIT(i);
  1017		}
  1018	
  1019		/*
  1020		 * Bits:
  1021		 *      9: Single point access flow
  1022		 *    0-3: Enable sensing point 0-3
  1023		 *
  1024		 * The initialization of the thermal zones give us
  1025		 * which sensor point to enable. If any thermal zone
  1026		 * was not described in the device tree, it won't be
  1027		 * enabled here in the sensor map.
  1028		 */
  1029		writel(sensor_map | BIT(9), LVTS_MONCTL0(lvts_ctrl->base));
  1030	
  1031		return 0;
  1032	}
  1033	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH RESEND] thermal/drivers/mediatek/lvts_thermal: Register thermal zones as hwmon sensors
@ 2023-03-16 18:02   ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2023-03-16 18:02 UTC (permalink / raw)
  To: Chen-Yu Tsai, Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria,
	Zhang Rui
  Cc: oe-kbuild-all, Chen-Yu Tsai, Matthias Brugger,
	AngeloGioacchino Del Regno, Balsam CHIHI, linux-pm,
	linux-arm-kernel, linux-mediatek, linux-kernel

Hi Chen-Yu,

I love your patch! Yet something to improve:

[auto build test ERROR on rafael-pm/thermal]
[also build test ERROR on linus/master v6.3-rc2 next-20230316]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Chen-Yu-Tsai/thermal-drivers-mediatek-lvts_thermal-Register-thermal-zones-as-hwmon-sensors/20230315-114601
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git thermal
patch link:    https://lore.kernel.org/r/20230315034449.2604197-1-wenst%40chromium.org
patch subject: [PATCH RESEND] thermal/drivers/mediatek/lvts_thermal: Register thermal zones as hwmon sensors
config: parisc-allmodconfig (https://download.01.org/0day-ci/archive/20230317/202303170104.d4JG4Rmo-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/1f9bbeb9645230bb309c589d8bea6bf066628b44
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Chen-Yu-Tsai/thermal-drivers-mediatek-lvts_thermal-Register-thermal-zones-as-hwmon-sensors/20230315-114601
        git checkout 1f9bbeb9645230bb309c589d8bea6bf066628b44
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash drivers/misc/ drivers/net/mdio/ drivers/pci/controller/ drivers/rtc/ drivers/thermal/mediatek/ drivers/tty/serial/ drivers/usb/host/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303170104.d4JG4Rmo-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/thermal/mediatek/lvts_thermal.c: In function 'lvts_ctrl_start':
>> drivers/thermal/mediatek/lvts_thermal.c:997:55: error: 'chip' undeclared (first use in this function)
     997 |                 if (devm_thermal_add_hwmon_sysfs(dev, chip->tz_dev))
         |                                                       ^~~~
   drivers/thermal/mediatek/lvts_thermal.c:997:55: note: each undeclared identifier is reported only once for each function it appears in


vim +/chip +997 drivers/thermal/mediatek/lvts_thermal.c

   971	
   972	static int lvts_ctrl_start(struct device *dev, struct lvts_ctrl *lvts_ctrl)
   973	{
   974		struct lvts_sensor *lvts_sensors = lvts_ctrl->sensors;
   975		struct thermal_zone_device *tz;
   976		u32 sensor_map = 0;
   977		int i;
   978	
   979		for (i = 0; i < lvts_ctrl->num_lvts_sensor; i++) {
   980	
   981			int dt_id = lvts_sensors[i].dt_id;
   982	
   983			tz = devm_thermal_of_zone_register(dev, dt_id, &lvts_sensors[i],
   984							   &lvts_ops);
   985			if (IS_ERR(tz)) {
   986				/*
   987				 * This thermal zone is not described in the
   988				 * device tree. It is not an error from the
   989				 * thermal OF code POV, we just continue.
   990				 */
   991				if (PTR_ERR(tz) == -ENODEV)
   992					continue;
   993	
   994				return PTR_ERR(tz);
   995			}
   996	
 > 997			if (devm_thermal_add_hwmon_sysfs(dev, chip->tz_dev))
   998				dev_warn(dev, "zone %d: Failed to add hwmon sysfs attributes\n", dt_id);
   999	
  1000			/*
  1001			 * The thermal zone pointer will be needed in the
  1002			 * interrupt handler, we store it in the sensor
  1003			 * structure. The thermal domain structure will be
  1004			 * passed to the interrupt handler private data as the
  1005			 * interrupt is shared for all the controller
  1006			 * belonging to the thermal domain.
  1007			 */
  1008			lvts_sensors[i].tz = tz;
  1009	
  1010			/*
  1011			 * This sensor was correctly associated with a thermal
  1012			 * zone, let's set the corresponding bit in the sensor
  1013			 * map, so we can enable the temperature monitoring in
  1014			 * the hardware thermal controller.
  1015			 */
  1016			sensor_map |= BIT(i);
  1017		}
  1018	
  1019		/*
  1020		 * Bits:
  1021		 *      9: Single point access flow
  1022		 *    0-3: Enable sensing point 0-3
  1023		 *
  1024		 * The initialization of the thermal zones give us
  1025		 * which sensor point to enable. If any thermal zone
  1026		 * was not described in the device tree, it won't be
  1027		 * enabled here in the sensor map.
  1028		 */
  1029		writel(sensor_map | BIT(9), LVTS_MONCTL0(lvts_ctrl->base));
  1030	
  1031		return 0;
  1032	}
  1033	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH RESEND] thermal/drivers/mediatek/lvts_thermal: Register thermal zones as hwmon sensors
  2023-06-13  9:13 ` Chen-Yu Tsai
@ 2023-06-13  9:19   ` Daniel Lezcano
  -1 siblings, 0 replies; 8+ messages in thread
From: Daniel Lezcano @ 2023-06-13  9:19 UTC (permalink / raw)
  To: Chen-Yu Tsai, Rafael J. Wysocki, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno,
	Nícolas F. R. A. Prado
  Cc: linux-pm, linux-kernel, linux-mediatek, linux-arm-kernel

On 13/06/2023 11:13, Chen-Yu Tsai wrote:
> Register thermal zones as hwmon sensors to let userspace read
> temperatures using standard hwmon interface.
> 
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>

Applied, thanks

-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH RESEND] thermal/drivers/mediatek/lvts_thermal: Register thermal zones as hwmon sensors
@ 2023-06-13  9:19   ` Daniel Lezcano
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Lezcano @ 2023-06-13  9:19 UTC (permalink / raw)
  To: Chen-Yu Tsai, Rafael J. Wysocki, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno,
	Nícolas F. R. A. Prado
  Cc: linux-pm, linux-kernel, linux-mediatek, linux-arm-kernel

On 13/06/2023 11:13, Chen-Yu Tsai wrote:
> Register thermal zones as hwmon sensors to let userspace read
> temperatures using standard hwmon interface.
> 
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>

Applied, thanks

-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH RESEND] thermal/drivers/mediatek/lvts_thermal: Register thermal zones as hwmon sensors
@ 2023-06-13  9:13 ` Chen-Yu Tsai
  0 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2023-06-13  9:13 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno,
	Nícolas F. R. A. Prado
  Cc: Chen-Yu Tsai, linux-pm, linux-kernel, linux-mediatek, linux-arm-kernel

Register thermal zones as hwmon sensors to let userspace read
temperatures using standard hwmon interface.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
 drivers/thermal/mediatek/lvts_thermal.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
index d0a3f95b7884..1e11defe4f35 100644
--- a/drivers/thermal/mediatek/lvts_thermal.c
+++ b/drivers/thermal/mediatek/lvts_thermal.c
@@ -19,6 +19,8 @@
 #include <linux/thermal.h>
 #include <dt-bindings/thermal/mediatek,lvts-thermal.h>
 
+#include "../thermal_hwmon.h"
+
 #define LVTS_MONCTL0(__base)	(__base + 0x0000)
 #define LVTS_MONCTL1(__base)	(__base + 0x0004)
 #define LVTS_MONCTL2(__base)	(__base + 0x0008)
@@ -996,6 +998,9 @@ static int lvts_ctrl_start(struct device *dev, struct lvts_ctrl *lvts_ctrl)
 			return PTR_ERR(tz);
 		}
 
+		if (devm_thermal_add_hwmon_sysfs(dev, tz))
+			dev_warn(dev, "zone %d: Failed to add hwmon sysfs attributes\n", dt_id);
+
 		/*
 		 * The thermal zone pointer will be needed in the
 		 * interrupt handler, we store it in the sensor
-- 
2.41.0.162.gfafddb0af9-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH RESEND] thermal/drivers/mediatek/lvts_thermal: Register thermal zones as hwmon sensors
@ 2023-06-13  9:13 ` Chen-Yu Tsai
  0 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2023-06-13  9:13 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno,
	Nícolas F. R. A. Prado
  Cc: Chen-Yu Tsai, linux-pm, linux-kernel, linux-mediatek, linux-arm-kernel

Register thermal zones as hwmon sensors to let userspace read
temperatures using standard hwmon interface.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
 drivers/thermal/mediatek/lvts_thermal.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
index d0a3f95b7884..1e11defe4f35 100644
--- a/drivers/thermal/mediatek/lvts_thermal.c
+++ b/drivers/thermal/mediatek/lvts_thermal.c
@@ -19,6 +19,8 @@
 #include <linux/thermal.h>
 #include <dt-bindings/thermal/mediatek,lvts-thermal.h>
 
+#include "../thermal_hwmon.h"
+
 #define LVTS_MONCTL0(__base)	(__base + 0x0000)
 #define LVTS_MONCTL1(__base)	(__base + 0x0004)
 #define LVTS_MONCTL2(__base)	(__base + 0x0008)
@@ -996,6 +998,9 @@ static int lvts_ctrl_start(struct device *dev, struct lvts_ctrl *lvts_ctrl)
 			return PTR_ERR(tz);
 		}
 
+		if (devm_thermal_add_hwmon_sysfs(dev, tz))
+			dev_warn(dev, "zone %d: Failed to add hwmon sysfs attributes\n", dt_id);
+
 		/*
 		 * The thermal zone pointer will be needed in the
 		 * interrupt handler, we store it in the sensor
-- 
2.41.0.162.gfafddb0af9-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-06-13  9:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15  3:44 [PATCH RESEND] thermal/drivers/mediatek/lvts_thermal: Register thermal zones as hwmon sensors Chen-Yu Tsai
2023-03-15  3:44 ` Chen-Yu Tsai
2023-03-16 18:02 ` kernel test robot
2023-03-16 18:02   ` kernel test robot
2023-06-13  9:13 Chen-Yu Tsai
2023-06-13  9:13 ` Chen-Yu Tsai
2023-06-13  9:19 ` Daniel Lezcano
2023-06-13  9:19   ` Daniel Lezcano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.