From patchwork Tue Dec 1 12:42:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Ben-Avraham X-Patchwork-Id: 336384 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=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, 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 94EAAC64E7A for ; Tue, 1 Dec 2020 12:43:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D00B20757 for ; Tue, 1 Dec 2020 12:43:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727055AbgLAMni (ORCPT ); Tue, 1 Dec 2020 07:43:38 -0500 Received: from guitar.tcltek.co.il ([192.115.133.116]:47935 "EHLO mx.tkos.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726930AbgLAMni (ORCPT ); Tue, 1 Dec 2020 07:43:38 -0500 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 14B3C4400C5; Tue, 1 Dec 2020 14:42:56 +0200 (IST) From: Jonathan Ben-Avraham To: linux-pm@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: Tue, 1 Dec 2020 14:42:46 +0200 Message-Id: <20201201124246.16381-1-yba@tkos.co.il> X-Mailer: git-send-email 2.11.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 */