Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3533683ybh; Tue, 17 Mar 2020 01:49:03 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuSt8DEW3B8xs5LVMQi04MKmpn8m6I4KX61erNpage1NbswWJwVtCcYHiupUht5/XPOzbPj X-Received: by 2002:aca:4286:: with SMTP id p128mr2570405oia.29.1584434943655; Tue, 17 Mar 2020 01:49:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584434943; cv=none; d=google.com; s=arc-20160816; b=Ugr7ulok9zw2i8H4CjLVAMTRuitUuIn1azC3z0r97NEWe1l6Q9OsBNbMpx1RD4JrXU mP4J9jF/1OOTqOVbPUAEmCWk1Y2HtwL/cQxAz7JnbM5DpSMAc9vvizGp7KHPI3IgHJLs 33dir5gQ1vxLJUUaNGB985eLK1Mh95I+kDM7XFJssGixqMijj5qVROCbpDAGBT3+kxFF KnfQEIcJrg+GM5UU50tyRx07xh0CyjNBeYgHwWYNnzUDrqLmcJIwYIzBigpElXSjxXv+ 6pOQuk0HLKOT00oa/5VSN44NKuLQ+jDgd4qxiWZZT1xoMH7Ko6TIcrRJRDXyHZxnvlr2 xOFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=TF9ZPq6K3m7hthYQMxgsfrxGm1XjgIE20ka3eMWPfOI=; b=0+PYoyNgWSHlp1skbwtYi8GrQGjkeJpXf8SYzVFffvZsZeu2JusOJgSrou6D69VCU2 9R1Si4JXhqOXd2Xlqnr3q9lxhMInBEKuYB7i7m5G2DhA8RfDFtTVOtGDSfH3E9F7n67O pliJbgiLjEbb1aBfBb6R7Ag3rKB2xW1uiXIApZHU9JyCssWVM3bflTYkN1FdW0V9ADN9 ksueJHccoAI8QNNjEltCcNu5zKjm/htuXfvgQarxl5yBcZnAvVCw12FHbK2dB4bD5r4A bhiK9iDv5qoSuWE4aSpEYCBX8JP9Fytjo4iF6MLLkTvpSkf/v/cfkTA2FsuTslbFAVSK 8hUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i2si281485oif.204.2020.03.17.01.48.51; Tue, 17 Mar 2020 01:49:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726148AbgCQIsU (ORCPT + 99 others); Tue, 17 Mar 2020 04:48:20 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:40675 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726057AbgCQIsU (ORCPT ); Tue, 17 Mar 2020 04:48:20 -0400 Received: by mail-ot1-f66.google.com with SMTP id h17so2181449otn.7; Tue, 17 Mar 2020 01:48:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TF9ZPq6K3m7hthYQMxgsfrxGm1XjgIE20ka3eMWPfOI=; b=cti8u4IeylfjBU/nTFCiR13/cPOQK70zY/obqWbtRzRsjjvuzd4wt77cSzGtdee8dA HDiMOFOuEh2GRULpOqozom0ujWZCuvXuRT+LxPeaMHjABHwpEvTfwFYNGh2oZ//4i3XP V9AXFycY8+Ml5lzv04unrY4q30Fvt2+vm0nNjjxUT4uZTHL0NRy/mNVhQcZ6HRwtw534 NpGRunMjc7B71h7a4N5+Euu+Sm3ERhVQm5aWJpNtQyUey64VCIwSh6srdU5Dxfn1njCM 1MKGxgDmHCL7e8bDM7wAvODtaxeWaMoGsNykLRn3w2O9UUH05szRCcCHhL3tIKc7CRSb f12g== X-Gm-Message-State: ANhLgQ1TDk9VBxtnoz3QtYyFKyPVvo1V1gggDERAaX1VK946S+hkQCpC HF0f9nSJhQ799SDuUCMwJKt7fg61RblEq525uGk= X-Received: by 2002:a9d:5c0c:: with SMTP id o12mr2783773otk.145.1584434899513; Tue, 17 Mar 2020 01:48:19 -0700 (PDT) MIME-Version: 1.0 References: <20200218151812.7816-1-geert+renesas@glider.be> <20200218151812.7816-3-geert+renesas@glider.be> In-Reply-To: From: Geert Uytterhoeven Date: Tue, 17 Mar 2020 09:48:08 +0100 Message-ID: Subject: Re: [PATCH v5 2/5] gpiolib: Add support for GPIO line table lookup To: Linus Walleij Cc: Bartosz Golaszewski , Jonathan Corbet , Harish Jenny K N , Eugeniu Rosca , Alexander Graf , Peter Maydell , Paolo Bonzini , Phil Reid , Marc Zyngier , Christoffer Dall , Magnus Damm , Rob Herring , Mark Rutland , "open list:GPIO SUBSYSTEM" , Linux Doc Mailing List , Linux-Renesas , "linux-kernel@vger.kernel.org" , QEMU Developers Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, On Thu, Mar 12, 2020 at 3:21 PM Linus Walleij wrote: > On Tue, Feb 18, 2020 at 4:18 PM Geert Uytterhoeven > wrote: > > Currently GPIOs can only be referred to by GPIO controller and offset in > > GPIO lookup tables. > > > > Add support for looking them up by line name. > > Rename gpiod_lookup.chip_label to gpiod_lookup.key, to make it clear > > that this field can have two meanings, and update the kerneldoc and > > GPIO_LOOKUP*() macros. > > > > Signed-off-by: Geert Uytterhoeven > > Reviewed-by: Ulrich Hecht > > Reviewed-by: Eugeniu Rosca > > Tested-by: Eugeniu Rosca > > I will try to understand why this change is necessary to implement > the gpio aggregator (probablt I will comment that on the other > patches like "aha now I see it" or so, but it would help a lot if the > commit message > would state the technical reason to why we need to do this change, > like what it is that you want to do and why you cannot do it without > this change. It's very simple: how do you want the user to refer to a specific GPIO line? Currently he can only do so by gpiochip label and index. However, there exists another stable reference: the (optional) line name, which can be attached using "gpio-line-names" in DT or ACPI. As this is the most use-centric way to refer to a GPIO, it makes sense to support lookup based on that, too. Will reword to make this clearer. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds