core.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * SuperH Pin Function Controller support.
  3. *
  4. * Copyright (C) 2012 Renesas Solutions Corp.
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. */
  10. #ifndef __SH_PFC_CORE_H__
  11. #define __SH_PFC_CORE_H__
  12. #include <linux/types.h>
  13. #include "sh_pfc.h"
  14. struct sh_pfc_pin_range {
  15. u16 start;
  16. u16 end;
  17. };
  18. int sh_pfc_register_gpiochip(struct sh_pfc *pfc);
  19. int sh_pfc_register_pinctrl(struct sh_pfc *pfc);
  20. u32 sh_pfc_read_raw_reg(void __iomem *mapped_reg, unsigned int reg_width);
  21. void sh_pfc_write_raw_reg(void __iomem *mapped_reg, unsigned int reg_width,
  22. u32 data);
  23. u32 sh_pfc_read(struct sh_pfc *pfc, u32 reg);
  24. void sh_pfc_write(struct sh_pfc *pfc, u32 reg, u32 data);
  25. int sh_pfc_get_pin_index(struct sh_pfc *pfc, unsigned int pin);
  26. int sh_pfc_config_mux(struct sh_pfc *pfc, unsigned mark, int pinmux_type);
  27. const struct pinmux_bias_reg *
  28. sh_pfc_pin_to_bias_reg(const struct sh_pfc *pfc, unsigned int pin,
  29. unsigned int *bit);
  30. #endif /* __SH_PFC_CORE_H__ */