core.h 832 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0
  2. *
  3. * SuperH Pin Function Controller support.
  4. *
  5. * Copyright (C) 2012 Renesas Solutions Corp.
  6. */
  7. #ifndef __SH_PFC_CORE_H__
  8. #define __SH_PFC_CORE_H__
  9. #include <linux/types.h>
  10. #include "sh_pfc.h"
  11. struct sh_pfc_pin_range {
  12. u16 start;
  13. u16 end;
  14. };
  15. int sh_pfc_register_gpiochip(struct sh_pfc *pfc);
  16. int sh_pfc_register_pinctrl(struct sh_pfc *pfc);
  17. u32 sh_pfc_read_raw_reg(void __iomem *mapped_reg, unsigned int reg_width);
  18. void sh_pfc_write_raw_reg(void __iomem *mapped_reg, unsigned int reg_width,
  19. u32 data);
  20. u32 sh_pfc_read(struct sh_pfc *pfc, u32 reg);
  21. void sh_pfc_write(struct sh_pfc *pfc, u32 reg, u32 data);
  22. int sh_pfc_get_pin_index(struct sh_pfc *pfc, unsigned int pin);
  23. int sh_pfc_config_mux(struct sh_pfc *pfc, unsigned mark, int pinmux_type);
  24. #endif /* __SH_PFC_CORE_H__ */