summaryrefslogtreecommitdiff
path: root/include/linux/extcon.h
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2016-07-25 21:15:19 +0900
committerChanwoo Choi <cw00.choi@samsung.com>2016-08-08 11:17:22 +0900
commit7f2a0a1699b51bfd738f1e0b15e057996fe1f259 (patch)
treedf2537d5d727507e9ff6611587b787dc52278a50 /include/linux/extcon.h
parent792e7e9e5d4358bc6157152b2c07b94eb9e261b0 (diff)
extcon: Add the support for the capability of each property
This patch adds the support of the property capability setting. This function decides the supported properties of each external connector on extcon provider driver. Ths list of new extcon APIs to get/set the capability of property as following: - int extcon_get_property_capability(struct extcon_dev *edev, unsigned int id, unsigned int prop); - int extcon_set_property_capability(struct extcon_dev *edev, unsigned int id, unsigned int prop); Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Tested-by: Chris Zhong <zyw@rock-chips.com> Tested-by: Guenter Roeck <groeck@chromium.org> Reviewed-by: Guenter Roeck <groeck@chromium.org>
Diffstat (limited to 'include/linux/extcon.h')
-rw-r--r--include/linux/extcon.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index f9d4a44e86d3..f08469089f74 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -235,6 +235,16 @@ extern int extcon_set_property(struct extcon_dev *edev, unsigned int id,
union extcon_property_value prop_val);
/*
+ * get/set_property_capability set the capability of the property for each
+ * external connector. They are used to set the capability of the property
+ * of each external connector based on the id and property.
+ */
+extern int extcon_get_property_capability(struct extcon_dev *edev,
+ unsigned int id, unsigned int prop);
+extern int extcon_set_property_capability(struct extcon_dev *edev,
+ unsigned int id, unsigned int prop);
+
+/*
* Following APIs are to monitor every action of a notifier.
* Registrar gets notified for every external port of a connection device.
* Probably this could be used to debug an action of notifier; however,
@@ -320,6 +330,18 @@ static inline int extcon_set_property(struct extcon_dev *edev, unsigned int id,
return 0;
}
+static inline int extcon_get_property_capability(struct extcon_dev *edev,
+ unsigned int id, unsigned int prop)
+{
+ return 0;
+}
+
+static inline int extcon_set_property_capability(struct extcon_dev *edev,
+ unsigned int id, unsigned int prop)
+{
+ return 0;
+}
+
static inline struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name)
{
return NULL;