aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-u300/core.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-02-09 01:23:28 -0500
committerLinus Walleij <linus.walleij@linaro.org>2012-02-10 15:33:02 -0500
commite93bcee00c43e2bd4037291262111016f4c05793 (patch)
treee69b5f7ffffb36096949eabdc0526173b25f695d /arch/arm/mach-u300/core.c
parent28a8d14cc74a0180323d9150c3d3dbf9dd60d55a (diff)
pinctrl: move generic functions to the pinctrl_ namespace
Since we want to use the former pinmux handles and mapping tables for generic control involving both muxing and configuration we begin refactoring by renaming them from pinmux_* to pinctrl_*. ChangeLog v1->v2: - Also rename the PINMUX_* macros in machine.h to PIN_ as indicated in the documentation so as to reflect the generic nature of these mapping entries from now on. Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-u300/core.c')
-rw-r--r--arch/arm/mach-u300/core.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index 1429e5282198..bb1034f8c2f5 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -1605,21 +1605,21 @@ static struct platform_device pinmux_device = {
1605}; 1605};
1606 1606
1607/* Pinmux settings */ 1607/* Pinmux settings */
1608static struct pinmux_map __initdata u300_pinmux_map[] = { 1608static struct pinctrl_map __initdata u300_pinmux_map[] = {
1609 /* anonymous maps for chip power and EMIFs */ 1609 /* anonymous maps for chip power and EMIFs */
1610 PINMUX_MAP_SYS_HOG("POWER", "pinmux-u300", "power"), 1610 PIN_MAP_SYS_HOG("POWER", "pinmux-u300", "power"),
1611 PINMUX_MAP_SYS_HOG("EMIF0", "pinmux-u300", "emif0"), 1611 PIN_MAP_SYS_HOG("EMIF0", "pinmux-u300", "emif0"),
1612 PINMUX_MAP_SYS_HOG("EMIF1", "pinmux-u300", "emif1"), 1612 PIN_MAP_SYS_HOG("EMIF1", "pinmux-u300", "emif1"),
1613 /* per-device maps for MMC/SD, SPI and UART */ 1613 /* per-device maps for MMC/SD, SPI and UART */
1614 PINMUX_MAP("MMCSD", "pinmux-u300", "mmc0", "mmci"), 1614 PIN_MAP("MMCSD", "pinmux-u300", "mmc0", "mmci"),
1615 PINMUX_MAP("SPI", "pinmux-u300", "spi0", "pl022"), 1615 PIN_MAP("SPI", "pinmux-u300", "spi0", "pl022"),
1616 PINMUX_MAP("UART0", "pinmux-u300", "uart0", "uart0"), 1616 PIN_MAP("UART0", "pinmux-u300", "uart0", "uart0"),
1617}; 1617};
1618 1618
1619struct u300_mux_hog { 1619struct u300_mux_hog {
1620 const char *name; 1620 const char *name;
1621 struct device *dev; 1621 struct device *dev;
1622 struct pinmux *pmx; 1622 struct pinctrl *p;
1623}; 1623};
1624 1624
1625static struct u300_mux_hog u300_mux_hogs[] = { 1625static struct u300_mux_hog u300_mux_hogs[] = {
@@ -1637,31 +1637,31 @@ static struct u300_mux_hog u300_mux_hogs[] = {
1637 }, 1637 },
1638}; 1638};
1639 1639
1640static int __init u300_pinmux_fetch(void) 1640static int __init u300_pinctrl_fetch(void)
1641{ 1641{
1642 int i; 1642 int i;
1643 1643
1644 for (i = 0; i < ARRAY_SIZE(u300_mux_hogs); i++) { 1644 for (i = 0; i < ARRAY_SIZE(u300_mux_hogs); i++) {
1645 struct pinmux *pmx; 1645 struct pinctrl *p;
1646 int ret; 1646 int ret;
1647 1647
1648 pmx = pinmux_get(u300_mux_hogs[i].dev, NULL); 1648 p = pinctrl_get(u300_mux_hogs[i].dev, NULL);
1649 if (IS_ERR(pmx)) { 1649 if (IS_ERR(p)) {
1650 pr_err("u300: could not get pinmux hog %s\n", 1650 pr_err("u300: could not get pinmux hog %s\n",
1651 u300_mux_hogs[i].name); 1651 u300_mux_hogs[i].name);
1652 continue; 1652 continue;
1653 } 1653 }
1654 ret = pinmux_enable(pmx); 1654 ret = pinctrl_enable(p);
1655 if (ret) { 1655 if (ret) {
1656 pr_err("u300: could enable pinmux hog %s\n", 1656 pr_err("u300: could enable pinmux hog %s\n",
1657 u300_mux_hogs[i].name); 1657 u300_mux_hogs[i].name);
1658 continue; 1658 continue;
1659 } 1659 }
1660 u300_mux_hogs[i].pmx = pmx; 1660 u300_mux_hogs[i].p = p;
1661 } 1661 }
1662 return 0; 1662 return 0;
1663} 1663}
1664subsys_initcall(u300_pinmux_fetch); 1664subsys_initcall(u300_pinctrl_fetch);
1665 1665
1666/* 1666/*
1667 * Notice that AMBA devices are initialized before platform devices. 1667 * Notice that AMBA devices are initialized before platform devices.
@@ -1861,8 +1861,8 @@ void __init u300_init_devices(void)
1861 u300_assign_physmem(); 1861 u300_assign_physmem();
1862 1862
1863 /* Initialize pinmuxing */ 1863 /* Initialize pinmuxing */
1864 pinmux_register_mappings(u300_pinmux_map, 1864 pinctrl_register_mappings(u300_pinmux_map,
1865 ARRAY_SIZE(u300_pinmux_map)); 1865 ARRAY_SIZE(u300_pinmux_map));
1866 1866
1867 /* Register subdevices on the I2C buses */ 1867 /* Register subdevices on the I2C buses */
1868 u300_i2c_register_board_devices(); 1868 u300_i2c_register_board_devices();