Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758705Ab2FUHtD (ORCPT ); Thu, 21 Jun 2012 03:49:03 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:47905 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753361Ab2FUHtA (ORCPT ); Thu, 21 Jun 2012 03:49:00 -0400 MIME-Version: 1.0 In-Reply-To: <20120620143140.GA7817@linux-sh.org> References: <1312780773-23142-1-git-send-email-Baohua.Song@csr.com> <20110808081552.GI32513@linux-sh.org> <4E40912C.5040801@codeaurora.org> <20120620143140.GA7817@linux-sh.org> Date: Thu, 21 Jun 2012 09:48:59 +0200 Message-ID: Subject: Re: [PATCH] GPIOLIB: add generic gpio_set_pull API From: Linus Walleij To: Paul Mundt Cc: Barry Song <21cnbao@gmail.com>, Rohit Vaswani , Kyungmin Park , Linus Walleij , linux-kernel@vger.kernel.org, workgroup.linux@csr.com, Grant Likely , Richard Woo , linux-arm-kernel@lists.infradead.org, Mark Brown Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1593 Lines: 38 On Wed, Jun 20, 2012 at 4:31 PM, Paul Mundt wrote: > On Wed, Jun 20, 2012 at 10:15:01AM +0200, Linus Walleij wrote: >> On Tue, Jun 19, 2012 at 5:25 AM, Barry Song <21cnbao@gmail.com> wrote: >> > but i think at least the macros of GPIO_PULL_NONE, GPIO_PULL_UP and >> > GPIO_PULL_DOWN should be standardized. >> >> You find an attempt at standardization in drivers/pinctrl/pinconf-generic.c >> which is also used by the composite U300+COH901 drivers. Drivers >> can select this support library and use the flags from >> >> > What's with PIN_CONFIG_END using such an insane value? This: PIN_CONFIG_END = 0x7FFF It's just that I reserved 16 bits for the different stuff, and then the bitstuffing functions below use 16 bits for this. If it's too much we can shrink it. > I'm happy to consolidate on the provided definitions and add my own on top > of that, but I'm not going to waste an insane amount of bits that I could > be using for driver-specific data and so on instead to comply with the > PIN_CONFIG_END comment. Is there any valid reason why this would ever > need to exceed 4 bits? I think we need more than 4 bits for sure, but not more than 8. If you want to patch it down to have 8 bits for the param and 24 bits for the argument, go ahead, it won't hurt. Yours, Linus Walleij -- 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/