rtc: stm32: get DBP register and mask from DT st, syscfg property
authorAmelie Delaunay <amelie.delaunay@st.com>
Thu, 19 Apr 2018 13:21:43 +0000 (15:21 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sun, 6 May 2018 20:22:43 +0000 (22:22 +0200)
commit22cb47c1ea2040c0424073c9d67dd0e644334a7c
tree6078b76a0a0cc61e097defb823f1ffe7f51d8ca9
parentdeb7dcfbf00ccdf0d7fadfa4fa18adacef2b8b7a
rtc: stm32: get DBP register and mask from DT st, syscfg property

RTC driver should not be aware of the PWR registers offset and bits
position. Furthermore, we can imagine that DBP relative register and bit
mask could change depending on the SoC.
So this patch introduces 2 parameters, dbp_reg and dbp_mask, allowing to
get PWR_CR and PWR_CR_DBP from device tree. And it prepares next RTC
version, backup domain write protection is disabled only if needed.

Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-stm32.c