Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1425932
| From | Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH/RFC 1/3] thermal: rcar_gen3_thermal: Modify the shared irq with initialization |
| Date | 2016-06-19 06:20 +0200 |
| Message-ID | <rLCng-5uJ-11@gated-at.bofh.it> (permalink) |
| References | <rLBKx-4Xe-1@gated-at.bofh.it> <rLCnf-5uJ-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal support Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com> - 2016-06-19 05:40 +0200
[PATCH 3/4] arm64: dts: r8a7795: Add R-Car Gen3 thermal support Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com> - 2016-06-19 05:40 +0200
[PATCH 2/4] thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal driver support Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com> - 2016-06-19 05:40 +0200
[PATCH 4/4] arm64: defconfig: Enable R-Car Gen3 thermal support Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com> - 2016-06-19 05:40 +0200
[PATCH/RFC 2/3] thermal: rcar_gen3_thermal: Modify the way to detect the interrupts Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com> - 2016-06-19 06:20 +0200
[PATCH/RFC 0/3] thermal: rcar_gen3_thermal: Apply shared interrupts for thermal sensors Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com> - 2016-06-19 06:20 +0200
[PATCH/RFC 3/3] arm64: dts: r8a7795: Support shared irq for thermal sensors Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com> - 2016-06-19 06:20 +0200
Re: [PATCH/RFC 3/3] arm64: dts: r8a7795: Support shared irq for thermal sensors Geert Uytterhoeven <geert@linux-m68k.org> - 2016-06-20 10:00 +0200
[PATCH/RFC 1/3] thermal: rcar_gen3_thermal: Modify the shared irq with initialization Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com> - 2016-06-19 06:20 +0200
Re: [PATCH 0/4] thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal support Geert Uytterhoeven <geert@linux-m68k.org> - 2016-06-20 10:00 +0200
csiph-web