All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/13] thermal/drivers/hisi: Fix missing interrupt enablement
@ 2017-08-30  8:47 ` Daniel Lezcano
  0 siblings, 0 replies; 48+ messages in thread
From: Daniel Lezcano @ 2017-08-30  8:47 UTC (permalink / raw)
  To: rui.zhang, edubezval
  Cc: daniel.lezcano, linux-pm, kevin.wangtao, leo.yan, open list

The interrupt for the temperature threshold is not enabled at the end of the
probe function, enable it after the setup is complete.

On the other side, the irq_enabled is not correctly set as we are checking if
the interrupt is masked where 'yes' means irq_enabled=false.

	irq_get_irqchip_state(data->irq, IRQCHIP_STATE_MASKED,
				&data->irq_enabled);

As we are always enabling the interrupt, it is pointless to check if
the interrupt is masked or not, just set irq_enabled to 'true'.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/thermal/hisi_thermal.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c
index bd3572c..8381696 100644
--- a/drivers/thermal/hisi_thermal.c
+++ b/drivers/thermal/hisi_thermal.c
@@ -345,8 +345,7 @@ static int hisi_thermal_probe(struct platform_device *pdev)
 	}
 
 	hisi_thermal_enable_bind_irq_sensor(data);
-	irq_get_irqchip_state(data->irq, IRQCHIP_STATE_MASKED,
-			      &data->irq_enabled);
+	data->irq_enabled = true;
 
 	for (i = 0; i < HISI_MAX_SENSORS; ++i) {
 		ret = hisi_thermal_register_sensor(pdev, data,
@@ -358,6 +357,8 @@ static int hisi_thermal_probe(struct platform_device *pdev)
 			hisi_thermal_toggle_sensor(&data->sensors[i], true);
 	}
 
+	enable_irq(data->irq);
+
 	return 0;
 }
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

end of thread, other threads:[~2017-09-04 14:30 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-30  8:47 [PATCH 01/13] thermal/drivers/hisi: Fix missing interrupt enablement Daniel Lezcano
2017-08-30  8:47 ` Daniel Lezcano
2017-08-30  8:47 ` [PATCH 02/13] thermal/drivers/hisi: Remove the multiple sensors support Daniel Lezcano
2017-08-30  8:47   ` Daniel Lezcano
2017-09-01 14:05   ` Leo Yan
2017-09-01 20:48     ` Daniel Lezcano
2017-08-30  8:47 ` [PATCH 03/13] thermal/drivers/hisi: Fix kernel panic on alarm interrupt Daniel Lezcano
2017-08-30  8:47   ` Daniel Lezcano
2017-09-01 14:14   ` Leo Yan
2017-08-30  8:47 ` [PATCH 04/13] thermal/drivers/hisi: Simplify the temperature/step computation Daniel Lezcano
2017-08-30  8:47   ` Daniel Lezcano
2017-09-01 14:24   ` Leo Yan
2017-08-30  8:47 ` [PATCH 05/13] thermal/drivers/hisi: Fix multiple alarm interrupts firing Daniel Lezcano
2017-08-30  8:47   ` Daniel Lezcano
2017-09-01 14:40   ` Leo Yan
2017-08-30  8:47 ` [PATCH 06/13] thermal/drivers/hisi: Remove pointless lock Daniel Lezcano
2017-08-30  8:47   ` Daniel Lezcano
2017-09-01 14:44   ` Leo Yan
2017-08-30  8:47 ` [PATCH 07/13] thermal/drivers/hisi: Encapsulate register writes into helpers Daniel Lezcano
2017-08-30  8:47   ` Daniel Lezcano
2017-09-02  2:09   ` Leo Yan
2017-09-02  2:17     ` Leo Yan
2017-08-30  8:47 ` [PATCH 08/13] thermal/drivers/hisi: Fix configuration register setting Daniel Lezcano
2017-08-30  8:47   ` Daniel Lezcano
2017-09-02  2:54   ` Leo Yan
2017-09-02  8:34     ` Daniel Lezcano
2017-09-04  0:58       ` Leo Yan
2017-09-04  9:16         ` Daniel Lezcano
2017-08-30  8:47 ` [PATCH 09/13] thermal/drivers/hisi: Remove costly sensor inspection Daniel Lezcano
2017-08-30  8:47   ` Daniel Lezcano
2017-09-02  3:29   ` Leo Yan
2017-09-02 13:10     ` Daniel Lezcano
2017-09-04  0:50       ` Leo Yan
2017-09-04 11:29         ` Daniel Lezcano
2017-09-04 14:30           ` Leo Yan
2017-08-30  8:47 ` [PATCH 10/13] thermal/drivers/hisi: Rename and remove unused field Daniel Lezcano
2017-08-30  8:47   ` Daniel Lezcano
2017-09-02  3:36   ` Leo Yan
2017-08-30  8:47 ` [PATCH 11/13] thermal/drivers/hisi: Convert long to int Daniel Lezcano
2017-08-30  8:47   ` Daniel Lezcano
2017-09-02  3:41   ` Leo Yan
2017-08-30  8:47 ` [PATCH 12/13] thermal/drivers/hisi: Remove thermal data back pointer Daniel Lezcano
2017-08-30  8:47   ` Daniel Lezcano
2017-08-30  8:47 ` [PATCH 13/13] thermal/drivers/hisi: Remove mutex_lock in the code Daniel Lezcano
2017-08-30  8:47   ` Daniel Lezcano
2017-09-02  4:04   ` Leo Yan
2017-09-02 13:11     ` Daniel Lezcano
2017-09-01  8:31 ` [PATCH 01/13] thermal/drivers/hisi: Fix missing interrupt enablement Leo Yan

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.