Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1512854 > unrolled thread
| Started by | Matt Ranostay <matt@ranostay.consulting> |
|---|---|
| First post | 2016-10-31 21:30 +0100 |
| Last post | 2016-11-04 22:50 +0100 |
| Articles | 11 — 5 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query Matt Ranostay <matt@ranostay.consulting> - 2016-10-31 21:30 +0100
Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query Pali Rohár <pali.rohar@gmail.com> - 2016-10-31 21:40 +0100
Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query Pavel Machek <pavel@ucw.cz> - 2016-10-31 22:40 +0100
Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query Matt Ranostay <mranostay@gmail.com> - 2016-11-01 21:00 +0100
Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query Pavel Machek <pavel@ucw.cz> - 2016-11-02 09:30 +0100
Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query Matt Ranostay <mranostay@gmail.com> - 2016-11-04 06:10 +0100
Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query Pavel Machek <pavel@ucw.cz> - 2016-11-04 08:20 +0100
Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query Tony Lindgren <tony@atomide.com> - 2016-11-04 16:00 +0100
Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query Pavel Machek <pavel@ucw.cz> - 2016-11-04 21:30 +0100
Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query Matt Ranostay <mranostay@gmail.com> - 2016-11-04 21:50 +0100
Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query Pavel Machek <pavel@ucw.cz> - 2016-11-04 22:50 +0100
| From | Matt Ranostay <matt@ranostay.consulting> |
|---|---|
| Date | 2016-10-31 21:30 +0100 |
| Subject | Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query |
| Message-ID | <syrns-7fi-21@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Pali Rohár <pali.rohar@gmail.com> |
|---|---|
| Date | 2016-10-31 21:40 +0100 |
| Message-ID | <syrx7-7iz-3@gated-at.bofh.it> |
| In reply to | #1512854 |
[Multipart message — attachments visible in raw view] — view raw
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
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2016-10-31 22:40 +0100 |
| Subject | Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query |
| Message-ID | <systc-7Sy-13@gated-at.bofh.it> |
| In reply to | #1512854 |
[Multipart message — attachments visible in raw view] — view raw
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
[toc] | [prev] | [next] | [standalone]
| From | Matt Ranostay <mranostay@gmail.com> |
|---|---|
| Date | 2016-11-01 21:00 +0100 |
| Message-ID | <syNnY-4yv-29@gated-at.bofh.it> |
| In reply to | #1512923 |
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
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2016-11-02 09:30 +0100 |
| Subject | Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query |
| Message-ID | <syZ5M-3QA-9@gated-at.bofh.it> |
| In reply to | #1513463 |
[Multipart message — attachments visible in raw view] — view raw
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
[toc] | [prev] | [next] | [standalone]
| From | Matt Ranostay <mranostay@gmail.com> |
|---|---|
| Date | 2016-11-04 06:10 +0100 |
| Message-ID | <szEVj-5Bj-7@gated-at.bofh.it> |
| In reply to | #1513734 |
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
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2016-11-04 08:20 +0100 |
| Subject | Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query |
| Message-ID | <szGX8-6ZA-15@gated-at.bofh.it> |
| In reply to | #1514999 |
[Multipart message — attachments visible in raw view] — view raw
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
[toc] | [prev] | [next] | [standalone]
| From | Tony Lindgren <tony@atomide.com> |
|---|---|
| Date | 2016-11-04 16:00 +0100 |
| Subject | Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query |
| Message-ID | <szO8h-37p-7@gated-at.bofh.it> |
| In reply to | #1515044 |
* 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
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2016-11-04 21:30 +0100 |
| Subject | Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query |
| Message-ID | <szThD-6we-1@gated-at.bofh.it> |
| In reply to | #1515233 |
[Multipart message — attachments visible in raw view] — view raw
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
[toc] | [prev] | [next] | [standalone]
| From | Matt Ranostay <mranostay@gmail.com> |
|---|---|
| Date | 2016-11-04 21:50 +0100 |
| Message-ID | <szTAZ-6Ct-7@gated-at.bofh.it> |
| In reply to | #1515376 |
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
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2016-11-04 22:50 +0100 |
| Subject | Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query |
| Message-ID | <szUx3-7cG-1@gated-at.bofh.it> |
| In reply to | #1515398 |
[Multipart message — attachments visible in raw view] — view raw
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web