Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4697419pxu; Thu, 10 Dec 2020 03:18:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJzksGE32IvLaWL/tr3A2o3cEm6FubiRaLTFoU9W6hnBxJvY5r2+8EjvjRPVAhMq/JDbfEJg X-Received: by 2002:a17:906:7146:: with SMTP id z6mr5875724ejj.379.1607599123032; Thu, 10 Dec 2020 03:18:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607599123; cv=none; d=google.com; s=arc-20160816; b=WNnvAjVIFOBkqQ0RdQ3kBHi/aJv5VwGlF1JuJF6g/VZ0jQijSLgJfJ4IbWTw1nwb4u w4Q35utNATw8u8SfDflNJorR3Fa9/5Cbyx9/RgDHwrHfhUo7Hbkp6shUfcPK7Y+iSL8x Dx8tJQ/9l8ezqtsgIVGUgANSpA3BgSPRu7TxaOET/ZkpMf9rGI8DfhZD5uv4ikBMLrBg 4/kosTn27k9du581wntg7IwG/G3QxacMS8RQ+eLBh1zgQBxXqpslbH2h5p/PQup/RNPk gyGda6n+W2EHNDGuWJbKlMu2a3qSHiI+x0y1tikHJ6W90O6/uT0Q+pni7erfGRQPK269 0ENA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=3g/PlbOq96E099kgmLST992B1AZT0J96fn+u0TM9mng=; b=oOX345DDU/m7D+iJoPZ2YaLIxs74naRAP1xu6A9XeyEqYPXaaDGEBLaKbpP3n3oO/N eYzmpbemq9NrgerC12r/KpElE59Uoppy6KNBPtqI6JzaIXusfgEqWeASG7tsw9UZmKup klH8BugZOuwnc4R8/lSVAJxf18YvASCLf+Jq5oXvgVAEeTk2RJQs/CJexp06c7OOHOTz oyMFbGYaa6dEl8cZPqhffJQw0hYIoJiDaWmvihFSyMhJkCTT1VpX6z/HJiHg7EMARZgT 2u3cZASiv/yyPlFFendoRbZktGd4WdE6kBk6Jb5tGWJYHDV1K/0m8LICtnBFdOj6nNkI YnHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f21si2488757eds.396.2020.12.10.03.18.20; Thu, 10 Dec 2020 03:18:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727727AbgLJJEj (ORCPT + 99 others); Thu, 10 Dec 2020 04:04:39 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:44399 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725953AbgLJJEi (ORCPT ); Thu, 10 Dec 2020 04:04:38 -0500 Received: by mail-lf1-f66.google.com with SMTP id m25so7098020lfc.11; Thu, 10 Dec 2020 01:04:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=3g/PlbOq96E099kgmLST992B1AZT0J96fn+u0TM9mng=; b=PWI0yePTw/E6TXKgfLwZ+qfbt4Ph3oukG81EdMMai5jEYP3FHikI39wwYNnVsiwFqT dJMLD2cmqZ1mRakIFlIl8R7MT3TOywvyTwZlUSg3tDRqFb5/1OvILi+EqwIcMXLMR605 WSXGby6LscSJ1hl/mnnvDPRC68MxRIqB78cK3ZcXWlKJHq/Npv4nhOvpbKX1TriutAaZ C5nn+bLCCt9QTAsd6c3SmAdDkbLNJW96u+ypQSlStVmoGDsS15DCB8CTbVBM8af3uR3j oaC3sL/wW9tAT6VvWhaQ5FExTCbbjDcMat92uU/KsZbNO/XSNvmyn5D87q5FX9uwkxl/ kXwg== X-Gm-Message-State: AOAM530jV98ZBlqSkA8Uf2pCR1SLXNRDnZbPfUCFwlEx7yqCi9Aw1sK1 35Vh1ZQNdlXTZt9iB6kPhFUxGm7GfclkyQ== X-Received: by 2002:a19:ecb:: with SMTP id 194mr1527898lfo.70.1607591035832; Thu, 10 Dec 2020 01:03:55 -0800 (PST) Received: from xi.terra (c-beaee455.07-184-6d6c6d4.bbcust.telenor.se. [85.228.174.190]) by smtp.gmail.com with ESMTPSA id j20sm539444ljc.47.2020.12.10.01.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Dec 2020 01:03:55 -0800 (PST) Received: from johan by xi.terra with local (Exim 4.93.0.4) (envelope-from ) id 1knHsJ-0008A1-T6; Thu, 10 Dec 2020 10:04:36 +0100 Date: Thu, 10 Dec 2020 10:04:35 +0100 From: Johan Hovold To: Linus Walleij Cc: Johan Hovold , Bartosz Golaszewski , Geert Uytterhoeven , Manivannan Sadhasivam , Greg KH , linux-usb , "linux-kernel@vger.kernel.org" , patong.mxl@gmail.com, Mauro Carvalho Chehab , Angelo Dureghello , "open list:GPIO SUBSYSTEM" Subject: Re: [PATCH v5 2/3] usb: serial: xr_serial: Add gpiochip support Message-ID: References: <20201122170822.21715-1-mani@kernel.org> <20201122170822.21715-3-mani@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 10, 2020 at 09:53:45AM +0100, Johan Hovold wrote: > On Wed, Dec 09, 2020 at 05:25:32PM +0100, Linus Walleij wrote: > > On Wed, Dec 9, 2020 at 4:24 PM Johan Hovold wrote: > > > So it sounds like there's nothing preventing per-chip-unique names in > > > the rest of gpiolib and the new chardev interface then? Are the > > > user-space libraries able to cope with it, etc? > > > > Yes the documentation refers to libgpiod a very well maintained > > library: > > https://www.kernel.org/doc/html/latest/driver-api/gpio/using-gpio.html > > https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/ > > Just did a super quick check and it seems libgpiod still assumes a flat > name space. For example, gpiod_chip_find_line() returns only the first > line found that matches a name. Shouldn't be impossible to extend, but > just want to make sure this flat namespace assumption hasn't been to > heavily relied upon. That should have been gpiod_line_find() (which in turn uses the above mentioned helper for per-chip lookups). Johan