Commit 5469a8de authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files
Merge thermal driver fixes for 6.12-rc7 from Daniel Lezcano:

"- Remove a false lockdep backtrace in the LMh driver (Dmitry
   Baryshkov)

 - Fix sampling handler context ptr in the libthermal (Emil Dahl Juhl)

 - Remove the thermal soft link when doing a make clean. The link is
   created at compilation time (Zhang Jiao)

 - Accept thermal zone without trip points as stated in the bindings,
   otherwise the thermal zone fails to initialize (Icenowy Zheng)"

* tag 'thermal-v6.12-rc7' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux:
  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
parents 59b723cd 725f31f3
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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);

+10 −11
Original line number Diff line number Diff line
@@ -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);
+3 −1
Original line number Diff line number Diff line
@@ -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)|" \
+2 −0
Original line number Diff line number Diff line
@@ -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) {