From: Stanimir Varbanov <svarbanov@mm-sol.com>
To: "Ivan T. Ivanov" <iivanov@mm-sol.com>
Cc: Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
David Collins <collinsd@codeaurora.org>
Subject: Re: [PATCH v4] thermal: Add QPNP PMIC temperature alarm driver
Date: Mon, 02 Feb 2015 17:38:17 +0200 [thread overview]
Message-ID: <54CF99E9.10305@mm-sol.com> (raw)
In-Reply-To: <1422890370-6914-1-git-send-email-iivanov@mm-sol.com>
On 02/02/2015 05:19 PM, Ivan T. Ivanov wrote:
> Add support for the temperature alarm peripheral found inside
> Qualcomm plug-and-play (QPNP) PMIC chips. The temperature alarm
> peripheral outputs a pulse on an interrupt line whenever the
> thermal over temperature stage value changes.
>
> Register a thermal sensor. The temperature reported by this thermal
> sensor device should reflect the actual PMIC die temperature if an
> ADC is present on the given PMIC. If no ADC is present, then the
> reported temperature should be estimated from the over temperature
> stage value.
>
> Cc: David Collins <collinsd@codeaurora.org>
> Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
> ---
>
<snip>
> +
> + ret = qpnp_tm_init(chip);
> + if (ret < 0) {
> + dev_err(&pdev->dev, "init failed\n");
> + goto fail;
> + }
> +
> + chip->tz_dev = thermal_zone_of_sensor_register(&pdev->dev, 0, chip,
> + &qpnp_tm_sensor_ops);
> + if (IS_ERR(chip->tz_dev)) {
> + dev_err(&pdev->dev, "failed to register sensor\n");
> + ret = PTR_ERR(chip->tz_dev);
> + goto fail;
> + }
> +
> + ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, qpnp_tm_isr,
> + IRQF_ONESHOT, node->name, chip);
> + if (ret < 0)
> + goto unreg;
> +
> + return 0;
> +
> +unreg:
> + thermal_zone_of_sensor_unregister(&pdev->dev, chip->tz_dev);
Any problem to request_irq before thermal_zone_of_sensor_register? It
will avoid having thermal sensor unregister call.
> +fail:
> + if (!IS_ERR(chip->adc))
> + iio_channel_release(chip->adc);
> +
> + return ret;
> +}
<snip>
--
regards,
Stan
next prev parent reply other threads:[~2015-02-02 15:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-02 15:19 [PATCH v4] thermal: Add QPNP PMIC temperature alarm driver Ivan T. Ivanov
2015-02-02 15:19 ` Ivan T. Ivanov
2015-02-02 15:38 ` Stanimir Varbanov [this message]
2015-02-03 8:31 ` Ivan T. Ivanov
2015-02-02 18:14 ` Eduardo Valentin
2015-02-03 9:24 ` Ivan T. Ivanov
2015-02-03 19:26 ` Eduardo Valentin
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=54CF99E9.10305@mm-sol.com \
--to=svarbanov@mm-sol.com \
--cc=collinsd@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=edubezval@gmail.com \
--cc=galak@codeaurora.org \
--cc=iivanov@mm-sol.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.