lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 12 Jul 2012 15:03:16 +0900
From:	Chanwoo Choi <cw00.choi@...sung.com>
To:	anton.vorontsov@...aro.org
Cc:	cbouatmailru@...il.com, jenny.tc@...el.com,
	ramakrishna.pallala@...el.com, myungjoo.ham@...sung.com,
	kyungmin.park@...sung.com, linux-kernel@...r.kernel.org,
	Chanwoo Choi <cw00.choi@...sung.com>
Subject: [PATCH 0/2] charger-manager: Use EXTCON Subsystem to control charger
 cable

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ