UPSTREAM: extcon: Block the bit masking operation for cable state except for extcon...
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 30 Jun 2016 17:41:18 +0000 (02:41 +0900)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 3 Aug 2016 02:07:01 +0000 (10:07 +0800)
commit894795dd1bffe6522d120d226b632ae8bcc21c94
treea1e128fce38ec0dfa1a1dcda3831e19644b187f8
parenteafd797094e6373190589e8f7b6fbb88a75542f7
UPSTREAM: 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.

Change-Id: I436b8d4f9485bb318e7d77db8902f85e2bc15778
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
(cherry picked from commit c2692f2dad4f3228579bb0b2cf2d6d9bf283f31a)
drivers/extcon/extcon.c
include/linux/extcon.h