.io_init = rk29_i2c3_io_init,
};
#endif
+#if defined (CONFIG_ANX7150)
+#define HDMI_VDD_CTL RK29_PIN6_PD3
+int anx7150_io_init(void)
+{
+ return 0;
+}
+struct hdmi_platform_data anx7150_data = {
+ .io_init = anx7150_io_init,
+};
+#endif
+
#ifdef CONFIG_I2C0_RK29
static struct i2c_board_info __initdata board_i2c0_devices[] = {
#if defined (CONFIG_RK1000_CONTROL)
.addr = 0x39, //0x39, 0x3d
.flags = 0,
.irq = RK29_PIN2_PA3,
+ .platform_data = &anx7150_data,
},
#endif
#if defined (CONFIG_SENSORS_MPU3050)
#endif
};
#endif
+#if defined (CONFIG_ANX7150)
+int anx7150_io_init(void)
+{
+ return 0;
+}
+struct hdmi_platform_data anx7150_data = {
+ .io_init = anx7150_io_init,
+};
+#endif
#ifdef CONFIG_I2C1_RK29
static struct i2c_board_info __initdata board_i2c1_devices[] = {
.flags = 0,
},
#endif
-#if defined (CONFIG_ANX7150) || defined (CONFIG_ANX7150_NEW)
+#if defined (CONFIG_ANX7150)
{
.type = "anx7150",
.addr = 0x39, //0x39, 0x3d
.flags = 0,
.irq = RK29_PIN1_PD7,
+ .platform_data = &anx7150_data,
},
#endif
.io_init = rk29_i2c3_io_init,
};
#endif
+
+#if defined (CONFIG_ANX7150)
+#define HDMI_VDD_CTL RK29_PIN6_PD3
+int anx7150_io_init(void)
+{
+ gpio_request(HDMI_VDD_CTL, "hdmi pwr ctl");
+ gpio_direction_output(HDMI_VDD_CTL, GPIO_HIGH);
+ //gpio_set_value(HDMI_VDD_CTL, GPIO_HIGH);
+ mdelay(10);
+ return 0;
+}
+struct hdmi_platform_data anx7150_data = {
+ .io_init = anx7150_io_init,
+};
+#endif
#ifdef CONFIG_I2C0_RK29
static struct i2c_board_info __initdata board_i2c0_devices[] = {
#if defined (CONFIG_RK1000_CONTROL)
.addr = 0x39, //0x39, 0x3d
.flags = 0,
.irq = RK29_PIN2_PA3,
+ .platform_data = &anx7150_data,
},
#endif
#if defined (CONFIG_GS_L3G4200D)
#endif
};
#endif
-
+#if defined (CONFIG_ANX7150)
+int anx7150_io_init(void)
+{
+ return 0;
+}
+struct hdmi_platform_data anx7150_data = {
+ .io_init = anx7150_io_init,
+};
+#endif
#ifdef CONFIG_I2C1_RK29
static struct i2c_board_info __initdata board_i2c1_devices[] = {
#if defined (CONFIG_RK1000_CONTROL1)
.flags = 0,
},
#endif
-#if defined (CONFIG_ANX7150) || defined (CONFIG_ANX7150_NEW)
+#if defined (CONFIG_ANX7150)
{
.type = "anx7150",
.addr = 0x39, //0x39, 0x3d
.flags = 0,
.irq = RK29_PIN1_PD7,
+ .platform_data = &anx7150_data,
},
#endif
struct led_newton_pwm* leds;
};
+struct hdmi_platform_data {
+ u32 hdmi_on_pin;
+ u32 hdmi_on_level;
+ int (*io_init)(void);
+ int (*io_deinit)(void);
+};
struct irda_info{
u32 intr_pin;
int (*iomux_init)(void);
#include <linux/interrupt.h>\r
#include <mach/gpio.h>\r
#include <mach/iomux.h>\r
+#include <mach/board.h>\r
\r
\r
\r
struct hdmi *hdmi = NULL;\r
struct anx7150_pdata *anx = NULL;\r
\r
-#if defined(CONFIG_MACH_RK29_PHONEPADSDK)\r
- gpio_request(HDMI_VDD_CTL, "hdmi pwr ctl");\r
- gpio_direction_output(HDMI_VDD_CTL, GPIO_HIGH);\r
- //gpio_set_value(HDMI_VDD_CTL, GPIO_HIGH); \r
- mdelay(10);\r
-#endif\r
+ struct hdmi_platform_data *pdata = client->dev.platform_data;\r
+\r
+ if(pdata && pdata->io_init)\r
+ pdata->io_init();\r
\r
hdmi = hdmi_register(sizeof(struct anx7150_pdata), &client->dev);\r
if (!hdmi)\r
\r
#define ANX7150_SCL_RATE 100 * 1000\r
\r
-/* VCC_HDMI 's control */\r
-#define HDMI_VDD_CTL RK29_PIN6_PD3\r
\r
/* HDMI auto switch */\r
#define HDMI_AUTO_SWITCH HDMI_ENABLE\r