summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephen Boyd <stephen.boyd@linaro.org>2016-09-07 14:35:07 -0700
committerAnson Huang <Anson.Huang@nxp.com>2017-06-08 19:27:38 +0800
commitd6ac750a629da9fb109410a80c5ea49c7c5da8a2 (patch)
tree4f7bbd42fe387818dd018075ca58d60741399372 /include
parent18bec03472070959d33e6937bb9ca87facee175d (diff)
usb: chipidea: Consolidate extcon notifiers
The two extcon notifiers are almost the same except for the variable name for the cable structure and the id notifier inverts the cable->state logic. Make it the same and replace two functions with one to save some lines. This also makes it so that the id cable state is true when the id pin is pulled low, so we change the name of ->state to ->connected to properly reflect that we're interested in the cable being connected. Cc: Peter Chen <peter.chen@nxp.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "Ivan T. Ivanov" <iivanov.xz@gmail.com> Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org> Signed-off-by: Peter Chen <peter.chen@nxp.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/chipidea.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
index 2f0ed8c0c1b7..9407908507b6 100644
--- a/include/linux/usb/chipidea.h
+++ b/include/linux/usb/chipidea.h
@@ -12,7 +12,7 @@ struct ci_hdrc;
/**
* struct ci_hdrc_cable - structure for external connector cable state tracking
- * @state: current state of the line
+ * @connected: true if cable is connected, false otherwise
* @changed: set to true when extcon event happen
* @enabled: set to true if we've enabled the vbus or id interrupt
* @edev: device which generate events
@@ -21,7 +21,7 @@ struct ci_hdrc;
* @conn: used for notification registration
*/
struct ci_hdrc_cable {
- bool state;
+ bool connected;
bool changed;
bool enabled;
struct extcon_dev *edev;