* [PATCH v2 0/2] power_supply: add new POWER_SUPPLY_PROP_POLL_INTERVAL property @ 2016-09-28 19:55 Matt Ranostay 2016-09-28 19:55 ` [PATCH v2 1/2] power: power_supply: add new property POWER_SUPPLY_PROP_POLL_INTERVAL Matt Ranostay 2016-09-28 19:55 ` [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query Matt Ranostay 0 siblings, 2 replies; 30+ messages in thread From: Matt Ranostay @ 2016-09-28 19:55 UTC (permalink / raw) To: Sebastian Reichel; +Cc: linux-pm, linux-kernel, Matt Ranostay Add power supply class POWER_SUPPLY_PROP_POLL_INTERVAL to allow dynamic device statistic updating interval. Changes from v1: * Fixed milliseconds typo in commit message * Fixed file paths to drivers/power/supply * Don't update if settings are the same condition Matt Ranostay (2): power: power_supply: add new property POWER_SUPPLY_PROP_POLL_INTERVAL power: bq27xxx_battery: add poll interval property query Documentation/power/power_supply_class.txt | 1 + drivers/power/supply/bq27xxx_battery.c | 40 ++++++++++++++++++++++++++++++ drivers/power/supply/power_supply_sysfs.c | 1 + include/linux/power_supply.h | 1 + 4 files changed, 43 insertions(+) -- 2.7.4 ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 1/2] power: power_supply: add new property POWER_SUPPLY_PROP_POLL_INTERVAL 2016-09-28 19:55 [PATCH v2 0/2] power_supply: add new POWER_SUPPLY_PROP_POLL_INTERVAL property Matt Ranostay @ 2016-09-28 19:55 ` Matt Ranostay 2016-09-28 19:55 ` [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query Matt Ranostay 1 sibling, 0 replies; 30+ messages in thread From: Matt Ranostay @ 2016-09-28 19:55 UTC (permalink / raw) To: Sebastian Reichel; +Cc: linux-pm, linux-kernel, Matt Ranostay, Tony Lindgren Add new POWER_SUPPLY_PROP_POLL_INTERVAL property to display/set the update interval in seconds of the device. Cc: Sebastian Reichel <sre@kernel.org> Cc: Tony Lindgren <tony@atomide.com Signed-off-by: Matt Ranostay <matt@ranostay.consulting> --- Documentation/power/power_supply_class.txt | 1 + drivers/power/supply/power_supply_sysfs.c | 1 + include/linux/power_supply.h | 1 + 3 files changed, 3 insertions(+) diff --git a/Documentation/power/power_supply_class.txt b/Documentation/power/power_supply_class.txt index 0c72588bd967..df9b315fe55c 100644 --- a/Documentation/power/power_supply_class.txt +++ b/Documentation/power/power_supply_class.txt @@ -158,6 +158,7 @@ while battery powers a load) TIME_TO_FULL - seconds left for battery to be considered full (i.e. while battery is charging) +POLL_INTERVAL - seconds between queries to retrieve stats from hardware Battery <-> external power supply interaction ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c index bcde8d13476a..580fd4bfe5f5 100644 --- a/drivers/power/supply/power_supply_sysfs.c +++ b/drivers/power/supply/power_supply_sysfs.c @@ -198,6 +198,7 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(scope), POWER_SUPPLY_ATTR(charge_term_current), POWER_SUPPLY_ATTR(calibrate), + POWER_SUPPLY_ATTR(poll_interval), /* 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 3965503315ef..8b4cfe950d3b 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -148,6 +148,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_SCOPE, POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT, POWER_SUPPLY_PROP_CALIBRATE, + POWER_SUPPLY_PROP_POLL_INTERVAL, /* in seconds! */ /* Properties of type `const char *' */ POWER_SUPPLY_PROP_MODEL_NAME, POWER_SUPPLY_PROP_MANUFACTURER, -- 2.7.4 ^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query 2016-09-28 19:55 [PATCH v2 0/2] power_supply: add new POWER_SUPPLY_PROP_POLL_INTERVAL property Matt Ranostay 2016-09-28 19:55 ` [PATCH v2 1/2] power: power_supply: add new property POWER_SUPPLY_PROP_POLL_INTERVAL Matt Ranostay @ 2016-09-28 19:55 ` Matt Ranostay 2016-10-24 19:58 ` Matt Ranostay 1 sibling, 1 reply; 30+ messages in thread From: Matt Ranostay @ 2016-09-28 19:55 UTC (permalink / raw) To: Sebastian Reichel; +Cc: linux-pm, linux-kernel, Matt Ranostay, Tony Lindgren Add POWER_SUPPLY_PROP_POLL_INTERVAL property to query and set the polling interval of the fuel gauge. Cc: Sebastian Reichel <sre@kernel.org> Cc: Tony Lindgren <tony@atomide.com Signed-off-by: Matt Ranostay <matt@ranostay.consulting> --- drivers/power/supply/bq27xxx_battery.c | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c index 3b0dbc689d72..d18802ca3327 100644 --- a/drivers/power/supply/bq27xxx_battery.c +++ b/drivers/power/supply/bq27xxx_battery.c @@ -262,6 +262,7 @@ static enum power_supply_property bq27000_battery_props[] = { POWER_SUPPLY_PROP_POWER_AVG, POWER_SUPPLY_PROP_HEALTH, POWER_SUPPLY_PROP_MANUFACTURER, + POWER_SUPPLY_PROP_POLL_INTERVAL, }; static enum power_supply_property bq27010_battery_props[] = { @@ -282,6 +283,7 @@ static enum power_supply_property bq27010_battery_props[] = { POWER_SUPPLY_PROP_CYCLE_COUNT, POWER_SUPPLY_PROP_HEALTH, POWER_SUPPLY_PROP_MANUFACTURER, + POWER_SUPPLY_PROP_POLL_INTERVAL, }; static enum power_supply_property bq27500_battery_props[] = { @@ -300,6 +302,7 @@ static enum power_supply_property bq27500_battery_props[] = { POWER_SUPPLY_PROP_CYCLE_COUNT, POWER_SUPPLY_PROP_HEALTH, POWER_SUPPLY_PROP_MANUFACTURER, + POWER_SUPPLY_PROP_POLL_INTERVAL, }; static enum power_supply_property bq27530_battery_props[] = { @@ -318,6 +321,7 @@ static enum power_supply_property bq27530_battery_props[] = { POWER_SUPPLY_PROP_HEALTH, POWER_SUPPLY_PROP_CYCLE_COUNT, POWER_SUPPLY_PROP_MANUFACTURER, + POWER_SUPPLY_PROP_POLL_INTERVAL, }; static enum power_supply_property bq27541_battery_props[] = { @@ -337,6 +341,7 @@ static enum power_supply_property bq27541_battery_props[] = { POWER_SUPPLY_PROP_POWER_AVG, POWER_SUPPLY_PROP_HEALTH, POWER_SUPPLY_PROP_MANUFACTURER, + POWER_SUPPLY_PROP_POLL_INTERVAL, }; static enum power_supply_property bq27545_battery_props[] = { @@ -355,6 +360,7 @@ static enum power_supply_property bq27545_battery_props[] = { POWER_SUPPLY_PROP_CYCLE_COUNT, POWER_SUPPLY_PROP_POWER_AVG, POWER_SUPPLY_PROP_MANUFACTURER, + POWER_SUPPLY_PROP_POLL_INTERVAL, }; static enum power_supply_property bq27421_battery_props[] = { @@ -370,6 +376,7 @@ static enum power_supply_property bq27421_battery_props[] = { POWER_SUPPLY_PROP_CHARGE_NOW, POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, POWER_SUPPLY_PROP_MANUFACTURER, + POWER_SUPPLY_PROP_POLL_INTERVAL, }; #define BQ27XXX_PROP(_id, _prop) \ @@ -955,6 +962,9 @@ static int bq27xxx_battery_get_property(struct power_supply *psy, case POWER_SUPPLY_PROP_MANUFACTURER: val->strval = BQ27XXX_MANUFACTURER; break; + case POWER_SUPPLY_PROP_POLL_INTERVAL: + val->intval = poll_interval; + break; default: return -EINVAL; } @@ -962,6 +972,34 @@ static int bq27xxx_battery_get_property(struct power_supply *psy, return ret; } +static int bq27xxx_battery_set_property(struct power_supply *psy, + enum power_supply_property psp, + const union power_supply_propval *val) +{ + struct bq27xxx_device_info *di = power_supply_get_drvdata(psy); + + if (psp != POWER_SUPPLY_PROP_POLL_INTERVAL) + return -EINVAL; + + if (poll_interval == val->intval) + return 0; + + poll_interval = val->intval; + cancel_delayed_work_sync(&di->work); + schedule_delayed_work(&di->work, 0); + + return 0; +} + +static int bq27xxx_property_is_writeable(struct power_supply *psy, + enum power_supply_property psp) +{ + if (psp == POWER_SUPPLY_PROP_POLL_INTERVAL) + return 1; + + return 0; +} + static void bq27xxx_external_power_changed(struct power_supply *psy) { struct bq27xxx_device_info *di = power_supply_get_drvdata(psy); @@ -988,6 +1026,8 @@ int bq27xxx_battery_setup(struct bq27xxx_device_info *di) psy_desc->properties = bq27xxx_battery_props[di->chip].props; psy_desc->num_properties = bq27xxx_battery_props[di->chip].size; psy_desc->get_property = bq27xxx_battery_get_property; + psy_desc->set_property = bq27xxx_battery_set_property; + psy_desc->property_is_writeable = bq27xxx_property_is_writeable; psy_desc->external_power_changed = bq27xxx_external_power_changed; di->bat = power_supply_register_no_ws(di->dev, psy_desc, &psy_cfg); -- 2.7.4 ^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query 2016-09-28 19:55 ` [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query Matt Ranostay @ 2016-10-24 19:58 ` Matt Ranostay 2016-10-24 20:14 ` Pavel Machek 0 siblings, 1 reply; 30+ messages in thread From: Matt Ranostay @ 2016-10-24 19:58 UTC (permalink / raw) To: Sebastian Reichel, Pavel Machek Cc: linux-pm, linux-kernel, Matt Ranostay, Tony Lindgren Pavel + Sebastian this is the patchset that need I some input on :) Thanks, Matt On Wed, Sep 28, 2016 at 12:55 PM, Matt Ranostay <mranostay@gmail.com> wrote: > Add POWER_SUPPLY_PROP_POLL_INTERVAL property to query and set the > polling interval of the fuel gauge. > > Cc: Sebastian Reichel <sre@kernel.org> > Cc: Tony Lindgren <tony@atomide.com > Signed-off-by: Matt Ranostay <matt@ranostay.consulting> > --- > drivers/power/supply/bq27xxx_battery.c | 40 ++++++++++++++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > > diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c > index 3b0dbc689d72..d18802ca3327 100644 > --- a/drivers/power/supply/bq27xxx_battery.c > +++ b/drivers/power/supply/bq27xxx_battery.c > @@ -262,6 +262,7 @@ static enum power_supply_property bq27000_battery_props[] = { > POWER_SUPPLY_PROP_POWER_AVG, > POWER_SUPPLY_PROP_HEALTH, > POWER_SUPPLY_PROP_MANUFACTURER, > + POWER_SUPPLY_PROP_POLL_INTERVAL, > }; > > static enum power_supply_property bq27010_battery_props[] = { > @@ -282,6 +283,7 @@ static enum power_supply_property bq27010_battery_props[] = { > POWER_SUPPLY_PROP_CYCLE_COUNT, > POWER_SUPPLY_PROP_HEALTH, > POWER_SUPPLY_PROP_MANUFACTURER, > + POWER_SUPPLY_PROP_POLL_INTERVAL, > }; > > static enum power_supply_property bq27500_battery_props[] = { > @@ -300,6 +302,7 @@ static enum power_supply_property bq27500_battery_props[] = { > POWER_SUPPLY_PROP_CYCLE_COUNT, > POWER_SUPPLY_PROP_HEALTH, > POWER_SUPPLY_PROP_MANUFACTURER, > + POWER_SUPPLY_PROP_POLL_INTERVAL, > }; > > static enum power_supply_property bq27530_battery_props[] = { > @@ -318,6 +321,7 @@ static enum power_supply_property bq27530_battery_props[] = { > POWER_SUPPLY_PROP_HEALTH, > POWER_SUPPLY_PROP_CYCLE_COUNT, > POWER_SUPPLY_PROP_MANUFACTURER, > + POWER_SUPPLY_PROP_POLL_INTERVAL, > }; > > static enum power_supply_property bq27541_battery_props[] = { > @@ -337,6 +341,7 @@ static enum power_supply_property bq27541_battery_props[] = { > POWER_SUPPLY_PROP_POWER_AVG, > POWER_SUPPLY_PROP_HEALTH, > POWER_SUPPLY_PROP_MANUFACTURER, > + POWER_SUPPLY_PROP_POLL_INTERVAL, > }; > > static enum power_supply_property bq27545_battery_props[] = { > @@ -355,6 +360,7 @@ static enum power_supply_property bq27545_battery_props[] = { > POWER_SUPPLY_PROP_CYCLE_COUNT, > POWER_SUPPLY_PROP_POWER_AVG, > POWER_SUPPLY_PROP_MANUFACTURER, > + POWER_SUPPLY_PROP_POLL_INTERVAL, > }; > > static enum power_supply_property bq27421_battery_props[] = { > @@ -370,6 +376,7 @@ static enum power_supply_property bq27421_battery_props[] = { > POWER_SUPPLY_PROP_CHARGE_NOW, > POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, > POWER_SUPPLY_PROP_MANUFACTURER, > + POWER_SUPPLY_PROP_POLL_INTERVAL, > }; > > #define BQ27XXX_PROP(_id, _prop) \ > @@ -955,6 +962,9 @@ static int bq27xxx_battery_get_property(struct power_supply *psy, > case POWER_SUPPLY_PROP_MANUFACTURER: > val->strval = BQ27XXX_MANUFACTURER; > break; > + case POWER_SUPPLY_PROP_POLL_INTERVAL: > + val->intval = poll_interval; > + break; > default: > return -EINVAL; > } > @@ -962,6 +972,34 @@ static int bq27xxx_battery_get_property(struct power_supply *psy, > return ret; > } > > +static int bq27xxx_battery_set_property(struct power_supply *psy, > + enum power_supply_property psp, > + const union power_supply_propval *val) > +{ > + struct bq27xxx_device_info *di = power_supply_get_drvdata(psy); > + > + if (psp != POWER_SUPPLY_PROP_POLL_INTERVAL) > + return -EINVAL; > + > + if (poll_interval == val->intval) > + return 0; > + > + poll_interval = val->intval; > + cancel_delayed_work_sync(&di->work); > + schedule_delayed_work(&di->work, 0); > + > + return 0; > +} > + > +static int bq27xxx_property_is_writeable(struct power_supply *psy, > + enum power_supply_property psp) > +{ > + if (psp == POWER_SUPPLY_PROP_POLL_INTERVAL) > + return 1; > + > + return 0; > +} > + > static void bq27xxx_external_power_changed(struct power_supply *psy) > { > struct bq27xxx_device_info *di = power_supply_get_drvdata(psy); > @@ -988,6 +1026,8 @@ int bq27xxx_battery_setup(struct bq27xxx_device_info *di) > psy_desc->properties = bq27xxx_battery_props[di->chip].props; > psy_desc->num_properties = bq27xxx_battery_props[di->chip].size; > psy_desc->get_property = bq27xxx_battery_get_property; > + psy_desc->set_property = bq27xxx_battery_set_property; > + psy_desc->property_is_writeable = bq27xxx_property_is_writeable; > psy_desc->external_power_changed = bq27xxx_external_power_changed; > > di->bat = power_supply_register_no_ws(di->dev, psy_desc, &psy_cfg); > -- > 2.7.4 > ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query 2016-10-24 19:58 ` Matt Ranostay @ 2016-10-24 20:14 ` Pavel Machek 0 siblings, 0 replies; 30+ messages in thread From: Pavel Machek @ 2016-10-24 20:14 UTC (permalink / raw) To: Matt Ranostay Cc: pali.rohar, sre, kernel list, linux-arm-kernel, linux-omap, tony, khilman, aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge, abcloriens [-- Attachment #1: Type: text/plain, Size: 586 bytes --] On Mon 2016-10-24 12:58:25, Matt Ranostay wrote: > Pavel + Sebastian this is the patchset that need I some input on :) Better then previous one. But my version of bq27xxx_battery.c already contains this: static const struct kernel_param_ops param_ops_poll_interval = { .get = param_get_uint, .set = poll_interval_param_set, }; ...so it should be possible to set poll interval already. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query @ 2016-10-24 20:14 ` Pavel Machek 0 siblings, 0 replies; 30+ messages in thread From: Pavel Machek @ 2016-10-24 20:14 UTC (permalink / raw) To: linux-arm-kernel On Mon 2016-10-24 12:58:25, Matt Ranostay wrote: > Pavel + Sebastian this is the patchset that need I some input on :) Better then previous one. But my version of bq27xxx_battery.c already contains this: static const struct kernel_param_ops param_ops_poll_interval = { .get = param_get_uint, .set = poll_interval_param_set, }; ...so it should be possible to set poll interval already. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161024/31406715/attachment.sig> ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query 2016-10-24 20:14 ` Pavel Machek @ 2016-10-25 18:47 ` Matt Ranostay -1 siblings, 0 replies; 30+ messages in thread From: Matt Ranostay @ 2016-10-25 18:47 UTC (permalink / raw) To: Pavel Machek Cc: pali.rohar, Sebastian Reichel, kernel list, linux-arm-kernel, Linux OMAP List, Tony Lindgren, khilman, aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge, abcloriens On Mon, Oct 24, 2016 at 1:14 PM, Pavel Machek <pavel@ucw.cz> wrote: > On Mon 2016-10-24 12:58:25, Matt Ranostay wrote: >> Pavel + Sebastian this is the patchset that need I some input on :) > > Better then previous one. > > But my version of bq27xxx_battery.c already contains this: This is for allowing udev rule to set the properties as well. otherwise a kinda crude RUN = " echo value > /sys/module/bq27xxx_battery/parameters/poll_interval" is required. > > static const struct kernel_param_ops param_ops_poll_interval = { > .get = param_get_uint, > .set = poll_interval_param_set, > }; > > ...so it should be possible to set poll interval already. > > Pavel > > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query @ 2016-10-25 18:47 ` Matt Ranostay 0 siblings, 0 replies; 30+ messages in thread From: Matt Ranostay @ 2016-10-25 18:47 UTC (permalink / raw) To: linux-arm-kernel On Mon, Oct 24, 2016 at 1:14 PM, Pavel Machek <pavel@ucw.cz> wrote: > On Mon 2016-10-24 12:58:25, Matt Ranostay wrote: >> Pavel + Sebastian this is the patchset that need I some input on :) > > Better then previous one. > > But my version of bq27xxx_battery.c already contains this: This is for allowing udev rule to set the properties as well. otherwise a kinda crude RUN = " echo value > /sys/module/bq27xxx_battery/parameters/poll_interval" is required. > > static const struct kernel_param_ops param_ops_poll_interval = { > .get = param_get_uint, > .set = poll_interval_param_set, > }; > > ...so it should be possible to set poll interval already. > > Pavel > > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query 2016-10-25 18:47 ` Matt Ranostay @ 2016-10-31 20:22 ` Matt Ranostay -1 siblings, 0 replies; 30+ messages in thread From: Matt Ranostay @ 2016-10-31 20:22 UTC (permalink / raw) To: Matt Ranostay Cc: Pavel Machek, pali.rohar, Sebastian Reichel, kernel list, linux-arm-kernel, Linux OMAP List, Tony Lindgren, khilman, aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge, abcloriens On Tue, Oct 25, 2016 at 11:47 AM, Matt Ranostay <mranostay@gmail.com> wrote: > On Mon, Oct 24, 2016 at 1:14 PM, Pavel Machek <pavel@ucw.cz> wrote: >> On Mon 2016-10-24 12:58:25, Matt Ranostay wrote: >>> Pavel + Sebastian this is the patchset that need I some input on :) >> >> Better then previous one. >> >> But my version of bq27xxx_battery.c already contains this: > > This is for allowing udev rule to set the properties as well. > otherwise a kinda crude RUN = " echo value > > /sys/module/bq27xxx_battery/parameters/poll_interval" is required. Any thoughts on this? Thanks, Matt > >> >> static const struct kernel_param_ops param_ops_poll_interval = { >> .get = param_get_uint, >> .set = poll_interval_param_set, >> }; >> >> ...so it should be possible to set poll interval already. >> >> Pavel >> >> -- >> (english) http://www.livejournal.com/~pavelmachek >> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query @ 2016-10-31 20:22 ` Matt Ranostay 0 siblings, 0 replies; 30+ messages in thread From: Matt Ranostay @ 2016-10-31 20:22 UTC (permalink / raw) To: linux-arm-kernel On Tue, Oct 25, 2016 at 11:47 AM, Matt Ranostay <mranostay@gmail.com> wrote: > On Mon, Oct 24, 2016 at 1:14 PM, Pavel Machek <pavel@ucw.cz> wrote: >> On Mon 2016-10-24 12:58:25, Matt Ranostay wrote: >>> Pavel + Sebastian this is the patchset that need I some input on :) >> >> Better then previous one. >> >> But my version of bq27xxx_battery.c already contains this: > > This is for allowing udev rule to set the properties as well. > otherwise a kinda crude RUN = " echo value > > /sys/module/bq27xxx_battery/parameters/poll_interval" is required. Any thoughts on this? Thanks, Matt > >> >> static const struct kernel_param_ops param_ops_poll_interval = { >> .get = param_get_uint, >> .set = poll_interval_param_set, >> }; >> >> ...so it should be possible to set poll interval already. >> >> Pavel >> >> -- >> (english) http://www.livejournal.com/~pavelmachek >> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query 2016-10-31 20:22 ` Matt Ranostay @ 2016-10-31 20:30 ` Pali Rohár -1 siblings, 0 replies; 30+ messages in thread From: Pali Rohár @ 2016-10-31 20:30 UTC (permalink / raw) To: Matt Ranostay Cc: Matt Ranostay, Pavel Machek, Sebastian Reichel, kernel list, linux-arm-kernel, Linux OMAP List, Tony Lindgren, khilman, aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge, abcloriens [-- Attachment #1: Type: Text/Plain, Size: 870 bytes --] On Monday 31 October 2016 21:22:18 Matt Ranostay wrote: > On Tue, Oct 25, 2016 at 11:47 AM, Matt Ranostay <mranostay@gmail.com> > wrote: > > On Mon, Oct 24, 2016 at 1:14 PM, Pavel Machek <pavel@ucw.cz> wrote: > >> On Mon 2016-10-24 12:58:25, Matt Ranostay wrote: > >>> Pavel + Sebastian this is the patchset that need I some input on > >>> :) > >> > >> Better then previous one. > > > >> But my version of bq27xxx_battery.c already contains this: > > This is for allowing udev rule to set the properties as well. > > otherwise a kinda crude RUN = " echo value > > > /sys/module/bq27xxx_battery/parameters/poll_interval" is required. > > Any thoughts on this? Isn't sysfs /sys/module/bq27xxx_battery/parameters/poll_interval attribute what should be used to change module parameters like poll_interval? -- Pali Rohár pali.rohar@gmail.com [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query @ 2016-10-31 20:30 ` Pali Rohár 0 siblings, 0 replies; 30+ messages in thread From: Pali Rohár @ 2016-10-31 20:30 UTC (permalink / raw) To: linux-arm-kernel On Monday 31 October 2016 21:22:18 Matt Ranostay wrote: > On Tue, Oct 25, 2016 at 11:47 AM, Matt Ranostay <mranostay@gmail.com> > wrote: > > On Mon, Oct 24, 2016 at 1:14 PM, Pavel Machek <pavel@ucw.cz> wrote: > >> On Mon 2016-10-24 12:58:25, Matt Ranostay wrote: > >>> Pavel + Sebastian this is the patchset that need I some input on > >>> :) > >> > >> Better then previous one. > > > >> But my version of bq27xxx_battery.c already contains this: > > This is for allowing udev rule to set the properties as well. > > otherwise a kinda crude RUN = " echo value > > > /sys/module/bq27xxx_battery/parameters/poll_interval" is required. > > Any thoughts on this? Isn't sysfs /sys/module/bq27xxx_battery/parameters/poll_interval attribute what should be used to change module parameters like poll_interval? -- Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161031/aa2d9abc/attachment.sig> ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query 2016-10-31 20:22 ` Matt Ranostay @ 2016-10-31 21:38 ` Pavel Machek -1 siblings, 0 replies; 30+ messages in thread From: Pavel Machek @ 2016-10-31 21:38 UTC (permalink / raw) To: Matt Ranostay Cc: Matt Ranostay, pali.rohar, Sebastian Reichel, kernel list, linux-arm-kernel, Linux OMAP List, Tony Lindgren, khilman, aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge, abcloriens [-- Attachment #1: Type: text/plain, Size: 1108 bytes --] On Mon 2016-10-31 13:22:18, Matt Ranostay wrote: > On Tue, Oct 25, 2016 at 11:47 AM, Matt Ranostay <mranostay@gmail.com> wrote: > > On Mon, Oct 24, 2016 at 1:14 PM, Pavel Machek <pavel@ucw.cz> wrote: > >> On Mon 2016-10-24 12:58:25, Matt Ranostay wrote: > >>> Pavel + Sebastian this is the patchset that need I some input on :) > >> > >> Better then previous one. > >> > >> But my version of bq27xxx_battery.c already contains this: > > > > This is for allowing udev rule to set the properties as well. > > otherwise a kinda crude RUN = " echo value > > > /sys/module/bq27xxx_battery/parameters/poll_interval" is required. > > Any thoughts on this? I'd say echo value > /sys/module/bq27xxx_battery/parameters/poll_interval .. is quite adequate solution...? Alternatively, convince us that something else is useful for everyone, and we can do the right thing (poll more often when battery is nearly empty), automatically... Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query @ 2016-10-31 21:38 ` Pavel Machek 0 siblings, 0 replies; 30+ messages in thread From: Pavel Machek @ 2016-10-31 21:38 UTC (permalink / raw) To: linux-arm-kernel On Mon 2016-10-31 13:22:18, Matt Ranostay wrote: > On Tue, Oct 25, 2016 at 11:47 AM, Matt Ranostay <mranostay@gmail.com> wrote: > > On Mon, Oct 24, 2016 at 1:14 PM, Pavel Machek <pavel@ucw.cz> wrote: > >> On Mon 2016-10-24 12:58:25, Matt Ranostay wrote: > >>> Pavel + Sebastian this is the patchset that need I some input on :) > >> > >> Better then previous one. > >> > >> But my version of bq27xxx_battery.c already contains this: > > > > This is for allowing udev rule to set the properties as well. > > otherwise a kinda crude RUN = " echo value > > > /sys/module/bq27xxx_battery/parameters/poll_interval" is required. > > Any thoughts on this? I'd say echo value > /sys/module/bq27xxx_battery/parameters/poll_interval .. is quite adequate solution...? Alternatively, convince us that something else is useful for everyone, and we can do the right thing (poll more often when battery is nearly empty), automatically... Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161031/bb28809e/attachment.sig> ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query 2016-10-31 21:38 ` Pavel Machek @ 2016-11-01 19:58 ` Matt Ranostay -1 siblings, 0 replies; 30+ messages in thread From: Matt Ranostay @ 2016-11-01 19:58 UTC (permalink / raw) To: Pavel Machek Cc: Matt Ranostay, pali.rohar, Sebastian Reichel, kernel list, linux-arm-kernel, Linux OMAP List, Tony Lindgren, khilman, aaro.koskinen, ivo.g.dimitrov.75, Patrik Bachan, serge, Mickuláš Qwertz On Mon, Oct 31, 2016 at 2:38 PM, Pavel Machek <pavel@ucw.cz> wrote: > On Mon 2016-10-31 13:22:18, Matt Ranostay wrote: >> On Tue, Oct 25, 2016 at 11:47 AM, Matt Ranostay <mranostay@gmail.com> wrote: >> > On Mon, Oct 24, 2016 at 1:14 PM, Pavel Machek <pavel@ucw.cz> wrote: >> >> On Mon 2016-10-24 12:58:25, Matt Ranostay wrote: >> >>> Pavel + Sebastian this is the patchset that need I some input on :) >> >> >> >> Better then previous one. >> >> >> >> But my version of bq27xxx_battery.c already contains this: >> > >> > This is for allowing udev rule to set the properties as well. >> > otherwise a kinda crude RUN = " echo value > >> > /sys/module/bq27xxx_battery/parameters/poll_interval" is required. >> >> Any thoughts on this? > > I'd say echo value > > /sys/module/bq27xxx_battery/parameters/poll_interval .. is quite > adequate solution...? > > Alternatively, convince us that something else is useful for everyone, > and we can do the right thing (poll more often when battery is nearly > empty), automatically... Ok should have had the patchset set it per device, and not use the global poll_interval. Of need to add some logic to see if uses the global poll_interval or it's own setting. There are times where you could have multiple batteries connected to multiple fuel gauges, and want to up the polling interval on certain ones that are discharging at different rates. But of course I'll let you guys let me know if this seems useful at all. > > Pavel > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query @ 2016-11-01 19:58 ` Matt Ranostay 0 siblings, 0 replies; 30+ messages in thread From: Matt Ranostay @ 2016-11-01 19:58 UTC (permalink / raw) To: linux-arm-kernel On Mon, Oct 31, 2016 at 2:38 PM, Pavel Machek <pavel@ucw.cz> wrote: > On Mon 2016-10-31 13:22:18, Matt Ranostay wrote: >> On Tue, Oct 25, 2016 at 11:47 AM, Matt Ranostay <mranostay@gmail.com> wrote: >> > On Mon, Oct 24, 2016 at 1:14 PM, Pavel Machek <pavel@ucw.cz> wrote: >> >> On Mon 2016-10-24 12:58:25, Matt Ranostay wrote: >> >>> Pavel + Sebastian this is the patchset that need I some input on :) >> >> >> >> Better then previous one. >> >> >> >> But my version of bq27xxx_battery.c already contains this: >> > >> > This is for allowing udev rule to set the properties as well. >> > otherwise a kinda crude RUN = " echo value > >> > /sys/module/bq27xxx_battery/parameters/poll_interval" is required. >> >> Any thoughts on this? > > I'd say echo value > > /sys/module/bq27xxx_battery/parameters/poll_interval .. is quite > adequate solution...? > > Alternatively, convince us that something else is useful for everyone, > and we can do the right thing (poll more often when battery is nearly > empty), automatically... Ok should have had the patchset set it per device, and not use the global poll_interval. Of need to add some logic to see if uses the global poll_interval or it's own setting. There are times where you could have multiple batteries connected to multiple fuel gauges, and want to up the polling interval on certain ones that are discharging at different rates. But of course I'll let you guys let me know if this seems useful at all. > > Pavel > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query 2016-11-01 19:58 ` Matt Ranostay @ 2016-11-02 8:22 ` Pavel Machek -1 siblings, 0 replies; 30+ messages in thread From: Pavel Machek @ 2016-11-02 8:22 UTC (permalink / raw) To: Matt Ranostay Cc: Matt Ranostay, pali.rohar, Sebastian Reichel, kernel list, linux-arm-kernel, Linux OMAP List, Tony Lindgren, khilman, aaro.koskinen, ivo.g.dimitrov.75, Patrik Bachan, serge, Mickuláš Qwertz [-- Attachment #1: Type: text/plain, Size: 1553 bytes --] Hi! > >> >> Better then previous one. > >> >> > >> >> But my version of bq27xxx_battery.c already contains this: > >> > > >> > This is for allowing udev rule to set the properties as well. > >> > otherwise a kinda crude RUN = " echo value > > >> > /sys/module/bq27xxx_battery/parameters/poll_interval" is required. > >> > >> Any thoughts on this? > > > > I'd say echo value > > > /sys/module/bq27xxx_battery/parameters/poll_interval .. is quite > > adequate solution...? > > > > Alternatively, convince us that something else is useful for everyone, > > and we can do the right thing (poll more often when battery is nearly > > empty), automatically... > > Ok should have had the patchset set it per device, and not use the > global poll_interval. Of need to add some logic to see if uses the > global poll_interval or it's own setting. > > There are times where you could have multiple batteries connected to > multiple fuel gauges, and want to up the polling interval on certain > ones that are discharging at different rates. > > But of course I'll let you guys let me know if this seems useful at all. I agree per-device polling would be cleaner. But unless you have hardware with more than one bq27xxx, I'd avoid the work... Now... its also possible that poll_interval should change itself (within kernel) to do the right thing. Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query @ 2016-11-02 8:22 ` Pavel Machek 0 siblings, 0 replies; 30+ messages in thread From: Pavel Machek @ 2016-11-02 8:22 UTC (permalink / raw) To: linux-arm-kernel Hi! > >> >> Better then previous one. > >> >> > >> >> But my version of bq27xxx_battery.c already contains this: > >> > > >> > This is for allowing udev rule to set the properties as well. > >> > otherwise a kinda crude RUN = " echo value > > >> > /sys/module/bq27xxx_battery/parameters/poll_interval" is required. > >> > >> Any thoughts on this? > > > > I'd say echo value > > > /sys/module/bq27xxx_battery/parameters/poll_interval .. is quite > > adequate solution...? > > > > Alternatively, convince us that something else is useful for everyone, > > and we can do the right thing (poll more often when battery is nearly > > empty), automatically... > > Ok should have had the patchset set it per device, and not use the > global poll_interval. Of need to add some logic to see if uses the > global poll_interval or it's own setting. > > There are times where you could have multiple batteries connected to > multiple fuel gauges, and want to up the polling interval on certain > ones that are discharging at different rates. > > But of course I'll let you guys let me know if this seems useful at all. I agree per-device polling would be cleaner. But unless you have hardware with more than one bq27xxx, I'd avoid the work... Now... its also possible that poll_interval should change itself (within kernel) to do the right thing. Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161102/5f5fae4c/attachment.sig> ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query 2016-11-02 8:22 ` Pavel Machek @ 2016-11-04 5:00 ` Matt Ranostay -1 siblings, 0 replies; 30+ messages in thread From: Matt Ranostay @ 2016-11-04 5:00 UTC (permalink / raw) To: Pavel Machek Cc: Matt Ranostay, pali.rohar, Sebastian Reichel, kernel list, linux-arm-kernel, Linux OMAP List, Tony Lindgren, khilman, aaro.koskinen, ivo.g.dimitrov.75, Patrik Bachan, serge, Mickuláš Qwertz On Wed, Nov 2, 2016 at 1:22 AM, Pavel Machek <pavel@ucw.cz> wrote: > Hi! > >> >> >> Better then previous one. >> >> >> >> >> >> But my version of bq27xxx_battery.c already contains this: >> >> > >> >> > This is for allowing udev rule to set the properties as well. >> >> > otherwise a kinda crude RUN = " echo value > >> >> > /sys/module/bq27xxx_battery/parameters/poll_interval" is required. >> >> >> >> Any thoughts on this? >> > >> > I'd say echo value > >> > /sys/module/bq27xxx_battery/parameters/poll_interval .. is quite >> > adequate solution...? >> > >> > Alternatively, convince us that something else is useful for everyone, >> > and we can do the right thing (poll more often when battery is nearly >> > empty), automatically... >> >> Ok should have had the patchset set it per device, and not use the >> global poll_interval. Of need to add some logic to see if uses the >> global poll_interval or it's own setting. >> >> There are times where you could have multiple batteries connected to >> multiple fuel gauges, and want to up the polling interval on certain >> ones that are discharging at different rates. >> >> But of course I'll let you guys let me know if this seems useful at all. > > I agree per-device polling would be cleaner. > Ok I'll work something up for RFC. > But unless you have hardware with more than one bq27xxx, I'd avoid the > work... > > Now... its also possible that poll_interval should change itself > (within kernel) to do the right thing. > True but that is state machine territory, but I'll worry about that later... > Best regards, > > Pavel > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query @ 2016-11-04 5:00 ` Matt Ranostay 0 siblings, 0 replies; 30+ messages in thread From: Matt Ranostay @ 2016-11-04 5:00 UTC (permalink / raw) To: linux-arm-kernel On Wed, Nov 2, 2016 at 1:22 AM, Pavel Machek <pavel@ucw.cz> wrote: > Hi! > >> >> >> Better then previous one. >> >> >> >> >> >> But my version of bq27xxx_battery.c already contains this: >> >> > >> >> > This is for allowing udev rule to set the properties as well. >> >> > otherwise a kinda crude RUN = " echo value > >> >> > /sys/module/bq27xxx_battery/parameters/poll_interval" is required. >> >> >> >> Any thoughts on this? >> > >> > I'd say echo value > >> > /sys/module/bq27xxx_battery/parameters/poll_interval .. is quite >> > adequate solution...? >> > >> > Alternatively, convince us that something else is useful for everyone, >> > and we can do the right thing (poll more often when battery is nearly >> > empty), automatically... >> >> Ok should have had the patchset set it per device, and not use the >> global poll_interval. Of need to add some logic to see if uses the >> global poll_interval or it's own setting. >> >> There are times where you could have multiple batteries connected to >> multiple fuel gauges, and want to up the polling interval on certain >> ones that are discharging at different rates. >> >> But of course I'll let you guys let me know if this seems useful at all. > > I agree per-device polling would be cleaner. > Ok I'll work something up for RFC. > But unless you have hardware with more than one bq27xxx, I'd avoid the > work... > > Now... its also possible that poll_interval should change itself > (within kernel) to do the right thing. > True but that is state machine territory, but I'll worry about that later... > Best regards, > > Pavel > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query 2016-11-04 5:00 ` Matt Ranostay @ 2016-11-04 7:09 ` Pavel Machek -1 siblings, 0 replies; 30+ messages in thread From: Pavel Machek @ 2016-11-04 7:09 UTC (permalink / raw) To: Matt Ranostay Cc: Matt Ranostay, pali.rohar, Sebastian Reichel, kernel list, linux-arm-kernel, Linux OMAP List, Tony Lindgren, khilman, aaro.koskinen, ivo.g.dimitrov.75, Patrik Bachan, serge, Mickuláš Qwertz [-- Attachment #1: Type: text/plain, Size: 1983 bytes --] On Thu 2016-11-03 22:00:56, Matt Ranostay wrote: > On Wed, Nov 2, 2016 at 1:22 AM, Pavel Machek <pavel@ucw.cz> wrote: > > Hi! > > > >> >> >> Better then previous one. > >> >> >> > >> >> >> But my version of bq27xxx_battery.c already contains this: > >> >> > > >> >> > This is for allowing udev rule to set the properties as well. > >> >> > otherwise a kinda crude RUN = " echo value > > >> >> > /sys/module/bq27xxx_battery/parameters/poll_interval" is required. > >> >> > >> >> Any thoughts on this? > >> > > >> > I'd say echo value > > >> > /sys/module/bq27xxx_battery/parameters/poll_interval .. is quite > >> > adequate solution...? > >> > > >> > Alternatively, convince us that something else is useful for everyone, > >> > and we can do the right thing (poll more often when battery is nearly > >> > empty), automatically... > >> > >> Ok should have had the patchset set it per device, and not use the > >> global poll_interval. Of need to add some logic to see if uses the > >> global poll_interval or it's own setting. > >> > >> There are times where you could have multiple batteries connected to > >> multiple fuel gauges, and want to up the polling interval on certain > >> ones that are discharging at different rates. > >> > >> But of course I'll let you guys let me know if this seems useful at all. > > > > I agree per-device polling would be cleaner. > > > > Ok I'll work something up for RFC. > > > But unless you have hardware with more than one bq27xxx, I'd avoid the > > work... > > > > Now... its also possible that poll_interval should change itself > > (within kernel) to do the right thing. > > > > True but that is state machine territory, but I'll worry about that later... Do you actually have hardware with more than one bq27xxx? Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query @ 2016-11-04 7:09 ` Pavel Machek 0 siblings, 0 replies; 30+ messages in thread From: Pavel Machek @ 2016-11-04 7:09 UTC (permalink / raw) To: linux-arm-kernel On Thu 2016-11-03 22:00:56, Matt Ranostay wrote: > On Wed, Nov 2, 2016 at 1:22 AM, Pavel Machek <pavel@ucw.cz> wrote: > > Hi! > > > >> >> >> Better then previous one. > >> >> >> > >> >> >> But my version of bq27xxx_battery.c already contains this: > >> >> > > >> >> > This is for allowing udev rule to set the properties as well. > >> >> > otherwise a kinda crude RUN = " echo value > > >> >> > /sys/module/bq27xxx_battery/parameters/poll_interval" is required. > >> >> > >> >> Any thoughts on this? > >> > > >> > I'd say echo value > > >> > /sys/module/bq27xxx_battery/parameters/poll_interval .. is quite > >> > adequate solution...? > >> > > >> > Alternatively, convince us that something else is useful for everyone, > >> > and we can do the right thing (poll more often when battery is nearly > >> > empty), automatically... > >> > >> Ok should have had the patchset set it per device, and not use the > >> global poll_interval. Of need to add some logic to see if uses the > >> global poll_interval or it's own setting. > >> > >> There are times where you could have multiple batteries connected to > >> multiple fuel gauges, and want to up the polling interval on certain > >> ones that are discharging at different rates. > >> > >> But of course I'll let you guys let me know if this seems useful at all. > > > > I agree per-device polling would be cleaner. > > > > Ok I'll work something up for RFC. > > > But unless you have hardware with more than one bq27xxx, I'd avoid the > > work... > > > > Now... its also possible that poll_interval should change itself > > (within kernel) to do the right thing. > > > > True but that is state machine territory, but I'll worry about that later... Do you actually have hardware with more than one bq27xxx? Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161104/b2f18794/attachment.sig> ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query 2016-11-04 7:09 ` Pavel Machek @ 2016-11-04 14:58 ` Tony Lindgren -1 siblings, 0 replies; 30+ messages in thread From: Tony Lindgren @ 2016-11-04 14:58 UTC (permalink / raw) To: Pavel Machek Cc: Matt Ranostay, Matt Ranostay, pali.rohar, Sebastian Reichel, kernel list, linux-arm-kernel, Linux OMAP List, khilman, aaro.koskinen, ivo.g.dimitrov.75, Patrik Bachan, serge, Mickuláš Qwertz * Pavel Machek <pavel@ucw.cz> [161104 00:10]: > On Thu 2016-11-03 22:00:56, Matt Ranostay wrote: > Do you actually have hardware with more than one bq27xxx? I can at least see the twl4030 battery/charger features being used together with some bq device to monitor the battery state. Not sure if that counts as multiple instances here though :) Regards, Tony ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query @ 2016-11-04 14:58 ` Tony Lindgren 0 siblings, 0 replies; 30+ messages in thread From: Tony Lindgren @ 2016-11-04 14:58 UTC (permalink / raw) To: linux-arm-kernel * Pavel Machek <pavel@ucw.cz> [161104 00:10]: > On Thu 2016-11-03 22:00:56, Matt Ranostay wrote: > Do you actually have hardware with more than one bq27xxx? I can at least see the twl4030 battery/charger features being used together with some bq device to monitor the battery state. Not sure if that counts as multiple instances here though :) Regards, Tony ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query 2016-11-04 14:58 ` Tony Lindgren @ 2016-11-04 20:29 ` Pavel Machek -1 siblings, 0 replies; 30+ messages in thread From: Pavel Machek @ 2016-11-04 20:29 UTC (permalink / raw) To: Tony Lindgren Cc: Matt Ranostay, Matt Ranostay, pali.rohar, Sebastian Reichel, kernel list, linux-arm-kernel, Linux OMAP List, khilman, aaro.koskinen, ivo.g.dimitrov.75, Patrik Bachan, serge, Mickuláš Qwertz [-- Attachment #1: Type: text/plain, Size: 813 bytes --] On Fri 2016-11-04 07:58:55, Tony Lindgren wrote: > * Pavel Machek <pavel@ucw.cz> [161104 00:10]: > > On Thu 2016-11-03 22:00:56, Matt Ranostay wrote: > > Do you actually have hardware with more than one bq27xxx? > > I can at least see the twl4030 battery/charger features > being used together with some bq device to monitor the > battery state. Not sure if that counts as multiple > instances here though :) I have that, too, but that was not what i was asking. Matt wanted support for different polling intervals on different bq27xxx chips. I'd like to know know if he actually has more than one bq27xxx in his device... Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query @ 2016-11-04 20:29 ` Pavel Machek 0 siblings, 0 replies; 30+ messages in thread From: Pavel Machek @ 2016-11-04 20:29 UTC (permalink / raw) To: linux-arm-kernel On Fri 2016-11-04 07:58:55, Tony Lindgren wrote: > * Pavel Machek <pavel@ucw.cz> [161104 00:10]: > > On Thu 2016-11-03 22:00:56, Matt Ranostay wrote: > > Do you actually have hardware with more than one bq27xxx? > > I can at least see the twl4030 battery/charger features > being used together with some bq device to monitor the > battery state. Not sure if that counts as multiple > instances here though :) I have that, too, but that was not what i was asking. Matt wanted support for different polling intervals on different bq27xxx chips. I'd like to know know if he actually has more than one bq27xxx in his device... Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161104/37ee45ee/attachment.sig> ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query 2016-11-04 20:29 ` Pavel Machek @ 2016-11-04 20:39 ` Matt Ranostay -1 siblings, 0 replies; 30+ messages in thread From: Matt Ranostay @ 2016-11-04 20:39 UTC (permalink / raw) To: Pavel Machek Cc: Tony Lindgren, Matt Ranostay, pali.rohar, Sebastian Reichel, kernel list, linux-arm-kernel, Linux OMAP List, khilman, aaro.koskinen, ivo.g.dimitrov.75, Patrik Bachan, serge, Mickuláš Qwertz On Fri, Nov 4, 2016 at 1:29 PM, Pavel Machek <pavel@ucw.cz> wrote: > On Fri 2016-11-04 07:58:55, Tony Lindgren wrote: >> * Pavel Machek <pavel@ucw.cz> [161104 00:10]: >> > On Thu 2016-11-03 22:00:56, Matt Ranostay wrote: >> > Do you actually have hardware with more than one bq27xxx? >> >> I can at least see the twl4030 battery/charger features >> being used together with some bq device to monitor the >> battery state. Not sure if that counts as multiple >> instances here though :) > > I have that, too, but that was not what i was asking. > > Matt wanted support for different polling intervals on different > bq27xxx chips. I'd like to know know if he actually has more than one > bq27xxx in his device... > Actually only one bq27xxx chip but in theory we could have more. > Best regards, > Pavel > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query @ 2016-11-04 20:39 ` Matt Ranostay 0 siblings, 0 replies; 30+ messages in thread From: Matt Ranostay @ 2016-11-04 20:39 UTC (permalink / raw) To: linux-arm-kernel On Fri, Nov 4, 2016 at 1:29 PM, Pavel Machek <pavel@ucw.cz> wrote: > On Fri 2016-11-04 07:58:55, Tony Lindgren wrote: >> * Pavel Machek <pavel@ucw.cz> [161104 00:10]: >> > On Thu 2016-11-03 22:00:56, Matt Ranostay wrote: >> > Do you actually have hardware with more than one bq27xxx? >> >> I can at least see the twl4030 battery/charger features >> being used together with some bq device to monitor the >> battery state. Not sure if that counts as multiple >> instances here though :) > > I have that, too, but that was not what i was asking. > > Matt wanted support for different polling intervals on different > bq27xxx chips. I'd like to know know if he actually has more than one > bq27xxx in his device... > Actually only one bq27xxx chip but in theory we could have more. > Best regards, > Pavel > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query 2016-11-04 20:39 ` Matt Ranostay @ 2016-11-04 21:43 ` Pavel Machek -1 siblings, 0 replies; 30+ messages in thread From: Pavel Machek @ 2016-11-04 21:43 UTC (permalink / raw) To: Matt Ranostay Cc: Tony Lindgren, Matt Ranostay, pali.rohar, Sebastian Reichel, kernel list, linux-arm-kernel, Linux OMAP List, khilman, aaro.koskinen, ivo.g.dimitrov.75, Patrik Bachan, serge, Mickuláš Qwertz [-- Attachment #1: Type: text/plain, Size: 1223 bytes --] On Fri 2016-11-04 13:39:19, Matt Ranostay wrote: > On Fri, Nov 4, 2016 at 1:29 PM, Pavel Machek <pavel@ucw.cz> wrote: > > On Fri 2016-11-04 07:58:55, Tony Lindgren wrote: > >> * Pavel Machek <pavel@ucw.cz> [161104 00:10]: > >> > On Thu 2016-11-03 22:00:56, Matt Ranostay wrote: > >> > Do you actually have hardware with more than one bq27xxx? > >> > >> I can at least see the twl4030 battery/charger features > >> being used together with some bq device to monitor the > >> battery state. Not sure if that counts as multiple > >> instances here though :) > > > > I have that, too, but that was not what i was asking. > > > > Matt wanted support for different polling intervals on different > > bq27xxx chips. I'd like to know know if he actually has more than one > > bq27xxx in his device... > > > > Actually only one bq27xxx chip but in theory we could have more. Hmm. As we'd have to keep both old and new interfaces to change the polling interfaces. Lets not due that unless we really need to, ok? Thanks, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query @ 2016-11-04 21:43 ` Pavel Machek 0 siblings, 0 replies; 30+ messages in thread From: Pavel Machek @ 2016-11-04 21:43 UTC (permalink / raw) To: linux-arm-kernel On Fri 2016-11-04 13:39:19, Matt Ranostay wrote: > On Fri, Nov 4, 2016 at 1:29 PM, Pavel Machek <pavel@ucw.cz> wrote: > > On Fri 2016-11-04 07:58:55, Tony Lindgren wrote: > >> * Pavel Machek <pavel@ucw.cz> [161104 00:10]: > >> > On Thu 2016-11-03 22:00:56, Matt Ranostay wrote: > >> > Do you actually have hardware with more than one bq27xxx? > >> > >> I can at least see the twl4030 battery/charger features > >> being used together with some bq device to monitor the > >> battery state. Not sure if that counts as multiple > >> instances here though :) > > > > I have that, too, but that was not what i was asking. > > > > Matt wanted support for different polling intervals on different > > bq27xxx chips. I'd like to know know if he actually has more than one > > bq27xxx in his device... > > > > Actually only one bq27xxx chip but in theory we could have more. Hmm. As we'd have to keep both old and new interfaces to change the polling interfaces. Lets not due that unless we really need to, ok? Thanks, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161104/f89a025b/attachment.sig> ^ permalink raw reply [flat|nested] 30+ messages in thread
end of thread, other threads:[~2016-11-04 21:43 UTC | newest] Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-09-28 19:55 [PATCH v2 0/2] power_supply: add new POWER_SUPPLY_PROP_POLL_INTERVAL property Matt Ranostay 2016-09-28 19:55 ` [PATCH v2 1/2] power: power_supply: add new property POWER_SUPPLY_PROP_POLL_INTERVAL Matt Ranostay 2016-09-28 19:55 ` [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query Matt Ranostay 2016-10-24 19:58 ` Matt Ranostay 2016-10-24 20:14 ` Pavel Machek 2016-10-24 20:14 ` Pavel Machek 2016-10-25 18:47 ` Matt Ranostay 2016-10-25 18:47 ` Matt Ranostay 2016-10-31 20:22 ` Matt Ranostay 2016-10-31 20:22 ` Matt Ranostay 2016-10-31 20:30 ` Pali Rohár 2016-10-31 20:30 ` Pali Rohár 2016-10-31 21:38 ` Pavel Machek 2016-10-31 21:38 ` Pavel Machek 2016-11-01 19:58 ` Matt Ranostay 2016-11-01 19:58 ` Matt Ranostay 2016-11-02 8:22 ` Pavel Machek 2016-11-02 8:22 ` Pavel Machek 2016-11-04 5:00 ` Matt Ranostay 2016-11-04 5:00 ` Matt Ranostay 2016-11-04 7:09 ` Pavel Machek 2016-11-04 7:09 ` Pavel Machek 2016-11-04 14:58 ` Tony Lindgren 2016-11-04 14:58 ` Tony Lindgren 2016-11-04 20:29 ` Pavel Machek 2016-11-04 20:29 ` Pavel Machek 2016-11-04 20:39 ` Matt Ranostay 2016-11-04 20:39 ` Matt Ranostay 2016-11-04 21:43 ` Pavel Machek 2016-11-04 21:43 ` Pavel Machek
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.