linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] charger-manager: Use EXTCON Subsystem to control charger cable
@ 2012-07-12  6:03 Chanwoo Choi
  2012-07-14  1:37 ` Anton Vorontsov
  0 siblings, 1 reply; 3+ messages in thread
From: Chanwoo Choi @ 2012-07-12  6:03 UTC (permalink / raw)
  To: anton.vorontsov
  Cc: cbouatmailru, jenny.tc, ramakrishna.pallala, myungjoo.ham,
	kyungmin.park, linux-kernel, Chanwoo Choi

This patchset add support EXTCON Subsystem in which charger-manager identify
the type of external connector and enable/disable charger(regulator) according
to the state of charger cable(external connector).

First patch control charger(regulator) of charger-manager when external
connector is attached or detached. If USB/TA cable is attached and thenE XTCON
subsystem notify the state of external connector to notifee(charger-manager)
which is registered in notifier chain of EXTCON, charger-manager enable charger
(regulator) for charging according to 'struct charger_cable'.

Second patch protect host device from over current. The charger-manager
set proper current limit of charger(regulator) for charging according to
type of charger cable when external connector is attached.

For example, if TA cable(external connector) is attached, charger-manager
enable charger('vinchg1' regulator) and set limit current within 65000~675000uA.

static struct charger_cable charger_cable_vinchg1[] = {
	{
		.extcon_name	= "max8997-muic",
		.name		= "USB",
		.min_uA		= 475000,
		.max_uA		= 475000 + 25000,
	}, {
		.extcon_name	= "max8997-muic",
		.name		= "TA",
		.min_uA		= 650000,
		.max_uA		= 650000 + 25000,
	},
};

static strcut charger_regulator nuri_regulators[] = {
	{
		.regulator_name	= "vinchg1",
		.cables		= charger_cable_vinchg1,
		.num_cables	= ARRAY_SIZE(charger_cable_vinchg1),
	},
};

static struct charger_desc nuri_charger_desc = {
	// ......

	.charger_regulators	= nuri_regulators,
	.num_charger_regulators	= ARRAY_SIZE(nuri_regulators),
};

Chanwoo Choi (2):
  charger-manager: Use EXTCON Subsystem to detect charger cables for
    charging
  charger-manager: Set current limit of regulator for over current
    protection

 drivers/power/charger-manager.c       |  152 +++++++++++++++++++++++++++++----
 include/linux/power/charger-manager.h |   67 ++++++++++++++-
 2 files changed, 202 insertions(+), 17 deletions(-)


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

end of thread, other threads:[~2012-07-16  0:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-12  6:03 [PATCH 0/2] charger-manager: Use EXTCON Subsystem to control charger cable Chanwoo Choi
2012-07-14  1:37 ` Anton Vorontsov
2012-07-16  0:41   ` Chanwoo Choi

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