Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp139095pxu; Wed, 25 Nov 2020 15:32:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2YxxGUMfm1SvHM2kpaMvOSDrebbaIAxm1/95Nd+2UmcS9BdKFr0+pHSsjldOXnH9AK90Q X-Received: by 2002:a50:ccc8:: with SMTP id b8mr76661edj.152.1606347170511; Wed, 25 Nov 2020 15:32:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606347170; cv=none; d=google.com; s=arc-20160816; b=DBdSq/OROMdwZTNaRUV3hsThGo06JR+xcBY9zUyZQv+ITPq4Bb+Zd0Wbt+RrbMXQA+ A3mg/yfhleR2cvELlth1jNQ3fhvYUQ3WX6TztwX0kG6knaaLkV6oSXtWL/L3vCUK/nZn cXZVFESsaRAthE+PhiRYLmnYpzUwd40NeclJUTvWkmoNOT6MOocmcmejY7oCY96zWZDp ikw17Efs1SVy8VXhaWwdmhHS6un4IrPNoB/FgMFIZeCNY7qBUirtdpn0cKAgjrzc74bz yhXVs40rvQpqE6iR8qc+w3Upxl80YrxOqwn4ZCcU1NTU7bP86Te+i2Ogt8yU0QsKIvPW pAoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature; bh=nyuZB6pe2aVr8Jr1Y0KmQ//+PGX3XaEKFQv1Cw25khI=; b=VVRu0fpYHSvkuQgpX8BTcQ/2kVhCIFpeBg7KEorcyQJ1SV2I7di/C9cNL4GvxJn7oS rTZFIRQ2o7i3Xc7d79MeUSRGj83LBNQdDObXX+VtC1tYCuNL5Jk3dJzYerV8kSnO3LnC gP4dtUy7GshoKo0W7/jHAqB61i+YsDZRgOoNPecsZCoryzV1kli8mxpLUWmO1hfV+WWF FHpveqibNl9THr34PJAoOcW3EqBbgjzCbLW1xff+rvP1f6mfDqQjb7C4B+bmlbl2vvDH 0AR4w0yYRjh/ZJ4pveXzDc03dwJfnX6x/9cl7OvU9pNeBpJK1kUj5KwvBahB3mldU0/N Kxkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KDGJAoW+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 10si1916962ejn.746.2020.11.25.15.32.26; Wed, 25 Nov 2020 15:32:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KDGJAoW+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732800AbgKYWNH (ORCPT + 99 others); Wed, 25 Nov 2020 17:13:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732090AbgKYWNC (ORCPT ); Wed, 25 Nov 2020 17:13:02 -0500 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CD5CC061A4F for ; Wed, 25 Nov 2020 14:13:02 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id k14so27345wrn.1 for ; Wed, 25 Nov 2020 14:13:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=nyuZB6pe2aVr8Jr1Y0KmQ//+PGX3XaEKFQv1Cw25khI=; b=KDGJAoW+H5ZOeq3z7CcJdvNkJSc9GX6I7RdvmhuBWTw34HLRNRqS/WAYwPmds/JP4N 9BLely5o4sAXLMB7L8M1yhWb1MjNq6zTgILIJBVHFHg3M9BevtvpmitbJH3M9en5WWN2 Dxow2NQRG7WLRIp/g5SJJZyvTO3E+0SMJ2SamBaT8Mgk9N35C15onCF6kaaH8Xbw/zan 2lH4/ScO4ViS6mtMHBsiwch/PMhANeH2EeLFFynb2dB20kfg4PCVjuu+mGnOgBBCeamo Rhtieayez7zymmo3yLCIBvskn2lYAYHaUfbqT4nQaCk1femzAI/vmyIv+oDNMXLpReWw ymLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nyuZB6pe2aVr8Jr1Y0KmQ//+PGX3XaEKFQv1Cw25khI=; b=ppm3bxSEAaQuNK4b+LPyc3oOyHmFJC2a0mBFYqhMMaPvOmDdZCgy4c3e8ZBYpQ1JlF M4Ml1cXNZ0IrH+j3T4tJcYNRrmftHyjHS2jl/d8JF3+V51TNGW2L007VZ+wfmfMqy54I +r0b9kZrKlPWCV0dOUeW5fL0DFgVPXdmLT1OSyNaHX9EuI16fqoA3qb7FhstgkbYK+Un Rsw+nJ+mDped6jENNlFQV4bZZ2v4+QMqz6+Ll4EcGnhYH7Z9G2hRpR1Zh/6ZfhWVziFF Yqo1t28cjsWzxK2eMocjVEvgr4tX1rLNDxiqZUxKSssGtdbfuHdyXSBQGLhrImV1SVTB GS/w== X-Gm-Message-State: AOAM53350kL+zkgGnjkEBWV+9XrtxMUgrwIaXPu7Y2mzyfYXCBzWxMrR kxrHWehgdtpDwXi6JwX0ENvmXt35U9Azyg== X-Received: by 2002:adf:ebcb:: with SMTP id v11mr38927wrn.408.1606342380540; Wed, 25 Nov 2020 14:13:00 -0800 (PST) Received: from ?IPv6:2a01:e34:ed2f:f020:c023:e75f:e8c4:d86? ([2a01:e34:ed2f:f020:c023:e75f:e8c4:d86]) by smtp.googlemail.com with ESMTPSA id a131sm6423875wmh.30.2020.11.25.14.12.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Nov 2020 14:12:59 -0800 (PST) Subject: Re: [PATCH] thermal: amlogic_thermal: Add hwmon support To: Dongjin Kim , Guillaume La Roque , Zhang Rui , Amit Kucheria , linux-pm@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org References: <20201125162405.GA1263100@paju> From: Daniel Lezcano Message-ID: Date: Wed, 25 Nov 2020 23:12:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201125162405.GA1263100@paju> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thanks for your patch but exactly the same patch was submitted and merged [1] -- Daniel [1] https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/commit/?h=thermal/next&id=cb68a8580e2086fad38597af4c60d39de8df0cde On 25/11/2020 17:24, Dongjin Kim wrote: > Expose Amlogic thermal as HWMON devices. > > $ sensors > cpu_thermal-virtual-0 > Adapter: Virtual device > temp1: +32.2 C (crit = +110.0 C) > > ddr_thermal-virtual-0 > Adapter: Virtual device > temp1: +33.4 C (crit = +110.0 C) > > Signed-off-by: Dongjin Kim > --- > drivers/thermal/amlogic_thermal.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c > index ccb1fe18e993..2fce96c32586 100644 > --- a/drivers/thermal/amlogic_thermal.c > +++ b/drivers/thermal/amlogic_thermal.c > @@ -29,6 +29,7 @@ > #include > > #include "thermal_core.h" > +#include "thermal_hwmon.h" > > #define TSENSOR_CFG_REG1 0x4 > #define TSENSOR_CFG_REG1_RSET_VBG BIT(12) > @@ -291,6 +292,9 @@ static int amlogic_thermal_probe(struct platform_device *pdev) > if (ret) > return ret; > > + if (devm_thermal_add_hwmon_sysfs(pdata->tzd)) > + dev_warn(&pdev->dev, "failed to add hwmon sysfs attributes\n"); > + > ret = amlogic_thermal_enable(pdata); > > return ret; > -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog