From: Bhupesh Sharma <bhupesh.sharma@linaro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
Amit Kucheria <amitk@kernel.org>,
Thara Gopinath <thara.gopinath@gmail.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Zhang Rui <rui.zhang@intel.com>
Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH 1/2] thermal/drivers/qcom/temp-alarm: register thermal zones as hwmon sensors
Date: Tue, 19 Jul 2022 11:29:02 +0530 [thread overview]
Message-ID: <d0dbf098-9c93-ed39-0599-fd70b451c19f@linaro.org> (raw)
In-Reply-To: <20220719054940.755907-1-dmitry.baryshkov@linaro.org>
On 7/19/22 11:19 AM, Dmitry Baryshkov wrote:
> Register thermal zones as hwmon sensors to let userspace read
> temperatures using standard hwmon interface.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
> index 7419e196dbb0..770f82cc9bca 100644
> --- a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
> +++ b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
> @@ -16,6 +16,7 @@
> #include <linux/thermal.h>
>
> #include "../thermal_core.h"
> +#include "../thermal_hwmon.h"
>
> #define QPNP_TM_REG_DIG_MAJOR 0x01
> #define QPNP_TM_REG_TYPE 0x04
> @@ -458,6 +459,10 @@ static int qpnp_tm_probe(struct platform_device *pdev)
> return ret;
> }
>
> + if (devm_thermal_add_hwmon_sysfs(chip->tz_dev))
> + dev_warn(&pdev->dev,
> + "Failed to add hwmon sysfs attributes\n");
> +
> ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, qpnp_tm_isr,
> IRQF_ONESHOT, node->name, chip);
> if (ret < 0)
LGTM, so:
Reviewed-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
next prev parent reply other threads:[~2022-07-19 5:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 5:49 [PATCH 1/2] thermal/drivers/qcom/temp-alarm: register thermal zones as hwmon sensors Dmitry Baryshkov
2022-07-19 5:49 ` [PATCH 2/2] thermal/drivers/qcom/spmi-adc-tm5: " Dmitry Baryshkov
2022-07-19 6:01 ` Bhupesh Sharma
2022-07-19 5:59 ` Bhupesh Sharma [this message]
2022-07-20 10:24 ` [PATCH 1/2] thermal/drivers/qcom/temp-alarm: " Daniel Lezcano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d0dbf098-9c93-ed39-0599-fd70b451c19f@linaro.org \
--to=bhupesh.sharma@linaro.org \
--cc=agross@kernel.org \
--cc=amitk@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=daniel.lezcano@linaro.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=konrad.dybcio@somainline.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=thara.gopinath@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox