rtc: tps80031: register as mfd sub device
[linux-2.6.git] / arch / arm / mach-tegra / board-enterprise-power.c
index f07e61c..4bf7f03 100644 (file)
@@ -333,13 +333,6 @@ static struct tps80031_bg_platform_data battery_gauge_data = {
        .battery_present = 1,
 };
 
-#define TPS_RTC()                              \
-       {                                               \
-               .id     = 0,            \
-               .name   = "rtc_tps80031",       \
-               .platform_data = &rtc_data,     \
-       }
-
 #define TPS_BATTERY()                                  \
        {                                               \
                .name   = "tps80031-charger",           \
@@ -356,14 +349,12 @@ static struct tps80031_bg_platform_data battery_gauge_data = {
        }
 
 #define TPS80031_DEVS_COMMON           \
-       TPS_RTC(),                      \
        TPS_BATTERY(),                  \
        TPS_BATTERY_GAUGE(),            \
        TPS_GPADC()
 
 
 static struct tps80031_subdev_info tps80031_devs[] = {
-       TPS_RTC(),
        TPS_BATTERY(),
        TPS_BATTERY_GAUGE(),
        TPS_GPADC()
@@ -451,6 +442,7 @@ static struct tps80031_platform_data tps_platform = {
        .clk32k_init_data       = clk32k_idata,
        .clk32k_init_data_size  = ARRAY_SIZE(clk32k_idata),
        .use_power_off  = true,
+       .rtc_pdata = &rtc_data,
 };
 
 static struct i2c_board_info __initdata enterprise_regulators[] = {
@@ -661,25 +653,21 @@ FIXED_REG(8, lcd_1v8_en,  NULL,
                TEGRA_GPIO_PB2, true, 1800, 0, 0);
 
 #define ADD_FIXED_REG(_name)   (&fixed_reg_##_name##_dev)
-
-#define FIXED_REGS_COMMON              \
-       ADD_FIXED_REG(pmu_5v15_en),     \
-       ADD_FIXED_REG(pmu_hdmi_5v0_en), \
-       ADD_FIXED_REG(vdd_fuse_en),     \
-       ADD_FIXED_REG(cam_ldo_2v8_en),  \
-       ADD_FIXED_REG(cam_ldo_1v8_en)
-
 static struct platform_device *fixed_regs_devices_a02[] = {
-       ADD_FIXED_REG(pmu_5v15_en),     \
-       ADD_FIXED_REG(pmu_3v3_en),      \
-       ADD_FIXED_REG(pmu_hdmi_5v0_en), \
-       ADD_FIXED_REG(vdd_fuse_en),     \
-       ADD_FIXED_REG(cam_ldo_2v8_en),  \
+       ADD_FIXED_REG(pmu_5v15_en),
+       ADD_FIXED_REG(pmu_3v3_en),
+       ADD_FIXED_REG(pmu_hdmi_5v0_en),
+       ADD_FIXED_REG(vdd_fuse_en),
+       ADD_FIXED_REG(cam_ldo_2v8_en),
        ADD_FIXED_REG(cam_ldo_1v8_en)
 };
 
 static struct platform_device *fixed_regs_devices_a03[] = {
-       FIXED_REGS_COMMON,
+       ADD_FIXED_REG(pmu_5v15_en),
+       ADD_FIXED_REG(pmu_hdmi_5v0_en),
+       ADD_FIXED_REG(vdd_fuse_en),
+       ADD_FIXED_REG(cam_ldo_2v8_en),
+       ADD_FIXED_REG(cam_ldo_1v8_en),
        ADD_FIXED_REG(vdd_sdmmc3_2v85_en),
        ADD_FIXED_REG(lcd_1v8_en),
 };