From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhang Rui Subject: Re: v4.10-rc4 to v4.10-rc5: battery regression on Nokia N900 Date: Fri, 27 Jan 2017 09:37:10 +0800 Message-ID: <1485481030.2469.15.camel@intel.com> References: <20170123144031.GA7870@amd> <20170123232654.GA19342@amd> <20170123234912.GA2460@roeck-us.net> <20170124070639.GA5068@rzhang1-surface> <20170124073720.GB5603@amd> <88c94ea6-abe2-0f20-337e-e9ee00c883d8@roeck-us.net> <20170124175800.GA15070@amd> <20170124184526.GA25056@roeck-us.net> <20170125111233.GB3912@amd> <20170125120918.GA7936@pali> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: <20170125120918.GA7936@pali> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Pali =?ISO-8859-1?Q?Roh=E1r?= , Pavel Machek Cc: ivo.g.dimitrov.75@gmail.com, khilman@kernel.org, tony@atomide.com, aaro.koskinen@iki.fi, sre@kernel.org, kernel list , abcloriens@gmail.com, Guenter Roeck , fabio.estevam@nxp.com, linux-omap@vger.kernel.org, patrikbachan@gmail.com, linux-arm-kernel , serge@hallyn.com List-Id: linux-omap@vger.kernel.org T24gV2VkLCAyMDE3LTAxLTI1IGF0IDEzOjA5ICswMTAwLCBQYWxpIFJvaMOhciB3cm90ZToKPiBP biBXZWRuZXNkYXkgMjUgSmFudWFyeSAyMDE3IDEyOjEyOjMzIFBhdmVsIE1hY2hlayB3cm90ZToK PiA+IAo+ID4gSGkhCj4gPiAKPiA+ID4gCj4gPiA+ID4gCj4gPiA+ID4gPiAKPiA+ID4gPiA+ID4g Cj4gPiA+ID4gPiA+ID4gCj4gPiA+ID4gPiA+ID4gUmlnaHQuCj4gPiA+ID4gPiA+ID4gCj4gPiA+ ID4gPiA+ID4gQmVmb3JlIHJldmVydGluZ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0aW9uIGlzIC4u IGFyZSB0aGVyZSBvdGhlciBkcml2ZXJzIGFmZmVjdGVkPyBEbyB3ZSB3YW50IHRvCj4gPiBkbwo+ ID4gJy0nIC0+ICdfJyBpbiB0aGUgY29yZSBvciBzb21ld2hlcmUgaW4gdGhlIGRyaXZlcnM/IFdl IG1pZ2h0IHdhbnQKPiA+IHRvCj4gPiBkbyB0aGUgY2hhbmdlIGluIGVhcmx5IGluIDQuMTEgYW5k IHNlZSB3aGF0IGJyZWFrcy4uLi4KPiBJSVJDIGh3bW9uIGNvcmUgZG9lcyBub3QgYWNjZXB0ICct JyBmb3IgYSBsb25nIHRpbWUgKG1heWJlIGFsbCA0LngKPiB2ZXJzaW9ucz8pLgo+IAoKX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbGludXgtYXJtLWtlcm5l bCBtYWlsaW5nIGxpc3QKbGludXgtYXJtLWtlcm5lbEBsaXN0cy5pbmZyYWRlYWQub3JnCmh0dHA6 Ly9saXN0cy5pbmZyYWRlYWQub3JnL21haWxtYW4vbGlzdGluZm8vbGludXgtYXJtLWtlcm5lbAo= From mboxrd@z Thu Jan 1 00:00:00 1970 From: rui.zhang@intel.com (Zhang Rui) Date: Fri, 27 Jan 2017 09:37:10 +0800 Subject: v4.10-rc4 to v4.10-rc5: battery regression on Nokia N900 In-Reply-To: <20170125120918.GA7936@pali> References: <20170123144031.GA7870@amd> <20170123232654.GA19342@amd> <20170123234912.GA2460@roeck-us.net> <20170124070639.GA5068@rzhang1-surface> <20170124073720.GB5603@amd> <88c94ea6-abe2-0f20-337e-e9ee00c883d8@roeck-us.net> <20170124175800.GA15070@amd> <20170124184526.GA25056@roeck-us.net> <20170125111233.GB3912@amd> <20170125120918.GA7936@pali> Message-ID: <1485481030.2469.15.camel@intel.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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. thanks, rui > > > > Next question is .. are there other drivers affected? Do we want to > > do > > '-' -> '_' in the core or somewhere in the drivers? We might want > > to > > do the change in early in 4.11 and see what breaks.... > IIRC hwmon core does not accept '-' for a long time (maybe all 4.x > versions?). > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753115AbdA0BiR (ORCPT ); Thu, 26 Jan 2017 20:38:17 -0500 Received: from mga04.intel.com ([192.55.52.120]:58311 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750900AbdA0BiP (ORCPT ); Thu, 26 Jan 2017 20:38:15 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,292,1477983600"; d="scan'208";a="1099478274" Message-ID: <1485481030.2469.15.camel@intel.com> Subject: Re: v4.10-rc4 to v4.10-rc5: battery regression on Nokia N900 From: Zhang Rui To: Pali =?ISO-8859-1?Q?Roh=E1r?= , Pavel Machek Cc: Guenter Roeck , sre@kernel.org, kernel list , linux-arm-kernel , 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 Date: Fri, 27 Jan 2017 09:37:10 +0800 In-Reply-To: <20170125120918.GA7936@pali> References: <20170123144031.GA7870@amd> <20170123232654.GA19342@amd> <20170123234912.GA2460@roeck-us.net> <20170124070639.GA5068@rzhang1-surface> <20170124073720.GB5603@amd> <88c94ea6-abe2-0f20-337e-e9ee00c883d8@roeck-us.net> <20170124175800.GA15070@amd> <20170124184526.GA25056@roeck-us.net> <20170125111233.GB3912@amd> <20170125120918.GA7936@pali> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. thanks, rui > > > > Next question is .. are there other drivers affected? Do we want to > > do > > '-' -> '_' in the core or somewhere in the drivers? We might want > > to > > do the change in early in 4.11 and see what breaks.... > IIRC hwmon core does not accept '-' for a long time (maybe all 4.x > versions?). >