linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: linux-kernel@vger.kernel.org
Cc: myungjoo.ham@samsung.com, cw00.choi@samsung.com,
	k.kozlowski@samsung.com, ckeepax@opensource.wolfsonmicro.com,
	gg@slimlogic.co.uk, kishon@ti.com, jaewon02.kim@samsung.com,
	rogerq@ti.com, ramakrishna.pallala@intel.com,
	george.cherian@ti.com, balbi@ti.com, aaro.koskinen@iki.fi
Subject: [PATCH 0/2] extcon: Use the unique id for each cable and update the extcon notifier
Date: Fri, 15 May 2015 23:31:16 +0900	[thread overview]
Message-ID: <1431700278-30465-1-git-send-email-cw00.choi@samsung.com> (raw)

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,	/* NONE */

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

	/* Charger external connector */
	EXTCON_TA		= 0x10,	/* TA */
	EXTCON_FAST_CHARGER	= 0x11,	/* FAST-CHARGER */
	EXTCON_SLOW_CHARGER	= 0x12,	/* SLOW-CHARGER */
	EXTCON_CHARGE_DOWNSTREAM= 0x13,	/* CHARGE-DOWNSTREAM */

	.....
};

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().

Chanwoo Choi (2):
  extcon: Use the unique id for external connector instead of string
  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                | 257 +++++++++++++++++++--------------
 include/linux/extcon.h                 | 109 +++++++-------
 include/linux/extcon/extcon-adc-jack.h |   5 +-
 13 files changed, 382 insertions(+), 432 deletions(-)

-- 
1.8.5.5


             reply	other threads:[~2015-05-15 14:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 14:31 Chanwoo Choi [this message]
2015-05-15 14:31 ` [PATCH 1/2] extcon: Use the unique id for external connector instead of string Chanwoo Choi
2015-05-15 14:49   ` Roger Quadros
2015-05-15 15:16   ` Charles Keepax
2015-05-15 15:57   ` Pallala, Ramakrishna
2015-05-17  7:10   ` Krzysztof Kozlowski
2015-05-17  7:53     ` Chanwoo Choi
2015-05-17  9:09       ` Krzysztof Kozlowski
2015-05-19 12:28       ` Chanwoo Choi
2015-05-20  3:24         ` Krzysztof Kozlowski
2015-05-20  3:48           ` Chanwoo Choi
2015-05-15 14:31 ` [PATCH 2/2] extcon: Update the prototype of extcon_register_notifier() with enum extcon Chanwoo Choi
2015-05-17  7:41   ` Krzysztof Kozlowski
2015-05-17  7:58     ` Chanwoo Choi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431700278-30465-1-git-send-email-cw00.choi@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=balbi@ti.com \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=george.cherian@ti.com \
    --cc=gg@slimlogic.co.uk \
    --cc=jaewon02.kim@samsung.com \
    --cc=k.kozlowski@samsung.com \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=ramakrishna.pallala@intel.com \
    --cc=rogerq@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).