1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
4  * Author(s): Patrice Chotard, <patrice.chotard@foss.st.com> for STMicroelectronics.
5  */
6 
7 #ifndef __STM32_PWR_H_
8 #define __STM32_PWR_H_
9 
10 #ifndef __ASSEMBLY__
11 #include <linux/bitops.h>
12 #endif
13 
14 /*
15  * Offsets of some PWR registers
16  */
17 #define PWR_CR1_ODEN			BIT(16)
18 #define PWR_CR1_ODSWEN			BIT(17)
19 #define PWR_CSR1_ODRDY			BIT(16)
20 #define PWR_CSR1_ODSWRDY		BIT(17)
21 
22 struct stm32_pwr_regs {
23 	u32 cr1;   /* power control register 1 */
24 	u32 csr1;  /* power control/status register 2 */
25 	u32 cr2;   /* power control register 2 */
26 	u32 csr2;  /* power control/status register 2 */
27 };
28 
29 #endif /* __STM32_PWR_H_ */
30