From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 752A7C55178 for ; Sat, 31 Oct 2020 21:14:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 23B3E206ED for ; Sat, 31 Oct 2020 21:14:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728541AbgJaVOF (ORCPT ); Sat, 31 Oct 2020 17:14:05 -0400 Received: from guitar.tcltek.co.il ([192.115.133.116]:59843 "EHLO mx.tkos.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726254AbgJaVOE (ORCPT ); Sat, 31 Oct 2020 17:14:04 -0400 X-Greylist: delayed 593 seconds by postgrey-1.27 at vger.kernel.org; Sat, 31 Oct 2020 17:14:04 EDT Received: from tnuva.tkos.co.il (unknown [10.0.4.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPSA id 5200C440316; Sat, 31 Oct 2020 23:04:08 +0200 (IST) From: Jonathan Ben-Avraham To: linux-kernel@vger.kernel.org Cc: Miquel Raynal , Zhang Rui , Daniel Lezcano , Amit Kucheria , Eduardo Valentin , Jonathan Ben-Avraham Subject: [PATCH] thermal: armada: hwmon support for new DT binding. Date: Sat, 31 Oct 2020 23:03:42 +0200 Message-Id: <20201031210342.6014-1-yba@tkos.co.il> X-Mailer: git-send-email 2.11.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For legacy DT binding the armada driver calls thermal_zone_device_register(), which registers the hwmon device. For new DT bindings, devm_thermal_add_hwmon_sysfs() must be called explicitly. Fixes: c9899c183921f (thermal: armada: use the resource managed registration helper alternative) Signed-off-by: Jonathan Ben-Avraham --- drivers/thermal/armada_thermal.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c index c2ebfb5be4b3..57f8d0df126f 100644 --- a/drivers/thermal/armada_thermal.c +++ b/drivers/thermal/armada_thermal.c @@ -20,6 +20,7 @@ #include #include "thermal_core.h" +#include "thermal_hwmon.h" /* Thermal Manager Control and Status Register */ #define PMU_TDC0_SW_RST_MASK (0x1 << 1) @@ -945,6 +946,10 @@ static int armada_thermal_probe(struct platform_device *pdev) */ if (irq > 0 && !priv->overheat_sensor) armada_configure_overheat_int(priv, tz, sensor->id); + + if (devm_thermal_add_hwmon_sysfs(tz)) + dev_warn(&pdev->dev, + "Failed to add hwmon sysfs attributes\n"); } /* Just complain if no overheat interrupt was set up */ -- 2.11.0