Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751737Ab1CKQzz (ORCPT ); Fri, 11 Mar 2011 11:55:55 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:43049 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750928Ab1CKQzw (ORCPT ); Fri, 11 Mar 2011 11:55:52 -0500 X-Auth-Info: 4FRB5DJAByHPqInn084cAMCztpQWK7tlZ0muQzXngeY= Message-ID: <4D7A5497.4070801@grandegger.com> Date: Fri, 11 Mar 2011 17:57:59 +0100 From: Wolfgang Grandegger User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.12) Gecko/20100907 Fedora/3.0.7-1.fc12 Thunderbird/3.0.7 MIME-Version: 1.0 To: Abhilash K V CC: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, tony@atomide.com, linux@arm.linux.org.uk, Sriramakrishnan Subject: Re: [PATCH] can : AM3517EVM : add platform specific init References: <1299775153-16766-1-git-send-email-abhilash.kv@ti.com> In-Reply-To: <1299775153-16766-1-git-send-email-abhilash.kv@ti.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1559 Lines: 48 On 03/10/2011 05:39 PM, Abhilash K V wrote: > CAN module on AM3517 requires programming of IO expander > as part of init sequence. Added transceiver_switch > callback to handle this. > > Signed-off-by: Sriramakrishnan > Reviewed-by: Vaibhav Hiremath > Signed-off-by: Abhilash K V > --- > arch/arm/mach-omap2/board-am3517evm.c | 18 ++++++++++++++++++ > 1 files changed, 18 insertions(+), 0 deletions(-) > > 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); > +} This function is called ony *any* ifconfig up and down request. I would expect gpio_request() will return -EBUSY when it's called more than once. Wolfgang. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/