From: Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Wolfram Sang <wsa@the-dreams.de>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <damm+renesas@opensource.se>,
Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Thao Phuong Le. Nguyen" <thao.nguyen.yb@rvc.renesas.com>,
"Hien Duy. Dang" <hien.dang.eb@rvc.renesas.com>,
Toru Oishi <toru.oishi.zj@rvc.renesas.com>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Gaku Inami <gaku.inami.xw@bp.renesas.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Simon Horman <horms@verge.net.au>,
"Khiem Trong. Nguyen" <khiem.nguyen.xt@rvc.r>
Subject: [PATCH/RFC 1/3] thermal: rcar_gen3_thermal: Modify the shared irq with initialization
Date: Sun, 19 Jun 2016 11:13:59 +0700 [thread overview]
Message-ID: <57661C07.9050905@rvc.renesas.com> (raw)
In-Reply-To: <57661BB1.3060401@rvc.renesas.com>
In R-CAR Gen3 series, it has some thermal sensors. The interrupt I/F
that can be used in thermal sensors is three. So it should be used
the interrupt I/F as shared.
This patch changes the shared settings for the thermal interrupts.
Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
Signed-off-by: Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com>
---
drivers/thermal/rcar_gen3_thermal.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c
index a9a372b..e640a14 100644
--- a/drivers/thermal/rcar_gen3_thermal.c
+++ b/drivers/thermal/rcar_gen3_thermal.c
@@ -416,6 +416,7 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev)
int ret = -ENODEV;
int idle;
struct device_node *tz_nd, *tmp_nd;
+ int i, irq_cnt;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
@@ -489,13 +490,18 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev)
rcar_gen3_thermal_irq_enable(priv);
/* Interrupt */
- if (irq) {
- ret = devm_request_irq(dev, irq->start,
- rcar_gen3_thermal_irq, 0,
- dev_name(dev), priv);
- if (ret) {
- dev_err(dev, "IRQ request failed\n ");
- goto error_unregister;
+ if (rcar_has_irq_support(priv)) {
+ irq_cnt = platform_irq_count(pdev);
+ for (i = 0; i < irq_cnt; i++) {
+ irq = platform_get_resource(pdev, IORESOURCE_IRQ, i);
+ ret = devm_request_irq(dev, irq->start,
+ rcar_gen3_thermal_irq,
+ IRQF_SHARED,
+ dev_name(dev), priv);
+ if (ret) {
+ dev_err(dev, "IRQ request failed\n ");
+ goto error_unregister;
+ }
}
}
--
1.9.1
next prev parent reply other threads:[~2016-06-19 4:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-19 3:31 [PATCH 0/4] thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal support Khiem Nguyen
2016-06-19 3:33 ` [PATCH 1/4] thermal: rcar_gen3_thermal: Document the R-Car Gen3 thermal bindings Khiem Nguyen
[not found] ` <57661290.9000501-NdPGGYSbX7otW8iMtHSHnA@public.gmane.org>
2016-06-20 7:49 ` Geert Uytterhoeven
[not found] ` <57661211.7010900-NdPGGYSbX7otW8iMtHSHnA@public.gmane.org>
2016-06-19 3:34 ` [PATCH 2/4] thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal driver support Khiem Nguyen
[not found] ` <576612DE.3070204-NdPGGYSbX7otW8iMtHSHnA@public.gmane.org>
2016-06-19 3:35 ` [PATCH 3/4] arm64: dts: r8a7795: Add R-Car Gen3 thermal support Khiem Nguyen
2016-06-19 3:36 ` [PATCH 4/4] arm64: defconfig: Enable " Khiem Nguyen
2016-06-20 1:44 ` [PATCH 2/4] thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal driver support Kuninori Morimoto
2016-09-03 2:10 ` Khiem Nguyen
2016-06-19 4:12 ` [PATCH/RFC 0/3] thermal: rcar_gen3_thermal: Apply shared interrupts for thermal sensors Khiem Nguyen
2016-06-19 4:13 ` Khiem Nguyen [this message]
2016-06-19 4:15 ` [PATCH/RFC 2/3] thermal: rcar_gen3_thermal: Modify the way to detect the interrupts Khiem Nguyen
[not found] ` <57661BB1.3060401-NdPGGYSbX7otW8iMtHSHnA@public.gmane.org>
2016-06-19 4:16 ` [PATCH/RFC 3/3] arm64: dts: r8a7795: Support shared irq for thermal sensors Khiem Nguyen
2016-06-20 7:53 ` Geert Uytterhoeven
2016-06-20 7:40 ` [PATCH 0/4] thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal support Geert Uytterhoeven
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=57661C07.9050905@rvc.renesas.com \
--to=khiem.nguyen.xt@rvc.renesas.com \
--cc=catalin.marinas@arm.com \
--cc=damm+renesas@opensource.se \
--cc=devicetree@vger.kernel.org \
--cc=edubezval@gmail.com \
--cc=gaku.inami.xw@bp.renesas.com \
--cc=geert+renesas@glider.be \
--cc=hien.dang.eb@rvc.renesas.com \
--cc=horms@verge.net.au \
--cc=khiem.nguyen.xt@rvc.r \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
--cc=thao.nguyen.yb@rvc.renesas.com \
--cc=toru.oishi.zj@rvc.renesas.com \
--cc=wsa@the-dreams.de \
/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;
as well as URLs for NNTP newsgroup(s).