summaryrefslogtreecommitdiffstats
path: root/include/linux/extcon.h
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2016-07-25 08:15:19 -0400
committerKishon Vijay Abraham I <kishon@ti.com>2016-09-10 07:18:52 -0400
commitceaa98f442cf09dc73946c6402489344367905ae (patch)
treeeb6d1778bfca92b7c419288d7b2654d28a38d3be /include/linux/extcon.h
parent067c1652e7a7d50d951eee1d34a414ea931cee6c (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,
235 union extcon_property_value prop_val); 235 union extcon_property_value prop_val);
236 236
237/* 237/*
238 * get/set_property_capability set the capability of the property for each
239 * external connector. They are used to set the capability of the property
240 * of each external connector based on the id and property.
241 */
242extern int extcon_get_property_capability(struct extcon_dev *edev,
243 unsigned int id, unsigned int prop);
244extern int extcon_set_property_capability(struct extcon_dev *edev,
245 unsigned int id, unsigned int prop);
246
247/*
238 * Following APIs are to monitor every action of a notifier. 248 * Following APIs are to monitor every action of a notifier.
239 * Registrar gets notified for every external port of a connection device. 249 * Registrar gets notified for every external port of a connection device.
240 * Probably this could be used to debug an action of notifier; however, 250 * 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,
320 return 0; 330 return 0;
321} 331}
322 332
333static inline int extcon_get_property_capability(struct extcon_dev *edev,
334 unsigned int id, unsigned int prop)
335{
336 return 0;
337}
338
339static inline int extcon_set_property_capability(struct extcon_dev *edev,
340 unsigned int id, unsigned int prop)
341{
342 return 0;
343}
344
323static inline struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name) 345static inline struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name)
324{ 346{
325 return NULL; 347 return NULL;