From f858add52185d927db546c8066f29b545d37b3ba Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 3 Jan 2022 11:22:28 +0100 Subject: [PATCH 2/2] pinctrl: cherryview: Allow overwriting the interrupt mapping when it points to pin 0 Commit bdfbef2d29dc ("pinctrl: cherryview: Don't use selection 0 to mark an interrupt line as unused") made the code properly differentiate between unset vs (hwirq) 0 entries in the GPIO-controller interrupt-line to GPIO pinnumber/hwirq mapping. This is causing some boards to not boot. This commit restores the old behavior of allowing chv_gpio_irq_startup() to overwrite the interrupt-line to pin mapping if the current mapping points to pin 0 (which used to be interpreted as both 0 and unused before). Signed-off-by: Hans de Goede --- drivers/pinctrl/intel/pinctrl-cherryview.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c index 1d5818269076..dd23c7405e37 100644 --- a/drivers/pinctrl/intel/pinctrl-cherryview.c +++ b/drivers/pinctrl/intel/pinctrl-cherryview.c @@ -1322,7 +1322,8 @@ static unsigned chv_gpio_irq_startup(struct irq_data *d) else handler = handle_edge_irq; - if (cctx->intr_lines[intsel] == CHV_INVALID_HWIRQ) { + if (cctx->intr_lines[intsel] == CHV_INVALID_HWIRQ || + cctx->intr_lines[intsel] == 0) { irq_set_handler_locked(d, handler); dev_dbg(dev, "using interrupt line %u for IRQ_TYPE_NONE on pin %u\n", intsel, pin); -- 2.33.1