Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4082639ybh; Tue, 6 Aug 2019 06:05:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqxivRTZt52EDmd0v121WKgmGjGdJW1JwihHFG46kDjiL438aLhuMkN+fqqsoRqmCOvg63sU X-Received: by 2002:a17:90a:bc42:: with SMTP id t2mr3094444pjv.121.1565096752579; Tue, 06 Aug 2019 06:05:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565096752; cv=none; d=google.com; s=arc-20160816; b=f1wATR7ZazvACmkFjyYSYxQLxQo9cv+Qv14WBKEN/2YnnKowUI77Sxqd4bk7s0IN42 A30730OwuBUUH8Wmd3trnSibutMMgUPVSdMEF5vxjcD0c57u8nI766n850v7omYoP8q9 G6tS+JzHcU+miP2SFlWbgnjJh8XgBvJyW8GlBNyXB8DCfEQ6ty/W8pxplUs5bxHhkO0p sm+VxzH9Ks9dpU+LEi8ITvZXEa9srmM2Eb9Y/d9/GGtPKDoha9oQJuAwxXHgGNvJfcGI j42IbGAXuqNjcCvEPOzyRMgqO3fIsUDOWzTqa+BhZRtJQM+W+crcnm93qUFq/wJbimXO Mi2w== 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:dkim-signature; bh=VSP7ertTaGliFxnzQE6UZ8P7kDdh7xHsv7HJAdC4s/g=; b=RM4trSHpJQZ4xiKaBFhMMrxZy1TPHdQgLf7xwvbclBIMzcfAkPXe3ZV5ezeQQoPRhf oxEb2ipObI7/5t3HPnzk+B+FgJnoO7nUdjStndx5x7ykIytiJ+oSTrNVSTCw/RJEXfd5 zBI7fnqoUpF5B0peyqozJL/zQpmA29GiytPCbxxZRat3mkyLXhzcfGTDZ+GKqeO/LHVz fcTbnzIQr0OU7ioR/pCncuX07fR3WsvyC0OI9Wvg8SI9Dcw7nfbSnk5MGGLWA51tBPMB TWxMrGbIBaTD5/FM2bGRdWp3nBgZh/2n1CZi+QcG0x3oECWPyOMzqsuT8g/5hbQQBwnr peLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hJ09HMiy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h186si48724328pge.110.2019.08.06.06.05.34; Tue, 06 Aug 2019 06:05:52 -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; dkim=pass header.i=@linaro.org header.s=google header.b=hJ09HMiy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731399AbfHFNEs (ORCPT + 99 others); Tue, 6 Aug 2019 09:04:48 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:41322 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726092AbfHFNEs (ORCPT ); Tue, 6 Aug 2019 09:04:48 -0400 Received: by mail-lj1-f194.google.com with SMTP id d24so82166596ljg.8 for ; Tue, 06 Aug 2019 06:04:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VSP7ertTaGliFxnzQE6UZ8P7kDdh7xHsv7HJAdC4s/g=; b=hJ09HMiyWFDdzVON9hsczrI8lwxd4BGK2p5ZiM1qSz3r2CZVJt698v4TipIfzs08xp FRm/+H/QMELlqo3dO2vQM+p2Hctehj6MpcypAFq7HAg8Igvdx5GmcdiFrUPMYboPigjG bLwFEk1sKaAvqez/V1NxBL1JD9KDxGbupOQqk2UjBlKsGcg0EbDtzIIF8l6pNIbOqCds iUJsDD57mZEb/MmCL6F9Go8fYRk+NiY8xsUkpULQXTMdis/OO7s5Kayr5Km80/pYxEVW I4HrSaKNu1id/oWV9R0gLzaRt4zhprNKaWIFA7WSEAZu7dCHiqJdR5cTW5Mq7ZKPn+RO yKRw== 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=VSP7ertTaGliFxnzQE6UZ8P7kDdh7xHsv7HJAdC4s/g=; b=R6KbClXayWkZ0HpCJiRZvf7xtvTDMN+5img4velQmb1t4J0h9IAMjPDXaoGtX+H9wy Pyx73UWQR6L/v5hiiySMli5s1NR18eRF18th9WctOJtyJ7emRR2Dzcuzz0NKeEI5wMx3 Na75pbVfmoQkfv2nwip0MrNmV7hD+03+qtNKCddz8NJizpcjHB60PCR65ah1NRXv4su1 WwbEc2wbIIkAzof+iqJxtmha6spIFWIp34p3BZr3de0ZYQj8qWuB/SkwmWfsJmXEyJY/ FOIjiXMcbqntEebrLntiksiyHU72lT9byiinoOUfSY3ZPrwBWd/7m9iJMOzBczt4AmnO HFiA== X-Gm-Message-State: APjAAAWiZa5Six7WbyP1q5zJ+nidwfRSg1uSbKmdgFOO0cTYRmBdL6vZ rftSqzitsGjS3WXjYff9RAmJ7OVDKjyKV5ft66MMmQ== X-Received: by 2002:a2e:9048:: with SMTP id n8mr1761330ljg.37.1565096686312; Tue, 06 Aug 2019 06:04:46 -0700 (PDT) MIME-Version: 1.0 References: <20190803133436.15016-1-rfried.dev@gmail.com> In-Reply-To: <20190803133436.15016-1-rfried.dev@gmail.com> From: Linus Walleij Date: Tue, 6 Aug 2019 15:04:34 +0200 Message-ID: Subject: Re: [PATCH] gpiolib: Take MUX usage into account To: Ramon Fried Cc: Bartosz Golaszewski , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , Stefan Wahren 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 On Sat, Aug 3, 2019 at 3:34 PM Ramon Fried wrote: > From: Stefan Wahren > > The user space like gpioinfo only see the GPIO usage but not the > MUX usage (e.g. I2C or SPI usage) of a pin. As a user we want to know which > pin is free/safe to use. So take the MUX usage of strict pinmux controllers > into account to get a more realistic view for ioctl GPIO_GET_LINEINFO_IOCTL. > > Signed-off-by: Stefan Wahren > Tested-By: Ramon Fried > Signed-off-by: Ramon Fried > --- > Sending Stefan's RFC as patch, as I tested it and it seems to work, > additionally, an accompanying fix was made by me to gpiolibd to fix a > display error of the actual result: > https://patchwork.ozlabs.org/patch/1139923/ This is mostly fine, some style nits so I fixed it up when applying. Yours, Linus Walleij