From patchwork Thu Mar 10 16:39:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Koyamangalath, Abhilash" X-Patchwork-Id: 625311 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2AGdlGT002905 for ; Thu, 10 Mar 2011 16:39:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752773Ab1CJQj3 (ORCPT ); Thu, 10 Mar 2011 11:39:29 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:60193 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752014Ab1CJQj2 (ORCPT ); Thu, 10 Mar 2011 11:39:28 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id p2AGdHWh012026 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 10 Mar 2011 10:39:19 -0600 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p2AGdDFZ025159; Thu, 10 Mar 2011 22:09:14 +0530 (IST) From: Abhilash K V To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: tony@atomide.com, linux@arm.linux.org.uk, Abhilash K V , Sriramakrishnan Subject: [PATCH] can : AM3517EVM : add platform specific init Date: Thu, 10 Mar 2011 22:09:13 +0530 Message-Id: <1299775153-16766-1-git-send-email-abhilash.kv@ti.com> X-Mailer: git-send-email 1.6.2.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 10 Mar 2011 16:39:48 +0000 (UTC) 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)