Revert "rk30:sdk:Support both of compatible pmic wm8326 and tps65910"
author黄涛 <huangtao@rock-chips.com>
Wed, 1 Aug 2012 03:14:03 +0000 (11:14 +0800)
committer黄涛 <huangtao@rock-chips.com>
Wed, 1 Aug 2012 03:14:03 +0000 (11:14 +0800)
This reverts commit f99e7676f552590ff6bf17e02ff4782d259e801a.

arch/arm/mach-rk30/board-rk30-sdk-tps65910.c
arch/arm/mach-rk30/board-rk30-sdk-wm8326.c
arch/arm/mach-rk30/board-rk30-sdk.c
drivers/mfd/tps65910.c
drivers/mfd/wm831x-core.c

index 8e1a6e28e7f8b6ffd584fb841171f32af11a6ad8..ac2ee6b19f1f911f93baa773fe54fdcc44d58a9f 100755 (executable)
@@ -575,7 +575,7 @@ static struct regulator_init_data tps65910_ldo8 = {
        .num_consumer_supplies = ARRAY_SIZE(tps65910_ldo8_supply),
        .consumer_supplies =  tps65910_ldo8_supply,
 };
-#ifdef PMIC_IS_TPS6591x
+
 void __sramfunc board_pmu_suspend(void)
 {      
        grf_writel(GPIO6_PB1_DIR_OUT, GRF_GPIO6L_DIR_ADDR);
@@ -593,7 +593,7 @@ void __sramfunc board_pmu_resume(void)
        sram_udelay(2000);
        #endif
 }
-#endif
+
 static struct tps65910_board tps65910_data = {
        .irq    = (unsigned)TPS65910_HOST_IRQ,          
        .irq_base = NR_GIC_IRQS + NR_GPIO_IRQS,
index 045b2c85089c7bd08b13f0dee90d74163a646fbd..ce3050e7e6df8dfaa58edc2cf516324ebd0895dd 100755 (executable)
@@ -773,7 +773,7 @@ static int wm831x_init_pin_type(struct wm831x *wm831x)
 out:
        return 0;
 }
-#ifdef PMIC_IS_WM831X
+
 void __sramfunc board_pmu_suspend(void)
 {      
        cru_writel(CRU_CLKGATE5_GRFCLK_ON,CRU_CLKGATE5_CON_ADDR); //open grf clk
@@ -792,7 +792,6 @@ void __sramfunc board_pmu_resume(void)
        sram_udelay(10000);
 #endif
 }
-#endif
 static struct wm831x_pdata wm831x_platdata = {
 
        /** Called before subdevices are set up */
index 4e5035e7253b3c1207a03e24f462278b202740cf..0b27edc772ddf81aad67db233110dd3b8e6553d4 100755 (executable)
@@ -44,8 +44,6 @@
 #include <linux/regulator/machine.h>
 #include <linux/rfkill-rk.h>
 #include <linux/sensor-dev.h>
-#include <linux/mfd/tps65910.h>
-#include <linux/regulator/rk29-pwm-regulator.h>
 #if defined(CONFIG_HDMI_RK30)
        #include "../../../drivers/video/rockchip/hdmi/rk_hdmi.h"
 #endif
@@ -75,9 +73,6 @@
 #define RK30_FB0_MEM_SIZE 8*SZ_1M
 #endif
 
-int PMIC_IS_WM831X = 0;
-int PMIC_IS_TPS6591x = 0;
-
 #ifdef CONFIG_VIDEO_RK29
 /*---------------- Camera Sensor Macro Define Begin  ------------------------*/
 /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/
@@ -1340,59 +1335,6 @@ static struct platform_device rk30_device_adc_battery = {
 };
 #endif
 
-#if CONFIG_RK30_PWM_REGULATOR
-const static int pwm_voltage_map[] = {
-       1000000, 1025000, 1050000, 1075000, 1100000, 1125000, 1150000, 1175000, 1200000, 1225000, 1250000, 1275000, 1300000, 1325000, 1350000, 1375000, 1400000
-};
-
-static struct regulator_consumer_supply pwm_dcdc1_consumers[] = {
-       {
-               .supply = "vdd_core",
-       }
-};
-
-struct regulator_init_data pwm_regulator_init_dcdc[1] =
-{
-       {
-               .constraints = {
-                       .name = "PWM_DCDC1",
-                       .min_uV = 600000,
-                       .max_uV = 1800000,      //0.6-1.8V
-                       .apply_uV = true,
-                       .valid_ops_mask = REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_VOLTAGE,
-               },
-               .num_consumer_supplies = ARRAY_SIZE(pwm_dcdc1_consumers),
-               .consumer_supplies = pwm_dcdc1_consumers,
-       },
-};
-
-static struct pwm_platform_data pwm_regulator_info[1] = {
-       {
-               .pwm_id = 3,
-               .pwm_gpio = RK30_PIN0_PD7,
-               .pwm_iomux_name = GPIO0D7_PWM3_NAME,
-               .pwm_iomux_pwm = GPIO0D_PWM3,
-               .pwm_iomux_gpio = GPIO0D_GPIO0D6,
-               .pwm_voltage = 1100000,
-               .min_uV = 1000000,
-               .max_uV = 1400000,
-               .coefficient = 455,     //45.5%
-               .pwm_voltage_map = pwm_voltage_map,
-               .init_data      = &pwm_regulator_init_dcdc[0],
-       },
-};
-
-struct platform_device pwm_regulator_device[1] = {
-       {
-               .name = "pwm-voltage-regulator",
-               .id = 0,
-               .dev            = {
-                       .platform_data = &pwm_regulator_info[0],
-               }
-       },
-};
-#endif
-
 #ifdef CONFIG_RK29_VMAC
 #define PHY_PWR_EN_GPIO        RK30_PIN1_PD6
 #include "board-rk30-sdk-vmac.c"
@@ -1461,9 +1403,6 @@ static struct platform_device device_rfkill_rk = {
 #endif
 
 static struct platform_device *devices[] __initdata = {
-#ifdef CONFIG_RK30_PWM_REGULATOR
-       &pwm_regulator_device[0],
-#endif
 #ifdef CONFIG_BACKLIGHT_RK29_BL
        &rk29_device_backlight,
 #endif
@@ -1601,13 +1540,7 @@ static struct i2c_board_info __initdata i2c0_info[] = {
 #endif
 
 #ifdef CONFIG_I2C1_RK30
-#ifdef CONFIG_MFD_WM831X_I2C
 #include "board-rk30-sdk-wm8326.c"
-#endif
-#ifdef CONFIG_MFD_TPS65910
-#define TPS65910_HOST_IRQ        RK30_PIN6_PA4
-#include "board-rk30-sdk-tps65910.c"
-#endif
 
 static struct i2c_board_info __initdata i2c1_info[] = {
 #if defined (CONFIG_MFD_WM831X_I2C)
@@ -1619,16 +1552,6 @@ static struct i2c_board_info __initdata i2c1_info[] = {
                .platform_data = &wm831x_platdata,
        },
 #endif
-#if defined (CONFIG_MFD_TPS65910)
-       {
-        .type           = "tps65910",
-        .addr           = TPS65910_I2C_ID0,
-        .flags          = 0,
-        .irq            = TPS65910_HOST_IRQ,
-       .platform_data = &tps65910_data,
-       },
-#endif
-
 };
 #endif
 
index 09ac6c3ca67bd12c7e83889235f3c8aa6aec2182..dd7813012b433796621eda9eedfbbbf3745a671a 100755 (executable)
@@ -232,7 +232,6 @@ out:
 }
 EXPORT_SYMBOL_GPL(tps65910_clear_bits);
 
-extern int PMIC_IS_TPS6591x;
 static int tps65910_i2c_probe(struct i2c_client *i2c,
                            const struct i2c_device_id *id)
 {
@@ -294,7 +293,6 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
                }
        }
        printk("%s:irq=%d,irq_base=%d\n",__func__,init_data->irq,init_data->irq_base);
-       PMIC_IS_TPS6591x = 1;
        return ret;
 
 err:
index 493b1ab52d84794bbdbdd8ac2176edccd4188954..504314e87de102618486939bd37222c6651554cf 100755 (executable)
@@ -1461,7 +1461,7 @@ static struct mfd_cell backlight_devs[] = {
                .name = "wm831x-backlight",
        },
 };
-extern int PMIC_IS_WM831X;
+
 /*
  * Instantiate the generic non-control parts of the device.
  */
@@ -1729,7 +1729,6 @@ int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq)
                        goto err_irq;
                }
        }
-       PMIC_IS_WM831X = 1;
        
        return 0;