From a34e2697fdb8def3336ea79c3352e577e622b3e2 Mon Sep 17 00:00:00 2001 From: Udipto Goswami Date: Tue, 22 Oct 2019 16:59:15 +0530 Subject: [PATCH] ANDROID: GKI: usb: phy: Fix ABI diff due to usb_phy.drive_dp_pulse This is a partial cherry-pick of just the header changes. change-Id: Ib1e18a8d40301c553efe0919e11c89ad87d9cfca Signed-off-by: Udipto Goswami Bug: 154275330 (cherry picked from commit b1caa8095292da59320a24ee5e9f470af2d0aad4) Signed-off-by: Saravana Kannan --- include/linux/usb/phy.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h index 6809aaa6dfa4..4f05705ba9b5 100644 --- a/include/linux/usb/phy.h +++ b/include/linux/usb/phy.h @@ -171,6 +171,7 @@ struct usb_phy { /* reset the PHY clocks */ int (*reset)(struct usb_phy *x); + int (*drive_dp_pulse)(struct usb_phy *x, unsigned int pulse_width); }; /* for board-specific init logic */ @@ -238,6 +239,15 @@ usb_phy_reset(struct usb_phy *x) return 0; } +static inline int +usb_phy_drive_dp_pulse(struct usb_phy *x, unsigned int pulse_width) +{ + if (x && x->drive_dp_pulse) + return x->drive_dp_pulse(x, pulse_width); + + return 0; +} + /* for usb host and peripheral controller drivers */ #if IS_ENABLED(CONFIG_USB_PHY) extern struct usb_phy *usb_get_phy(enum usb_phy_type type);