hwspinlock: stm32: enable clock at probe
authorFabien Dessenne <fabien.dessenne@foss.st.com>
Mon, 11 Oct 2021 13:58:36 +0000 (15:58 +0200)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Wed, 17 Nov 2021 22:12:44 +0000 (16:12 -0600)
commit60630924bb5af8751adcecc896e7763c3783ca89
tree0332002e40f10f6d2e78d7b92a0af307c328bb1b
parentfa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf
hwspinlock: stm32: enable clock at probe

Set the clock during probe and keep its control during suspend / resume
operations.
This fixes an issue when CONFIG_PM is not set and where the clock is
never enabled.

Make use of devm_ functions to simplify the code.

Signed-off-by: Fabien Dessenne <fabien.dessenne@foss.st.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211011135836.1045437-1-fabien.dessenne@foss.st.com
drivers/hwspinlock/stm32_hwspinlock.c