stm32_pwr.h 708 B

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