Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1475254rwd; Tue, 16 May 2023 18:30:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4aqsy5MDGKNi09DYFvdawB/XzFpmyg501KlYiuQM/EA+tmaYvuzPCfn66HB1MXtLAs7YuT X-Received: by 2002:a17:902:ea11:b0:1ac:7f56:de04 with SMTP id s17-20020a170902ea1100b001ac7f56de04mr38892236plg.45.1684287038328; Tue, 16 May 2023 18:30:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684287038; cv=none; d=google.com; s=arc-20160816; b=eyw6qXk0NKMuPt7HDtjQTdOO31qCw3o+s0iNWzSypATjRYN62VxtIjsxx5B34o0noX ZJFxGcxKq+f6N15q/QgY1X395nHSyPBFD20yn5H9gWYCODxMyRcKrW2XCsd+zudwt4Fo DHTUfFzy7FQGZ7qEKxFjy5PGcKZelc7u8LE+26xw4wCpOBDnyDKsT/XMDkovWgHUH3Ox oXnq8zrxKO65bSqdC0Y2jNohywtgU9YYPBgv8YMQXmkHgNwKqGT4tH+XyF8aLu1e61t8 SukDIPHcOkWWoDOUpkdIsp3MwURuweLVYgWLCVurlZdT19p3/sTua0zxAy7qciBd7fcN v6rQ== 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:dkim-signature; bh=Dc5kCvbNWz3KM2SNUBOoevcDuTxR/og4VBr5RaEEGus=; b=sQPn8g3wm5iJrGAMOWKbCKOi3uIuYGoNOw/u+jDIrSUDBwSTHWy0Teh8XNx4CA9+RU 3nLjJwFWRPJXYxekfzlx6Z+gGkqeenuCsKlUp6/SuuzuSMzy3unQsofkyXfioyy2ZVCO +SOY9McPQHUXkZi8YGesbgIiLUAaR/pYbWqAGnPhm7Jfv7j97Wpy06BW1NTi/ScK5PJU VoQQToE73yUymZxpIE9KBbUVXz1KVAE2q9HQmpX6P+1yMRdA964OFm7ZaujQ5Zb4JuU0 +OL6gDB9b/w+1daIi7vrTIxgaC0YcEC+Mbm+5CXFvl233tamJDIHBOGHVLOMAVWJP48c gZoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=QjV4sMA0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u4-20020a170902e80400b001a67a19331dsi21332959plg.202.2023.05.16.18.30.24; Tue, 16 May 2023 18:30:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=QjV4sMA0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230406AbjEQBVo (ORCPT + 99 others); Tue, 16 May 2023 21:21:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjEQBVn (ORCPT ); Tue, 16 May 2023 21:21:43 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B750646B6; Tue, 16 May 2023 18:21:42 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1ae50da739dso1230065ad.1; Tue, 16 May 2023 18:21:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684286502; x=1686878502; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Dc5kCvbNWz3KM2SNUBOoevcDuTxR/og4VBr5RaEEGus=; b=QjV4sMA0vpAF1Zbq8t+2lq2LPbm+asq9DFF85vgRjw54vytEpt3eMOnlOZ3/hYKfut fg37O2x85XtFIxq97+xB2BOJBHh4dc1CvKnJTbIVk4EEDr1W08nlgy6YLQZK0xCA0rjO KPh2aYjCktdn8uBh4d3zdGAuX9/H1BOwNX8jTh4hD78yOV0XRhUJ6fTx70buM0VnQeEJ wS92wzUnY7+GjMfeGtH7dhiMXPL1fuXoSJ4foNsQ54ccC8axf2ZOaeZOO5brr227n4kD yntIrpI1EDAggAsOsiU3av2I70H5XXVG6R/2MXM6pe5s8rtWz2n7OBsjU5qJj/wC1qTk bytA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684286502; x=1686878502; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Dc5kCvbNWz3KM2SNUBOoevcDuTxR/og4VBr5RaEEGus=; b=feJq7z/ylHGY1ZfRZNGQZPfa4vLzMRjqVrqVWSY7VxMlusd1WsGVd3BQz8AgaZNNh7 lQSwr02mSfzfueXcXtYQ/4NDVptw6Wxf5wYViXOG6AYgy2M6QMP2muV97GgBj2P1ogD4 crwpk2vAZxKZYyJ2QjEu757wNFIg9yi5/dVM8Y5LVstbGJlH2RABlxEjrxreUb7pCj0w EJ+EwB3r3B35VALo4prxWKfU9N3YNrVNwWFumc0nSKoDfyn+VVqH+T1My0lRwGcHIAQL W+Hb5bZACzlJ6Im2VYQw7d5JUWvgfOqRQVRsxxS9PMHBRDN1scC4qzk9V6ItlGB28d2a sQCA== X-Gm-Message-State: AC+VfDwkTaKQA20ULhifxK7ubuxRrtGZnQA1KaDFTEEBSJqmGRlwXsdm msUgUMSPtuiZP7GZdXQ+zWY= X-Received: by 2002:a17:902:ec85:b0:1ad:e746:ca50 with SMTP id x5-20020a170902ec8500b001ade746ca50mr22360069plg.2.1684286502180; Tue, 16 May 2023 18:21:42 -0700 (PDT) Received: from sol (194-223-178-180.tpgi.com.au. [194.223.178.180]) by smtp.gmail.com with ESMTPSA id ay8-20020a1709028b8800b001a9a3b3f931sm16181989plb.99.2023.05.16.18.21.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 18:21:41 -0700 (PDT) Date: Wed, 17 May 2023 09:21:36 +0800 From: Kent Gibson To: Chris Packham Cc: Linus Walleij , "brgl@bgdev.pl" , "johan@kernel.org" , "andy.shevchenko@gmail.com" , "maz@kernel.org" , Ben Brown , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] gpiolib: Avoid side effects in gpio_is_visible() Message-ID: References: <20230512042806.3438373-1-chris.packham@alliedtelesis.co.nz> <31a23398-9b0e-4a19-3576-84fcfd3ce4b5@alliedtelesis.co.nz> <457859be-257a-5528-d5dd-d59c4c9c0636@alliedtelesis.co.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <457859be-257a-5528-d5dd-d59c4c9c0636@alliedtelesis.co.nz> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 17, 2023 at 01:07:25AM +0000, Chris Packham wrote: > > On 17/05/23 12:47, Kent Gibson wrote: > > On Tue, May 16, 2023 at 11:50:42PM +0000, Chris Packham wrote: > >> Hi Kent, > >> > >> > > Given appropriate line names, that is already something you can do with > > the libgpiod v2 tools. Something like: > > > > `for x in gpiochip*; do gpioset -c x tx-dis=1; done` > Would that deal with the fact the GPIO lines are port1-tx-dis, > port2-tx-dis, ... port96-tx-dis? That is assuming the lines are all given the same name - "tx-dis". If the line names are all distinct, and you can generate the list, then you could provide that list to gpioset instead. e.g. `gpioset port1-tx-dis=1 port2-tx-dis=1 ....` and it will work out which lines are on which chips. Cheers, Kent.