From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753365Ab1HSL7G (ORCPT ); Fri, 19 Aug 2011 07:59:06 -0400 Received: from mail-qy0-f174.google.com ([209.85.216.174]:39923 "EHLO mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752642Ab1HSL7C convert rfc822-to-8bit (ORCPT ); Fri, 19 Aug 2011 07:59:02 -0400 MIME-Version: 1.0 In-Reply-To: <20110709102337.GD9247@sirena.org.uk> References: <1307984291-9774-1-git-send-email-linus.walleij@stericsson.com> <20110709102337.GD9247@sirena.org.uk> Date: Fri, 19 Aug 2011 13:59:00 +0200 Message-ID: Subject: Re: [PATCH 1/2] drivers: create a pinmux subsystem v3 From: Linus Walleij To: Mark Brown Cc: Grant Likely , Linus Walleij , linux-kernel@vger.kernel.org, Martin Persson , Joe Perches , Russell King , Linaro Dev , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 9, 2011 at 12:23 PM, Mark Brown wrote: > On Mon, Jun 13, 2011 at 01:57:36PM -0600, Grant Likely wrote: >> On Mon, Jun 13, 2011 at 10:58 AM, Linus Walleij >> >> I would *strongly* recommend against individual device drivers >> accessing the pinmux api.  This is system level configuration code, >> and should be handled at the system level. > > There can also be advantages to putting the pin into the designed mode > without the driver being loaded from the electrical point of view.  For > example, selecting appropriate pull values for pads can cut down on > power consumption. Since the pin control subsystem is reference counting wrt mux settings, one does not exclude the other. So for example a driver may or may not grab a certain set-up of pins and the core platform may do the same, but when they start to request different conflicting things the subsystem will complain, as is apropriate. So this is a very pure driver framework, without policy, it just does what it's told, and will prevent undefined and impossible settings. Atleast that's the idea. Thanks, Linus Walleij