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:
Joseph Chen 2019-07-27 17:10:27 +08:00
parent ded32713dc
commit 0f9d23ea98
2 changed files with 5 additions and 0 deletions

View File

@ -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) {

View File

@ -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);
};