]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (bt1-pvt) Test sensor power supply on probe
authorBaikal Electronics <support@baikalelectronics.ru>
Sun, 20 Sep 2020 11:09:21 +0000 (14:09 +0300)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 4 Oct 2020 15:40:10 +0000 (08:40 -0700)
commitb65857c0006785f0ac2f60bcd83550032b931a87
tree3f091be8f8117c74e3dac697bcd429d3bbd07951
parent766b4418f724436416aa1969c709aa89cd66dfc4
hwmon: (bt1-pvt) Test sensor power supply on probe

Baikal-T1 PVT sensor has got a dedicated power supply domain (feed up by
the external GPVT/VPVT_18 pins). In case if it isn't powered up, the
registers will be accessible, but the sensor conversion just won't happen.
Due to that an attempt to read data from any PVT sensor will cause the
task hanging up.  For instance that will happen if XP11 jumper isn't
installed on the Baikal-T1-based BFK3.1 board. Let's at least test whether
the conversion work on the device probe procedure. By doing so will make
sure that the PVT sensor is powered up at least at boot time.

Fixes: e7a19fa7a832 ("hwmon: Add Baikal-T1 PVT sensor driver")
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Link: https://lore.kernel.org/r/20200920110924.19741-2-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/bt1-pvt.c