Skip to contentSkip to conversation

v4.10-rc4 to v4.10-rc5: battery regression on Nokia N900

DISCUSSION Pavel Machek 5 participants 43 messages Jan 23, 2017 – Jan 27, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi!

It seems that battery driver stopped working on N900 between -rc4 and -rc5.

Best regards,
Pavel

Signature · 9 lines
(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/20170123/075700cc/attachment.sig>
#1 lore raw
Quoted 2 lines · On Monday 23 January 2017 13:40:58 Pavel Machek wrote:

It seems that battery driver stopped working on N900 between -rc4 and -rc5.

Which one of those 4 drivers stopped working?

Signature · 2 lines
Pali Roh?r
pali.rohar at gmail.com
#2 lore raw
Quoted 5 lines · Pali Roh?r
Quoted 2 lines · On Monday 23 January 2017 13:40:58 Pavel Machek wrote:

It seems that battery driver stopped working on N900 between -rc4 and -rc5.

Which one of those 4 drivers stopped working?

n900-battery.

Pavel

Signature · 9 lines
(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/20170123/5df964b2/attachment-0001.sig>
#3 lore raw
In reply to Pavel Machek

Hi!

Quoted 2 lines

It seems that battery driver stopped working on N900 between -rc4 and -rc5.

pavel at amd:/data/l/linux-n900$ git bisect log
# bad: [41f283973653dc44af47585fa79fb6da6ffdc2e2] Merge /data//l/clean-cg into mini-v4.10
# good: [4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185] It seems mainline -rc4 did have a fix for the sound issue. Use that one.
git bisect start 'mini-v4.10' '4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185'
# good: [e90665a5d38b17fdbe484a85fbba917a7006522d] Merge tag 'ceph-for-4.10-rc5' of git://github.com/ceph/ceph-client
git bisect good e90665a5d38b17fdbe484a85fbba917a7006522d
# good: [83fd57a740bb19286959b3085eb93532f3e7ef2c] Merge tag 'powerpc-4.10-2' of
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
git bisect good 83fd57a740bb19286959b3085eb93532f3e7ef2c
# good: [c497f8d17246720afe680ea1a8fa6e48e75af852] Merge tag 'usb-4.10-rc5' of
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
git bisect good c497f8d17246720afe680ea1a8fa6e48e75af852
# bad: [bb6c01c2dde67b165cf7c808b0f00677b6f94b96] Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
git bisect bad bb6c01c2dde67b165cf7c808b0f00677b6f94b96
# good: [18591add41ec9558ce0e32ef88626c18cc70c686] thermal: rockchip:
handle set_trips without the trip points
git bisect good 18591add41ec9558ce0e32ef88626c18cc70c686
# bad: [f53345e8cf027d03187b9417f1f8883c516e1a5b] thermal: core: move tz->device.groups cleanup to thermal_release
git bisect bad f53345e8cf027d03187b9417f1f8883c516e1a5b
# bad: [7611fb68062f8d7f416f3272894d1edf7bbff29c] thermal:
thermal_hwmon: Convert to hwmon_device_register_with_info() git bisect bad 7611fb68062f8d7f416f3272894d1edf7bbff29c

# first bad commit: [7611fb68062f8d7f416f3272894d1edf7bbff29c]
thermal: thermal_hwmon: Convert to hwmon_device_register_with_info()
pavel at amd:/data/l/linux-n900$

pavel at amd:/data/l/linux-n900$ git bisect log
# bad: [41f283973653dc44af47585fa79fb6da6ffdc2e2] Merge /data//l/clean-cg into mini-v4.10
# good: [4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185] It seems mainline -rc4 did have a fix for the sound issue. Use that one.
git bisect start 'mini-v4.10' '4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185'
# good: [e90665a5d38b17fdbe484a85fbba917a7006522d] Merge tag 'ceph-for-4.10-rc5' of git://github.com/ceph/ceph-client
git bisect good e90665a5d38b17fdbe484a85fbba917a7006522d
# good: [83fd57a740bb19286959b3085eb93532f3e7ef2c] Merge tag 'powerpc-4.10-2' of
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
git bisect good 83fd57a740bb19286959b3085eb93532f3e7ef2c
# good: [c497f8d17246720afe680ea1a8fa6e48e75af852] Merge tag 'usb-4.10-rc5' of
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
git bisect good c497f8d17246720afe680ea1a8fa6e48e75af852
# bad: [bb6c01c2dde67b165cf7c808b0f00677b6f94b96] Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
git bisect bad bb6c01c2dde67b165cf7c808b0f00677b6f94b96
# good: [18591add41ec9558ce0e32ef88626c18cc70c686] thermal: rockchip:
handle set_trips without the trip points
git bisect good 18591add41ec9558ce0e32ef88626c18cc70c686
# bad: [f53345e8cf027d03187b9417f1f8883c516e1a5b] thermal: core: move tz->device.groups cleanup to thermal_release
git bisect bad f53345e8cf027d03187b9417f1f8883c516e1a5b
# bad: [7611fb68062f8d7f416f3272894d1edf7bbff29c] thermal:
thermal_hwmon: Convert to hwmon_device_register_with_info() git bisect bad 7611fb68062f8d7f416f3272894d1edf7bbff29c

# first bad commit: [7611fb68062f8d7f416f3272894d1edf7bbff29c]
thermal: thermal_hwmon: Convert to hwmon_device_register_with_info()
pavel at amd:/data/l/linux-n900$

7611fb68062f8d7f416f3272894d1edf7bbff29c is the first bad commit commit 7611fb68062f8d7f416f3272894d1edf7bbff29c

Author: Fabio Estevam <[email protected]>
Date:   Tue Dec 27 15:31:49 2016 -0200

thermal: thermal_hwmon: Convert to
hwmon_device_register_with_info()

Booting Linux on a mx6q based board leads to the following warning:

(NULL device *): hwmon_device_register() is deprecated. Please convert the
driver to use hwmon_device_register_with_info().

,so do as suggested.

Also, this results in the core taking care of creating the 'name'
attribute, so drop the code doing that from the thermal driver.

:040000 040000 b3f6095ab53677277c2f9d75cb6430afb6825765
156a18e983a22b8ae43c7b312a4e1c63017f0e26 M drivers

I'll try to revert it on the top of v4.10-rc5 now... and yes, it fixes the issue.

Any idea what went wrong and how to fix that?

Anyway as we are at -rc5 and this is warning fix that caused a regression on different hardware... it should be reverted.

Best regards,

Pavel

Signature · 9 lines
(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/20170123/401a99d3/attachment.sig>
maintainer
#4 lore raw
Quoted 101 lines · Pavel Machek

Hi!

Quoted 2 lines

It seems that battery driver stopped working on N900 between -rc4 and -rc5.

pavel at amd:/data/l/linux-n900$ git bisect log
# bad: [41f283973653dc44af47585fa79fb6da6ffdc2e2] Merge /data//l/clean-cg into mini-v4.10
# good: [4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185] It seems mainline -rc4 did have a fix for the sound issue. Use that one.
git bisect start 'mini-v4.10' '4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185'
# good: [e90665a5d38b17fdbe484a85fbba917a7006522d] Merge tag 'ceph-for-4.10-rc5' of git://github.com/ceph/ceph-client
git bisect good e90665a5d38b17fdbe484a85fbba917a7006522d
# good: [83fd57a740bb19286959b3085eb93532f3e7ef2c] Merge tag 'powerpc-4.10-2' of
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
git bisect good 83fd57a740bb19286959b3085eb93532f3e7ef2c
# good: [c497f8d17246720afe680ea1a8fa6e48e75af852] Merge tag 'usb-4.10-rc5' of
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
git bisect good c497f8d17246720afe680ea1a8fa6e48e75af852
# bad: [bb6c01c2dde67b165cf7c808b0f00677b6f94b96] Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
git bisect bad bb6c01c2dde67b165cf7c808b0f00677b6f94b96
# good: [18591add41ec9558ce0e32ef88626c18cc70c686] thermal: rockchip:
handle set_trips without the trip points
git bisect good 18591add41ec9558ce0e32ef88626c18cc70c686
# bad: [f53345e8cf027d03187b9417f1f8883c516e1a5b] thermal: core: move tz->device.groups cleanup to thermal_release
git bisect bad f53345e8cf027d03187b9417f1f8883c516e1a5b
# bad: [7611fb68062f8d7f416f3272894d1edf7bbff29c] thermal:
thermal_hwmon: Convert to hwmon_device_register_with_info() git bisect bad 7611fb68062f8d7f416f3272894d1edf7bbff29c

# first bad commit: [7611fb68062f8d7f416f3272894d1edf7bbff29c]
thermal: thermal_hwmon: Convert to hwmon_device_register_with_info()
pavel at amd:/data/l/linux-n900$

pavel at amd:/data/l/linux-n900$ git bisect log
# bad: [41f283973653dc44af47585fa79fb6da6ffdc2e2] Merge /data//l/clean-cg into mini-v4.10
# good: [4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185] It seems mainline -rc4 did have a fix for the sound issue. Use that one.
git bisect start 'mini-v4.10' '4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185'
# good: [e90665a5d38b17fdbe484a85fbba917a7006522d] Merge tag 'ceph-for-4.10-rc5' of git://github.com/ceph/ceph-client
git bisect good e90665a5d38b17fdbe484a85fbba917a7006522d
# good: [83fd57a740bb19286959b3085eb93532f3e7ef2c] Merge tag 'powerpc-4.10-2' of
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
git bisect good 83fd57a740bb19286959b3085eb93532f3e7ef2c
# good: [c497f8d17246720afe680ea1a8fa6e48e75af852] Merge tag 'usb-4.10-rc5' of
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
git bisect good c497f8d17246720afe680ea1a8fa6e48e75af852
# bad: [bb6c01c2dde67b165cf7c808b0f00677b6f94b96] Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
git bisect bad bb6c01c2dde67b165cf7c808b0f00677b6f94b96
# good: [18591add41ec9558ce0e32ef88626c18cc70c686] thermal: rockchip:
handle set_trips without the trip points
git bisect good 18591add41ec9558ce0e32ef88626c18cc70c686
# bad: [f53345e8cf027d03187b9417f1f8883c516e1a5b] thermal: core: move tz->device.groups cleanup to thermal_release
git bisect bad f53345e8cf027d03187b9417f1f8883c516e1a5b
# bad: [7611fb68062f8d7f416f3272894d1edf7bbff29c] thermal:
thermal_hwmon: Convert to hwmon_device_register_with_info() git bisect bad 7611fb68062f8d7f416f3272894d1edf7bbff29c

# first bad commit: [7611fb68062f8d7f416f3272894d1edf7bbff29c]
thermal: thermal_hwmon: Convert to hwmon_device_register_with_info()
pavel at amd:/data/l/linux-n900$

7611fb68062f8d7f416f3272894d1edf7bbff29c is the first bad commit commit 7611fb68062f8d7f416f3272894d1edf7bbff29c

Author: Fabio Estevam <[email protected]>
Date:   Tue Dec 27 15:31:49 2016 -0200

thermal: thermal_hwmon: Convert to
hwmon_device_register_with_info()

Booting Linux on a mx6q based board leads to the following warning:

(NULL device *): hwmon_device_register() is deprecated. Please convert the
driver to use hwmon_device_register_with_info().

,so do as suggested.

Also, this results in the core taking care of creating the 'name'
attribute, so drop the code doing that from the thermal driver.

:040000 040000 b3f6095ab53677277c2f9d75cb6430afb6825765
156a18e983a22b8ae43c7b312a4e1c63017f0e26 M drivers

Quoted 8 lines

I'll try to revert it on the top of v4.10-rc5 now... and yes, it fixes the issue.

Any idea what went wrong and how to fix that?

Anyway as we are at -rc5 and this is warning fix that caused a regression on different hardware... it should be reverted.

Agreed.

What exactly does "stopped working" mean ? That might help understanding what went wrong.

Thanks,
Guenter

#5 lore raw
Quoted 107 lines · Guenter Roeck
Quoted 106 lines · Pavel Machek

Hi!

Quoted 2 lines

It seems that battery driver stopped working on N900 between -rc4 and -rc5.

pavel at amd:/data/l/linux-n900$ git bisect log
# bad: [41f283973653dc44af47585fa79fb6da6ffdc2e2] Merge /data//l/clean-cg into mini-v4.10
# good: [4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185] It seems mainline -rc4 did have a fix for the sound issue. Use that one.
git bisect start 'mini-v4.10' '4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185'
# good: [e90665a5d38b17fdbe484a85fbba917a7006522d] Merge tag 'ceph-for-4.10-rc5' of git://github.com/ceph/ceph-client
git bisect good e90665a5d38b17fdbe484a85fbba917a7006522d
# good: [83fd57a740bb19286959b3085eb93532f3e7ef2c] Merge tag 'powerpc-4.10-2' of
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
git bisect good 83fd57a740bb19286959b3085eb93532f3e7ef2c
# good: [c497f8d17246720afe680ea1a8fa6e48e75af852] Merge tag 'usb-4.10-rc5' of
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
git bisect good c497f8d17246720afe680ea1a8fa6e48e75af852
# bad: [bb6c01c2dde67b165cf7c808b0f00677b6f94b96] Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
git bisect bad bb6c01c2dde67b165cf7c808b0f00677b6f94b96
# good: [18591add41ec9558ce0e32ef88626c18cc70c686] thermal: rockchip:
handle set_trips without the trip points
git bisect good 18591add41ec9558ce0e32ef88626c18cc70c686
# bad: [f53345e8cf027d03187b9417f1f8883c516e1a5b] thermal: core: move tz->device.groups cleanup to thermal_release
git bisect bad f53345e8cf027d03187b9417f1f8883c516e1a5b
# bad: [7611fb68062f8d7f416f3272894d1edf7bbff29c] thermal:
thermal_hwmon: Convert to hwmon_device_register_with_info() git bisect bad 7611fb68062f8d7f416f3272894d1edf7bbff29c

# first bad commit: [7611fb68062f8d7f416f3272894d1edf7bbff29c]
thermal: thermal_hwmon: Convert to hwmon_device_register_with_info()
pavel at amd:/data/l/linux-n900$

pavel at amd:/data/l/linux-n900$ git bisect log
# bad: [41f283973653dc44af47585fa79fb6da6ffdc2e2] Merge /data//l/clean-cg into mini-v4.10
# good: [4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185] It seems mainline -rc4 did have a fix for the sound issue. Use that one.
git bisect start 'mini-v4.10' '4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185'
# good: [e90665a5d38b17fdbe484a85fbba917a7006522d] Merge tag 'ceph-for-4.10-rc5' of git://github.com/ceph/ceph-client
git bisect good e90665a5d38b17fdbe484a85fbba917a7006522d
# good: [83fd57a740bb19286959b3085eb93532f3e7ef2c] Merge tag 'powerpc-4.10-2' of
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
git bisect good 83fd57a740bb19286959b3085eb93532f3e7ef2c
# good: [c497f8d17246720afe680ea1a8fa6e48e75af852] Merge tag 'usb-4.10-rc5' of
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
git bisect good c497f8d17246720afe680ea1a8fa6e48e75af852
# bad: [bb6c01c2dde67b165cf7c808b0f00677b6f94b96] Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
git bisect bad bb6c01c2dde67b165cf7c808b0f00677b6f94b96
# good: [18591add41ec9558ce0e32ef88626c18cc70c686] thermal: rockchip:
handle set_trips without the trip points
git bisect good 18591add41ec9558ce0e32ef88626c18cc70c686
# bad: [f53345e8cf027d03187b9417f1f8883c516e1a5b] thermal: core: move tz->device.groups cleanup to thermal_release
git bisect bad f53345e8cf027d03187b9417f1f8883c516e1a5b
# bad: [7611fb68062f8d7f416f3272894d1edf7bbff29c] thermal:
thermal_hwmon: Convert to hwmon_device_register_with_info() git bisect bad 7611fb68062f8d7f416f3272894d1edf7bbff29c

# first bad commit: [7611fb68062f8d7f416f3272894d1edf7bbff29c]
thermal: thermal_hwmon: Convert to hwmon_device_register_with_info()
pavel at amd:/data/l/linux-n900$

7611fb68062f8d7f416f3272894d1edf7bbff29c is the first bad commit commit 7611fb68062f8d7f416f3272894d1edf7bbff29c

Author: Fabio Estevam <[email protected]>
Date:   Tue Dec 27 15:31:49 2016 -0200

thermal: thermal_hwmon: Convert to
hwmon_device_register_with_info()

Booting Linux on a mx6q based board leads to the following warning:

(NULL device *): hwmon_device_register() is deprecated. Please convert the
driver to use hwmon_device_register_with_info().

,so do as suggested.

Also, this results in the core taking care of creating the 'name'
attribute, so drop the code doing that from the thermal driver.

:040000 040000 b3f6095ab53677277c2f9d75cb6430afb6825765
156a18e983a22b8ae43c7b312a4e1c63017f0e26 M drivers

I'll try to revert it on the top of v4.10-rc5 now... and yes, it fixes the issue.

Any idea what went wrong and how to fix that?

Quoted 7 lines
Quoted 3 lines

Anyway as we are at -rc5 and this is warning fix that caused a regression on different hardware... it should be reverted.

Agreed.

What exactly does "stopped working" mean ? That might help understanding what went wrong.

/sys files related to battery no longer appear. I beieve this has something to do with it:

[    2.374877] of_get_named_gpiod_flags: parsed 'reset-gpios' property
of node '/ocp at 68000000/spi at 48098000/tsc2005 at 0[0]' - status (0)
[    2.375946] input: TSC2005 touchscreen as
/devices/platform/68000000.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5
[    2.392120] rx51-battery: probe of n900-battery failed with error
-22
[    2.399902] omap_hsmmc 4809c000.mmc: GPIO lookup for consumer cd

Pavel

Signature · 9 lines
(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/20170123/b637ffa7/attachment.sig>
maintainer
#6 lore raw
Quoted 119 lines · Pavel Machek
Quoted 107 lines · Guenter Roeck
Quoted 106 lines · Pavel Machek

Hi!

Quoted 2 lines

It seems that battery driver stopped working on N900 between -rc4 and -rc5.

pavel at amd:/data/l/linux-n900$ git bisect log
# bad: [41f283973653dc44af47585fa79fb6da6ffdc2e2] Merge /data//l/clean-cg into mini-v4.10
# good: [4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185] It seems mainline -rc4 did have a fix for the sound issue. Use that one.
git bisect start 'mini-v4.10' '4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185'
# good: [e90665a5d38b17fdbe484a85fbba917a7006522d] Merge tag 'ceph-for-4.10-rc5' of git://github.com/ceph/ceph-client
git bisect good e90665a5d38b17fdbe484a85fbba917a7006522d
# good: [83fd57a740bb19286959b3085eb93532f3e7ef2c] Merge tag 'powerpc-4.10-2' of
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
git bisect good 83fd57a740bb19286959b3085eb93532f3e7ef2c
# good: [c497f8d17246720afe680ea1a8fa6e48e75af852] Merge tag 'usb-4.10-rc5' of
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
git bisect good c497f8d17246720afe680ea1a8fa6e48e75af852
# bad: [bb6c01c2dde67b165cf7c808b0f00677b6f94b96] Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
git bisect bad bb6c01c2dde67b165cf7c808b0f00677b6f94b96
# good: [18591add41ec9558ce0e32ef88626c18cc70c686] thermal: rockchip:
handle set_trips without the trip points
git bisect good 18591add41ec9558ce0e32ef88626c18cc70c686
# bad: [f53345e8cf027d03187b9417f1f8883c516e1a5b] thermal: core: move tz->device.groups cleanup to thermal_release
git bisect bad f53345e8cf027d03187b9417f1f8883c516e1a5b
# bad: [7611fb68062f8d7f416f3272894d1edf7bbff29c] thermal:
thermal_hwmon: Convert to hwmon_device_register_with_info() git bisect bad 7611fb68062f8d7f416f3272894d1edf7bbff29c

# first bad commit: [7611fb68062f8d7f416f3272894d1edf7bbff29c]
thermal: thermal_hwmon: Convert to hwmon_device_register_with_info()
pavel at amd:/data/l/linux-n900$

pavel at amd:/data/l/linux-n900$ git bisect log
# bad: [41f283973653dc44af47585fa79fb6da6ffdc2e2] Merge /data//l/clean-cg into mini-v4.10
# good: [4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185] It seems mainline -rc4 did have a fix for the sound issue. Use that one.
git bisect start 'mini-v4.10' '4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185'
# good: [e90665a5d38b17fdbe484a85fbba917a7006522d] Merge tag 'ceph-for-4.10-rc5' of git://github.com/ceph/ceph-client
git bisect good e90665a5d38b17fdbe484a85fbba917a7006522d
# good: [83fd57a740bb19286959b3085eb93532f3e7ef2c] Merge tag 'powerpc-4.10-2' of
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
git bisect good 83fd57a740bb19286959b3085eb93532f3e7ef2c
# good: [c497f8d17246720afe680ea1a8fa6e48e75af852] Merge tag 'usb-4.10-rc5' of
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
git bisect good c497f8d17246720afe680ea1a8fa6e48e75af852
# bad: [bb6c01c2dde67b165cf7c808b0f00677b6f94b96] Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
git bisect bad bb6c01c2dde67b165cf7c808b0f00677b6f94b96
# good: [18591add41ec9558ce0e32ef88626c18cc70c686] thermal: rockchip:
handle set_trips without the trip points
git bisect good 18591add41ec9558ce0e32ef88626c18cc70c686
# bad: [f53345e8cf027d03187b9417f1f8883c516e1a5b] thermal: core: move tz->device.groups cleanup to thermal_release
git bisect bad f53345e8cf027d03187b9417f1f8883c516e1a5b
# bad: [7611fb68062f8d7f416f3272894d1edf7bbff29c] thermal:
thermal_hwmon: Convert to hwmon_device_register_with_info() git bisect bad 7611fb68062f8d7f416f3272894d1edf7bbff29c

# first bad commit: [7611fb68062f8d7f416f3272894d1edf7bbff29c]
thermal: thermal_hwmon: Convert to hwmon_device_register_with_info()
pavel at amd:/data/l/linux-n900$

7611fb68062f8d7f416f3272894d1edf7bbff29c is the first bad commit commit 7611fb68062f8d7f416f3272894d1edf7bbff29c

Author: Fabio Estevam <[email protected]>
Date:   Tue Dec 27 15:31:49 2016 -0200

thermal: thermal_hwmon: Convert to
hwmon_device_register_with_info()

Booting Linux on a mx6q based board leads to the following warning:

(NULL device *): hwmon_device_register() is deprecated. Please convert the
driver to use hwmon_device_register_with_info().

,so do as suggested.

Also, this results in the core taking care of creating the 'name'
attribute, so drop the code doing that from the thermal driver.

:040000 040000 b3f6095ab53677277c2f9d75cb6430afb6825765
156a18e983a22b8ae43c7b312a4e1c63017f0e26 M drivers

I'll try to revert it on the top of v4.10-rc5 now... and yes, it fixes the issue.

Any idea what went wrong and how to fix that?

Quoted 7 lines
Quoted 3 lines

Anyway as we are at -rc5 and this is warning fix that caused a regression on different hardware... it should be reverted.

Agreed.

What exactly does "stopped working" mean ? That might help understanding what went wrong.

/sys files related to battery no longer appear. I beieve this has something to do with it:

Quoted 8 lines
[    2.374877] of_get_named_gpiod_flags: parsed 'reset-gpios' property
of node '/ocp at 68000000/spi at 48098000/tsc2005 at 0[0]' - status (0)
[    2.375946] input: TSC2005 touchscreen as
/devices/platform/68000000.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5
[    2.392120] rx51-battery: probe of n900-battery failed with error
-22
[    2.399902] omap_hsmmc 4809c000.mmc: GPIO lookup for consumer cd

Only problem I can imagine is that power_supply_register() fails registering the thermal zone, which in turn would suggest that the offending patch might not work at all, at least not under some circumstances. So it should definitely be reverted until we figure out the problem.

Guenter

#7 lore raw
In reply to Pavel Machek

Hi!

Quoted 16 lines
Quoted 5 lines
Quoted 5 lines

I'll try to revert it on the top of v4.10-rc5 now... and yes, it fixes the issue.

Any idea what went wrong and how to fix that?

Quoted 7 lines
Quoted 3 lines

Anyway as we are at -rc5 and this is warning fix that caused a regression on different hardware... it should be reverted.

Agreed.

What exactly does "stopped working" mean ? That might help understanding what went wrong.

/sys files related to battery no longer appear. I beieve this has something to do with it:

Quoted 6 lines
[    2.374877] of_get_named_gpiod_flags: parsed 'reset-gpios' property
of node '/ocp at 68000000/spi at 48098000/tsc2005 at 0[0]' - status (0)
[    2.375946] input: TSC2005 touchscreen as
/devices/platform/68000000.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5
[    2.392120] rx51-battery: probe of n900-battery failed with error

-22

Mystery solved:

drivers/hwmon/hwmon.c +3 -1
index 3932f92..fe5ec82 100644
@@ -545,8 +545,10 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata,
 	int i, j, err, id;
 
 	/* Do not accept invalid characters in hwmon name attribute */
-	if (name && (!strlen(name) || strpbrk(name, "-* \t\n")))
+	if (name && (!strlen(name) || strpbrk(name, "-* \t\n"))) {
+		printk("hwmon: Invalid character detected: %s\n", name);
 		return ERR_PTR(-EINVAL);
+	}
 
 	id = ida_simple_get(&hwmon_ida, 0, 0, GFP_KERNEL);
 	if (id < 0)

pavel at n900:~$ dmesg | grep -5 Invalid

[    0.829650] of_get_named_gpiod_flags: parsed 'gpio-reset' property
of node '/ocp at 68000000/i2c at 48072000/tlv320aic3x at 19[0]' - status (0)
[    0.833831] tsl2563 2-0029: model 7, rev. 0
[    0.837768] of_get_named_gpiod_flags: parsed 'enable-gpio' property
of node '/ocp at 68000000/i2c at 48072000/lp5523 at 32[0]' - status (0)
[    1.921417] omap_i2c 48072000.i2c: controller timed out
[    2.056823] lp5523x 2-0032: lp5523 Programmable led chip found
[    2.064147] hwmon: Invalid character detected: bq27200-0
[    2.064544] bq27xxx-battery 2-0055: failed to register battery
[    2.064605] bq27xxx-battery: probe of 2-0055 failed with error -22
[    2.065368] of_get_named_gpiod_flags: parsed 'power-gpio' property
of node '/ocp at 68000000/i2c at 48072000/tpa6130a2 at 60[0]' - status (0)
[    2.083221] bq2415x-charger 2-006b: automode supported, waiting for
events
[    2.084442] bq2415x-charger 2-006b: driver registered
--
[    2.369842] g_ether gadget: g_ether ready
[    2.377197] tsc2005 spi1.0: GPIO lookup for consumer reset
[    2.377227] tsc2005 spi1.0: using device tree for GPIO lookup
[    2.377288] of_get_named_gpiod_flags: parsed 'reset-gpios' property
of node '/ocp at 68000000/spi at 48098000/tsc2005 at 0[0]' - status (0)
[    2.378936] input: TSC2005 touchscreen as
/devices/platform/68000000.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5
[    2.395111] hwmon: Invalid character detected: rx51-battery
[    2.402587] rx51-battery: probe of n900-battery failed with error
-22
[    2.410247] omap_hsmmc 4809c000.mmc: GPIO lookup for consumer cd
[    2.410247] omap_hsmmc 4809c000.mmc: using device tree for GPIO
lookup
[    2.410278] of_get_named_gpiod_flags: can't parse 'cd-gpios'
property of node '/ocp at 68000000/mmc at 4809c000[0]'
[    2.410278] of_get_named_gpiod_flags: can't parse 'cd-gpio'

property of node '/ocp at 68000000/mmc@4809c000[0]'

Pavel

Signature · 9 lines
(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/20170124/6b7e6316/attachment.sig>
maintainer
#8 lore raw
Quoted 46 lines · Pavel Machek

Hi!

Quoted 16 lines
Quoted 5 lines
Quoted 5 lines

I'll try to revert it on the top of v4.10-rc5 now... and yes, it fixes the issue.

Any idea what went wrong and how to fix that?

Quoted 7 lines
Quoted 3 lines

Anyway as we are at -rc5 and this is warning fix that caused a regression on different hardware... it should be reverted.

Agreed.

What exactly does "stopped working" mean ? That might help understanding what went wrong.

/sys files related to battery no longer appear. I beieve this has something to do with it:

Quoted 6 lines
[    2.374877] of_get_named_gpiod_flags: parsed 'reset-gpios' property
of node '/ocp at 68000000/spi at 48098000/tsc2005 at 0[0]' - status (0)
[    2.375946] input: TSC2005 touchscreen as
/devices/platform/68000000.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5
[    2.392120] rx51-battery: probe of n900-battery failed with error

-22

Mystery solved:

drivers/hwmon/hwmon.c +3 -1
index 3932f92..fe5ec82 100644
@@ -545,8 +545,10 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata,
 	int i, j, err, id;
 
 	/* Do not accept invalid characters in hwmon name attribute */
-	if (name && (!strlen(name) || strpbrk(name, "-* \t\n")))
+	if (name && (!strlen(name) || strpbrk(name, "-* \t\n"))) {
+		printk("hwmon: Invalid character detected: %s\n", name);
 		return ERR_PTR(-EINVAL);
+	}
 
 	id = ida_simple_get(&hwmon_ida, 0, 0, GFP_KERNEL);
 	if (id < 0)

pavel at n900:~$ dmesg | grep -5 Invalid

Quoted 8 lines
[    0.829650] of_get_named_gpiod_flags: parsed 'gpio-reset' property
of node '/ocp at 68000000/i2c at 48072000/tlv320aic3x at 19[0]' - status (0)
[    0.833831] tsl2563 2-0029: model 7, rev. 0
[    0.837768] of_get_named_gpiod_flags: parsed 'enable-gpio' property
of node '/ocp at 68000000/i2c at 48072000/lp5523 at 32[0]' - status (0)
[    1.921417] omap_i2c 48072000.i2c: controller timed out
[    2.056823] lp5523x 2-0032: lp5523 Programmable led chip found
[    2.064147] hwmon: Invalid character detected: bq27200-0

So the problem is really that the thermal driver needs to create a valid name.

Guenter

Quoted 32 lines
[    2.064544] bq27xxx-battery 2-0055: failed to register battery
[    2.064605] bq27xxx-battery: probe of 2-0055 failed with error -22
[    2.065368] of_get_named_gpiod_flags: parsed 'power-gpio' property
of node '/ocp at 68000000/i2c at 48072000/tpa6130a2 at 60[0]' - status (0)
[    2.083221] bq2415x-charger 2-006b: automode supported, waiting for
events
[    2.084442] bq2415x-charger 2-006b: driver registered
--
[    2.369842] g_ether gadget: g_ether ready
[    2.377197] tsc2005 spi1.0: GPIO lookup for consumer reset
[    2.377227] tsc2005 spi1.0: using device tree for GPIO lookup
[    2.377288] of_get_named_gpiod_flags: parsed 'reset-gpios' property
of node '/ocp at 68000000/spi at 48098000/tsc2005 at 0[0]' - status (0)
[    2.378936] input: TSC2005 touchscreen as
/devices/platform/68000000.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5
[    2.395111] hwmon: Invalid character detected: rx51-battery
[    2.402587] rx51-battery: probe of n900-battery failed with error
-22
[    2.410247] omap_hsmmc 4809c000.mmc: GPIO lookup for consumer cd
[    2.410247] omap_hsmmc 4809c000.mmc: using device tree for GPIO
lookup
[    2.410278] of_get_named_gpiod_flags: can't parse 'cd-gpios'
property of node '/ocp at 68000000/mmc at 4809c000[0]'
[    2.410278] of_get_named_gpiod_flags: can't parse 'cd-gpio'

property of node '/ocp at 68000000/mmc at 4809c000[0]'

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
reviewer
#9 lore raw
Quoted 46 lines · Guenter Roeck
Quoted 45 lines · Pavel Machek

Hi!

Quoted 16 lines
Quoted 5 lines
Quoted 5 lines

I'll try to revert it on the top of v4.10-rc5 now... and yes, it fixes the issue.

Any idea what went wrong and how to fix that?

Quoted 7 lines
Quoted 3 lines

Anyway as we are at -rc5 and this is warning fix that caused a regression on different hardware... it should be reverted.

Agreed.

What exactly does "stopped working" mean ? That might help understanding what went wrong.

/sys files related to battery no longer appear. I beieve this has something to do with it:

Quoted 6 lines
[    2.374877] of_get_named_gpiod_flags: parsed 'reset-gpios' property
of node '/ocp at 68000000/spi at 48098000/tsc2005 at 0[0]' - status (0)
[    2.375946] input: TSC2005 touchscreen as
/devices/platform/68000000.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5
[    2.392120] rx51-battery: probe of n900-battery failed with error

-22

Mystery solved:

drivers/hwmon/hwmon.c +3 -1
index 3932f92..fe5ec82 100644
@@ -545,8 +545,10 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata,
 	int i, j, err, id;
 
 	/* Do not accept invalid characters in hwmon name attribute */
-	if (name && (!strlen(name) || strpbrk(name, "-* \t\n")))
+	if (name && (!strlen(name) || strpbrk(name, "-* \t\n"))) {
+		printk("hwmon: Invalid character detected: %s\n", name);
 		return ERR_PTR(-EINVAL);
+	}
 
 	id = ida_simple_get(&hwmon_ida, 0, 0, GFP_KERNEL);
 	if (id < 0)
Quoted 12 lines
Quoted 9 lines

pavel at n900:~$ dmesg | grep -5 Invalid

[    0.829650] of_get_named_gpiod_flags: parsed 'gpio-reset' property
of node '/ocp at 68000000/i2c at 48072000/tlv320aic3x at 19[0]' - status (0)
[    0.833831] tsl2563 2-0029: model 7, rev. 0
[    0.837768] of_get_named_gpiod_flags: parsed 'enable-gpio' property
of node '/ocp at 68000000/i2c at 48072000/lp5523 at 32[0]' - status (0)
[    1.921417] omap_i2c 48072000.i2c: controller timed out
[    2.056823] lp5523x 2-0032: lp5523 Programmable led chip found
[    2.064147] hwmon: Invalid character detected: bq27200-0

So the problem is really that the thermal driver needs to create a valid name.

Right.

Before reverting, can you please try if this patch works or not?

thanks,
rui

Quoted 1 line

From 79320ea3721314ec29ed6cdd6987ff922b11d6f9 Mon Sep 17 00:00:00 2001

From: Zhang Rui <[email protected]>
Date: Tue, 24 Jan 2017 14:11:03 +0800
Subject: [PATCH] thermal: fix parameter when registering hwmon

commit 7611fb68062f ("thermal: thermal_hwmon: Convert to hwmon_device_register_with_info()") converts thermal core to use hwmon_device_register_with_info() to register to hwmon instead of deprecated hwmon_device_register().
But at the same time, the name of the hwmon device created is changed to the thermal zone device name in this commit, which may contain incompatible characters for hwmon.

Fixes it by using exactly the same parameters as before this commit.

Fixes 7611fb68062f ("thermal: thermal_hwmon: Convert to hwmon_devce_register_with_info()")
---
 drivers/thermal/thermal_hwmon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/thermal_hwmon.c +2 -2
index c4a508a..0c6789f 100644
@@ -157,8 +157,8 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
 
 	INIT_LIST_HEAD(&hwmon->tz_list);
 	strlcpy(hwmon->type, tz->type, THERMAL_NAME_LENGTH);
-	hwmon->device = hwmon_device_register_with_info(NULL, hwmon->type,
-							hwmon, NULL, NULL);
+	hwmon->device = hwmon_device_register_with_info(NULL, NULL, NULL,
+							NULL, NULL);
 	if (IS_ERR(hwmon->device)) {
 		result = PTR_ERR(hwmon->device);
 		goto free_mem;
Signature · 1 line
2.7.4
Quoted 36 lines

Guenter

Quoted 32 lines
[    2.064544] bq27xxx-battery 2-0055: failed to register battery
[    2.064605] bq27xxx-battery: probe of 2-0055 failed with error -22
[    2.065368] of_get_named_gpiod_flags: parsed 'power-gpio' property
of node '/ocp at 68000000/i2c at 48072000/tpa6130a2 at 60[0]' - status (0)
[    2.083221] bq2415x-charger 2-006b: automode supported, waiting for
events
[    2.084442] bq2415x-charger 2-006b: driver registered
--
[    2.369842] g_ether gadget: g_ether ready
[    2.377197] tsc2005 spi1.0: GPIO lookup for consumer reset
[    2.377227] tsc2005 spi1.0: using device tree for GPIO lookup
[    2.377288] of_get_named_gpiod_flags: parsed 'reset-gpios' property
of node '/ocp at 68000000/spi at 48098000/tsc2005 at 0[0]' - status (0)
[    2.378936] input: TSC2005 touchscreen as
/devices/platform/68000000.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5
[    2.395111] hwmon: Invalid character detected: rx51-battery
[    2.402587] rx51-battery: probe of n900-battery failed with error
-22
[    2.410247] omap_hsmmc 4809c000.mmc: GPIO lookup for consumer cd
[    2.410247] omap_hsmmc 4809c000.mmc: using device tree for GPIO
lookup
[    2.410278] of_get_named_gpiod_flags: can't parse 'cd-gpios'
property of node '/ocp at 68000000/mmc at 4809c000[0]'
[    2.410278] of_get_named_gpiod_flags: can't parse 'cd-gpio'

property of node '/ocp at 68000000/mmc at 4809c000[0]'

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#10 lore raw
Quoted 59 lines · Zhang Rui
Quoted 46 lines · Guenter Roeck
Quoted 45 lines · Pavel Machek

Hi!

Quoted 16 lines
Quoted 5 lines
Quoted 5 lines

I'll try to revert it on the top of v4.10-rc5 now... and yes, it fixes the issue.

Any idea what went wrong and how to fix that?

Quoted 7 lines
Quoted 3 lines

Anyway as we are at -rc5 and this is warning fix that caused a regression on different hardware... it should be reverted.

Agreed.

What exactly does "stopped working" mean ? That might help understanding what went wrong.

/sys files related to battery no longer appear. I beieve this has something to do with it:

Quoted 6 lines
[    2.374877] of_get_named_gpiod_flags: parsed 'reset-gpios' property
of node '/ocp at 68000000/spi at 48098000/tsc2005 at 0[0]' - status (0)
[    2.375946] input: TSC2005 touchscreen as
/devices/platform/68000000.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5
[    2.392120] rx51-battery: probe of n900-battery failed with error

-22

Mystery solved:

drivers/hwmon/hwmon.c +3 -1
index 3932f92..fe5ec82 100644
@@ -545,8 +545,10 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata,
 	int i, j, err, id;
 
 	/* Do not accept invalid characters in hwmon name attribute */
-	if (name && (!strlen(name) || strpbrk(name, "-* \t\n")))
+	if (name && (!strlen(name) || strpbrk(name, "-* \t\n"))) {
+		printk("hwmon: Invalid character detected: %s\n", name);
 		return ERR_PTR(-EINVAL);
+	}
 
 	id = ida_simple_get(&hwmon_ida, 0, 0, GFP_KERNEL);
 	if (id < 0)
Quoted 12 lines
Quoted 9 lines

pavel at n900:~$ dmesg | grep -5 Invalid

[    0.829650] of_get_named_gpiod_flags: parsed 'gpio-reset' property
of node '/ocp at 68000000/i2c at 48072000/tlv320aic3x at 19[0]' - status (0)
[    0.833831] tsl2563 2-0029: model 7, rev. 0
[    0.837768] of_get_named_gpiod_flags: parsed 'enable-gpio' property
of node '/ocp at 68000000/i2c at 48072000/lp5523 at 32[0]' - status (0)
[    1.921417] omap_i2c 48072000.i2c: controller timed out
[    2.056823] lp5523x 2-0032: lp5523 Programmable led chip found
[    2.064147] hwmon: Invalid character detected: bq27200-0

So the problem is really that the thermal driver needs to create a valid name.

Quoted 3 lines

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?

Pavel

Quoted 40 lines

thanks,
rui

Quoted 1 line

From 79320ea3721314ec29ed6cdd6987ff922b11d6f9 Mon Sep 17 00:00:00 2001

From: Zhang Rui <[email protected]>
Date: Tue, 24 Jan 2017 14:11:03 +0800
Subject: [PATCH] thermal: fix parameter when registering hwmon

commit 7611fb68062f ("thermal: thermal_hwmon: Convert to hwmon_device_register_with_info()") converts thermal core to use hwmon_device_register_with_info() to register to hwmon instead of deprecated hwmon_device_register().
But at the same time, the name of the hwmon device created is changed to the thermal zone device name in this commit, which may contain incompatible characters for hwmon.

Fixes it by using exactly the same parameters as before this commit.

Fixes 7611fb68062f ("thermal: thermal_hwmon: Convert to hwmon_devce_register_with_info()")
---
 drivers/thermal/thermal_hwmon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/thermal_hwmon.c +2 -2
index c4a508a..0c6789f 100644
@@ -157,8 +157,8 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
 
 	INIT_LIST_HEAD(&hwmon->tz_list);
 	strlcpy(hwmon->type, tz->type, THERMAL_NAME_LENGTH);
-	hwmon->device = hwmon_device_register_with_info(NULL, hwmon->type,
-							hwmon, NULL, NULL);
+	hwmon->device = hwmon_device_register_with_info(NULL, NULL, NULL,
+							NULL, NULL);
 	if (IS_ERR(hwmon->device)) {
 		result = PTR_ERR(hwmon->device);
 		goto free_mem;
Signature · 9 lines
(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/20170124/d40ba625/attachment.sig>
maintainer
#11 lore raw
Quoted 64 lines · Pavel Machek
Quoted 59 lines · Zhang Rui
Quoted 46 lines · Guenter Roeck
Quoted 45 lines · Pavel Machek

Hi!

Quoted 16 lines
Quoted 5 lines
Quoted 5 lines

I'll try to revert it on the top of v4.10-rc5 now... and yes, it fixes the issue.

Any idea what went wrong and how to fix that?

Quoted 7 lines
Quoted 3 lines

Anyway as we are at -rc5 and this is warning fix that caused a regression on different hardware... it should be reverted.

Agreed.

What exactly does "stopped working" mean ? That might help understanding what went wrong.

/sys files related to battery no longer appear. I beieve this has something to do with it:

Quoted 6 lines
[    2.374877] of_get_named_gpiod_flags: parsed 'reset-gpios' property
of node '/ocp at 68000000/spi at 48098000/tsc2005 at 0[0]' - status (0)
[    2.375946] input: TSC2005 touchscreen as
/devices/platform/68000000.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5
[    2.392120] rx51-battery: probe of n900-battery failed with error

-22

Mystery solved:

drivers/hwmon/hwmon.c +3 -1
index 3932f92..fe5ec82 100644
@@ -545,8 +545,10 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata,
 	int i, j, err, id;
 
 	/* Do not accept invalid characters in hwmon name attribute */
-	if (name && (!strlen(name) || strpbrk(name, "-* \t\n")))
+	if (name && (!strlen(name) || strpbrk(name, "-* \t\n"))) {
+		printk("hwmon: Invalid character detected: %s\n", name);
 		return ERR_PTR(-EINVAL);
+	}
 
 	id = ida_simple_get(&hwmon_ida, 0, 0, GFP_KERNEL);
 	if (id < 0)
Quoted 12 lines
Quoted 9 lines

pavel at n900:~$ dmesg | grep -5 Invalid

[    0.829650] of_get_named_gpiod_flags: parsed 'gpio-reset' property
of node '/ocp at 68000000/i2c at 48072000/tlv320aic3x at 19[0]' - status (0)
[    0.833831] tsl2563 2-0029: model 7, rev. 0
[    0.837768] of_get_named_gpiod_flags: parsed 'enable-gpio' property
of node '/ocp at 68000000/i2c at 48072000/lp5523 at 32[0]' - status (0)
[    1.921417] omap_i2c 48072000.i2c: controller timed out
[    2.056823] lp5523x 2-0032: lp5523 Programmable led chip found
[    2.064147] hwmon: Invalid character detected: bq27200-0

So the problem is really that the thermal driver needs to create a valid name.

Quoted 3 lines

Right.

Before reverting, can you please try if this patch works or not?

Quoted 8 lines

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.

Guenter

#12 lore raw
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines

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.

Quoted 7 lines
Quoted 4 lines

"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.

Unfortunately, code enforces different rules than documentation says, and it is all visible to userspace.

Pavel

Signature · 9 lines
(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/20170124/c7c57cea/attachment.sig>
maintainer
#13 lore raw
Quoted 13 lines · Pavel Machek
Quoted 13 lines
Quoted 13 lines
Quoted 4 lines

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?

Quoted 7 lines
Quoted 3 lines

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.

Not sure what the problem to be discussed is. Please provide details.

Quoted 1 line

Unfortunately, code enforces different rules than documentation says,

Please specify your problem with rules vs. documentation. You mean the additional checks which also block wildcards and spaces/newline in the name ? Are you having a problem with those ? What are those problems ? I'll be more than happy to update the documentation if your problem is with that mismatch.

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.

Quoted 2 lines

and it is all visible to userspace.

We are talking about a value reported by an attribute, not about an attribute. Maybe the ABI Police thinks differently, but I do not count fixing the value reported by an attribute as an ABI change.

Effecively, what this enforcement does is to make userspace actually work. Ultimately that means, per your standard, that fixing values reported by the kernel is not permitted under any circumstances, even if such changes result in userspace actually working as intended as a result of that change. I would argue that such an enforcement goes a little bit too far.

In addition, there is actually another problem solved by the patch you want to have reverted: The current thermal code has another problem, which is that it creates the name attribute _after_ registering the hwmon device. The udev event for creating the hwmon device thus occurs before its mandatory name attribute (and any other attribute, for that matter) exists, meaning that any userspace handler acting on it would be completely unpredictable. Now _this_ is a real ABI "change", since it fixes a race condition. I guess you are going to argue that this isn't permitted either ?

Guenter

#14 lore raw
Quoted 18 lines · Guenter Roeck
Quoted 17 lines · Pavel Machek
Quoted 16 lines
Quoted 5 lines
Quoted 4 lines

Right.

Before reverting, can you please try if this patch works or not?

Quoted 8 lines

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.

Quoted 5 lines
Quoted 3 lines

Well, lets revert the patch and then we can discuss what to do with the "name" problem.

Not sure what the problem to be discussed is. Please provide details.

See below.

Quoted 7 lines
Quoted 1 line

Unfortunately, code enforces different rules than documentation says,

Please specify your problem with rules vs. documentation. You mean the additional checks which also block wildcards and spaces/newline in the name ? Are you having a problem with those ? What are those problems ? I'll be more than happy to update the documentation if your problem is with that mismatch.

Yes, it sounds like documentation should be updated.

Quoted 9 lines

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.

Quoted 2 lines

and it is all visible to userspace.

We are talking about a value reported by an attribute, not about an attribute. Maybe the ABI Police thinks differently, but I do not count fixing the value reported by an attribute as an ABI change.

The rule is not what you think it is. It does not matter if it is attribute or value. It is about breaking userspace.

And this is the attribute userland will use to search for sensor it works with, right? So changing this attribute will break userspace if someone uses it. N900 already > 2 temperature sensors on, so someone may actually be using it.

Quoted 5 lines

Effecively, what this enforcement does is to make userspace actually work. Ultimately that means, per your standard, that fixing values reported by the kernel is not permitted under any circumstances, even if such changes result in userspace actually working as intended as a result of that change. I would argue that such an enforcement goes a little bit too far.

You can argue whatever you want, but the rule is "no regressions". You may not break userspace app A to fix userspace app B.

Quoted 8 lines

In addition, there is actually another problem solved by the patch you want to have reverted: The current thermal code has another problem, which is that it creates the name attribute _after_ registering the hwmon device. The udev event for creating the hwmon device thus occurs before its mandatory name attribute (and any other attribute, for that matter) exists, meaning that any userspace handler acting on it would be completely unpredictable. Now _this_ is a real ABI "change", since it fixes a race condition. I guess you are going to argue that this isn't permitted either ?

You guessed wrong. It would only be problem if somone relied on that race condition.

Anyway, I reported a rather serious regression in -rc5. The original patch was obviously not understood enough, and it broke charging on my hardware. I'd argue it had no reason to be in -rc5 in the first place.

I believe solution is obvious. Revert the damn patch. I actually wonder why we are discussing it.

Maintainer suggested different solution, but you said it was broken.

You are suggesting modification of two driver names on N900. You don't know what sideeffects it might have. You don't know if there are more driver names to fix. You did not offer a patch.

It is an ugly regression and it is -rc5 time. Actually not your problem, but Fabio Estevam or Zhang Rui has to deal with it soon.

Thanks,

Pavel

Signature · 9 lines
(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/20170124/9ac43c2b/attachment.sig>
#15 lore raw
Quoted 2 lines · Pavel Machek

It is an ugly regression and it is -rc5 time. Actually not your problem, but Fabio Estevam or Zhang Rui has to deal with it soon.

I have already sent the revert and it was acked-by you and Guenter.

reviewer
#16 lore raw
Quoted 6 lines · Fabio Estevam
Quoted 3 lines · Pavel Machek

It is an ugly regression and it is -rc5 time. Actually not your problem, but Fabio Estevam or Zhang Rui has to deal with it soon.

I have already sent the revert and it was acked-by you and Guenter.

Revert patch has been applied and queued for next -rc.

thanks,
rui

#17 lore raw
Quoted 9 lines · Zhang Rui
Quoted 6 lines · Fabio Estevam
Quoted 3 lines · Pavel Machek

It is an ugly regression and it is -rc5 time. Actually not your problem, but Fabio Estevam or Zhang Rui has to deal with it soon.

I have already sent the revert and it was acked-by you and Guenter.

Revert patch has been applied and queued for next -rc.

Thanks!
Pavel

Signature · 9 lines
(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/20170125/1a8a5cd5/attachment-0001.sig>
#18 lore raw
In reply to Guenter Roeck

Hi!

Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 3 lines

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?

Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

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

Quoted 3 lines

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.

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....

Pavel

Signature · 9 lines
(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/20170125/3056248c/attachment.sig>
maintainer
#19 lore raw
Quoted 21 lines · Pavel Machek

Hi!

Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 3 lines

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?

Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

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.

Quoted 7 lines

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

The 'name' parameter will be mandatory for hwmon_device_register_with_groups() and hwmon_device_register_with_info() starting with v4.11, and the API documentation will be updated to list all invalid characters.

The thermal subsystem doesn't play well when it comes to hwmon userspace interaction (generating and removing sensor attributes dynamically messes up pretty much everything, and generating the name attribute after hwmon registration for sure messes up any udev listener). libsensors gets confused by '-' in the 'name' attribute. libsensors also doesn't expect sensor attributes to be dynamically generated and removed, and may react unpredictably if they are. This all means that any existing users of hwmon devices created by the thermal subsystem will most likely not use libsensors nor udev listeners. At the same time, it seems to be quite important at least to you that the '-' in the name is retained.

Given all that, maybe thermal should just stick with the deprecated API and accept the deprecated warning message (or maybe drop hwmon support altogether).

Guenter

#20 lore raw
In reply to Pavel Machek
Quoted 28 lines · On Wednesday 25 January 2017 12:12:33 Pavel Machek wrote:

Hi!

Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 3 lines

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?

Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

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

Quoted 6 lines
Quoted 3 lines

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.

Quoted 3 lines

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?).

Signature · 2 lines
Pali Roh?r
pali.rohar at gmail.com
reviewer
#21 lore raw
Quoted 49 lines · Pali Roh?r
Quoted 38 lines · On Wednesday 25 January 2017 12:12:33 Pavel Machek wrote:

Hi!

Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 9 lines

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?

Quoted 8 lines
Quoted 8 lines
Quoted 5 lines

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

Quoted 1 line
Quoted 8 lines
Quoted 5 lines

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.

Quoted 8 lines

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

Quoted 9 lines
Quoted 6 lines

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?).

maintainer
#22 lore raw
Quoted 62 lines · Zhang Rui
Quoted 49 lines · Pali Roh?r
Quoted 38 lines · On Wednesday 25 January 2017 12:12:33 Pavel Machek wrote:

Hi!

Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 9 lines

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?

Quoted 8 lines
Quoted 8 lines
Quoted 5 lines

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

Quoted 1 line
Quoted 8 lines
Quoted 5 lines

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.

Quoted 8 lines

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.

Quoted 9 lines

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.

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.

Guenter

reviewer
#23 lore raw
Quoted 90 lines · Guenter Roeck
Quoted 89 lines · Zhang Rui
Quoted 65 lines · Pali Roh?r
Quoted 57 lines · On Wednesday 25 January 2017 12:12:33 Pavel Machek wrote:

Hi!

Quoted 34 lines
Quoted 34 lines
Quoted 34 lines
Quoted 20 lines
Quoted 10 lines
Quoted 5 lines

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.

Quoted 8 lines

"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.

Quoted 4 lines
Quoted 4 lines

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

Quoted 8 lines

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.

Quoted 4 lines

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.

Quoted 11 lines

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.

Quoted 9 lines
Quoted 6 lines

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.

Quoted 5 lines

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

maintainer
#24 lore raw
Quoted 97 lines · Zhang Rui
Quoted 96 lines · Guenter Roeck
Quoted 95 lines · Zhang Rui
Quoted 65 lines · Pali Roh?r
Quoted 57 lines · On Wednesday 25 January 2017 12:12:33 Pavel Machek wrote:

Hi!

Quoted 34 lines
Quoted 34 lines
Quoted 34 lines
Quoted 20 lines
Quoted 10 lines
Quoted 5 lines

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.

Quoted 8 lines

"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.

Quoted 4 lines
Quoted 4 lines

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

Quoted 8 lines

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.

Quoted 4 lines

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.

Quoted 11 lines

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.

Quoted 5 lines
Quoted 3 lines

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.

Even if the use doesn't depend on that name ?

Quoted 3 lines

If thermal zone I/F is used, we can not change it's 'type' name to be compatible with new hwmon API.

You mean you can not fix the name to be compatible with libsensors.

Makes me wonder if there shouldn't be a rule that exploits must not be fixed if already exploited.

Guenter

Quoted 11 lines
Quoted 5 lines

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

#25 lore raw

Hi!

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

That sounds like fun. Changing bq27200-0 to bq27200_0 is Forbidden by the ABI Police, but taking the entire device away is ok.

Changing bq27200-0 to bq27200_0 is forbidden in -rc6 time. If you believe noone depends on the name, argue your case, and it might be possible to change it in -rc0.

If someone uses the name, they care about the device, and you can't take it away.

Quoted 4 lines
Quoted 2 lines

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.

Even if the use doesn't depend on that name ?

If the use doesn't depend on the name, you may get away with changing the name. (But not in -rc6.)

Quoted 7 lines
Quoted 2 lines

If thermal zone I/F is used, we can not change it's 'type' name to be compatible with new hwmon API.

You mean you can not fix the name to be compatible with libsensors.

Makes me wonder if there shouldn't be a rule that exploits must not be fixed if already exploited.

That is not useful argumentation.
Pavel

Signature · 9 lines
(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/20170127/acb177c3/attachment-0001.sig>
maintainer
#26 lore raw
Quoted 23 lines · Pavel Machek

Hi!

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

That sounds like fun. Changing bq27200-0 to bq27200_0 is Forbidden by the ABI Police, but taking the entire device away is ok.

Changing bq27200-0 to bq27200_0 is forbidden in -rc6 time. If you believe noone depends on the name, argue your case, and it might be possible to change it in -rc0.

If someone uses the name, they care about the device, and you can't take it away.

Quoted 4 lines
Quoted 2 lines

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.

Even if the use doesn't depend on that name ?

If the use doesn't depend on the name, you may get away with changing the name. (But not in -rc6.)

Quoted 3 lines
Quoted 2 lines

If thermal zone I/F is used, we can not change it's 'type' name to be compatible with new hwmon API.

Quoted 6 lines
Quoted 4 lines

You mean you can not fix the name to be compatible with libsensors.

Makes me wonder if there shouldn't be a rule that exploits must not be fixed if already exploited.

That is not useful argumentation.

Oh, but it is. Providing a valid name is a bug fix for me. For you it is an ABI change. So the ultimate question is what counts as an ABI change and what counts as a bug fix.

Guenter

#27 lore raw
Quoted 26 lines · Guenter Roeck
Quoted 25 lines · Pavel Machek

Hi!

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

That sounds like fun. Changing bq27200-0 to bq27200_0 is Forbidden by the ABI Police, but taking the entire device away is ok.

Changing bq27200-0 to bq27200_0 is forbidden in -rc6 time. If you believe noone depends on the name, argue your case, and it might be possible to change it in -rc0.

If someone uses the name, they care about the device, and you can't take it away.

Quoted 4 lines
Quoted 2 lines

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.

Even if the use doesn't depend on that name ?

If the use doesn't depend on the name, you may get away with changing the name. (But not in -rc6.)

Quoted 5 lines
Quoted 2 lines

If thermal zone I/F is used, we can not change it's 'type' name to be compatible with new hwmon API.

You mean you can not fix the name to be compatible with libsensors.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Makes me wonder if there shouldn't be a rule that exploits must not be fixed if already exploited.

That is not useful argumentation.

Oh, but it is. Providing a valid name is a bug fix for me. For you it is an ABI change. So the ultimate question is what counts as an ABI change and what counts as a bug fix.

You may not fix bugs if it breaks someone's configuration. Now, obviously security is something we can't sacrifice. But if docs don't match the code.. we fix the docs, not the code.

Do you want to call me? I'll give you cellphone number.

Pavel

Signature · 9 lines
(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/20170127/08e5cc4e/attachment.sig>
reviewer
#28 lore raw
In reply to Guenter Roeck
Quoted 129 lines · Guenter Roeck
Quoted 128 lines · Zhang Rui
Quoted 126 lines · Guenter Roeck
Quoted 124 lines · Zhang Rui
Quoted 81 lines · Pali Roh?r
Quoted 71 lines · On Wednesday 25 January 2017 12:12:33 Pavel Machek wrote:

Hi!

Quoted 43 lines
Quoted 43 lines
Quoted 43 lines
Quoted 27 lines
Quoted 15 lines
Quoted 6 lines

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.

Quoted 9 lines

"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.

Quoted 5 lines
Quoted 5 lines

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

Quoted 11 lines

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.

Quoted 5 lines

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.

Quoted 15 lines

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.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

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.

Even if the use doesn't depend on that name ?

when I said "the interface is used", I mean the name string is used.

Quoted 7 lines
Quoted 5 lines

If thermal zone I/F is used, we can not change it's 'type' name to be
compatible with new hwmon API.

You mean you can not fix the name to be compatible with libsensors.

We can try to convert it to a libsensor-compatible string, either for hwmon only, or for both thermal and hwmon. But this is an ABI change, right?
And my understanding about the ABI change is that, if no one cares about it, we're okay, or else, this is a regression, and we need to fall back to the previous ABI immediately. In order to change it in a long run, we need to make a note in Documentation/ABI/, and change it sometime in the future (a couple of release cycles or even more). This also happens when I was trying to delete the obsoltete

thanks,
rui

Quoted 17 lines

Makes me wonder if there shouldn't be a rule that exploits must not be fixed if already exploited.

Guenter

Quoted 12 lines
Quoted 7 lines

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

maintainer
#29 lore raw
Quoted 11 lines · Zhang Rui
Quoted 7 lines
Quoted 5 lines

If thermal zone I/F is used, we can not change it's 'type' name to be
compatible with new hwmon API.

You mean you can not fix the name to be compatible with libsensors.

We can try to convert it to a libsensor-compatible string, either for hwmon only, or for both thermal and hwmon. But this is an ABI change, right?

Let's go back to the basics.

Fact is that the thermal subsystem registers hwmon devices with 'name' attributes which violate the documented hardware monitoring ABI. I think we can consider this undisputed.

The rest is pretty much all opinion.

Is a change in a driver to stop violating a documented ABI an ABI change or a bug fix ? In other words, does a driver violating a documented ABI make that ABI violation part of the ABI ?

Quite interesting questions. My take is that it is a bug fix, others apparently have the strong opinion that potential users of such an ABI violation have priority, and that a violation of a documented ABI _does_ make this violation part of the ABI.

I'll leave it at that. I tried to make my position clear, but it appears that I am quite alone in my opinion. With that, I'll leave it up to you to decide how to proceed.

Guenter

#30 lore raw
Quoted 19 lines · Guenter Roeck
Quoted 11 lines · Zhang Rui
Quoted 7 lines
Quoted 5 lines

If thermal zone I/F is used, we can not change it's 'type' name to be
compatible with new hwmon API.

You mean you can not fix the name to be compatible with libsensors.

We can try to convert it to a libsensor-compatible string, either for hwmon only, or for both thermal and hwmon. But this is an ABI change, right?

Let's go back to the basics.

Fact is that the thermal subsystem registers hwmon devices with 'name' attributes which violate the documented hardware monitoring ABI. I think we can consider this undisputed.

Quoted 5 lines

The rest is pretty much all opinion.

Is a change in a driver to stop violating a documented ABI an ABI change or a bug fix ? In other words, does a driver violating a documented ABI make that ABI violation part of the ABI ?

It can be both. But "no regressions" takes precedence over "documentation".

Quoted 4 lines

Quite interesting questions. My take is that it is a bug fix, others apparently have the strong opinion that potential users of such an ABI violation have priority, and that a violation of a documented ABI _does_ make this violation part of the ABI.

"Potential" users you can work around. "Real" users are problem.

And yes, I have strong opinion about release candidates. Outside that, see my next mail.

Pavel

Signature · 9 lines
(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/20170127/45c7f31f/attachment.sig>
#31 lore raw
In reply to Zhang Rui

Hi!

Quoted 17 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

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.

Even if the use doesn't depend on that name ?

when I said "the interface is used", I mean the name string is used.

Quoted 7 lines
Quoted 5 lines

If thermal zone I/F is used, we can not change it's 'type' name to be
compatible with new hwmon API.

You mean you can not fix the name to be compatible with libsensors.

Quoted 8 lines

We can try to convert it to a libsensor-compatible string, either for hwmon only, or for both thermal and hwmon. But this is an ABI change, right?
And my understanding about the ABI change is that, if no one cares about it, we're okay, or else, this is a regression, and we need to fall back to the previous ABI immediately. In order to change it in a long run, we need to make a note in Documentation/ABI/, and change it sometime in the future (a couple of release cycles or even more).

If no one cares, you can get away with the change. So I guess that's what we should try. In -rc1. We should _not_ do "this changes in 2 years" dance, as that would increase chance for someone to use the old name.

So I guess changing to libsensor-compatible name in v4.11-rc0 (maybe with note in the ABI documenation) is the best plan. If someone complains, we'll have to revert and think about something else.

Pavel

Signature · 9 lines
(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/20170127/e9ed2a62/attachment-0001.sig>
#32 lore raw
In reply to Zhang Rui
Quoted 97 lines · On Friday 27 January 2017 11:39:42 Zhang Rui wrote:
Quoted 96 lines · Guenter Roeck
Quoted 95 lines · Zhang Rui
Quoted 65 lines · Pali Roh?r
Quoted 57 lines · On Wednesday 25 January 2017 12:12:33 Pavel Machek wrote:

Hi!

Quoted 34 lines
Quoted 34 lines
Quoted 34 lines
Quoted 20 lines
Quoted 10 lines
Quoted 5 lines

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.

Quoted 8 lines

"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.

Quoted 4 lines
Quoted 4 lines

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

Quoted 8 lines

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.

Quoted 4 lines

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.

Quoted 11 lines

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.

Quoted 7 lines
Quoted 3 lines

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).

Quoted 10 lines
Quoted 5 lines

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

Signature · 2 lines
Pali Roh?r
pali.rohar at gmail.com
#33 lore raw
In reply to Guenter Roeck
Quoted 10 lines
Quoted 10 lines

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.

Quoted 7 lines
Quoted 4 lines

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.

Stop trying to break other people's systems. Thanks you.

Pavel

Signature · 9 lines
(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/20170127/001533da/attachment.sig>
maintainer
#34 lore raw
Quoted 15 lines · Pavel Machek
Quoted 15 lines
Quoted 14 lines

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.

Quoted 5 lines
Quoted 2 lines

That sounds like fun. Changing bq27200-0 to bq27200_0 is Forbidden by the ABI Police, but taking the entire device away is ok.

Stop trying to break other people's systems. Thanks you.

You still have not shown that it does. Actually, I am trying to _fix_ other people's systems (those using libsensors).

Guenter

#35 lore raw

Hi!

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

That sounds like fun. Changing bq27200-0 to bq27200_0 is Forbidden by the ABI Police, but taking the entire device away is ok.

Stop trying to break other people's systems. Thanks you.

You still have not shown that it does. Actually, I am trying to _fix_ other people's systems (those using libsensors).

No, I don't know that it does. Please avoid 1) calling me police and
2) claiming that taking away entire devices is okay (when it probably is not).

And no, I don't know if anyone uses hwmon ABI on affected N900. [And how many other devices are affected, '-' seems to be quite common character in kernel names.] If I knew about concrete breakage, we'd have very different discussion.

Well, so first things first. What about fixing libsensors to allow '-' and '*' in the name?

Pavel

Signature · 9 lines
(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/20170127/1950d963/attachment-0001.sig>
#36 lore raw
In reply to Pali Rohár
Quoted 36 lines · Pali Roh?r
Quoted 28 lines · On Wednesday 25 January 2017 12:12:33 Pavel Machek wrote:

Hi!

Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 3 lines

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?

Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

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

Quoted 6 lines
Quoted 3 lines

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.

Quoted 7 lines

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.

So maemo does not use that. Good. Nor does my Debian userspace. Hey, maybe you can get away with changing that.

Including batteries in hwmon interface seems useful, and I'd keep that.

Pavel

Signature · 9 lines
(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/20170127/bd2ac369/attachment.sig>
maintainer
#37 lore raw
In reply to Zhang Rui
Quoted 93 lines · Zhang Rui
Quoted 46 lines · Guenter Roeck
Quoted 45 lines · Pavel Machek

Hi!

Quoted 16 lines
Quoted 5 lines
Quoted 5 lines

I'll try to revert it on the top of v4.10-rc5 now... and yes, it fixes the issue.

Any idea what went wrong and how to fix that?

Quoted 7 lines
Quoted 3 lines

Anyway as we are at -rc5 and this is warning fix that caused a regression on different hardware... it should be reverted.

Agreed.

What exactly does "stopped working" mean ? That might help understanding what went wrong.

/sys files related to battery no longer appear. I beieve this has something to do with it:

Quoted 6 lines
[    2.374877] of_get_named_gpiod_flags: parsed 'reset-gpios' property
of node '/ocp at 68000000/spi at 48098000/tsc2005 at 0[0]' - status (0)
[    2.375946] input: TSC2005 touchscreen as
/devices/platform/68000000.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5
[    2.392120] rx51-battery: probe of n900-battery failed with error

-22

Mystery solved:

drivers/hwmon/hwmon.c +3 -1
index 3932f92..fe5ec82 100644
@@ -545,8 +545,10 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata,
 	int i, j, err, id;
 
 	/* Do not accept invalid characters in hwmon name attribute */
-	if (name && (!strlen(name) || strpbrk(name, "-* \t\n")))
+	if (name && (!strlen(name) || strpbrk(name, "-* \t\n"))) {
+		printk("hwmon: Invalid character detected: %s\n", name);
 		return ERR_PTR(-EINVAL);
+	}
 
 	id = ida_simple_get(&hwmon_ida, 0, 0, GFP_KERNEL);
 	if (id < 0)
Quoted 12 lines
Quoted 9 lines

pavel at n900:~$ dmesg | grep -5 Invalid

[    0.829650] of_get_named_gpiod_flags: parsed 'gpio-reset' property
of node '/ocp at 68000000/i2c at 48072000/tlv320aic3x at 19[0]' - status (0)
[    0.833831] tsl2563 2-0029: model 7, rev. 0
[    0.837768] of_get_named_gpiod_flags: parsed 'enable-gpio' property
of node '/ocp at 68000000/i2c at 48072000/lp5523 at 32[0]' - status (0)
[    1.921417] omap_i2c 48072000.i2c: controller timed out
[    2.056823] lp5523x 2-0032: lp5523 Programmable led chip found
[    2.064147] hwmon: Invalid character detected: bq27200-0

So the problem is really that the thermal driver needs to create a valid name.

Right.

Before reverting, can you please try if this patch works or not?

thanks,
rui

Quoted 1 line

From 79320ea3721314ec29ed6cdd6987ff922b11d6f9 Mon Sep 17 00:00:00 2001

From: Zhang Rui <[email protected]>
Date: Tue, 24 Jan 2017 14:11:03 +0800
Subject: [PATCH] thermal: fix parameter when registering hwmon

commit 7611fb68062f ("thermal: thermal_hwmon: Convert to hwmon_device_register_with_info()") converts thermal core to use hwmon_device_register_with_info() to register to hwmon instead of deprecated hwmon_device_register().
But at the same time, the name of the hwmon device created is changed to the thermal zone device name in this commit, which may contain incompatible characters for hwmon.

Fixes it by using exactly the same parameters as before this commit.

Fixes 7611fb68062f ("thermal: thermal_hwmon: Convert to hwmon_devce_register_with_info()")
---
 drivers/thermal/thermal_hwmon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/thermal_hwmon.c +0 -0
index c4a508a..0c6789f 100644

drivers/thermal/thermal_hwmon.c int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) · line 161

Quoted 7 lines
drivers/thermal/thermal_hwmon.c +2 -2
@@ -157,8 +157,8 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
 
 	INIT_LIST_HEAD(&hwmon->tz_list);
 	strlcpy(hwmon->type, tz->type, THERMAL_NAME_LENGTH);
-	hwmon->device = hwmon_device_register_with_info(NULL, hwmon->type,
-							hwmon, NULL, NULL);
+	hwmon->device = hwmon_device_register_with_info(NULL, NULL, NULL,
+							NULL, NULL);

This is wrong. The name should be converted to a valid name. Otherwise you would still have to provide the name attribute yourself, and the resulting name would still be invalid. A simple fix would be to add

	strreplace(hwmon->type, '-', '_');

after strlcpy().

Guenter

Quoted 4 lines
drivers/thermal/thermal_hwmon.c +0 -0
 	if (IS_ERR(hwmon->device)) {
 		result = PTR_ERR(hwmon->device);
 		goto free_mem;
#38 lore raw

Hi!

Quoted 62 lines
Quoted 51 lines
Quoted 30 lines
Quoted 30 lines
Quoted 9 lines

/sys files related to battery no longer appear. I beieve this has something to do with it:

[    2.374877] of_get_named_gpiod_flags: parsed 'reset-gpios' property
of node '/ocp at 68000000/spi at 48098000/tsc2005 at 0[0]' - status (0)
[    2.375946] input: TSC2005 touchscreen as
/devices/platform/68000000.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5
[    2.392120] rx51-battery: probe of n900-battery failed with error

-22

Mystery solved:

drivers/hwmon/hwmon.c +3 -1
index 3932f92..fe5ec82 100644
@@ -545,8 +545,10 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata,
 	int i, j, err, id;
 
 	/* Do not accept invalid characters in hwmon name attribute */
-	if (name && (!strlen(name) || strpbrk(name, "-* \t\n")))
+	if (name && (!strlen(name) || strpbrk(name, "-* \t\n"))) {
+		printk("hwmon: Invalid character detected: %s\n", name);
 		return ERR_PTR(-EINVAL);
+	}
 
 	id = ida_simple_get(&hwmon_ida, 0, 0, GFP_KERNEL);
 	if (id < 0)
Quoted 12 lines
Quoted 9 lines

pavel at n900:~$ dmesg | grep -5 Invalid

[    0.829650] of_get_named_gpiod_flags: parsed 'gpio-reset' property
of node '/ocp at 68000000/i2c at 48072000/tlv320aic3x at 19[0]' - status (0)
[    0.833831] tsl2563 2-0029: model 7, rev. 0
[    0.837768] of_get_named_gpiod_flags: parsed 'enable-gpio' property
of node '/ocp at 68000000/i2c at 48072000/lp5523 at 32[0]' - status (0)
[    1.921417] omap_i2c 48072000.i2c: controller timed out
[    2.056823] lp5523x 2-0032: lp5523 Programmable led chip found
[    2.064147] hwmon: Invalid character detected: bq27200-0

So the problem is really that the thermal driver needs to create a valid name.

Right.

Before reverting, can you please try if this patch works or not?

drivers/thermal/thermal_hwmon.c +0 -0
index c4a508a..0c6789f 100644

drivers/thermal/thermal_hwmon.c int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) · line 161

Quoted 7 lines
drivers/thermal/thermal_hwmon.c +2 -2
@@ -157,8 +157,8 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
 
 	INIT_LIST_HEAD(&hwmon->tz_list);
 	strlcpy(hwmon->type, tz->type, THERMAL_NAME_LENGTH);
-	hwmon->device = hwmon_device_register_with_info(NULL, hwmon->type,
-							hwmon, NULL, NULL);
+	hwmon->device = hwmon_device_register_with_info(NULL, NULL, NULL,
+							NULL, NULL);

This is wrong. The name should be converted to a valid name. Otherwise you would still have to provide the name attribute yourself, and the resulting name would still be invalid. A simple fix would be to add

Quoted 2 lines
	strreplace(hwmon->type, '-', '_');

after strlcpy().

Simple, yes. But that will change userland interface. Is it okay thing to do?
Pavel

Signature · 9 lines
(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/20170124/4006858c/attachment.sig>
maintainer
#39 lore raw
Quoted 67 lines · Pavel Machek

Hi!

Quoted 62 lines
Quoted 51 lines
Quoted 30 lines
Quoted 30 lines
Quoted 9 lines

/sys files related to battery no longer appear. I beieve this has something to do with it:

[    2.374877] of_get_named_gpiod_flags: parsed 'reset-gpios' property
of node '/ocp at 68000000/spi at 48098000/tsc2005 at 0[0]' - status (0)
[    2.375946] input: TSC2005 touchscreen as
/devices/platform/68000000.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5
[    2.392120] rx51-battery: probe of n900-battery failed with error

-22

Mystery solved:

drivers/hwmon/hwmon.c +3 -1
index 3932f92..fe5ec82 100644
@@ -545,8 +545,10 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata,
 	int i, j, err, id;
 
 	/* Do not accept invalid characters in hwmon name attribute */
-	if (name && (!strlen(name) || strpbrk(name, "-* \t\n")))
+	if (name && (!strlen(name) || strpbrk(name, "-* \t\n"))) {
+		printk("hwmon: Invalid character detected: %s\n", name);
 		return ERR_PTR(-EINVAL);
+	}
 
 	id = ida_simple_get(&hwmon_ida, 0, 0, GFP_KERNEL);
 	if (id < 0)
Quoted 12 lines
Quoted 9 lines

pavel at n900:~$ dmesg | grep -5 Invalid

[    0.829650] of_get_named_gpiod_flags: parsed 'gpio-reset' property
of node '/ocp at 68000000/i2c at 48072000/tlv320aic3x at 19[0]' - status (0)
[    0.833831] tsl2563 2-0029: model 7, rev. 0
[    0.837768] of_get_named_gpiod_flags: parsed 'enable-gpio' property
of node '/ocp at 68000000/i2c at 48072000/lp5523 at 32[0]' - status (0)
[    1.921417] omap_i2c 48072000.i2c: controller timed out
[    2.056823] lp5523x 2-0032: lp5523 Programmable led chip found
[    2.064147] hwmon: Invalid character detected: bq27200-0

So the problem is really that the thermal driver needs to create a valid name.

Right.

Before reverting, can you please try if this patch works or not?

drivers/thermal/thermal_hwmon.c +0 -0
index c4a508a..0c6789f 100644

drivers/thermal/thermal_hwmon.c int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) · line 161

Quoted 7 lines
drivers/thermal/thermal_hwmon.c +2 -2
@@ -157,8 +157,8 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
 
 	INIT_LIST_HEAD(&hwmon->tz_list);
 	strlcpy(hwmon->type, tz->type, THERMAL_NAME_LENGTH);
-	hwmon->device = hwmon_device_register_with_info(NULL, hwmon->type,
-							hwmon, NULL, NULL);
+	hwmon->device = hwmon_device_register_with_info(NULL, NULL, NULL,
+							NULL, NULL);

This is wrong. The name should be converted to a valid name. Otherwise you would still have to provide the name attribute yourself, and the resulting name would still be invalid. A simple fix would be to add

Quoted 2 lines
	strreplace(hwmon->type, '-', '_');

after strlcpy().

Quoted 2 lines

Simple, yes. But that will change userland interface. Is it okay thing to do?

Yes, because the old name is invalid. Note that the new API also changes the sysfs directory path. But, as mentioned separately, if providing valid names is unacceptable for thermal drivers, the thermal subsystem will have to stick with the old API (and I may create a patch to make the name attribute mandatory for the new API to prevent people from defeating the purpose of the conversion by not providing one).

Guenter

#40 lore raw
In reply to Guenter Roeck

Hi!

Quoted 43 lines
Quoted 43 lines
Quoted 16 lines
Quoted 5 lines
Quoted 5 lines

I'll try to revert it on the top of v4.10-rc5 now... and yes, it fixes the issue.

Any idea what went wrong and how to fix that?

Quoted 7 lines
Quoted 3 lines

Anyway as we are at -rc5 and this is warning fix that caused a regression on different hardware... it should be reverted.

Agreed.

What exactly does "stopped working" mean ? That might help understanding what went wrong.

/sys files related to battery no longer appear. I beieve this has something to do with it:

Quoted 6 lines
[    2.374877] of_get_named_gpiod_flags: parsed 'reset-gpios' property
of node '/ocp at 68000000/spi at 48098000/tsc2005 at 0[0]' - status (0)
[    2.375946] input: TSC2005 touchscreen as
/devices/platform/68000000.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5
[    2.392120] rx51-battery: probe of n900-battery failed with error

-22

Mystery solved:

drivers/hwmon/hwmon.c +3 -1
index 3932f92..fe5ec82 100644
@@ -545,8 +545,10 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata,
 	int i, j, err, id;
 
 	/* Do not accept invalid characters in hwmon name attribute */
-	if (name && (!strlen(name) || strpbrk(name, "-* \t\n")))
+	if (name && (!strlen(name) || strpbrk(name, "-* \t\n"))) {
+		printk("hwmon: Invalid character detected: %s\n", name);
 		return ERR_PTR(-EINVAL);
+	}
 
 	id = ida_simple_get(&hwmon_ida, 0, 0, GFP_KERNEL);
 	if (id < 0)
Quoted 11 lines
Quoted 9 lines

pavel at n900:~$ dmesg | grep -5 Invalid

[    0.829650] of_get_named_gpiod_flags: parsed 'gpio-reset' property
of node '/ocp at 68000000/i2c at 48072000/tlv320aic3x at 19[0]' - status (0)
[    0.833831] tsl2563 2-0029: model 7, rev. 0
[    0.837768] of_get_named_gpiod_flags: parsed 'enable-gpio' property
of node '/ocp at 68000000/i2c at 48072000/lp5523 at 32[0]' - status (0)
[    1.921417] omap_i2c 48072000.i2c: controller timed out
[    2.056823] lp5523x 2-0032: lp5523 Programmable led chip found
[    2.064147] hwmon: Invalid character detected: bq27200-0

So the problem is really that the thermal driver needs to create a valid name.

Look down how log continues.

So we really have two problematic names on one device. Plus, those names are exposed to userspace, AFAICT. So "just changing them" might not be good idea.

Maybe we should just relax the check?

Anyway, this just confirms that original patch needs to be reverted, and that there will be some fun issues to solve in v4.11.

Pavel

Quoted 26 lines
Quoted 26 lines
[    2.064544] bq27xxx-battery 2-0055: failed to register battery
[    2.064605] bq27xxx-battery: probe of 2-0055 failed with error -22
[    2.065368] of_get_named_gpiod_flags: parsed 'power-gpio' property
of node '/ocp at 68000000/i2c at 48072000/tpa6130a2 at 60[0]' - status (0)
[    2.083221] bq2415x-charger 2-006b: automode supported, waiting for
events
[    2.084442] bq2415x-charger 2-006b: driver registered
--
[    2.369842] g_ether gadget: g_ether ready
[    2.377197] tsc2005 spi1.0: GPIO lookup for consumer reset
[    2.377227] tsc2005 spi1.0: using device tree for GPIO lookup
[    2.377288] of_get_named_gpiod_flags: parsed 'reset-gpios' property
of node '/ocp at 68000000/spi at 48098000/tsc2005 at 0[0]' - status (0)
[    2.378936] input: TSC2005 touchscreen as
/devices/platform/68000000.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5
[    2.395111] hwmon: Invalid character detected: rx51-battery
[    2.402587] rx51-battery: probe of n900-battery failed with error
-22
[    2.410247] omap_hsmmc 4809c000.mmc: GPIO lookup for consumer cd
[    2.410247] omap_hsmmc 4809c000.mmc: using device tree for GPIO
lookup
[    2.410278] of_get_named_gpiod_flags: can't parse 'cd-gpios'
property of node '/ocp at 68000000/mmc at 4809c000[0]'
[    2.410278] of_get_named_gpiod_flags: can't parse 'cd-gpio'

property of node '/ocp at 68000000/mmc at 4809c000[0]'

Signature · 9 lines
(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/20170124/54824eb3/attachment.sig>
maintainer
#41 lore raw
Quoted 57 lines · Pavel Machek

Hi!

Quoted 43 lines
Quoted 43 lines
Quoted 16 lines
Quoted 5 lines
Quoted 5 lines

I'll try to revert it on the top of v4.10-rc5 now... and yes, it fixes the issue.

Any idea what went wrong and how to fix that?

Quoted 7 lines
Quoted 3 lines

Anyway as we are at -rc5 and this is warning fix that caused a regression on different hardware... it should be reverted.

Agreed.

What exactly does "stopped working" mean ? That might help understanding what went wrong.

/sys files related to battery no longer appear. I beieve this has something to do with it:

Quoted 6 lines
[    2.374877] of_get_named_gpiod_flags: parsed 'reset-gpios' property
of node '/ocp at 68000000/spi at 48098000/tsc2005 at 0[0]' - status (0)
[    2.375946] input: TSC2005 touchscreen as
/devices/platform/68000000.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5
[    2.392120] rx51-battery: probe of n900-battery failed with error

-22

Mystery solved:

drivers/hwmon/hwmon.c +3 -1
index 3932f92..fe5ec82 100644
@@ -545,8 +545,10 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata,
 	int i, j, err, id;
 
 	/* Do not accept invalid characters in hwmon name attribute */
-	if (name && (!strlen(name) || strpbrk(name, "-* \t\n")))
+	if (name && (!strlen(name) || strpbrk(name, "-* \t\n"))) {
+		printk("hwmon: Invalid character detected: %s\n", name);
 		return ERR_PTR(-EINVAL);
+	}
 
 	id = ida_simple_get(&hwmon_ida, 0, 0, GFP_KERNEL);
 	if (id < 0)
Quoted 11 lines
Quoted 9 lines

pavel at n900:~$ dmesg | grep -5 Invalid

[    0.829650] of_get_named_gpiod_flags: parsed 'gpio-reset' property
of node '/ocp at 68000000/i2c at 48072000/tlv320aic3x at 19[0]' - status (0)
[    0.833831] tsl2563 2-0029: model 7, rev. 0
[    0.837768] of_get_named_gpiod_flags: parsed 'enable-gpio' property
of node '/ocp at 68000000/i2c at 48072000/lp5523 at 32[0]' - status (0)
[    1.921417] omap_i2c 48072000.i2c: controller timed out
[    2.056823] lp5523x 2-0032: lp5523 Programmable led chip found
[    2.064147] hwmon: Invalid character detected: bq27200-0

So the problem is really that the thermal driver needs to create a valid name.

Quoted 8 lines

Look down how log continues.

So we really have two problematic names on one device. Plus, those names are exposed to userspace, AFAICT. So "just changing them" might not be good idea.

Maybe we should just relax the check?

So that invalid names are reported to user space ? No. If you insist reporting bad names to user space just because bad names have been reported to user space before, messing up libsensors, stick with the old API that lets you do that, but don't mess up the new API.

Guenter

Quoted 33 lines

Anyway, this just confirms that original patch needs to be reverted, and that there will be some fun issues to solve in v4.11.

Pavel

Quoted 26 lines
Quoted 26 lines
[    2.064544] bq27xxx-battery 2-0055: failed to register battery
[    2.064605] bq27xxx-battery: probe of 2-0055 failed with error -22
[    2.065368] of_get_named_gpiod_flags: parsed 'power-gpio' property
of node '/ocp at 68000000/i2c at 48072000/tpa6130a2 at 60[0]' - status (0)
[    2.083221] bq2415x-charger 2-006b: automode supported, waiting for
events
[    2.084442] bq2415x-charger 2-006b: driver registered
--
[    2.369842] g_ether gadget: g_ether ready
[    2.377197] tsc2005 spi1.0: GPIO lookup for consumer reset
[    2.377227] tsc2005 spi1.0: using device tree for GPIO lookup
[    2.377288] of_get_named_gpiod_flags: parsed 'reset-gpios' property
of node '/ocp at 68000000/spi at 48098000/tsc2005 at 0[0]' - status (0)
[    2.378936] input: TSC2005 touchscreen as
/devices/platform/68000000.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5
[    2.395111] hwmon: Invalid character detected: rx51-battery
[    2.402587] rx51-battery: probe of n900-battery failed with error
-22
[    2.410247] omap_hsmmc 4809c000.mmc: GPIO lookup for consumer cd
[    2.410247] omap_hsmmc 4809c000.mmc: using device tree for GPIO
lookup
[    2.410278] of_get_named_gpiod_flags: can't parse 'cd-gpios'
property of node '/ocp at 68000000/mmc at 4809c000[0]'
[    2.410278] of_get_named_gpiod_flags: can't parse 'cd-gpio'

property of node '/ocp at 68000000/mmc at 4809c000[0]'

#42 lore raw
In reply to Pavel Machek
Quoted 94 lines · Pavel Machek

Hi!

Quoted 2 lines

It seems that battery driver stopped working on N900 between -rc4 and -rc5.

pavel at amd:/data/l/linux-n900$ git bisect log
# bad: [41f283973653dc44af47585fa79fb6da6ffdc2e2] Merge /data//l/clean-cg into mini-v4.10
# good: [4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185] It seems mainline -rc4 did have a fix for the sound issue. Use that one.
git bisect start 'mini-v4.10' '4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185'
# good: [e90665a5d38b17fdbe484a85fbba917a7006522d] Merge tag 'ceph-for-4.10-rc5' of git://github.com/ceph/ceph-client
git bisect good e90665a5d38b17fdbe484a85fbba917a7006522d
# good: [83fd57a740bb19286959b3085eb93532f3e7ef2c] Merge tag 'powerpc-4.10-2' of
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
git bisect good 83fd57a740bb19286959b3085eb93532f3e7ef2c
# good: [c497f8d17246720afe680ea1a8fa6e48e75af852] Merge tag 'usb-4.10-rc5' of
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
git bisect good c497f8d17246720afe680ea1a8fa6e48e75af852
# bad: [bb6c01c2dde67b165cf7c808b0f00677b6f94b96] Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
git bisect bad bb6c01c2dde67b165cf7c808b0f00677b6f94b96
# good: [18591add41ec9558ce0e32ef88626c18cc70c686] thermal: rockchip:
handle set_trips without the trip points
git bisect good 18591add41ec9558ce0e32ef88626c18cc70c686
# bad: [f53345e8cf027d03187b9417f1f8883c516e1a5b] thermal: core: move tz->device.groups cleanup to thermal_release
git bisect bad f53345e8cf027d03187b9417f1f8883c516e1a5b
# bad: [7611fb68062f8d7f416f3272894d1edf7bbff29c] thermal:
thermal_hwmon: Convert to hwmon_device_register_with_info() git bisect bad 7611fb68062f8d7f416f3272894d1edf7bbff29c

# first bad commit: [7611fb68062f8d7f416f3272894d1edf7bbff29c]
thermal: thermal_hwmon: Convert to hwmon_device_register_with_info()
pavel at amd:/data/l/linux-n900$

pavel at amd:/data/l/linux-n900$ git bisect log
# bad: [41f283973653dc44af47585fa79fb6da6ffdc2e2] Merge /data//l/clean-cg into mini-v4.10
# good: [4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185] It seems mainline -rc4 did have a fix for the sound issue. Use that one.
git bisect start 'mini-v4.10' '4f8d9925eb1de1ec1c4183164f1bc7b01f5ae185'
# good: [e90665a5d38b17fdbe484a85fbba917a7006522d] Merge tag 'ceph-for-4.10-rc5' of git://github.com/ceph/ceph-client
git bisect good e90665a5d38b17fdbe484a85fbba917a7006522d
# good: [83fd57a740bb19286959b3085eb93532f3e7ef2c] Merge tag 'powerpc-4.10-2' of
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
git bisect good 83fd57a740bb19286959b3085eb93532f3e7ef2c
# good: [c497f8d17246720afe680ea1a8fa6e48e75af852] Merge tag 'usb-4.10-rc5' of
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
git bisect good c497f8d17246720afe680ea1a8fa6e48e75af852
# bad: [bb6c01c2dde67b165cf7c808b0f00677b6f94b96] Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
git bisect bad bb6c01c2dde67b165cf7c808b0f00677b6f94b96
# good: [18591add41ec9558ce0e32ef88626c18cc70c686] thermal: rockchip:
handle set_trips without the trip points
git bisect good 18591add41ec9558ce0e32ef88626c18cc70c686
# bad: [f53345e8cf027d03187b9417f1f8883c516e1a5b] thermal: core: move tz->device.groups cleanup to thermal_release
git bisect bad f53345e8cf027d03187b9417f1f8883c516e1a5b
# bad: [7611fb68062f8d7f416f3272894d1edf7bbff29c] thermal:
thermal_hwmon: Convert to hwmon_device_register_with_info() git bisect bad 7611fb68062f8d7f416f3272894d1edf7bbff29c

# first bad commit: [7611fb68062f8d7f416f3272894d1edf7bbff29c]
thermal: thermal_hwmon: Convert to hwmon_device_register_with_info()
pavel at amd:/data/l/linux-n900$

7611fb68062f8d7f416f3272894d1edf7bbff29c is the first bad commit commit 7611fb68062f8d7f416f3272894d1edf7bbff29c

Author: Fabio Estevam <[email protected]>
Date:   Tue Dec 27 15:31:49 2016 -0200

thermal: thermal_hwmon: Convert to
hwmon_device_register_with_info()

Booting Linux on a mx6q based board leads to the following warning:

(NULL device *): hwmon_device_register() is deprecated. Please convert the
driver to use hwmon_device_register_with_info().

,so do as suggested.

Also, this results in the core taking care of creating the 'name'
attribute, so drop the code doing that from the thermal driver.

Quoted 8 lines

:040000 040000 b3f6095ab53677277c2f9d75cb6430afb6825765
156a18e983a22b8ae43c7b312a4e1c63017f0e26 M drivers

I'll try to revert it on the top of v4.10-rc5 now.

As I mentioned, works ok with the revert.

rx51_battery.c calls power_supply_register()
power_supply_core.c calls thermal_zone_device_register() in psy_register_thermal() thermal_core.c calls thermal_add_hwmon_sysfs()

Best regards,
Pavel

Signature · 9 lines
(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/20170123/17fce7f1/attachment-0001.sig>