#endif
#include "../../../drivers/misc/gps/rk29_gps.h"
+#include "../../../drivers/serial/sc8800.h"
/* Set memory size of pmem */
#ifdef CONFIG_RK29_MEM_SIZE_M
#if defined(CONFIG_MFD_WM831X)
-
+static struct wm831x *gWm831x;
int wm831x_pre_init(struct wm831x *parm)
{
int ret;
printk("%s\n", __FUNCTION__);
-
+ gWm831x = parm;
//ILIM = 900ma
ret = wm831x_reg_read(parm, WM831X_POWER_STATE) & 0xffff;
wm831x_reg_write(parm, WM831X_POWER_STATE, (ret&0xfff8) | 0x04);
struct regulator *dcdc;
struct regulator *ldo;
-
dcdc = regulator_get(NULL, "dcdc3"); // 1th IO
regulator_set_voltage(dcdc,3000000,3000000);
regulator_enable(dcdc);
.jd_thr = 0,
.PA_control =0,
+
+ .speaker_incall_vol = 0,
+ .speaker_incall_mic_vol = -9,
+ .speaker_normal_vol = 6,
+ .earpiece_incall_vol = 0,
+ .headset_incall_vol = 6,
+ .headset_incall_mic_vol = -6,
+ .headset_normal_vol = 6,
+ .BT_incall_vol = 0,
+ .BT_incall_mic_vol = 0,
+ .recorder_vol = 50,
+
};
//#endif
.flags = 0,
.slave_addr = 0xff,
.scl_rate = 400*1000,
- .mode = I2C_MODE_POLL,
+ .mode = I2C_MODE_IRQ,
.io_init = rk29_i2c1_io_init,
};
.flags = 0,
.slave_addr = 0xff,
.scl_rate = 400*1000,
- .mode = I2C_MODE_POLL,
+ .mode = I2C_MODE_IRQ,
.io_init = rk29_i2c3_io_init,
};
};
#endif
+#if defined(CONFIG_SERIAL_SC8800)
+static struct plat_sc8800 sc8800_plat_data = {
+ .slav_rts_pin = RK29_PIN4_PD4,
+ .slav_rdy_pin = RK29_PIN4_PD1,
+ .master_rts_pin = RK29_PIN4_PD2,
+ .master_rdy_pin = RK29_PIN4_PD3,
+ //.poll_time = 100,
+};
+#endif
+
static struct spi_board_info board_spi_devices[] = {
#if defined(CONFIG_TOUCHSCREEN_XPT2046_SPI)
{
.platform_data = &wm831x_platdata,
},
#endif
-
+#if defined(CONFIG_SERIAL_SC8800)
+ {
+ .modalias = "sc8800",
+ .bus_num = 0,
+ .platform_data = &sc8800_plat_data,
+ .max_speed_hz = 12*1000*1000,
+ .chip_select = 0,
+ },
+#endif
};
{
printk(KERN_ERR "rk29_pm_power_off start...\n");
gpio_direction_output(POWER_ON_PIN, GPIO_LOW);
+#if defined(CONFIG_MFD_WM831X)
+ wm831x_device_shutdown(gWm831x);
+#endif
while (1);
}
gpio_direction_output(POWER_ON_PIN, GPIO_HIGH);
pm_power_off = rk29_pm_power_off;
-// codec
- gpio_request(RK29_PIN5_PA1, NULL);
- gpio_direction_output(RK29_PIN5_PA1,GPIO_HIGH);
- gpio_free(RK29_PIN5_PA1);
-
platform_add_devices(devices, ARRAY_SIZE(devices));
#ifdef CONFIG_I2C0_RK29
i2c_register_board_info(default_i2c0_data.bus_num, board_i2c0_devices,