summaryrefslogtreecommitdiff
path: root/include/linux/extcon.h
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2016-06-30 20:41:18 +0300
committerKishon Vijay Abraham I <kishon@ti.com>2016-09-10 14:18:49 +0300
commit84c48dc55945b4edfb63388832ebcca82d003ee7 (patch)
tree4b8b94aa8f17a857277aed05d58ce0d5196636a4 /include/linux/extcon.h
parent0143f59de50eee70485be9b658e42495d72698dd (diff)
downloadlinux-84c48dc55945b4edfb63388832ebcca82d003ee7.tar.xz
extcon: Block the bit masking operation for cable state except for extcon core
This patch restrict the usage of extcon_update_state() in the extcon core because the extcon_update_state() use the bit masking to change the state of external connector. When this function is used in device drivers, it may occur the probelm with the handling mistake of bit masking. Also, this patch removes the extcon_get/set_state() functions because these functions use the bit masking which is reluctant way. Instead, extcon provides the extcon_set/get_cable_state_() functions. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'include/linux/extcon.h')
-rw-r--r--include/linux/extcon.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index 61004413dc64..667b1d35af12 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -150,20 +150,6 @@ extern struct extcon_dev *devm_extcon_dev_allocate(struct device *dev,
extern void devm_extcon_dev_free(struct device *dev, struct extcon_dev *edev);
/*
- * get/set/update_state access the 32b encoded state value, which represents
- * states of all possible cables of the multistate port. For example, if one
- * calls extcon_set_state(edev, 0x7), it may mean that all the three cables
- * are attached to the port.
- */
-static inline u32 extcon_get_state(struct extcon_dev *edev)
-{
- return edev->state;
-}
-
-extern int extcon_set_state(struct extcon_dev *edev, u32 state);
-extern int extcon_update_state(struct extcon_dev *edev, u32 mask, u32 state);
-
-/*
* get/set_cable_state access each bit of the 32b encoded state value.
* They are used to access the status of each cable based on the cable id.
*/
@@ -232,22 +218,6 @@ static inline struct extcon_dev *devm_extcon_dev_allocate(struct device *dev,
static inline void devm_extcon_dev_free(struct extcon_dev *edev) { }
-static inline u32 extcon_get_state(struct extcon_dev *edev)
-{
- return 0;
-}
-
-static inline int extcon_set_state(struct extcon_dev *edev, u32 state)
-{
- return 0;
-}
-
-static inline int extcon_update_state(struct extcon_dev *edev, u32 mask,
- u32 state)
-{
- return 0;
-}
-
static inline int extcon_get_cable_state_(struct extcon_dev *edev,
unsigned int id)
{