Merge tag 'thermal-6.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull thermal control fixes from Rafael Wysocki:
"These fix one issue in the qcom lmh thermal driver, a DT handling
issue in the thermal core and two issues in the userspace thermal
library:

- Allow tripless thermal zones defined in a DT to be registered in
accordance with the thermal DT bindings (Icenowy Zheng)

- Annotate LMH IRQs with lockdep classes to prevent lockdep from
reporting a possible recursive locking issue that cannot really
occur (Dmitry Baryshkov)

- Improve the thermal library "make clean" to remove a leftover
symbolic link created during compilation and fix the sampling
handler invocation in that library to pass the correct pointer to
it (Emil Dahl Juhl, zhang jiao)"

* tag 'thermal-6.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
thermal/of: support thermal zones w/o trips subnode
tools/lib/thermal: Remove the thermal.h soft link when doing make clean
tools/lib/thermal: Fix sampling handler context ptr
thermal/drivers/qcom/lmh: Remove false lockdep backtrace

+22 -12
+7
drivers/thermal/qcom/lmh.c
··· 73 73 static int lmh_irq_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw) 74 74 { 75 75 struct lmh_hw_data *lmh_data = d->host_data; 76 + static struct lock_class_key lmh_lock_key; 77 + static struct lock_class_key lmh_request_key; 76 78 79 + /* 80 + * This lock class tells lockdep that GPIO irqs are in a different 81 + * category than their parents, so it won't report false recursion. 82 + */ 83 + irq_set_lockdep_class(irq, &lmh_lock_key, &lmh_request_key); 77 84 irq_set_chip_and_handler(irq, &lmh_irq_chip, handle_simple_irq); 78 85 irq_set_chip_data(irq, lmh_data); 79 86
+10 -11
drivers/thermal/thermal_of.c
··· 99 99 struct device_node *trips; 100 100 int ret, count; 101 101 102 + *ntrips = 0; 103 + 102 104 trips = of_get_child_by_name(np, "trips"); 103 - if (!trips) { 104 - pr_err("Failed to find 'trips' node\n"); 105 - return ERR_PTR(-EINVAL); 106 - } 105 + if (!trips) 106 + return NULL; 107 107 108 108 count = of_get_child_count(trips); 109 - if (!count) { 110 - pr_err("No trip point defined\n"); 111 - ret = -EINVAL; 112 - goto out_of_node_put; 113 - } 109 + if (!count) 110 + return NULL; 114 111 115 112 tt = kzalloc(sizeof(*tt) * count, GFP_KERNEL); 116 113 if (!tt) { ··· 130 133 131 134 out_kfree: 132 135 kfree(tt); 133 - *ntrips = 0; 134 136 out_of_node_put: 135 137 of_node_put(trips); 136 138 ··· 397 401 398 402 trips = thermal_of_trips_init(np, &ntrips); 399 403 if (IS_ERR(trips)) { 400 - pr_err("Failed to find trip points for %pOFn id=%d\n", sensor, id); 404 + pr_err("Failed to parse trip points for %pOFn id=%d\n", sensor, id); 401 405 ret = PTR_ERR(trips); 402 406 goto out_of_node_put; 403 407 } 408 + 409 + if (!trips) 410 + pr_info("No trip points found for %pOFn id=%d\n", sensor, id); 404 411 405 412 ret = thermal_of_monitor_init(np, &delay, &pdelay); 406 413 if (ret) {
+3 -1
tools/lib/thermal/Makefile
··· 121 121 122 122 clean: 123 123 $(call QUIET_CLEAN, libthermal) $(RM) $(LIBTHERMAL_A) \ 124 - *.o *~ *.a *.so *.so.$(VERSION) *.so.$(LIBTHERMAL_VERSION) .*.d .*.cmd LIBTHERMAL-CFLAGS $(LIBTHERMAL_PC) 124 + *.o *~ *.a *.so *.so.$(VERSION) *.so.$(LIBTHERMAL_VERSION) \ 125 + .*.d .*.cmd LIBTHERMAL-CFLAGS $(LIBTHERMAL_PC) \ 126 + $(srctree)/tools/$(THERMAL_UAPI) 125 127 126 128 $(LIBTHERMAL_PC): 127 129 $(QUIET_GEN)sed -e "s|@PREFIX@|$(prefix)|" \
+2
tools/lib/thermal/sampling.c
··· 16 16 struct thermal_handler_param *thp = arg; 17 17 struct thermal_handler *th = thp->th; 18 18 19 + arg = thp->arg; 20 + 19 21 genlmsg_parse(nlh, 0, attrs, THERMAL_GENL_ATTR_MAX, NULL); 20 22 21 23 switch (genlhdr->cmd) {