From: "Pali Rohár" <pali.rohar@gmail.com> To: Zhang Rui <rui.zhang@intel.com> Cc: Guenter Roeck <linux@roeck-us.net>, Pavel Machek <pavel@ucw.cz>, sre@kernel.org, kernel list <linux-kernel@vger.kernel.org>, linux-arm-kernel <linux-arm-kernel@lists.infradead.org>, linux-omap@vger.kernel.org, tony@atomide.com, khilman@kernel.org, aaro.koskinen@iki.fi, ivo.g.dimitrov.75@gmail.com, patrikbachan@gmail.com, serge@hallyn.com, abcloriens@gmail.com, fabio.estevam@nxp.com Subject: Re: v4.10-rc4 to v4.10-rc5: battery regression on Nokia N900 Date: Fri, 27 Jan 2017 09:35:52 +0100 [thread overview] Message-ID: <20170127083552.GA24223@pali> (raw) In-Reply-To: <1485488382.2469.27.camel@intel.com> On Friday 27 January 2017 11:39:42 Zhang Rui wrote: > On Thu, 2017-01-26 at 18:03 -0800, Guenter Roeck wrote: > > On 01/26/2017 05:37 PM, Zhang Rui wrote: > > > > > > On Wed, 2017-01-25 at 13:09 +0100, Pali Rohár wrote: > > > > > > > > On Wednesday 25 January 2017 12:12:33 Pavel Machek wrote: > > > > > > > > > > > > > > > Hi! > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Right. > > > > > > > > > > > > > > > > > > > > Before reverting, can you please try if this patch > > > > > > > > > > works > > > > > > > > > > or not? > > > > > > > > > Not really. Revert now. Sorry. > > > > > > > > > > > > > > > > > > Are you sure? This does not look equivalent to me at > > > > > > > > > all. > > > > > > > > > > > > > > > > > > "name" file handling moved from drivers to the core, > > > > > > > > > which > > > > > > > > > added some > > > > > > > > > crazy checks what name can contain. Even if this > > > > > > > > > "works", > > > > > > > > > what is the > > > > > > > > > expected effect on the "name" file? > > > > > > > > > > > > > > > > > The hwmon name attribute must not include '-', as > > > > > > > > documented > > > > > > > > in > > > > > > > > Documentation/hwmon/sysfs-interface. Is enforcing that > > > > > > > > 'crazy' ? > > > > > > > > Maybe in your world, but not in mine. > > > > > > > Well, lets revert the patch and then we can discuss what to > > > > > > > do > > > > > > > with > > > > > > > the "name" problem. > > > > > Ok, so the patch is on the way in. What to do next? > > > > > > > > > > pavel@n900:/sys/class/hwmon$ cat hwmon0/name > > > > > bq27200-0 > > > > > pavel@n900:/sys/class/hwmon$ cat hwmon1/name > > > > > rx51-battery > > > > > > > > > > > > > > > > > > > > > > > To provide some detail: libsensors gets just as confused with > > > > > > wildcards > > > > > > and whitespace/newline as it does with '-' in the reported > > > > > > name, > > > > > > which > > > > > > is why those are blocked by the new API. > > > > > Ok... Question is "does someone actually use hwmon*/name on > > > > > N900"? > > > > > If > > > > > so, we can't change it, but it is well possible that noone is. > > > > IIRC hwmon is used on Nokia N900. > > > > > > > > But I have not seen hwmon devices for bq27200 and rx51-battery > > > > yet. > > > > Those are power supply driver and auto-exporting them also via > > > > hwmon > > > > is > > > > something new, right? If yes, then we can use any name for those > > > > new > > > > hwmon devices as they cannot break userspace... as there is no > > > > userspace > > > > application for them. > > > > > > > If this is the case, you'd better set > > > (struct thermal_zone_params)->no_hwmon when registering the thermal > > > zone device, in which case, the hwmon device will not be created. > > > > > > In fact, I'd prefer to change tzp->no_hwmon to tzp->hwmon to not > > > create > > > hwmon I/F by default, and see if there is anyone using it. If yes, > > > we > > > can set the flag in soc thermal driver, explicitly, at meantime, a > > > hwmon compatible name is required. > > > > > > But one foreseeable result is that we may get bug reports from end > > > user > > > that some sensors (acpitz, etc) are gone in 'sensors' output. And > > > TBH, > > > I'm not quite sure if this can be counted as a regression or not. > > > > > That sounds like fun. Changing bq27200-0 to bq27200_0 is Forbidden by > > the ABI Police, but taking the entire device away is ok. > > > No. IMO, it depends on if the interface is used or not. > If hwmon I/F is used, we can not take it away, nor change its name. > If thermal zone I/F is used, we can not change it's 'type' name to be > compatible with new hwmon API. And what about allowing driver (rx51_battery.ko) to set hwmon name to be compatible with hwmon policy? Power supply name will be unchanged, but hwmon name could be different (it is new API/ABI -- not used by anyone) to fit into hwmon subsytem. Or instead allowing driver to set name, what about fixing name in hwmon subsystem to be compatible? (By fixing I mean to only fix hwmon name, not power supply). > > Anyway, sounds good to me. No one will use something that isn't > > there, > > and no one will realize that it could have been there, so I don't > > expect > > anyone to complain. > > Yes, I agree. > > thanks, > rui -- Pali Rohár pali.rohar@gmail.com
WARNING: multiple messages have this Message-ID (diff)
From: pali.rohar@gmail.com (Pali Rohár) To: linux-arm-kernel@lists.infradead.org Subject: v4.10-rc4 to v4.10-rc5: battery regression on Nokia N900 Date: Fri, 27 Jan 2017 09:35:52 +0100 [thread overview] Message-ID: <20170127083552.GA24223@pali> (raw) In-Reply-To: <1485488382.2469.27.camel@intel.com> On Friday 27 January 2017 11:39:42 Zhang Rui wrote: > On Thu, 2017-01-26 at 18:03 -0800, Guenter Roeck wrote: > > On 01/26/2017 05:37 PM, Zhang Rui wrote: > > > > > > On Wed, 2017-01-25 at 13:09 +0100, Pali Roh?r wrote: > > > > > > > > On Wednesday 25 January 2017 12:12:33 Pavel Machek wrote: > > > > > > > > > > > > > > > Hi! > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Right. > > > > > > > > > > > > > > > > > > > > Before reverting, can you please try if this patch > > > > > > > > > > works > > > > > > > > > > or not? > > > > > > > > > Not really. Revert now. Sorry. > > > > > > > > > > > > > > > > > > Are you sure? This does not look equivalent to me at > > > > > > > > > all. > > > > > > > > > > > > > > > > > > "name" file handling moved from drivers to the core, > > > > > > > > > which > > > > > > > > > added some > > > > > > > > > crazy checks what name can contain. Even if this > > > > > > > > > "works", > > > > > > > > > what is the > > > > > > > > > expected effect on the "name" file? > > > > > > > > > > > > > > > > > The hwmon name attribute must not include '-', as > > > > > > > > documented > > > > > > > > in > > > > > > > > Documentation/hwmon/sysfs-interface. Is enforcing that > > > > > > > > 'crazy' ? > > > > > > > > Maybe in your world, but not in mine. > > > > > > > Well, lets revert the patch and then we can discuss what to > > > > > > > do > > > > > > > with > > > > > > > the "name" problem. > > > > > Ok, so the patch is on the way in. What to do next? > > > > > > > > > > pavel at n900:/sys/class/hwmon$ cat hwmon0/name > > > > > bq27200-0 > > > > > pavel at n900:/sys/class/hwmon$ cat hwmon1/name > > > > > rx51-battery > > > > > > > > > > > > > > > > > > > > > > > To provide some detail: libsensors gets just as confused with > > > > > > wildcards > > > > > > and whitespace/newline as it does with '-' in the reported > > > > > > name, > > > > > > which > > > > > > is why those are blocked by the new API. > > > > > Ok... Question is "does someone actually use hwmon*/name on > > > > > N900"? > > > > > If > > > > > so, we can't change it, but it is well possible that noone is. > > > > IIRC hwmon is used on Nokia N900. > > > > > > > > But I have not seen hwmon devices for bq27200 and rx51-battery > > > > yet. > > > > Those are power supply driver and auto-exporting them also via > > > > hwmon > > > > is > > > > something new, right? If yes, then we can use any name for those > > > > new > > > > hwmon devices as they cannot break userspace... as there is no > > > > userspace > > > > application for them. > > > > > > > If this is the case, you'd better set > > > (struct thermal_zone_params)->no_hwmon when registering the thermal > > > zone device, in which case, the hwmon device will not be created. > > > > > > In fact, I'd prefer to change tzp->no_hwmon to tzp->hwmon to not > > > create > > > hwmon I/F by default, and see if there is anyone using it. If yes, > > > we > > > can set the flag in soc thermal driver, explicitly, at meantime, a > > > hwmon compatible name is required. > > > > > > But one foreseeable result is that we may get bug reports from end > > > user > > > that some sensors (acpitz, etc) are gone in 'sensors' output. And > > > TBH, > > > I'm not quite sure if this can be counted as a regression or not. > > > > > That sounds like fun. Changing bq27200-0 to bq27200_0 is Forbidden by > > the ABI Police, but taking the entire device away is ok. > > > No. IMO, it depends on if the interface is used or not. > If hwmon I/F is used, we can not take it away, nor change its name. > If thermal zone I/F is used, we can not change it's 'type' name to be > compatible with new hwmon API. And what about allowing driver (rx51_battery.ko) to set hwmon name to be compatible with hwmon policy? Power supply name will be unchanged, but hwmon name could be different (it is new API/ABI -- not used by anyone) to fit into hwmon subsytem. Or instead allowing driver to set name, what about fixing name in hwmon subsystem to be compatible? (By fixing I mean to only fix hwmon name, not power supply). > > Anyway, sounds good to me. No one will use something that isn't > > there, > > and no one will realize that it could have been there, so I don't > > expect > > anyone to complain. > > Yes, I agree. > > thanks, > rui -- Pali Roh?r pali.rohar at gmail.com
next prev parent reply other threads:[~2017-01-27 8:36 UTC|newest] Thread overview: 97+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-01-23 12:40 v4.10-rc4 to v4.10-rc5: battery regression on Nokia N900 Pavel Machek 2017-01-23 12:40 ` Pavel Machek 2017-01-23 12:42 ` Pali Rohár 2017-01-23 12:42 ` Pali Rohár 2017-01-23 14:20 ` Pavel Machek 2017-01-23 14:20 ` Pavel Machek 2017-01-23 14:19 ` Pavel Machek 2017-01-23 14:19 ` Pavel Machek 2017-01-23 14:31 ` Guenter Roeck 2017-01-23 14:31 ` Guenter Roeck 2017-01-23 14:40 ` Pavel Machek 2017-01-23 14:40 ` Pavel Machek 2017-01-23 17:10 ` Guenter Roeck 2017-01-23 17:10 ` Guenter Roeck 2017-01-23 23:26 ` Pavel Machek 2017-01-23 23:26 ` Pavel Machek 2017-01-23 23:49 ` Guenter Roeck 2017-01-23 23:49 ` Guenter Roeck 2017-01-24 7:06 ` Zhang Rui 2017-01-24 7:06 ` Zhang Rui 2017-01-24 7:37 ` Pavel Machek 2017-01-24 7:37 ` Pavel Machek 2017-01-24 14:18 ` Guenter Roeck 2017-01-24 14:18 ` Guenter Roeck 2017-01-24 17:58 ` Pavel Machek 2017-01-24 17:58 ` Pavel Machek 2017-01-24 18:45 ` Guenter Roeck 2017-01-24 18:45 ` Guenter Roeck 2017-01-24 22:46 ` Pavel Machek 2017-01-24 22:46 ` Pavel Machek 2017-01-24 23:07 ` Fabio Estevam 2017-01-24 23:07 ` Fabio Estevam 2017-01-25 5:29 ` Zhang Rui 2017-01-25 5:29 ` Zhang Rui 2017-01-25 10:17 ` Pavel Machek 2017-01-25 10:17 ` Pavel Machek 2017-01-25 11:12 ` Pavel Machek 2017-01-25 11:12 ` Pavel Machek 2017-01-25 11:51 ` Guenter Roeck 2017-01-25 11:51 ` Guenter Roeck 2017-01-25 11:51 ` Guenter Roeck 2017-01-25 12:09 ` Pali Rohár 2017-01-25 12:09 ` Pali Rohár 2017-01-27 1:37 ` Zhang Rui 2017-01-27 1:37 ` Zhang Rui 2017-01-27 1:37 ` Zhang Rui 2017-01-27 2:03 ` Guenter Roeck 2017-01-27 2:03 ` Guenter Roeck 2017-01-27 3:39 ` Zhang Rui 2017-01-27 3:39 ` Zhang Rui 2017-01-27 3:39 ` Zhang Rui 2017-01-27 6:27 ` Guenter Roeck 2017-01-27 6:27 ` Guenter Roeck 2017-01-27 6:27 ` Guenter Roeck 2017-01-27 11:16 ` Pavel Machek 2017-01-27 11:16 ` Pavel Machek 2017-01-27 14:13 ` Guenter Roeck 2017-01-27 14:13 ` Guenter Roeck 2017-01-27 19:06 ` Pavel Machek 2017-01-27 19:06 ` Pavel Machek 2017-01-27 19:06 ` Pavel Machek 2017-01-27 14:40 ` Zhang Rui 2017-01-27 14:40 ` Zhang Rui 2017-01-27 17:20 ` Guenter Roeck 2017-01-27 17:20 ` Guenter Roeck 2017-01-27 19:12 ` Pavel Machek 2017-01-27 19:12 ` Pavel Machek 2017-01-27 19:12 ` Pavel Machek 2017-01-27 19:29 ` Pavel Machek 2017-01-27 19:29 ` Pavel Machek 2017-01-27 19:29 ` Pavel Machek 2017-01-27 8:35 ` Pali Rohár [this message] 2017-01-27 8:35 ` Pali Rohár 2017-01-27 11:09 ` Pavel Machek 2017-01-27 11:09 ` Pavel Machek 2017-01-27 11:09 ` Pavel Machek 2017-01-27 14:14 ` Guenter Roeck 2017-01-27 14:14 ` Guenter Roeck 2017-01-27 14:14 ` Guenter Roeck 2017-01-27 19:02 ` Pavel Machek 2017-01-27 19:02 ` Pavel Machek 2017-01-27 19:02 ` Pavel Machek 2017-01-27 11:29 ` Pavel Machek 2017-01-27 11:29 ` Pavel Machek 2017-01-24 14:10 ` Guenter Roeck 2017-01-24 14:10 ` Guenter Roeck 2017-01-24 14:15 ` Pavel Machek 2017-01-24 14:15 ` Pavel Machek 2017-01-24 14:30 ` Guenter Roeck 2017-01-24 14:30 ` Guenter Roeck 2017-01-24 7:34 ` Pavel Machek 2017-01-24 7:34 ` Pavel Machek 2017-01-24 14:15 ` Guenter Roeck 2017-01-24 14:15 ` Guenter Roeck 2017-01-23 20:22 ` Pavel Machek 2017-01-23 20:22 ` Pavel Machek 2017-01-23 20:22 ` Pavel Machek
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20170127083552.GA24223@pali \ --to=pali.rohar@gmail.com \ --cc=aaro.koskinen@iki.fi \ --cc=abcloriens@gmail.com \ --cc=fabio.estevam@nxp.com \ --cc=ivo.g.dimitrov.75@gmail.com \ --cc=khilman@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-omap@vger.kernel.org \ --cc=linux@roeck-us.net \ --cc=patrikbachan@gmail.com \ --cc=pavel@ucw.cz \ --cc=rui.zhang@intel.com \ --cc=serge@hallyn.com \ --cc=sre@kernel.org \ --cc=tony@atomide.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.