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
This commit is contained in:
@@ -73,7 +73,14 @@ static struct irq_chip lmh_irq_chip = {
|
||||
static int lmh_irq_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw)
|
||||
{
|
||||
struct lmh_hw_data *lmh_data = d->host_data;
|
||||
static struct lock_class_key lmh_lock_key;
|
||||
static struct lock_class_key lmh_request_key;
|
||||
|
||||
/*
|
||||
* This lock class tells lockdep that GPIO irqs are in a different
|
||||
* category than their parents, so it won't report false recursion.
|
||||
*/
|
||||
irq_set_lockdep_class(irq, &lmh_lock_key, &lmh_request_key);
|
||||
irq_set_chip_and_handler(irq, &lmh_irq_chip, handle_simple_irq);
|
||||
irq_set_chip_data(irq, lmh_data);
|
||||
|
||||
|
||||
@@ -99,18 +99,15 @@ static struct thermal_trip *thermal_of_trips_init(struct device_node *np, int *n
|
||||
struct device_node *trips;
|
||||
int ret, count;
|
||||
|
||||
*ntrips = 0;
|
||||
|
||||
trips = of_get_child_by_name(np, "trips");
|
||||
if (!trips) {
|
||||
pr_err("Failed to find 'trips' node\n");
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
if (!trips)
|
||||
return NULL;
|
||||
|
||||
count = of_get_child_count(trips);
|
||||
if (!count) {
|
||||
pr_err("No trip point defined\n");
|
||||
ret = -EINVAL;
|
||||
goto out_of_node_put;
|
||||
}
|
||||
if (!count)
|
||||
return NULL;
|
||||
|
||||
tt = kzalloc(sizeof(*tt) * count, GFP_KERNEL);
|
||||
if (!tt) {
|
||||
@@ -133,7 +130,6 @@ static struct thermal_trip *thermal_of_trips_init(struct device_node *np, int *n
|
||||
|
||||
out_kfree:
|
||||
kfree(tt);
|
||||
*ntrips = 0;
|
||||
out_of_node_put:
|
||||
of_node_put(trips);
|
||||
|
||||
@@ -401,11 +397,14 @@ static struct thermal_zone_device *thermal_of_zone_register(struct device_node *
|
||||
|
||||
trips = thermal_of_trips_init(np, &ntrips);
|
||||
if (IS_ERR(trips)) {
|
||||
pr_err("Failed to find trip points for %pOFn id=%d\n", sensor, id);
|
||||
pr_err("Failed to parse trip points for %pOFn id=%d\n", sensor, id);
|
||||
ret = PTR_ERR(trips);
|
||||
goto out_of_node_put;
|
||||
}
|
||||
|
||||
if (!trips)
|
||||
pr_info("No trip points found for %pOFn id=%d\n", sensor, id);
|
||||
|
||||
ret = thermal_of_monitor_init(np, &delay, &pdelay);
|
||||
if (ret) {
|
||||
pr_err("Failed to initialize monitoring delays from %pOFn\n", np);
|
||||
|
||||
@@ -121,7 +121,9 @@ all: fixdep
|
||||
|
||||
clean:
|
||||
$(call QUIET_CLEAN, libthermal) $(RM) $(LIBTHERMAL_A) \
|
||||
*.o *~ *.a *.so *.so.$(VERSION) *.so.$(LIBTHERMAL_VERSION) .*.d .*.cmd LIBTHERMAL-CFLAGS $(LIBTHERMAL_PC)
|
||||
*.o *~ *.a *.so *.so.$(VERSION) *.so.$(LIBTHERMAL_VERSION) \
|
||||
.*.d .*.cmd LIBTHERMAL-CFLAGS $(LIBTHERMAL_PC) \
|
||||
$(srctree)/tools/$(THERMAL_UAPI)
|
||||
|
||||
$(LIBTHERMAL_PC):
|
||||
$(QUIET_GEN)sed -e "s|@PREFIX@|$(prefix)|" \
|
||||
|
||||
@@ -16,6 +16,8 @@ static int handle_thermal_sample(struct nl_msg *n, void *arg)
|
||||
struct thermal_handler_param *thp = arg;
|
||||
struct thermal_handler *th = thp->th;
|
||||
|
||||
arg = thp->arg;
|
||||
|
||||
genlmsg_parse(nlh, 0, attrs, THERMAL_GENL_ATTR_MAX, NULL);
|
||||
|
||||
switch (genlhdr->cmd) {
|
||||
|
||||
Reference in New Issue
Block a user