162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ci * 362306a36Sopenharmony_ci * SuperH Pin Function Controller support. 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (C) 2012 Renesas Solutions Corp. 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci#ifndef __SH_PFC_CORE_H__ 862306a36Sopenharmony_ci#define __SH_PFC_CORE_H__ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#include <linux/types.h> 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#include "sh_pfc.h" 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_cistruct sh_pfc_pin_range { 1562306a36Sopenharmony_ci u16 start; 1662306a36Sopenharmony_ci u16 end; 1762306a36Sopenharmony_ci}; 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ciint sh_pfc_register_gpiochip(struct sh_pfc *pfc); 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ciint sh_pfc_register_pinctrl(struct sh_pfc *pfc); 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ciu32 sh_pfc_read_raw_reg(void __iomem *mapped_reg, unsigned int reg_width); 2462306a36Sopenharmony_civoid sh_pfc_write_raw_reg(void __iomem *mapped_reg, unsigned int reg_width, 2562306a36Sopenharmony_ci u32 data); 2662306a36Sopenharmony_ciu32 sh_pfc_read(struct sh_pfc *pfc, u32 reg); 2762306a36Sopenharmony_civoid sh_pfc_write(struct sh_pfc *pfc, u32 reg, u32 data); 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ciint sh_pfc_get_pin_index(struct sh_pfc *pfc, unsigned int pin); 3062306a36Sopenharmony_ciint sh_pfc_config_mux(struct sh_pfc *pfc, unsigned mark, int pinmux_type); 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci#endif /* __SH_PFC_CORE_H__ */ 33