From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johan Hovold Subject: Re: [PATCH 0/6] GPIO character device skeleton Date: Mon, 2 Nov 2015 11:00:39 +0100 Message-ID: <20151102100039.GD8676@localhost> References: <1445502750-22672-1-git-send-email-linus.walleij@linaro.org> <20151024175331.GA22220@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-lb0-f172.google.com ([209.85.217.172]:35935 "EHLO mail-lb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751310AbbKBKAe (ORCPT ); Mon, 2 Nov 2015 05:00:34 -0500 Received: by lbjm5 with SMTP id m5so84430121lbj.3 for ; Mon, 02 Nov 2015 02:00:32 -0800 (PST) Content-Disposition: inline In-Reply-To: Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Linus Walleij Cc: Markus Pargmann , "linux-gpio@vger.kernel.org" , Johan Hovold , Alexandre Courbot , Arnd Bergmann , Michael Welling , Mark Brown , Amit Kucheria On Fri, Oct 30, 2015 at 03:40:50PM +0100, Linus Walleij wrote: > On Sat, Oct 24, 2015 at 7:53 PM, Markus Pargmann wrote: > > >> How to identify and manipulate individual GPIO lines from this > >> ABI is a *LATER* *QUESTION*, this is the bare essentials for > >> getting there: basic operations on the gpiochip device level. > > > > Does this include identifying GPIO lines independent of gpiochips? I > > think that is a use-case as well. > > My view is that we will NOT support any such GPIO lines. > > The new API requires that everyone use gpiolib properly for all their > GPIOs if they want to use them from userspace. > > We have cases with gpiochips with a single GPIO line, so I don't > see why we can't require that. I think Markus question was how to *identify* lines independent of gpiochips. That is given a line name how do we find the corresponding chip and line (number)? I know this series does not add such mechanisms, but we need to discuss this from the start. Do we want user space to iterate over all gpio chips to search for a line name? Note that this could result in more than one gpio (chip + offset) being returned (consider hot-pluggable devices or just dtsi). Johan