All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] extcon: Use the unique id for each cable and update the extcon notifier
@ 2015-05-20  4:41 Chanwoo Choi
  2015-05-20  4:41 ` [PATCH v3 1/3] extcon: Use the unique id for external connector instead of string Chanwoo Choi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chanwoo Choi @ 2015-05-20  4:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: myungjoo.ham, cw00.choi, k.kozlowski, ckeepax, gg, kishon,
	jaewon02.kim, rogerq, ramakrishna.pallala, balbi, aaro.koskinen

This patch-set update the extcon core to resolve the ambiguous identification
method for each external connectors. So, first patch define the unique id
for each external connector to identify them by using common unique id on
various extcon device driver as following:

enum extcon {
	EXTCON_NONE		= 0x0,

	/* USB external connector */
	EXTCON_USB		= 0x1,
	EXTCON_USB_HOST		= 0x2,

	/* Charger external connector */
	EXTCON_TA		= 0x10,
	EXTCON_FAST_CHARGER	= 0x11,
	EXTCON_SLOW_CHARGER	= 0x12,
	EXTCON_CHARGE_DOWNSTREAM= 0x13,

	.....
};

And the second patch simplify the prototype of extcon notifier's register
and unregister function with the unique id. All extcon driver have to use
the unique id (enum extcon definition) when registering the notifier and
getting/setting the state of cable state.
: int extcon_{register|unregister}_notifier(struct extcon_dev *edev,
				enum extcon id, struct notifier_block *nb)

In result, the extcon_{register|unregister}_interest() will be deprecated
by using the simply extcon_{register|unregister}_notifier().

Changes from v2:
- Update the description of following functions using the EXTCON_NONE to show
the end of array instead of NULL.
: extcon_dev_allocate() / devm_extcon_dev_allocate()

Changes from v1:
- Make separate patch about using the capital letter for the name of external connectors
- Make internal find_cable_index_by_{id|name}() to remove the duplicate code
- Code clean minor issue

Chanwoo Choi (3):
  extcon: Use the unique id for external connector instead of string
  extcon: Use capital letter for the name of external connectors
  extcon: Update the prototype of extcon_register_notifier() with enum extcon

 drivers/extcon/extcon-arizona.c        |  38 ++---
 drivers/extcon/extcon-axp288.c         |  24 ++-
 drivers/extcon/extcon-max14577.c       |  45 ++----
 drivers/extcon/extcon-max77693.c       |  95 +++++------
 drivers/extcon/extcon-max77843.c       |  56 +++----
 drivers/extcon/extcon-max8997.c        |  59 +++----
 drivers/extcon/extcon-palmas.c         |  22 +--
 drivers/extcon/extcon-rt8973a.c        |  40 ++---
 drivers/extcon/extcon-sm5502.c         |  32 ++--
 drivers/extcon/extcon-usb-gpio.c       |  32 +---
 drivers/extcon/extcon.c                | 277 ++++++++++++++++++---------------
 include/linux/extcon.h                 | 128 +++++++--------
 include/linux/extcon/extcon-adc-jack.h |   5 +-
 13 files changed, 387 insertions(+), 466 deletions(-)

-- 
1.8.5.5


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-05-20  6:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-20  4:41 [PATCH v3 0/3] extcon: Use the unique id for each cable and update the extcon notifier Chanwoo Choi
2015-05-20  4:41 ` [PATCH v3 1/3] extcon: Use the unique id for external connector instead of string Chanwoo Choi
2015-05-20  6:01   ` Krzysztof Kozlowski
2015-05-20  4:41 ` [PATCH v3 2/3] extcon: Use capital letter for the name of external connectors Chanwoo Choi
2015-05-20  4:41 ` [PATCH v3 3/3] extcon: Update the prototype of extcon_register_notifier() with enum extcon Chanwoo Choi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.