From 90973cac080650a695cf254f856f331d0d99415f Mon Sep 17 00:00:00 2001
From: Morten Rasmussen <morten.rasmussen@arm.com>
Date: Thu, 5 Oct 2023 13:52:02 +0200
Subject: [PATCH] devlib: Make add_trip_point and add_thermal_zone private

Adding thermal zones and trip points are only done at thermal module
initialization. There is no need for these functions to be public.

Signed-off-by: Morten Rasmussen <morten.rasmussen@arm.com>
---
 devlib/module/thermal.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/devlib/module/thermal.py b/devlib/module/thermal.py
index f442c51..d23739e 100644
--- a/devlib/module/thermal.py
+++ b/devlib/module/thermal.py
@@ -58,9 +58,9 @@ class ThermalZone(object):
         for entry in self.target.list_directory(self.path, as_root=target.is_rooted):
             re_match = re.match('^trip_point_([0-9]+)_temp', entry)
             if re_match is not None:
-                self.add_trip_point(re_match.group(1))
+                self._add_trip_point(re_match.group(1))
 
-    def add_trip_point(self, _id):
+    def _add_trip_point(self, _id):
         self.trip_points[int(_id)] = TripPoint(self, _id)
 
     @asyn.asyncf
@@ -154,12 +154,12 @@ class ThermalModule(Module):
                 continue
 
             if re_match.group(1) == 'thermal_zone':
-                self.add_thermal_zone(re_match.group(2))
+                self._add_thermal_zone(re_match.group(2))
             elif re_match.group(1) == 'cooling_device':
                 # TODO
                 pass
 
-    def add_thermal_zone(self, _id):
+    def _add_thermal_zone(self, _id):
         self.zones[int(_id)] = ThermalZone(self.target, self.thermal_root, _id)
 
     def disable_all_zones(self):