提交 60be4230 编写于 作者: C Courtney Cavin 提交者: Greg Kroah-Hartman

spmi: pmic-arb: add support for irq_get_irqchip_state

Reviewed-by: NAndy Gross <agross@codeaurora.org>
Signed-off-by: NCourtney Cavin <courtney.cavin@sonymobile.com>
Signed-off-by: NBjorn Andersson <bjorn.andersson@sonymobile.com>
Tested-by: NTim Bird <tim.bird@sonymobile.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 a9fce374
......@@ -575,6 +575,22 @@ static int qpnpint_irq_set_type(struct irq_data *d, unsigned int flow_type)
return 0;
}
static int qpnpint_get_irqchip_state(struct irq_data *d,
enum irqchip_irq_state which,
bool *state)
{
u8 irq = d->hwirq >> 8;
u8 status = 0;
if (which != IRQCHIP_STATE_LINE_LEVEL)
return -EINVAL;
qpnpint_spmi_read(d, QPNPINT_REG_RT_STS, &status, 1);
*state = !!(status & BIT(irq));
return 0;
}
static struct irq_chip pmic_arb_irqchip = {
.name = "pmic_arb",
.irq_enable = qpnpint_irq_enable,
......@@ -582,6 +598,7 @@ static struct irq_chip pmic_arb_irqchip = {
.irq_mask = qpnpint_irq_mask,
.irq_unmask = qpnpint_irq_unmask,
.irq_set_type = qpnpint_irq_set_type,
.irq_get_irqchip_state = qpnpint_get_irqchip_state,
.flags = IRQCHIP_MASK_ON_SUSPEND
| IRQCHIP_SKIP_SET_WAKE,
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册