Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752630Ab1EJVpb (ORCPT ); Tue, 10 May 2011 17:45:31 -0400 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:57764 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752319Ab1EJVp3 (ORCPT ); Tue, 10 May 2011 17:45:29 -0400 Date: Tue, 10 May 2011 22:45:18 +0100 From: Russell King - ARM Linux To: Linus Walleij Cc: linux-kernel@vger.kernel.org, Grant Likely , Martin Persson , Lee Jones , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 0/4] Pinmux subsystem Message-ID: <20110510214518.GB5315@n2100.arm.linux.org.uk> References: <1304363768-30338-1-git-send-email-linus.walleij@stericsson.com> <20110502225708.GD28001@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1165 Lines: 31 On Tue, May 10, 2011 at 11:25:44PM +0200, Linus Walleij wrote: > It can, basically: > > struct pinmux *pmx; > > pmx = pinmux_get(dev, "irda-uart"); > pinmux_enable(pmx); > (... SIR UART operations ...) > pinmux_disable(pmx); > pinmux_put(pmx); > (... stuff to init FIR silicon ...) > pmx = pinmux_get(dev, "irda-fir"); > pinmux_enable(pmx); > (... etc ...) You really don't want to do this. It's not that SIR and FIR are that exclusive. You only switch to FIR mode when you've negotiated in SIR mode, and then there's tight timings for doing that. Essentially you agree in SIR mode to switch to FIR mode, switch to FIR mode and expect a response in FIR mode from the remote end. Calling out to lots of functions to perform the switch is asking for that response to be missed because you've not set things up for it. You'd want to have SIR and FIR mode 'got', and then switch as quickly as possible between them. -- 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/