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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20ADAB092842284E95860F279283C56422D1AD1E@BGSMSX104.gar.corp.intel.com>
Date:	Fri, 3 Jan 2014 11:09:49 +0000
From:	"Tc, Jenny" <jenny.tc@...el.com>
To:	Anton Vorontsov <anton@...msg.org>,
	Pali Rohár <pali.rohar@...il.com>
CC:	David Woodhouse <dwmw2@...radead.org>,
	Tony Lindgren <tony@...mide.com>,
	Russell King <linux@....linux.org.uk>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	"freemangordon@....bg" <freemangordon@....bg>,
	"aaro.koskinen@....fi" <aaro.koskinen@....fi>,
	"pavel@....cz" <pavel@....cz>
Subject: RE: [PATCH v2 1/3] power_supply: Add power_supply notifier

Anton,

I don't see this patch in Linux tree. Any update on this would be helpful

Thanks
Jenny

> -----Original Message-----
> From: Anton Vorontsov [mailto:anton@...rybugs.org] On Behalf Of Anton
> Vorontsov
> Sent: Monday, December 02, 2013 3:54 AM
> To: Pali Rohár
> Cc: David Woodhouse; Tony Lindgren; Russell King; linux-kernel@...r.kernel.org;
> linux-omap@...r.kernel.org; freemangordon@....bg; aaro.koskinen@....fi;
> pavel@....cz; Tc, Jenny
> Subject: Re: [PATCH v2 1/3] power_supply: Add power_supply notifier
> 
> On Tue, Nov 19, 2013 at 11:18:03AM +0100, Pali Rohár wrote:
> > This patch adds a notifier chain to the power_supply.
> > This notifier helps drivers in other subsystem to listen to changes in
> > power supply subsystem. This would help to take some actions in those
> > drivers on changing the power supply properties.
> > One such scenario is to increase/decrease system performance based on
> > the battery capacity/voltage. Another scenario is to adjust the h/w
> > peak current detection voltage/current thresholds based on battery
> > voltage/capacity. The notifier helps drivers to listen to changes in
> > power_suppy susbystem without polling the power_supply properties
> >
> > Signed-off-by: Jenny TC <jenny.tc@...el.com>
> > Signed-off-by: Pali Rohár <pali.rohar@...il.com>
> ...
> > +enum power_supply_notifier_events {
> > +	PSY_EVENT_NONE,
> 
> This one is not needed.
> 
> > +	PSY_EVENT_PROP_CHANGED,
> > +	PSY_EVENT_BATTERY,
> > +	PSY_EVENT_CABLE,
> > +};
> 
> The only event that is currently used in your patch series is
> EVENT_PROP_CHANGED... So, I applied the patch with the following changes:
> 
> diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index
> c6f52c0..0c2a260 100644
> --- a/include/linux/power_supply.h
> +++ b/include/linux/power_supply.h
> @@ -15,6 +15,7 @@
>  #include <linux/init.h>
>  #include <linux/slab.h>
>  #include <linux/device.h>
> +#include <linux/notifier.h>
>  #include <linux/err.h>
>  #include <linux/power_supply.h>
>  #include <linux/thermal.h>
> @@ -159,10 +159,7 @@ enum power_supply_type {  };
> 
>  enum power_supply_notifier_events {
> -	PSY_EVENT_NONE,
>  	PSY_EVENT_PROP_CHANGED,
> -	PSY_EVENT_BATTERY,
> -	PSY_EVENT_CABLE,
>  };
> 
>  union power_supply_propval {
> @@ -242,7 +239,7 @@ struct power_supply_info {
>  	int use_for_apm;
>  };
> 
> -extern struct atomic_notifier_head    power_supply_notifier;
> +extern struct atomic_notifier_head power_supply_notifier;
>  extern int power_supply_reg_notifier(struct notifier_block *nb);  extern void
> power_supply_unreg_notifier(struct notifier_block *nb);  extern struct
> power_supply *power_supply_get_by_name(const char *name);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ