All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC V2 0/4] Add "scope" to power supplies
@ 2011-12-09 22:43 Jeremy Fitzhardinge
  2011-12-09 22:43 ` [PATCH RFC V2 1/4] power_supply: add SCOPE attribute " Jeremy Fitzhardinge
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Jeremy Fitzhardinge @ 2011-12-09 22:43 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: David Woodhouse, Linux Kernel Mailing List, Richard Hughes,
	Daniel Nicoletti, linux-input, Jiri Kosina, Jeremy Fitzhardinge

This series adds a "scope" attribute to power supplies, to indicate
whether it powers the whole system ("System") or just some subset of
the devices ("Device").  This allows upowerd to distinguish between
system-wide power supplies and self-powered devices such as cordless
mice.

This series also adds a "powers" link to power supplies, so that if
they're scope=Device, they can specifically indicate which device
tree they power.

Updates since last post:
 - Add more complete documentation to scope and "powers" links
 - Remove unnecessary scopes on System power supplies
 - Make HID battery supplies Device, and add "powers" pointers
   for them.

This can also be pulled from:
	git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git power-supply-scope

Jeremy Fitzhardinge (4):
  power_supply: add SCOPE attribute to power supplies
  power_supply: allow a power supply to explicitly point to powered
    device
  power_supply: add scope properties to some self-powered HID devices
  power_supply: add "powers" links to self-powered HID devices

 drivers/hid/hid-wacom.c            |   16 ++++++++++++++--
 drivers/hid/hid-wiimote.c          |   10 +++++++++-
 drivers/power/power_supply_core.c  |    7 +++++++
 drivers/power/power_supply_sysfs.c |    6 ++++++
 include/linux/power_supply.h       |    8 ++++++++
 5 files changed, 44 insertions(+), 3 deletions(-)

-- 
1.7.7.3


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

* [PATCH RFC V2 1/4] power_supply: add SCOPE attribute to power supplies
  2011-12-09 22:43 [PATCH RFC V2 0/4] Add "scope" to power supplies Jeremy Fitzhardinge
@ 2011-12-09 22:43 ` Jeremy Fitzhardinge
  2011-12-09 22:43 ` [PATCH RFC V2 2/4] power_supply: allow a power supply to explicitly point to powered device Jeremy Fitzhardinge
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Jeremy Fitzhardinge @ 2011-12-09 22:43 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: David Woodhouse, Linux Kernel Mailing List, Richard Hughes,
	Daniel Nicoletti, linux-input, Jiri Kosina, Jeremy Fitzhardinge,
	Richard Hughes

This adds a "scope" attribute to a power_supply, which indicates how
much of the system it powers.  It appears in sysfs as "scope" or in
the uevent file as POWER_SUPPLY_SCOPE=.  There are presently three
possible values:
	Unknown - unknown power topology
	System - the power supply powers the whole system
	Device - it powers a specific device, or tree of devices

A power supply which doesn't have a "scope" attribute should be assumed to
have "System" scope.

In general, usermode should assume that loss of all System-scoped power
supplies will power off the whole system, but any single one is sufficient
to power the system.

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Richard Hughes <richard@hughsie.com>
---
 drivers/power/power_supply_sysfs.c |    6 ++++++
 include/linux/power_supply.h       |    7 +++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
index e15d4c9..21178eb 100644
--- a/drivers/power/power_supply_sysfs.c
+++ b/drivers/power/power_supply_sysfs.c
@@ -63,6 +63,9 @@ static ssize_t power_supply_show_property(struct device *dev,
 	static char *capacity_level_text[] = {
 		"Unknown", "Critical", "Low", "Normal", "High", "Full"
 	};
+	static char *scope_text[] = {
+		"Unknown", "System", "Device"
+	};
 	ssize_t ret = 0;
 	struct power_supply *psy = dev_get_drvdata(dev);
 	const ptrdiff_t off = attr - power_supply_attrs;
@@ -95,6 +98,8 @@ static ssize_t power_supply_show_property(struct device *dev,
 		return sprintf(buf, "%s\n", capacity_level_text[value.intval]);
 	else if (off == POWER_SUPPLY_PROP_TYPE)
 		return sprintf(buf, "%s\n", type_text[value.intval]);
+	else if (off == POWER_SUPPLY_PROP_SCOPE)
+		return sprintf(buf, "%s\n", scope_text[value.intval]);
 	else if (off >= POWER_SUPPLY_PROP_MODEL_NAME)
 		return sprintf(buf, "%s\n", value.strval);
 
@@ -167,6 +172,7 @@ static struct device_attribute power_supply_attrs[] = {
 	POWER_SUPPLY_ATTR(time_to_full_now),
 	POWER_SUPPLY_ATTR(time_to_full_avg),
 	POWER_SUPPLY_ATTR(type),
+	POWER_SUPPLY_ATTR(scope),
 	/* Properties of type `const char *' */
 	POWER_SUPPLY_ATTR(model_name),
 	POWER_SUPPLY_ATTR(manufacturer),
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 204c18d..040a7b0 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -74,6 +74,12 @@ enum {
 	POWER_SUPPLY_CAPACITY_LEVEL_FULL,
 };
 
+enum {
+	POWER_SUPPLY_SCOPE_UNKNOWN = 0,
+	POWER_SUPPLY_SCOPE_SYSTEM,
+	POWER_SUPPLY_SCOPE_DEVICE,
+};
+
 enum power_supply_property {
 	/* Properties of type `int' */
 	POWER_SUPPLY_PROP_STATUS = 0,
@@ -116,6 +122,7 @@ enum power_supply_property {
 	POWER_SUPPLY_PROP_TIME_TO_FULL_NOW,
 	POWER_SUPPLY_PROP_TIME_TO_FULL_AVG,
 	POWER_SUPPLY_PROP_TYPE, /* use power_supply.type instead */
+	POWER_SUPPLY_PROP_SCOPE,
 	/* Properties of type `const char *' */
 	POWER_SUPPLY_PROP_MODEL_NAME,
 	POWER_SUPPLY_PROP_MANUFACTURER,
-- 
1.7.7.3


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

* [PATCH RFC V2 2/4] power_supply: allow a power supply to explicitly point to powered device
  2011-12-09 22:43 [PATCH RFC V2 0/4] Add "scope" to power supplies Jeremy Fitzhardinge
  2011-12-09 22:43 ` [PATCH RFC V2 1/4] power_supply: add SCOPE attribute " Jeremy Fitzhardinge
@ 2011-12-09 22:43 ` Jeremy Fitzhardinge
  2011-12-09 22:43 ` [PATCH RFC V2 3/4] power_supply: add scope properties to some self-powered HID devices Jeremy Fitzhardinge
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Jeremy Fitzhardinge @ 2011-12-09 22:43 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: David Woodhouse, Linux Kernel Mailing List, Richard Hughes,
	Daniel Nicoletti, linux-input, Jiri Kosina, Jeremy Fitzhardinge,
	Richard Hughes

If a power supply has a scope of "Device", then allow the power supply
to indicate what device it actually powers. This is represented in the
power supply's sysfs directory as a symlink named "powers", which points to
the sysfs directory of the powered device.

If the device has children, then the sub-devices are also powered by
the same power supply.

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Richard Hughes <richard@hughsie.com>
---
 drivers/power/power_supply_core.c |    7 +++++++
 include/linux/power_supply.h      |    1 +
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
index 329b46b..b10c121 100644
--- a/drivers/power/power_supply_core.c
+++ b/drivers/power/power_supply_core.c
@@ -147,6 +147,12 @@ struct power_supply *power_supply_get_by_name(char *name)
 }
 EXPORT_SYMBOL_GPL(power_supply_get_by_name);
 
+int power_supply_powers(struct power_supply *psy, struct device *dev)
+{
+	return sysfs_create_link_nowarn(&psy->dev->kobj, &dev->kobj, "powers");
+}
+EXPORT_SYMBOL_GPL(power_supply_powers);
+
 static void power_supply_dev_release(struct device *dev)
 {
 	pr_debug("device: '%s': %s\n", dev_name(dev), __func__);
@@ -202,6 +208,7 @@ EXPORT_SYMBOL_GPL(power_supply_register);
 void power_supply_unregister(struct power_supply *psy)
 {
 	cancel_work_sync(&psy->changed_work);
+	sysfs_remove_link(&psy->dev->kobj, "powers");
 	power_supply_remove_triggers(psy);
 	device_unregister(psy->dev);
 }
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 040a7b0..2e3c827 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -218,6 +218,7 @@ static inline int power_supply_is_system_supplied(void) { return -ENOSYS; }
 extern int power_supply_register(struct device *parent,
 				 struct power_supply *psy);
 extern void power_supply_unregister(struct power_supply *psy);
+extern int power_supply_powers(struct power_supply *psy, struct device *dev);
 
 /* For APM emulation, think legacy userspace. */
 extern struct class *power_supply_class;
-- 
1.7.7.3


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

* [PATCH RFC V2 3/4] power_supply: add scope properties to some self-powered HID devices
  2011-12-09 22:43 [PATCH RFC V2 0/4] Add "scope" to power supplies Jeremy Fitzhardinge
  2011-12-09 22:43 ` [PATCH RFC V2 1/4] power_supply: add SCOPE attribute " Jeremy Fitzhardinge
  2011-12-09 22:43 ` [PATCH RFC V2 2/4] power_supply: allow a power supply to explicitly point to powered device Jeremy Fitzhardinge
@ 2011-12-09 22:43 ` Jeremy Fitzhardinge
  2011-12-09 22:43 ` [PATCH RFC V2 4/4] power_supply: add "powers" links to " Jeremy Fitzhardinge
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Jeremy Fitzhardinge @ 2011-12-09 22:43 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: David Woodhouse, Linux Kernel Mailing List, Richard Hughes,
	Daniel Nicoletti, linux-input, Jiri Kosina, Jeremy Fitzhardinge

The Wacom and Wiimote HID drivers register power supplies for themselves
to indicate their battery levels.  Make those power supplies device scope.

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Jiri Kosina <jkosina@suse.cz>
---
 drivers/hid/hid-wacom.c   |   12 ++++++++++--
 drivers/hid/hid-wiimote.c |    8 +++++++-
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
index 17bb88f..ad39777 100644
--- a/drivers/hid/hid-wacom.c
+++ b/drivers/hid/hid-wacom.c
@@ -47,12 +47,14 @@ static unsigned short batcap[8] = { 1, 15, 25, 35, 50, 70, 100, 0 };
 
 static enum power_supply_property wacom_battery_props[] = {
 	POWER_SUPPLY_PROP_PRESENT,
-	POWER_SUPPLY_PROP_CAPACITY
+	POWER_SUPPLY_PROP_CAPACITY,
+	POWER_SUPPLY_PROP_SCOPE,
 };
 
 static enum power_supply_property wacom_ac_props[] = {
 	POWER_SUPPLY_PROP_PRESENT,
-	POWER_SUPPLY_PROP_ONLINE
+	POWER_SUPPLY_PROP_ONLINE,
+	POWER_SUPPLY_PROP_SCOPE,
 };
 
 static int wacom_battery_get_property(struct power_supply *psy,
@@ -68,6 +70,9 @@ static int wacom_battery_get_property(struct power_supply *psy,
 	case POWER_SUPPLY_PROP_PRESENT:
 		val->intval = 1;
 		break;
+	case POWER_SUPPLY_PROP_SCOPE:
+		val->intval = POWER_SUPPLY_SCOPE_DEVICE;
+		break;
 	case POWER_SUPPLY_PROP_CAPACITY:
 		/* show 100% battery capacity when charging */
 		if (power_state == 0)
@@ -99,6 +104,9 @@ static int wacom_ac_get_property(struct power_supply *psy,
 		else
 			val->intval = 0;
 		break;
+	case POWER_SUPPLY_PROP_SCOPE:
+		val->intval = POWER_SUPPLY_SCOPE_DEVICE;
+		break;
 	default:
 		ret = -EINVAL;
 		break;
diff --git a/drivers/hid/hid-wiimote.c b/drivers/hid/hid-wiimote.c
index 76739c0..98e4828 100644
--- a/drivers/hid/hid-wiimote.c
+++ b/drivers/hid/hid-wiimote.c
@@ -136,7 +136,8 @@ static __u16 wiiproto_keymap[] = {
 };
 
 static enum power_supply_property wiimote_battery_props[] = {
-	POWER_SUPPLY_PROP_CAPACITY
+	POWER_SUPPLY_PROP_CAPACITY,
+	POWER_SUPPLY_PROP_SCOPE,
 };
 
 /* requires the state.lock spinlock to be held */
@@ -468,6 +469,11 @@ static int wiimote_battery_get_property(struct power_supply *psy,
 	int ret = 0, state;
 	unsigned long flags;
 
+	if (psp == POWER_SUPPLY_PROP_SCOPE) {
+		val->intval = POWER_SUPPLY_SCOPE_DEVICE;
+		return 0;
+	}
+
 	ret = wiimote_cmd_acquire(wdata);
 	if (ret)
 		return ret;
-- 
1.7.7.3


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

* [PATCH RFC V2 4/4] power_supply: add "powers" links to self-powered HID devices
  2011-12-09 22:43 [PATCH RFC V2 0/4] Add "scope" to power supplies Jeremy Fitzhardinge
                   ` (2 preceding siblings ...)
  2011-12-09 22:43 ` [PATCH RFC V2 3/4] power_supply: add scope properties to some self-powered HID devices Jeremy Fitzhardinge
@ 2011-12-09 22:43 ` Jeremy Fitzhardinge
  2011-12-12  8:42 ` [PATCH RFC V2 0/4] Add "scope" to power supplies Jiri Kosina
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Jeremy Fitzhardinge @ 2011-12-09 22:43 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: David Woodhouse, Linux Kernel Mailing List, Richard Hughes,
	Daniel Nicoletti, linux-input, Jiri Kosina, Jeremy Fitzhardinge

Make the relationship between the Wiimote and Wacom self-powered HID
devices and their power supply explicit by adding a "powers" link.

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Jiri Kosina <jkosina@suse.cz>
---
 drivers/hid/hid-wacom.c   |    4 ++++
 drivers/hid/hid-wiimote.c |    2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
index ad39777..3d28e49 100644
--- a/drivers/hid/hid-wacom.c
+++ b/drivers/hid/hid-wacom.c
@@ -397,6 +397,8 @@ static int wacom_probe(struct hid_device *hdev,
 	wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY;
 	wdata->battery.use_for_apm = 0;
 
+	power_supply_powers(&wdata->battery, &hdev->dev);
+
 	ret = power_supply_register(&hdev->dev, &wdata->battery);
 	if (ret) {
 		hid_warn(hdev, "can't create sysfs battery attribute, err: %d\n",
@@ -411,6 +413,8 @@ static int wacom_probe(struct hid_device *hdev,
 	wdata->ac.type = POWER_SUPPLY_TYPE_MAINS;
 	wdata->ac.use_for_apm = 0;
 
+	power_supply_powers(&wdata->battery, &hdev->dev);
+
 	ret = power_supply_register(&hdev->dev, &wdata->ac);
 	if (ret) {
 		hid_warn(hdev,
diff --git a/drivers/hid/hid-wiimote.c b/drivers/hid/hid-wiimote.c
index 98e4828..fc0b4db 100644
--- a/drivers/hid/hid-wiimote.c
+++ b/drivers/hid/hid-wiimote.c
@@ -1263,6 +1263,8 @@ static int wiimote_hid_probe(struct hid_device *hdev,
 	wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY;
 	wdata->battery.use_for_apm = 0;
 
+	power_supply_powers(&wdata->battery, &hdev->dev);
+
 	ret = power_supply_register(&wdata->hdev->dev, &wdata->battery);
 	if (ret) {
 		hid_err(hdev, "Cannot register battery device\n");
-- 
1.7.7.3


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

* Re: [PATCH RFC V2 0/4] Add "scope" to power supplies
  2011-12-09 22:43 [PATCH RFC V2 0/4] Add "scope" to power supplies Jeremy Fitzhardinge
                   ` (3 preceding siblings ...)
  2011-12-09 22:43 ` [PATCH RFC V2 4/4] power_supply: add "powers" links to " Jeremy Fitzhardinge
@ 2011-12-12  8:42 ` Jiri Kosina
  2011-12-19  6:26 ` Jeremy Fitzhardinge
  2012-01-04  5:11 ` Anton Vorontsov
  6 siblings, 0 replies; 13+ messages in thread
From: Jiri Kosina @ 2011-12-12  8:42 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Anton Vorontsov, David Woodhouse, Linux Kernel Mailing List,
	Richard Hughes, Daniel Nicoletti, linux-input

On Fri, 9 Dec 2011, Jeremy Fitzhardinge wrote:

> This series adds a "scope" attribute to power supplies, to indicate
> whether it powers the whole system ("System") or just some subset of
> the devices ("Device").  This allows upowerd to distinguish between
> system-wide power supplies and self-powered devices such as cordless
> mice.
> 
> This series also adds a "powers" link to power supplies, so that if
> they're scope=Device, they can specifically indicate which device
> tree they power.
> 
> Updates since last post:
>  - Add more complete documentation to scope and "powers" links
>  - Remove unnecessary scopes on System power supplies
>  - Make HID battery supplies Device, and add "powers" pointers
>    for them.
> 
> This can also be pulled from:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git power-supply-scope
> 
> Jeremy Fitzhardinge (4):
>   power_supply: add SCOPE attribute to power supplies
>   power_supply: allow a power supply to explicitly point to powered
>     device
>   power_supply: add scope properties to some self-powered HID devices
>   power_supply: add "powers" links to self-powered HID devices
> 
>  drivers/hid/hid-wacom.c            |   16 ++++++++++++++--
>  drivers/hid/hid-wiimote.c          |   10 +++++++++-
>  drivers/power/power_supply_core.c  |    7 +++++++
>  drivers/power/power_supply_sysfs.c |    6 ++++++
>  include/linux/power_supply.h       |    8 ++++++++
>  5 files changed, 44 insertions(+), 3 deletions(-)

Anton, in case you are going to take this patchset, I think it makes sense 
to take it through your tree. In that case, please add

	Signed-off-by: Jiri Kosina <jkosina@suse.cz>

to the two patches touching drivers/hid/. Thanks,

-- 
Jiri Kosina
SUSE Labs

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

* Re: [PATCH RFC V2 0/4] Add "scope" to power supplies
  2011-12-09 22:43 [PATCH RFC V2 0/4] Add "scope" to power supplies Jeremy Fitzhardinge
                   ` (4 preceding siblings ...)
  2011-12-12  8:42 ` [PATCH RFC V2 0/4] Add "scope" to power supplies Jiri Kosina
@ 2011-12-19  6:26 ` Jeremy Fitzhardinge
  2011-12-19 10:25   ` Jiri Kosina
  2012-01-04  5:11 ` Anton Vorontsov
  6 siblings, 1 reply; 13+ messages in thread
From: Jeremy Fitzhardinge @ 2011-12-19  6:26 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: Jeremy Fitzhardinge, David Woodhouse, Linux Kernel Mailing List,
	Richard Hughes, Daniel Nicoletti, linux-input, Jiri Kosina

Ping?

On 12/09/2011 02:43 PM, Jeremy Fitzhardinge wrote:
> This series adds a "scope" attribute to power supplies, to indicate
> whether it powers the whole system ("System") or just some subset of
> the devices ("Device").  This allows upowerd to distinguish between
> system-wide power supplies and self-powered devices such as cordless
> mice.
>
> This series also adds a "powers" link to power supplies, so that if
> they're scope=Device, they can specifically indicate which device
> tree they power.
>
> Updates since last post:
>  - Add more complete documentation to scope and "powers" links
>  - Remove unnecessary scopes on System power supplies
>  - Make HID battery supplies Device, and add "powers" pointers
>    for them.
>
> This can also be pulled from:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git power-supply-scope
>
> Jeremy Fitzhardinge (4):
>   power_supply: add SCOPE attribute to power supplies
>   power_supply: allow a power supply to explicitly point to powered
>     device
>   power_supply: add scope properties to some self-powered HID devices
>   power_supply: add "powers" links to self-powered HID devices
>
>  drivers/hid/hid-wacom.c            |   16 ++++++++++++++--
>  drivers/hid/hid-wiimote.c          |   10 +++++++++-
>  drivers/power/power_supply_core.c  |    7 +++++++
>  drivers/power/power_supply_sysfs.c |    6 ++++++
>  include/linux/power_supply.h       |    8 ++++++++
>  5 files changed, 44 insertions(+), 3 deletions(-)
>


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

* Re: [PATCH RFC V2 0/4] Add "scope" to power supplies
  2011-12-19  6:26 ` Jeremy Fitzhardinge
@ 2011-12-19 10:25   ` Jiri Kosina
  2012-01-03 14:57     ` Jiri Kosina
  0 siblings, 1 reply; 13+ messages in thread
From: Jiri Kosina @ 2011-12-19 10:25 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Anton Vorontsov, David Woodhouse, Linux Kernel Mailing List,
	Richard Hughes, Daniel Nicoletti, linux-input

On Sun, 18 Dec 2011, Jeremy Fitzhardinge wrote:

> Ping?

Anton, if you are not going to take this patchset for whatever reason, but 
are fine with the changes, feel free to just provide Ack for the patches 
touching drivers/power, and I'll take them through hid tree.

Thanks.

> 
> On 12/09/2011 02:43 PM, Jeremy Fitzhardinge wrote:
> > This series adds a "scope" attribute to power supplies, to indicate
> > whether it powers the whole system ("System") or just some subset of
> > the devices ("Device").  This allows upowerd to distinguish between
> > system-wide power supplies and self-powered devices such as cordless
> > mice.
> >
> > This series also adds a "powers" link to power supplies, so that if
> > they're scope=Device, they can specifically indicate which device
> > tree they power.
> >
> > Updates since last post:
> >  - Add more complete documentation to scope and "powers" links
> >  - Remove unnecessary scopes on System power supplies
> >  - Make HID battery supplies Device, and add "powers" pointers
> >    for them.
> >
> > This can also be pulled from:
> > 	git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git power-supply-scope
> >
> > Jeremy Fitzhardinge (4):
> >   power_supply: add SCOPE attribute to power supplies
> >   power_supply: allow a power supply to explicitly point to powered
> >     device
> >   power_supply: add scope properties to some self-powered HID devices
> >   power_supply: add "powers" links to self-powered HID devices
> >
> >  drivers/hid/hid-wacom.c            |   16 ++++++++++++++--
> >  drivers/hid/hid-wiimote.c          |   10 +++++++++-
> >  drivers/power/power_supply_core.c  |    7 +++++++
> >  drivers/power/power_supply_sysfs.c |    6 ++++++
> >  include/linux/power_supply.h       |    8 ++++++++
> >  5 files changed, 44 insertions(+), 3 deletions(-)
> >
> 

-- 
Jiri Kosina
SUSE Labs

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

* Re: [PATCH RFC V2 0/4] Add "scope" to power supplies
  2011-12-19 10:25   ` Jiri Kosina
@ 2012-01-03 14:57     ` Jiri Kosina
  0 siblings, 0 replies; 13+ messages in thread
From: Jiri Kosina @ 2012-01-03 14:57 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Anton Vorontsov, David Woodhouse, Linux Kernel Mailing List,
	Richard Hughes, Daniel Nicoletti, linux-input

On Mon, 19 Dec 2011, Jiri Kosina wrote:

> > Ping?
> 
> Anton, if you are not going to take this patchset for whatever reason, but 
> are fine with the changes, feel free to just provide Ack for the patches 
> touching drivers/power, and I'll take them through hid tree.

Anton, hello?

> > On 12/09/2011 02:43 PM, Jeremy Fitzhardinge wrote:
> > > This series adds a "scope" attribute to power supplies, to indicate
> > > whether it powers the whole system ("System") or just some subset of
> > > the devices ("Device").  This allows upowerd to distinguish between
> > > system-wide power supplies and self-powered devices such as cordless
> > > mice.
> > >
> > > This series also adds a "powers" link to power supplies, so that if
> > > they're scope=Device, they can specifically indicate which device
> > > tree they power.
> > >
> > > Updates since last post:
> > >  - Add more complete documentation to scope and "powers" links
> > >  - Remove unnecessary scopes on System power supplies
> > >  - Make HID battery supplies Device, and add "powers" pointers
> > >    for them.
> > >
> > > This can also be pulled from:
> > > 	git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git power-supply-scope
> > >
> > > Jeremy Fitzhardinge (4):
> > >   power_supply: add SCOPE attribute to power supplies
> > >   power_supply: allow a power supply to explicitly point to powered
> > >     device
> > >   power_supply: add scope properties to some self-powered HID devices
> > >   power_supply: add "powers" links to self-powered HID devices
> > >
> > >  drivers/hid/hid-wacom.c            |   16 ++++++++++++++--
> > >  drivers/hid/hid-wiimote.c          |   10 +++++++++-
> > >  drivers/power/power_supply_core.c  |    7 +++++++
> > >  drivers/power/power_supply_sysfs.c |    6 ++++++
> > >  include/linux/power_supply.h       |    8 ++++++++
> > >  5 files changed, 44 insertions(+), 3 deletions(-)
> > >

-- 
Jiri Kosina
SUSE Labs

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

* Re: [PATCH RFC V2 0/4] Add "scope" to power supplies
  2011-12-09 22:43 [PATCH RFC V2 0/4] Add "scope" to power supplies Jeremy Fitzhardinge
                   ` (5 preceding siblings ...)
  2011-12-19  6:26 ` Jeremy Fitzhardinge
@ 2012-01-04  5:11 ` Anton Vorontsov
  2012-01-04 12:48   ` Jiri Kosina
  2012-01-04 13:00   ` Jeremy Fitzhardinge
  6 siblings, 2 replies; 13+ messages in thread
From: Anton Vorontsov @ 2012-01-04  5:11 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: David Woodhouse, Linux Kernel Mailing List, Richard Hughes,
	Daniel Nicoletti, linux-input, Jiri Kosina

On Fri, Dec 09, 2011 at 02:43:15PM -0800, Jeremy Fitzhardinge wrote:
> This series adds a "scope" attribute to power supplies, to indicate
> whether it powers the whole system ("System") or just some subset of
> the devices ("Device").  This allows upowerd to distinguish between
> system-wide power supplies and self-powered devices such as cordless
> mice.
> 
> This series also adds a "powers" link to power supplies, so that if
> they're scope=Device, they can specifically indicate which device
> tree they power.
> 
> Updates since last post:
>  - Add more complete documentation to scope and "powers" links
>  - Remove unnecessary scopes on System power supplies
>  - Make HID battery supplies Device, and add "powers" pointers
>    for them.
> 
> This can also be pulled from:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git power-supply-scope
> 
> Jeremy Fitzhardinge (4):
>   power_supply: add SCOPE attribute to power supplies
>   power_supply: allow a power supply to explicitly point to powered
>     device
>   power_supply: add scope properties to some self-powered HID devices
>   power_supply: add "powers" links to self-powered HID devices
> 
>  drivers/hid/hid-wacom.c            |   16 ++++++++++++++--
>  drivers/hid/hid-wiimote.c          |   10 +++++++++-
>  drivers/power/power_supply_core.c  |    7 +++++++
>  drivers/power/power_supply_sysfs.c |    6 ++++++
>  include/linux/power_supply.h       |    8 ++++++++
>  5 files changed, 44 insertions(+), 3 deletions(-)

Pulled into battery-2.6.git, thank you!

-- 
Anton Vorontsov
Email: cbouatmailru@gmail.com

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

* Re: [PATCH RFC V2 0/4] Add "scope" to power supplies
  2012-01-04  5:11 ` Anton Vorontsov
@ 2012-01-04 12:48   ` Jiri Kosina
  2012-01-04 12:57     ` Anton Vorontsov
  2012-01-04 13:00   ` Jeremy Fitzhardinge
  1 sibling, 1 reply; 13+ messages in thread
From: Jiri Kosina @ 2012-01-04 12:48 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: Jeremy Fitzhardinge, David Woodhouse, Linux Kernel Mailing List,
	Richard Hughes, Daniel Nicoletti, linux-input

On Wed, 4 Jan 2012, Anton Vorontsov wrote:

> > This series adds a "scope" attribute to power supplies, to indicate
> > whether it powers the whole system ("System") or just some subset of
> > the devices ("Device").  This allows upowerd to distinguish between
> > system-wide power supplies and self-powered devices such as cordless
> > mice.
> > 
> > This series also adds a "powers" link to power supplies, so that if
> > they're scope=Device, they can specifically indicate which device
> > tree they power.
> > 
> > Updates since last post:
> >  - Add more complete documentation to scope and "powers" links
> >  - Remove unnecessary scopes on System power supplies
> >  - Make HID battery supplies Device, and add "powers" pointers
> >    for them.
> > 
> > This can also be pulled from:
> > 	git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git power-supply-scope
> > 
> > Jeremy Fitzhardinge (4):
> >   power_supply: add SCOPE attribute to power supplies
> >   power_supply: allow a power supply to explicitly point to powered
> >     device
> >   power_supply: add scope properties to some self-powered HID devices
> >   power_supply: add "powers" links to self-powered HID devices
> > 
> >  drivers/hid/hid-wacom.c            |   16 ++++++++++++++--
> >  drivers/hid/hid-wiimote.c          |   10 +++++++++-
> >  drivers/power/power_supply_core.c  |    7 +++++++
> >  drivers/power/power_supply_sysfs.c |    6 ++++++
> >  include/linux/power_supply.h       |    8 ++++++++
> >  5 files changed, 44 insertions(+), 3 deletions(-)
> 
> Pulled into battery-2.6.git, thank you!

Thanks. Looking at the tree ... in case you are going to rebase the 
branch, please add

	Signed-off-by: Jiri Kosina <jkosina@suse.cz>

or at least

	Acked-by: Jiri Kosina <jkosina@suse.cz>

to patches touching drivers/hid. Thanks,

-- 
Jiri Kosina
SUSE Labs

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

* Re: [PATCH RFC V2 0/4] Add "scope" to power supplies
  2012-01-04 12:48   ` Jiri Kosina
@ 2012-01-04 12:57     ` Anton Vorontsov
  0 siblings, 0 replies; 13+ messages in thread
From: Anton Vorontsov @ 2012-01-04 12:57 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Jeremy Fitzhardinge, David Woodhouse, Linux Kernel Mailing List,
	Richard Hughes, Daniel Nicoletti, linux-input

On Wed, Jan 04, 2012 at 01:48:40PM +0100, Jiri Kosina wrote:
[...]
> > Pulled into battery-2.6.git, thank you!
> 
> Thanks. Looking at the tree ... in case you are going to rebase the 
> branch, please add
> 
> 	Signed-off-by: Jiri Kosina <jkosina@suse.cz>
> 
> or at least
> 
> 	Acked-by: Jiri Kosina <jkosina@suse.cz>
> 
> to patches touching drivers/hid. Thanks,

Yeah, since I just pulled that tree, I didn't have a chance to insert
your Ack. But if I ever rebase the tree, I'll add it.

In any case, I'll mention your ack when I send a pull request to
Linus.

Thanks!

-- 
Anton Vorontsov
Email: cbouatmailru@gmail.com

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

* Re: [PATCH RFC V2 0/4] Add "scope" to power supplies
  2012-01-04  5:11 ` Anton Vorontsov
  2012-01-04 12:48   ` Jiri Kosina
@ 2012-01-04 13:00   ` Jeremy Fitzhardinge
  1 sibling, 0 replies; 13+ messages in thread
From: Jeremy Fitzhardinge @ 2012-01-04 13:00 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: David Woodhouse, Linux Kernel Mailing List, Richard Hughes,
	Daniel Nicoletti, linux-input, Jiri Kosina

On 01/04/2012 04:11 PM, Anton Vorontsov wrote:
> Pulled into battery-2.6.git, thank you!
Thank you!

    J

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

end of thread, other threads:[~2012-01-04 13:01 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-09 22:43 [PATCH RFC V2 0/4] Add "scope" to power supplies Jeremy Fitzhardinge
2011-12-09 22:43 ` [PATCH RFC V2 1/4] power_supply: add SCOPE attribute " Jeremy Fitzhardinge
2011-12-09 22:43 ` [PATCH RFC V2 2/4] power_supply: allow a power supply to explicitly point to powered device Jeremy Fitzhardinge
2011-12-09 22:43 ` [PATCH RFC V2 3/4] power_supply: add scope properties to some self-powered HID devices Jeremy Fitzhardinge
2011-12-09 22:43 ` [PATCH RFC V2 4/4] power_supply: add "powers" links to " Jeremy Fitzhardinge
2011-12-12  8:42 ` [PATCH RFC V2 0/4] Add "scope" to power supplies Jiri Kosina
2011-12-19  6:26 ` Jeremy Fitzhardinge
2011-12-19 10:25   ` Jiri Kosina
2012-01-03 14:57     ` Jiri Kosina
2012-01-04  5:11 ` Anton Vorontsov
2012-01-04 12:48   ` Jiri Kosina
2012-01-04 12:57     ` Anton Vorontsov
2012-01-04 13:00   ` Jeremy Fitzhardinge

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.