linux/drivers/pinctrl/sh-pfc/core.h
<<
>>
Prefs
   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
  13#include <linux/types.h>
  14
  15#include "sh_pfc.h"
  16
  17struct sh_pfc_pin_range {
  18        u16 start;
  19        u16 end;
  20};
  21
  22int sh_pfc_register_gpiochip(struct sh_pfc *pfc);
  23
  24int sh_pfc_register_pinctrl(struct sh_pfc *pfc);
  25
  26u32 sh_pfc_read_raw_reg(void __iomem *mapped_reg, unsigned int reg_width);
  27void sh_pfc_write_raw_reg(void __iomem *mapped_reg, unsigned int reg_width,
  28                          u32 data);
  29u32 sh_pfc_read_reg(struct sh_pfc *pfc, u32 reg, unsigned int width);
  30void sh_pfc_write_reg(struct sh_pfc *pfc, u32 reg, unsigned int width,
  31                      u32 data);
  32
  33int sh_pfc_get_pin_index(struct sh_pfc *pfc, unsigned int pin);
  34int sh_pfc_config_mux(struct sh_pfc *pfc, unsigned mark, int pinmux_type);
  35
  36const struct sh_pfc_bias_info *
  37sh_pfc_pin_to_bias_info(const struct sh_pfc_bias_info *info,
  38                        unsigned int num, unsigned int pin);
  39
  40#endif /* __SH_PFC_CORE_H__ */
  41