extcon: gpio: Add power resume support
Quoted 59 lines · Barry Song
Quoted 51 lines
2013/12/23 Chanwoo Choi <[email protected]>:
Quoted 42 lines · Barry Song
Quoted 16 lines
2013/12/23 Chanwoo Choi <[email protected]>:
Quoted 15 lines · Barry Song
Quoted 13 lines
2013/12/23 Chanwoo Choi <[email protected]>:
Quoted 9 lines · rjying
Quoted 3 lines
From: Rongjun Ying <[email protected]>
After system resume, need send extcon uevent to userspace
Why did extcon send uevent after wakeup from suspend?
If extcon cable is attatched or detached on suspend state, Kernel can detect the interrupt about changed state of extcon.
irq controller has lost power in suspend, so there is no pending interrupt. and HW will not pend any interrupt when we hotplug cable during sleep.
Quoted 8 lines
Quoted 6 lines
No, SoC in suspend state must maintain the minimum power under 1mA if completed the power-optimization on suspend state.
If user insert USB cable to target, the external interrupt connected to USB port is happened. And kernel would be waked up from suspend state to operate proper interrupt handler of external interrupt.
no. not every USB supports that. that depends on the power domain design of SoC.
USB is only example for gpio control in suspend state.
Quoted 11 lines
Quoted 6 lines
Also,
Input subsystem used gpio-keys driver for power button..
If user press power button in suspend state, target would be waked up from suspend state. It is same case both extcon gpio and gpio-keys of input subsystem.no. it depends on the SoC design. many SoC only support 1 special key which can work as ON-KEY as wakeup source. and this kind of keys might not be GPIO at all.
there is a special power domain which is still open for it.many SoC?
Quoted 7 lines
As I knew, most SoC has supported various wakeup source. As you comment, if specific SoC support only one special key for wakeup from suspend state, I think it isn't common.
Also,
This patch isn't necessary on SoCs which support various wakeup source (e.g., external interrupt). As you comment, this issue has dependecy on specific SoC. Why did you think this common code?Quoted 6 lines
i am not thinking this patch must be common codes but i think the extcon should provide common codes to support all chips. that is what a framework should consider.
if there is no this or things similar with this, how could extcon support the chips which don't support receiving sleep gpio interrupts?
Quoted 6 lines
Sure, subsystem should support all cases related to this issue.
I'd like to send common patch to support all cases as we discussed. If some patch support all case, I would review and apply it.
Chanwoo Choi
Dear Barry and Chanwoo,
What about having a flag in extcon platform data that describes whether this extcon-gpio requires status double checking at resume or not?
Cheers,
MyungJoo
�淸�{.n�+돴윯돪�+%듚�깁負쪐w��{.n�+돴쪐{깸G쳺��{ay����,j�f"톒쉹��묎�z_溫(�쉸듶줷"얎�m����G쳺�◀?솳鈺�&x�~뤳턨O뺞촾퇉v�^�m����띠�◀?뻀�
2013/12/23 MyungJoo Ham <[email protected]>:
Quoted 64 lines
Quoted 64 lines · Barry Song
Quoted 51 lines
2013/12/23 Chanwoo Choi <[email protected]>:
Quoted 42 lines · Barry Song
Quoted 16 lines
2013/12/23 Chanwoo Choi <[email protected]>:
Quoted 15 lines · Barry Song
Quoted 13 lines
2013/12/23 Chanwoo Choi <[email protected]>:
Quoted 9 lines · rjying
Quoted 3 lines
From: Rongjun Ying <[email protected]>
After system resume, need send extcon uevent to userspace
Why did extcon send uevent after wakeup from suspend?
If extcon cable is attatched or detached on suspend state, Kernel can detect the interrupt about changed state of extcon.
irq controller has lost power in suspend, so there is no pending interrupt. and HW will not pend any interrupt when we hotplug cable during sleep.
Quoted 8 lines
Quoted 6 lines
No, SoC in suspend state must maintain the minimum power under 1mA if completed the power-optimization on suspend state.
If user insert USB cable to target, the external interrupt connected to USB port is happened. And kernel would be waked up from suspend state to operate proper interrupt handler of external interrupt.
no. not every USB supports that. that depends on the power domain design of SoC.
USB is only example for gpio control in suspend state.
Quoted 11 lines
Quoted 6 lines
Also,
Input subsystem used gpio-keys driver for power button..
If user press power button in suspend state, target would be waked up from suspend state. It is same case both extcon gpio and gpio-keys of input subsystem.no. it depends on the SoC design. many SoC only support 1 special key which can work as ON-KEY as wakeup source. and this kind of keys might not be GPIO at all.
there is a special power domain which is still open for it.many SoC?
Quoted 7 lines
As I knew, most SoC has supported various wakeup source. As you comment, if specific SoC support only one special key for wakeup from suspend state, I think it isn't common.
Also,
This patch isn't necessary on SoCs which support various wakeup source (e.g., external interrupt). As you comment, this issue has dependecy on specific SoC. Why did you think this common code?Quoted 6 lines
i am not thinking this patch must be common codes but i think the extcon should provide common codes to support all chips. that is what a framework should consider.
if there is no this or things similar with this, how could extcon support the chips which don't support receiving sleep gpio interrupts?
Sure, subsystem should support all cases related to this issue.
I'd like to send common patch to support all cases as we discussed. If some patch support all case, I would review and apply it.
Quoted 8 lines
Quoted 1 line
Chanwoo Choi
Dear Barry and Chanwoo,
What about having a flag in extcon platform data that describes whether this extcon-gpio requires status double checking at resume or not?
MyungJoo,
Thanks!
i am ok. what about naming it as "bool lost_sleep_irq"? default, it is 0, for chips that will lose sleeping IRQ, set it to 1?
Chanwoo, how do you think?
Quoted 5 lines
Cheers,
MyungJoo
-barry