summaryrefslogtreecommitdiff
path: root/drivers/hwmon/lm63.c
diff options
context:
space:
mode:
authorNicolin Chen <nicoleotsuka@gmail.com>2018-11-05 12:48:43 -0800
committerGuenter Roeck <linux@roeck-us.net>2018-12-16 15:13:13 -0800
commit323aeb0eb5d9a6820130dfab1214a83edf385dcd (patch)
tree64daad7cf46ae76a9089568c191b1ccb52bc2a1d /drivers/hwmon/lm63.c
parent4c0415a371fdbac6531d435a50745255e32d0e0e (diff)
hwmon: (ina3221) Add PM runtime support
If all three channels are disabled via in[123]_enable ABI, the driver could suspend the chip for power saving purpose. So this patch adds the PM runtime support in order to gain more power control than system suspend and resume use case. For PM runtime, there are a few related changes happening: 1) Added a new pm_dev device pointer for all the PM runtime callbacks. This is because hwmon core registers a child device for each hwmon driver and passes it back to each driver. So there might be a mismatch between two device pointers in the driver if mixing using them. 2) Added a check in ina3221_is_enabled() to make sure that the chip is resumed. 3) Bypassed the unchanged status in ina3221_write_enable() in order to keep the PM runtime refcount being matched. 4) Removed the reset routine in the probe() by calling the resume() via pm_runtime_get_sync() instead, as they're similar. It's also necessary to do so to match initial PM refcount with the number of enabled channels. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/lm63.c')
0 files changed, 0 insertions, 0 deletions