Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754296Ab2HEKGG (ORCPT ); Sun, 5 Aug 2012 06:06:06 -0400 Received: from mail-vb0-f46.google.com ([209.85.212.46]:35943 "EHLO mail-vb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753719Ab2HEKGF (ORCPT ); Sun, 5 Aug 2012 06:06:05 -0400 MIME-Version: 1.0 In-Reply-To: <20120801152240.GA16388@sig21.net> References: <20120801152240.GA16388@sig21.net> Date: Sun, 5 Aug 2012 12:06:03 +0200 Message-ID: Subject: Re: DT GPIO numbering? From: Linus Walleij To: Johannes Stezenbach Cc: devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org, Grant Likely 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: 1092 Lines: 28 On Wed, Aug 1, 2012 at 5:22 PM, Johannes Stezenbach wrote: > I'm currently learning how Linux devicetree support works, > here is one question I couldn't find an answer for. > > I understand that within the devicetree GPIOs are referenced by phandle, > thus the numbers are irrelevant. However, in sysfs the number is > what is used to access the GPIO, e.g. for debugging or > blinkenlight apps. How does this fit together? I think it simply does not fit together. Grant & me has been claiming the GPIO sysfs interface is a bit crazy from time to time. My long-term plan would be to replace it with /dev/gpio/gpioN device nodes per-gpiochip and use ioctl etc to control these beasts instead. However one does not do that overnight, and my life is too busy, and other refactorings also need to happen :-/ 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/