2 * Copyright (C) 2012 Samsung Electronics
3 * Abhilash Kesavan <a.kesavan@samsung.com>
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24 #ifndef __ASM_ARM_ARCH_PINMUX_H
25 #define __ASM_ARM_ARCH_PINMUX_H
30 * Flags for setting specific configarations of peripherals.
31 * List will grow with support for more devices getting added.
34 PINMUX_FLAG_NONE = 0x00000000,
37 PINMUX_FLAG_8BIT_MODE = 1 << 0, /* SDMMC 8-bit mode */
39 /* Flags for SROM controller */
40 PINMUX_FLAG_BANK = 3 << 0, /* bank number (0-3) */
41 PINMUX_FLAG_16BIT = 1 << 2, /* 16-bit width */
45 * Configures the pinmux for a particular peripheral.
47 * Each gpio can be configured in many different ways (4 bits on exynos)
48 * such as "input", "output", "special function", "external interrupt"
49 * etc. This function will configure the peripheral pinmux along with
50 * pull-up/down and drive strength.
52 * @param peripheral peripheral to be configured
53 * @param flags configure flags
54 * @return 0 if ok, -1 on error (e.g. unsupported peripheral)
56 int exynos_pinmux_config(int peripheral, int flags);