The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v4 0/2] hwmon: (jc42) regmap conversion and resume fix
@ 2022-10-23 21:31 Martin Blumenstingl
  2022-10-23 21:31 ` [PATCH v4 1/2] hwmon: (jc42) Convert register access and caching to regmap/regcache Martin Blumenstingl
  2022-10-23 21:31 ` [PATCH v4 2/2] hwmon: (jc42) Restore the min/max/critical temperatures on resume Martin Blumenstingl
  0 siblings, 2 replies; 5+ messages in thread
From: Martin Blumenstingl @ 2022-10-23 21:31 UTC (permalink / raw)
  To: linux, linux-hwmon; +Cc: jdelvare, linux-kernel, Martin Blumenstingl

Hello,

this is a follow-up to the comments I got from Guenter on v1 of my patch
from [0] titled:
  "hwmon: (jc42) Restore the min/max/critical temperatures on resume"
There Guenter suggested: "The best solution would probably be to convert
the driver to use regmap and let regmap handle the caching". That's the
goal of this series - in addition to fixing the original resume issue
(see patch #3 - which was the reason for v1 of this series).

Guenter suggested:
> Make sure that the alarm bits are not dropped after reading the
> temperature (running the 'sensors' command with alarms active should
> do)
I configured the limits to be below the case temperature on my system
(as the jc42 sensor - a ST Microelectronics STTS2004 - is part of the
DIMMs) and ran sensors three times in a row. The output is the same for
all runs:
  temp1:       +35.0°C  (low  =  +0.0°C)            ALARM (HIGH, CRIT)
                        (high = +25.0°C, hyst = +25.0°C)
                        (crit = +30.0°C, hyst = +30.0°C)
My conclusion is that the alarm bit is not dropped after reading the
temperature.


Changes since v3 at [2]:
- re-add the update_lock mutex as Guenter spotted that it's still
  needed in jc42_write() - and later on we found out that jc42_read()
  also requires it (previously it was part of the now removed
  jc42_update_device()). This affects patch #1
- added Guenter's Reviewed-by to patch #2 (thank you!)

Changes since v2 at [1]:
- squashed patches #1, #2 and #4 into the new patch #1 (without any
  other changes to content in jc42.c)
- patch #3 has no changes other than it's numbering (see previous
  change)
- dropped RFC prefix

Changes since v1 at [0]:
- marked as RFC
- added patches for regmap (patch #1) and regcache (patch #2) conversion
- patch #3 has been updated to use regcache for restoring the register
  values during system resume (this was originally patch 1/1)
- added another patch to remove caching of the temperature register


[0] https://lore.kernel.org/linux-hwmon/20221019214108.220319-1-martin.blumenstingl@googlemail.com/
[1] https://lore.kernel.org/linux-hwmon/20221020210320.1624617-1-martin.blumenstingl@googlemail.com/
[2] https://lore.kernel.org/linux-hwmon/20221021165000.1865615-1-martin.blumenstingl@googlemail.com/


Martin Blumenstingl (2):
  hwmon: (jc42) Convert register access and caching to regmap/regcache
  hwmon: (jc42) Restore the min/max/critical temperatures on resume

 drivers/hwmon/Kconfig |   1 +
 drivers/hwmon/jc42.c  | 243 ++++++++++++++++++++++++------------------
 2 files changed, 141 insertions(+), 103 deletions(-)

-- 
2.38.1


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

end of thread, other threads:[~2022-10-26 15:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-23 21:31 [PATCH v4 0/2] hwmon: (jc42) regmap conversion and resume fix Martin Blumenstingl
2022-10-23 21:31 ` [PATCH v4 1/2] hwmon: (jc42) Convert register access and caching to regmap/regcache Martin Blumenstingl
2022-10-26 15:05   ` Guenter Roeck
2022-10-23 21:31 ` [PATCH v4 2/2] hwmon: (jc42) Restore the min/max/critical temperatures on resume Martin Blumenstingl
2022-10-26 15:06   ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox