diff options
author | Xu Yang <xu.yang_2@nxp.com> | 2022-10-13 23:14:36 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-10-23 14:34:53 +0200 |
commit | 450857c6058f092167f17bad97a2cc9c2a39b9a0 (patch) | |
tree | 56da313c74b40b0af9ee4de784d1c1c8ed6d288b /drivers/usb/chipidea/ci.h | |
parent | 74494b33211d067427db25824cd8b53fa0eab1ef (diff) | |
download | linux-450857c6058f092167f17bad97a2cc9c2a39b9a0.tar.gz linux-450857c6058f092167f17bad97a2cc9c2a39b9a0.tar.bz2 linux-450857c6058f092167f17bad97a2cc9c2a39b9a0.zip |
usb: chipidea: core: handle suspend/resume for each role
There may be a need to handle suspend/resume per role. This patch
will add this support.
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Acked-by: Peter Chen <peter.chen@kernel.org>
Link: https://lore.kernel.org/r/20221013151442.3262951-3-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/ci.h')
-rw-r--r-- | drivers/usb/chipidea/ci.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h index a4a3be049910..005c67cb3afb 100644 --- a/drivers/usb/chipidea/ci.h +++ b/drivers/usb/chipidea/ci.h @@ -127,12 +127,16 @@ enum ci_revision { * struct ci_role_driver - host/gadget role driver * @start: start this role * @stop: stop this role + * @suspend: system suspend handler for this role + * @resume: system resume handler for this role * @irq: irq handler for this role * @name: role name string (host/gadget) */ struct ci_role_driver { int (*start)(struct ci_hdrc *); void (*stop)(struct ci_hdrc *); + void (*suspend)(struct ci_hdrc *ci); + void (*resume)(struct ci_hdrc *ci, bool power_lost); irqreturn_t (*irq)(struct ci_hdrc *); const char *name; }; |