]> Pileus Git - ~andy/linux/commitdiff
sh: ecovec24: Remove MMCIF and SDHI .set_pwr() callbacks
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 8 Aug 2013 10:38:36 +0000 (12:38 +0200)
committerChris Ball <cjb@laptop.org>
Sun, 25 Aug 2013 03:45:39 +0000 (23:45 -0400)
The MMCIF and SHDI platform data .set_pwr() callbacks are used to
control the vmmc/vqmmc power supplies. As the power supplies already
register control GPIOs there's no need to perform the operation
manually. Remove the callback functions.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
arch/sh/boards/mach-ecovec24/setup.c

index 5af40f5e0ba4dd2dcc5a6650b4a722f1bf88616a..0332d25573035aff1f1b1a161f4a3e1862f74475 100644 (file)
@@ -598,29 +598,9 @@ static struct platform_device sdhi0_power = {
        },
 };
 
-static void sdhi0_set_pwr(struct platform_device *pdev, int state)
-{
-       static int power_gpio = -EINVAL;
-
-       if (power_gpio < 0) {
-               int ret = gpio_request(GPIO_PTB6, NULL);
-               if (!ret) {
-                       power_gpio = GPIO_PTB6;
-                       gpio_direction_output(power_gpio, 0);
-               }
-       }
-
-       /*
-        * Toggle the GPIO regardless, whether we managed to grab it above or
-        * the fixed regulator driver did.
-        */
-       gpio_set_value(GPIO_PTB6, state);
-}
-
 static struct sh_mobile_sdhi_info sdhi0_info = {
        .dma_slave_tx   = SHDMA_SLAVE_SDHI0_TX,
        .dma_slave_rx   = SHDMA_SLAVE_SDHI0_RX,
-       .set_pwr        = sdhi0_set_pwr,
        .tmio_caps      = MMC_CAP_SDIO_IRQ | MMC_CAP_POWER_OFF_CARD |
                          MMC_CAP_NEEDS_POLL,
        .tmio_flags     = TMIO_MMC_USE_GPIO_CD,
@@ -650,25 +630,6 @@ static struct platform_device sdhi0_device = {
        },
 };
 
-static void cn12_set_pwr(struct platform_device *pdev, int state)
-{
-       static int power_gpio = -EINVAL;
-
-       if (power_gpio < 0) {
-               int ret = gpio_request(GPIO_PTB7, NULL);
-               if (!ret) {
-                       power_gpio = GPIO_PTB7;
-                       gpio_direction_output(power_gpio, 0);
-               }
-       }
-
-       /*
-        * Toggle the GPIO regardless, whether we managed to grab it above or
-        * the fixed regulator driver did.
-        */
-       gpio_set_value(GPIO_PTB7, state);
-}
-
 #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
 /* SDHI1 */
 static struct sh_mobile_sdhi_info sdhi1_info = {
@@ -678,7 +639,6 @@ static struct sh_mobile_sdhi_info sdhi1_info = {
                          MMC_CAP_NEEDS_POLL,
        .tmio_flags     = TMIO_MMC_USE_GPIO_CD,
        .cd_gpio        = GPIO_PTW7,
-       .set_pwr        = cn12_set_pwr,
 };
 
 static struct resource sdhi1_resources[] = {
@@ -1000,7 +960,6 @@ static struct resource sh_mmcif_resources[] = {
 };
 
 static struct sh_mmcif_plat_data sh_mmcif_plat = {
-       .set_pwr        = cn12_set_pwr,
        .sup_pclk       = 0, /* SH7724: Max Pclk/2 */
        .caps           = MMC_CAP_4_BIT_DATA |
                          MMC_CAP_8_BIT_DATA |