diff mbox

can : AM3517EVM : add platform specific init

Message ID 1299775153-16766-1-git-send-email-abhilash.kv@ti.com (mailing list archive)
State Changes Requested, archived
Delegated to: Tony Lindgren
Headers show

Commit Message

Koyamangalath, Abhilash March 10, 2011, 4:39 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 2e4aad2..782d72d 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -734,6 +734,23 @@  static struct omap_board_mux board_mux[] __initdata = {
 };
 #endif
 
+/*
+ * HECC information
+ */
+
+#define CAN_STB         214
+static void hecc_phy_control(int on)
+{
+        int r;
+
+        r = gpio_request(CAN_STB, "can_stb");
+        if (r) {
+                printk(KERN_ERR "failed to get can_stb \n");
+                return;
+        }
+
+        gpio_direction_output(CAN_STB, (on==1)?0:1);
+}
 
 static struct resource am3517_hecc_resources[] = {
 	{
@@ -762,6 +779,7 @@  static struct ti_hecc_platform_data am3517_evm_hecc_pdata = {
 	.mbx_offset		= AM35XX_HECC_MBOX_OFFSET,
 	.int_line		= AM35XX_HECC_INT_LINE,
 	.version		= AM35XX_HECC_VERSION,
+	.transceiver_switch     = hecc_phy_control,
 };
 
 static void am3517_evm_hecc_init(struct ti_hecc_platform_data *pdata)