We use it to exit charge animation while system is in runtime.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ia6bc3f7a20310f73e060418f0a0ab01ef8745b11
The PIMC as parent has register the interrupt controller as a irq chip,
and as a children, this driver only cares about the rise/fall event.
Change-Id: I934901a786b70920cd413e1fb15c8a5c372ea399
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
- use standard dm framework to implement all key drivers;
- all key node to be children and attach to key bus;
- dm key uclass takes over most work;
- reduce a lot of driver code size;
Change-Id: I9ea4515249d493eb4434890b90350f694c07404f
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
1. dm key framework takes over more generic jobs;
2. key drivers remove unused codes and match new framework;
3. only power key is registered as interrupt key;
Change-Id: Icdda86f588af721b685f801ed251581f2fd85793
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
1. set pmic_sleep as sleep function;
2. set pmic_int active low.
Change-Id: I4bc4034e18b19dc9b1b328870db652d11173fe3a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
because we support U-Boot system suspend and trap into ATF,
we have to make pwrkey as wakeup source, so that we must
register pmic_int as an irq.
we found reading 'get_timer(0)' will return a large value in
the interrupt routine and I don't find out what happend now,
so I add the 'get_ms()' which reads arm gerneric timer tick
direcly.
we clean all PMIC interrupt status for safety to avoid pmic_int
hold in low level which make PMIC can't respond to interrupt any
more.
Change-Id: I46ff81030696f4672faa9fc81141952e52fd5ba9
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
1. add key name and type;
2. clear both fall and rise interrupt when detect rise.
Change-Id: I0698f3decc4b92cf32ce564a1827eedb5ee19a01
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
RK805/816 provide pwrkey function while RK808/818 is not.
Change-Id: Ia6cd9fcb0a360d81cff54cf49a1f1c9c653488e6
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>