linux/drivers/extcon
Chanwoo Choi ab11af049f extcon: Add the synchronization extcon APIs to support the notification
This patch adds the synchronization extcon APIs to support the notifications
for both state and property. When extcon_*_sync() functions is called,
the extcon informs the information from extcon provider to extcon client.

The extcon driver may need to change the both state and multiple properties
at the same time. After setting the data of a external connector,
the extcon send the notification to client driver with the extcon_*_sync().

The list of new extcon APIs as following:
- extcon_sync() : Send the notification for each external connector to
		synchronize the information between extcon provider driver
		and extcon client driver.
- extcon_set_state_sync() : Set the state of external connector with noti.
- extcon_set_property_sync() : Set the property of external connector with noti.

For example,
case 1, change the state of external connector and synchronized the data.
	extcon_set_state_sync(edev, EXTCON_USB, 1);

case 2, change both the state and property of external connector
	and synchronized the data.
	extcon_set_state(edev, EXTCON_USB, 1);
	extcon_set_property(edev, EXTCON_USB, EXTCON_PROP_USB_VBUS 1);
	extcon_sync(edev, EXTCON_USB);

case 3, change the property of external connector and synchronized the data.
	extcon_set_property(edev, EXTCON_USB, EXTCON_PROP_USB_VBUS, 0);
	extcon_sync(edev, EXTCON_USB);

case 4, change the property of external connector and synchronized the data.
	extcon_set_property_sync(edev, EXTCON_USB, EXTCON_PROP_USB_VBUS, 0);

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>
2016-08-08 11:17:22 +09:00
..
devres.c extcon: Add resource-managed functions to register extcon notifier 2016-06-27 21:03:23 +09:00
extcon-adc-jack.c extcon: adc-jack: Remove the usage of extcon_set_state() 2016-08-08 10:58:35 +09:00
extcon-arizona.c extcon: arizona: Remove the usage of extcon_update_state() 2016-08-08 10:58:35 +09:00
extcon-axp288.c extcon: Modify the id and name of external connector 2015-10-16 08:30:09 +09:00
extcon-gpio.c extcon: gpio: Remove the usage of extcon_set_state() 2016-08-08 10:58:36 +09:00
extcon-max3355.c extcon: add Maxim MAX3355 driver 2015-12-21 11:44:00 +09:00
extcon-max8997.c extcon: Add the EXTCON_CHG_USB_SDP to support SDP charing port 2016-01-25 13:16:53 +09:00
extcon-max14577.c extcon: Add the EXTCON_CHG_USB_SDP to support SDP charing port 2016-01-25 13:16:53 +09:00
extcon-max77693.c extcon: Add the EXTCON_CHG_USB_SDP to support SDP charing port 2016-01-25 13:16:53 +09:00
extcon-max77843.c extcon: max77843: Use correct size for reading the interrupt register 2016-02-05 11:37:26 +09:00
extcon-palmas.c extcon: palmas: Fix boot up state of VBUS when using GPIO detection 2016-06-15 17:17:22 +09:00
extcon-rt8973a.c extcon: Add the EXTCON_CHG_USB_SDP to support SDP charing port 2016-01-25 13:16:53 +09:00
extcon-rt8973a.h extcon: rt8973a: Add Richtek RT8973A extcon driver 2014-09-22 11:43:08 +09:00
extcon-sm5502.c extcon: Add the EXTCON_CHG_USB_SDP to support SDP charing port 2016-01-25 13:16:53 +09:00
extcon-sm5502.h extcon: sm5502: Move sm5502.h header file to extcon directory 2014-09-22 11:43:08 +09:00
extcon-usb-gpio.c extcon: usb-gpio: add support for ACPI gpio interface 2016-06-21 14:09:53 +09:00
extcon.c extcon: Add the synchronization extcon APIs to support the notification 2016-08-08 11:17:22 +09:00
Kconfig extcon: add Maxim MAX3355 driver 2015-12-21 11:44:00 +09:00
Makefile extcon: link devres into core module 2016-06-30 22:18:40 +09:00