]> git.baikalelectronics.ru Git - kernel.git/commit
thermal: armada: Wait sensors validity before exiting the init callback
authorMiquel Raynal <miquel.raynal@free-electrons.com>
Fri, 22 Dec 2017 16:14:12 +0000 (17:14 +0100)
committerEduardo Valentin <edubezval@gmail.com>
Mon, 1 Jan 2018 21:25:19 +0000 (13:25 -0800)
commit64163681a25e00182f727caa3a57ffe8d70f1022
tree9775cb18fdacc6fd65e2d309fe94c3fa65dae5d0
parent8c0b888f6610d0ebbc4bdfb52d2fef9f4a11adfc
thermal: armada: Wait sensors validity before exiting the init callback

The thermal core will check for sensors validity right after the
initialization callback has returned. As the initialization routine make
a reset, the sensors are not ready immediately and the core spawns an
error in the dmesg. Avoid this annoying situation by polling on the
validity bit before exiting from these routines. This also avoid the use
of blind sleeps.

Suggested-by: David Sniatkiwicz <davidsn@marvell.com>
Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/armada_thermal.c