Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4092160ybh; Tue, 6 Aug 2019 06:13:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRUjTfNZFWmMK5ScCreolIeY++ZYqxcMKDKeYK9E+eyiKM7TKlwgJMlsB999MdphsJjej9 X-Received: by 2002:a17:90a:a489:: with SMTP id z9mr3097825pjp.24.1565097188258; Tue, 06 Aug 2019 06:13:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565097188; cv=none; d=google.com; s=arc-20160816; b=Qol8aywjSLeBGmXqnLJyInuYx+jKcPy/tA209DPdwVk0F1JwQFVRaixqNW8cIlO0vr xp0f7f2xZQFC6aLeVS4Z783lDZ2BQA3pcTpKsSrl50Ia2geMbklR+I4ehwlRmIZ6PLzZ eIJlAaXcAnpH9nXPy7u81zn+fez7czuLfLKl0lAVLq3EtcCNXN1xoLmopsMx2EGjRFw+ Owbsun6lUEw3FSM1E2LkQyjQ5ukTAwQ4Mio+UhKD+nv4kRW6xtCt6pzgUxZmnal6H+gq n6brokjNPvLlcOl67XQZKPcSLYTNxSrrYOqPNNPnfaZhX3JbZsmX3x1L4Ti5JyuraEAa CE/Q== 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=H0vagFQ3739JrCrLPS29VGkKplJ4eh9USrRRP/YZnBk=; b=yIcAeUAS77vZxBaFZLoghylj7ffk9x10NMRrYbtp7w55g9H3m7E6k0HmlGS9rxOVhD rdY8/LP8wtaQ4/+SLNwrZZkHbRAmR0cuKnB0Km1bvbKQZf14p6EOeUnS8RK0TGFpk8up T5SOZzaBbKMQsHSx+WZnz6aBEonorZiJDj07SMU02QEQAR5EE5MygO2Pywojf90ojwMC Ssg2EK9ngz2gCDdWYBW88zQkYP2V7gJAfDHfNpKd6Nr0rcHJdR7epUYFZxJtXwM1W8IW rTTtzgtqORifAxvbOmJWwor2eRcTJHAYcA/pOEZIrQ9Op8Vd8K+clwT6yFEdtmMpopD4 I8Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HlpTB3Af; 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 q25si44295707pgv.114.2019.08.06.06.12.52; Tue, 06 Aug 2019 06:13:08 -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=HlpTB3Af; 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 S1730859AbfHFNLl (ORCPT + 99 others); Tue, 6 Aug 2019 09:11:41 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:41128 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726834AbfHFNLl (ORCPT ); Tue, 6 Aug 2019 09:11:41 -0400 Received: by mail-lf1-f65.google.com with SMTP id 62so56203546lfa.8 for ; Tue, 06 Aug 2019 06:11:39 -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=H0vagFQ3739JrCrLPS29VGkKplJ4eh9USrRRP/YZnBk=; b=HlpTB3AfoXubHmbOTwFI+0OzaGP1Nl1VLy/JFzh9Njx8wGbwMJFMbtKjx9/NUZsNaK K/cLL+pL8bOt2yI5TdoHessmfhPymfIpULOlpiELbAQV2MYtjGGiAjnUE6YRw4FlPO64 9tKJjn34YL8ZdybMMzgV6I4LdPJTgRfmD+p/tD1aysDuEBmMjul2DGFEuaKOPTXGSW0n iq7NUCiBTtqdbjRhhsTQ562D8Qk8cNr2L2+/gsV6e8pkg5zv70zLhylKA0pk3b1h9/EY ghVnyeP6tnoQCfvqcyRXCanw6EEjd5sa6qQlf4xbpSiWcwpUhdYlUkzkU6VLdqhWOU1G a7dg== 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=H0vagFQ3739JrCrLPS29VGkKplJ4eh9USrRRP/YZnBk=; b=kdI1a2Amh/iwTIHmq0EHIKW2d61sJuvUpdpWnWjqYx5yHtaRXhsfR6tuUnhgsz+bUJ PXbETI/MuEOepk6RNUh0EgraT3kEk4Bv+J+Vr0bwvfk3uCHRFM3UK+lSlcP3AwmOucXJ L/iqkWV6D1iWlPEiZjmN2DxcZBzP/l6JBo+aTGoRqwoBAR4coxwoDkA//nmsQGwyJ23s L3erslqcRw1l8IuR0HwyrNgvdOl2z9sA61tRhrRrvRjKkw0T1JHHrNLVdZu7Zfxwfvlm 4tsg9+Ed3Eo6Fkxvh/IVsyFbpwjRSFFcw33oCCn44RM9NBPr2LqZQHVwChMx/USqQRdi +1PA== X-Gm-Message-State: APjAAAVHDba9gzr6xQ2uvQx6vpsY0QppimJyNWyVJswuNOxkS+pvSy4u hl++fYp+cmMeJoyfEjJ+CnmK24EeUxJf4wKIUh6Aog== X-Received: by 2002:ac2:5c42:: with SMTP id s2mr2536999lfp.61.1565097098965; Tue, 06 Aug 2019 06:11:38 -0700 (PDT) MIME-Version: 1.0 References: <20190803133436.15016-1-rfried.dev@gmail.com> In-Reply-To: From: Linus Walleij Date: Tue, 6 Aug 2019 15:11:27 +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 Tue, Aug 6, 2019 at 3:04 PM Linus Walleij wrote: > 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. Ooops no. It needs a deeper rework in accordance to my comments last time it was posted. Please read this reply to Stefan's patch and address the comments: https://lore.kernel.org/linux-gpio/CACRpkdb5DjAMRYkT+b0U6HVk7E6ccLT79-LB=QGQWWtE17aPUg@mail.gmail.com/ Yours, Linus Walleij