#include <linux/mfd/rk610_core.h>
#endif
+#if defined(CONFIG_MFD_RK616)
+#include <linux/mfd/rk616.h>
+#endif
+
+
#if defined(CONFIG_RK_HDMI)
#include "../../../drivers/video/rockchip/hdmi/rk_hdmi.h"
#endif
};
#endif
+#if defined(CONFIG_MFD_RK616)
+#define RK616_RST_PIN RK30_PIN3_PB2
+#define RK616_PWREN_PIN RK30_PIN0_PA3
+#define RK616_SCL_RATE (100*1000) //i2c scl rate
+static int rk616_power_on_init(void)
+{
+ int ret;
+
+ if(RK616_PWREN_PIN != INVALID_GPIO)
+ {
+ ret = gpio_request(RK616_PWREN_PIN, "rk616 pwren");
+ if (ret)
+ {
+ printk(KERN_ERR "rk616 pwren gpio request fail\n");
+ }
+ else
+ {
+ gpio_direction_output(RK616_PWREN_PIN,GPIO_HIGH);
+ }
+ }
+
+ if(RK616_RST_PIN != INVALID_GPIO)
+ {
+ ret = gpio_request(RK616_RST_PIN, "rk616 reset");
+ if (ret)
+ {
+ printk(KERN_ERR "rk616 reset gpio request fail\n");
+ }
+ else
+ {
+ gpio_direction_output(RK616_RST_PIN, GPIO_HIGH);
+ msleep(100);
+ gpio_direction_output(RK616_RST_PIN, GPIO_LOW);
+ msleep(100);
+ gpio_set_value(RK616_RST_PIN, GPIO_HIGH);
+ }
+ }
+
+ return 0;
+
+}
+
+
+static struct rk616_platform_data rk616_pdata = {
+ .power_init = rk616_power_on_init,
+ .scl_rate = RK616_SCL_RATE,
+};
+#endif
+
#ifdef CONFIG_SND_SOC_RK610
static int rk610_codec_io_init(void)
{
#ifdef CONFIG_I2C4_RK30
static struct i2c_board_info __initdata i2c4_info[] = {
+#if defined (CONFIG_MFD_RK616)
+ {
+ .type = "rk616",
+ .addr = 0x50,
+ .flags = 0,
+ .platform_data = &rk616_pdata,
+ },
+#endif
+
};
#endif