Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0
0002  *
0003  * SuperH Pin Function Controller support.
0004  *
0005  * Copyright (C) 2012  Renesas Solutions Corp.
0006  */
0007 #ifndef __SH_PFC_CORE_H__
0008 #define __SH_PFC_CORE_H__
0009 
0010 #include <linux/types.h>
0011 
0012 #include "sh_pfc.h"
0013 
0014 struct sh_pfc_pin_range {
0015     u16 start;
0016     u16 end;
0017 };
0018 
0019 int sh_pfc_register_gpiochip(struct sh_pfc *pfc);
0020 
0021 int sh_pfc_register_pinctrl(struct sh_pfc *pfc);
0022 
0023 u32 sh_pfc_read_raw_reg(void __iomem *mapped_reg, unsigned int reg_width);
0024 void sh_pfc_write_raw_reg(void __iomem *mapped_reg, unsigned int reg_width,
0025               u32 data);
0026 u32 sh_pfc_read(struct sh_pfc *pfc, u32 reg);
0027 void sh_pfc_write(struct sh_pfc *pfc, u32 reg, u32 data);
0028 
0029 int sh_pfc_get_pin_index(struct sh_pfc *pfc, unsigned int pin);
0030 int sh_pfc_config_mux(struct sh_pfc *pfc, unsigned mark, int pinmux_type);
0031 
0032 #endif /* __SH_PFC_CORE_H__ */