linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] hwmon: bt1-pvt: Fix PVT sensor being unpowered
@ 2020-09-20 11:09 Serge Semin
  2020-09-20 11:09 ` [PATCH 1/3] hwmon: bt1-pvt: Test sensor power supply on probe Serge Semin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Serge Semin @ 2020-09-20 11:09 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck, Maxim Kaurkin
  Cc: Serge Semin, Serge Semin, Maxim Kaurkin, Alexey Malahov,
	Pavel Parkhomenko, linux-mips, linux-hwmon, linux-kernel

Baikal-T1 PVT sensor has got a dedicated power domain with 1.8V intended
to be supplied via the external GPVT and VPVT_18 pins. In case if the
power isn't supplied, the sensor IO registers will be accessible, but the
data conversion just won't happen. The situation of the power loss
currently will cause the temperature and voltage read procedures to hang
up. The problem is fixed in the framework of this patchset firstly by
checking whether the conversion works at the sensor probe procedure, and
secondly by keeping the current conversion update timeout in the private
driver data cache and using it to set the wait-completion timeout.

Fixes: 87976ce2825d ("hwmon: Add Baikal-T1 PVT sensor driver")
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Cc: Maxim Kaurkin <Maxim.Kaurkin@baikalelectronics.ru>
Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>
Cc: linux-mips@vger.kernel.org
Cc: linux-hwmon@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

Serge Semin (3):
  hwmon: bt1-pvt: Test sensor power supply on probe
  hwmon: bt1-pvt: Cache current update timeout
  hwmon: bt1-pvt: Wait for the completion with timeout

 drivers/hwmon/bt1-pvt.c | 138 ++++++++++++++++++++++++++++------------
 drivers/hwmon/bt1-pvt.h |   3 +
 2 files changed, 101 insertions(+), 40 deletions(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-10-02 16:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-20 11:09 [PATCH 0/3] hwmon: bt1-pvt: Fix PVT sensor being unpowered Serge Semin
2020-09-20 11:09 ` [PATCH 1/3] hwmon: bt1-pvt: Test sensor power supply on probe Serge Semin
2020-10-02 16:15   ` Guenter Roeck
2020-09-20 11:09 ` [PATCH 2/3] hwmon: bt1-pvt: Cache current update timeout Serge Semin
2020-10-02 16:15   ` Guenter Roeck
2020-09-20 11:09 ` [PATCH 3/3] hwmon: bt1-pvt: Wait for the completion with timeout Serge Semin
2020-10-02 16:15   ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).