dm: key: allow power key to skip irq handler init
At sometime, its parent driver would setup the main interrupt(e.g. PMIC). Change-Id: I8d24266c48f515fc92c3529a5b6aa7a18d181af1 Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
parent
ded32713dc
commit
0f9d23ea98
|
@ -274,6 +274,9 @@ static int key_post_probe(struct udevice *dev)
|
|||
#ifdef CONFIG_IRQ
|
||||
int irq;
|
||||
|
||||
if (uc_key->skip_irq_init)
|
||||
return 0;
|
||||
|
||||
irq = phandle_gpio_to_irq(uc_key->gpios[0],
|
||||
uc_key->gpios[1]);
|
||||
if (irq < 0) {
|
||||
|
|
|
@ -47,6 +47,8 @@ struct dm_key_uclass_platdata {
|
|||
|
||||
u32 trig_cnt;
|
||||
|
||||
int skip_irq_init;
|
||||
|
||||
/* Only for pwrkey gpio irq */
|
||||
void (*irq_thread)(int irq, struct udevice *dev);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue