arm: goni: add i2c_init_board()
authorRobert Baldyga <r.baldyga@samsung.com>
Mon, 6 Oct 2014 12:33:11 +0000 (14:33 +0200)
committerSimon Glass <sjg@chromium.org>
Wed, 22 Oct 2014 16:33:49 +0000 (10:33 -0600)
Add proper initialization of GPIO pins used by software i2c.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
board/samsung/goni/goni.c
include/configs/s5p_goni.h

index eb0f9bffae0e4a3b925b570af2ab4f1337aa2f60..5f76be358acbfa0c353389dd5fbf6e040f130e85 100644 (file)
@@ -33,6 +33,16 @@ int board_init(void)
        return 0;
 }
 
+#ifdef CONFIG_SYS_I2C_INIT_BOARD
+void i2c_init_board(void)
+{
+       gpio_request(S5PC110_GPIO_J43, "i2c_clk");
+       gpio_request(S5PC110_GPIO_J40, "i2c_data");
+       gpio_direction_output(S5PC110_GPIO_J43, 1);
+       gpio_direction_output(S5PC110_GPIO_J40, 1);
+}
+#endif
+
 int power_init_board(void)
 {
        int ret;
index 0c6e9c7878477048b4e4e69bb9f3510f33f72563..fc2497a3320875423765bae1e53ae6eb77156a4a 100644 (file)
 #define CONFIG_SYS_I2C_SOFT_SPEED      50000
 #define CONFIG_SYS_I2C_SOFT_SLAVE      0x7F
 #define CONFIG_I2C_MULTI_BUS
+#define CONFIG_SYS_I2C_INIT_BOARD
+
 #define CONFIG_SYS_MAX_I2C_BUS 7
 #define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_S3C_UDC_OTG