linux/drivers/extcon
Chanwoo Choi 046050f6e6 extcon: Update the prototype of extcon_register_notifier() with enum extcon
Previously, extcon consumer driver used the extcon_register_interest()
to register the notifier chain and then to receive the notifier event
when external connector's state is changed. When registering the notifier chain
for specific external connector with extcon_register_interest(), it used the
the string name of external connector directly. There are potential problem
because of unclear, non-standard and inconsequent cable name. Namely,
it is not appropriate method to identify each external connector.

So, this patch modify the prototype of extcon_register_notifier() by using
the 'enum extcon' which are the unique id for each external connector
instead of unclear string method.

- Previously, the extcon consumer driver used the extcon_register_interest()
with 'cable_name' to point out the specific external connector. Also. it used
the un-needed structure (struct extcon_specific_cable_nb).
: int extcon_register_interest(struct extcon_specific_cable_nb *obj,
			     const char *extcon_name, const char *cable_name,
			     struct notifier_block *nb)

- Newly, the updated extcon_register_notifier() would definitely support
the same feature to detech the changed state of external connector without
any specific structure (struct extcon_specific_cable_nb).
: int extcon_register_notifier(struct extcon_dev *edev, enum extcon id,
			     struct notifier_block *nb)

This patch support the both extcon_register_interest() and new extcon_register_
notifier(). But the extcon_{register|unregister}_interest() will be deprecated
because extcon core would support the notifier event for extcon consumer driver
with only updated extcon_register_notifier() and 'extcon_specific_cable_nb'
will be removed if there are no extcon consumer driver with legacy
extcon_{register|unregister}_interest().

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
2015-05-22 18:58:55 +09:00
..
extcon-adc-jack.c extcon: Remove the optional name of extcon device 2015-05-19 16:39:06 +09:00
extcon-arizona.c extcon: Use the unique id for external connector instead of string 2015-05-22 18:58:44 +09:00
extcon-axp288.c extcon: Use the unique id for external connector instead of string 2015-05-22 18:58:44 +09:00
extcon-gpio.c extcon: Remove the optional name of extcon device 2015-05-19 16:39:06 +09:00
extcon-max8997.c extcon: Use the unique id for external connector instead of string 2015-05-22 18:58:44 +09:00
extcon-max14577.c extcon: Use the unique id for external connector instead of string 2015-05-22 18:58:44 +09:00
extcon-max77693.c extcon: Use the unique id for external connector instead of string 2015-05-22 18:58:44 +09:00
extcon-max77843.c extcon: Use the unique id for external connector instead of string 2015-05-22 18:58:44 +09:00
extcon-palmas.c extcon: Use the unique id for external connector instead of string 2015-05-22 18:58:44 +09:00
extcon-rt8973a.c extcon: Use the unique id for external connector instead of string 2015-05-22 18:58:44 +09:00
extcon-rt8973a.h extcon: rt8973a: Add Richtek RT8973A extcon driver 2014-09-22 11:43:08 +09:00
extcon-sm5502.c extcon: Use the unique id for external connector instead of string 2015-05-22 18:58:44 +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: Use the unique id for external connector instead of string 2015-05-22 18:58:44 +09:00
extcon.c extcon: Update the prototype of extcon_register_notifier() with enum extcon 2015-05-22 18:58:55 +09:00
Kconfig extcon: Allow compile test of GPIO consumers if !GPIOLIB 2015-05-19 16:39:06 +09:00
Makefile extcon: axp288: Add axp288 extcon driver support 2015-05-19 16:39:04 +09:00