summaryrefslogtreecommitdiff
path: root/rust/helpers/vmalloc.c
diff options
context:
space:
mode:
authorSean Nyekjaer <sean@geanix.com>2025-09-01 09:49:13 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2025-09-10 19:47:05 +0100
commit0792c1984a45ccd7a296d6b8cb78088bc99a212e (patch)
tree23f6c9ee2ff6fea8ef8b0f28de2e6454099a7384 /rust/helpers/vmalloc.c
parentb947d4edfc4fc23a912b0ba160f8af3543b0283b (diff)
iio: imu: inv_icm42600: Simplify pm_runtime setup
Rework the power management in inv_icm42600_core_probe() to use devm_pm_runtime_set_active_enabled(), which simplifies the runtime PM setup by handling activation and enabling in one step. Remove the separate inv_icm42600_disable_pm callback, as it's no longer needed with the devm-managed approach. Using devm_pm_runtime_enable() also fixes the missing disable of autosuspend. Update inv_icm42600_disable_vddio_reg() to only disable the regulator if the device is not suspended i.e. powered-down, preventing unbalanced disables. Also remove redundant error msg on regulator_disable(), the regulator framework already emits an error message when regulator_disable() fails. This simplifies the PM setup and avoids manipulating the usage counter unnecessarily. Fixes: 31c24c1e93c3 ("iio: imu: inv_icm42600: add core of new inv_icm42600 driver") Signed-off-by: Sean Nyekjaer <sean@geanix.com> Link: https://patch.msgid.link/20250901-icm42pmreg-v3-1-ef1336246960@geanix.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'rust/helpers/vmalloc.c')
0 files changed, 0 insertions, 0 deletions