Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp18417944ybl; Fri, 3 Jan 2020 01:52:10 -0800 (PST) X-Google-Smtp-Source: APXvYqxGdWYiX8haqe+QJ6VjNqyud+WsHAZU7YFfQ4jCa3Rgp3OXNeeMjylmNC1KkP0/Ubo+s4gJ X-Received: by 2002:a9d:5c8a:: with SMTP id a10mr62049268oti.95.1578045130256; Fri, 03 Jan 2020 01:52:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578045130; cv=none; d=google.com; s=arc-20160816; b=0lF2KSHO9L3RiOoobXKcXJWKPeLcglJ42LNw0Iv8Ybxwbl+kQu71/kH6yGHbxZpQ3u BWWFxOWOlwiGkfTUB9KLBJNtzaIbSoaJQ65qmAjSnzlt+N0u0yCEj8tVj4yTNT9TftfZ kHA4f/dh+37egalZiM43IHcJoaibIHSODffzmu8b11Pva0An221De7K7Tn9Vfpq0aPCI Ry+2xa7OVp5LPsBpqQoKj2bpiRNGEKCeNStlHYmBrpWl0F6BQBlNuERMO7yhNa582HuJ zMhGZl6JqC6R03qjG2f1vYOXhs05guy9XLL5XRlizwvDL5nMKD7Xsc+3XaekLW25IoEg 6ZTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=m2l4ZP00y1MciphnLaoZDMF/+IkQks5KZaGyrGhDRiA=; b=zlcJ6ddEljkpEQqgBQii7DdlXUB3kvATgLfTO141JCfWcCk2pZqMAZWhul3suDi3x9 WEnSv9/5PkLPElA+HNqKqyY9veLqjIZ1pVKqX0nIkwfYuwwPXTbx6m6hUxqwNSf8X6j0 kZHD8ZIYNRN7paABw3WmkyLOMRb7M+PEd5TW4rvosJbqz3v4B2Os8P8yTBQMPlLCYJ9c 7lNjlMCqXUWaMSOHPnvLmpjr2sioywwRqMyEXqOrAaVb7My/p+kbLCqNEozX95s+r3wP WEgRRHyMhOV3FmEsUfMzoVeSi4KaO4DWUKyDoMXL/zYUO9U/k4DScIfnNzeoeKZJby9s HZLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=cG4ow4LH; 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 q126si27975799oia.8.2020.01.03.01.51.58; Fri, 03 Jan 2020 01:52:10 -0800 (PST) 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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=cG4ow4LH; 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 S1727518AbgACJvW (ORCPT + 99 others); Fri, 3 Jan 2020 04:51:22 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:38375 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727436AbgACJvV (ORCPT ); Fri, 3 Jan 2020 04:51:21 -0500 Received: by mail-qk1-f193.google.com with SMTP id k6so33350698qki.5 for ; Fri, 03 Jan 2020 01:51:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=m2l4ZP00y1MciphnLaoZDMF/+IkQks5KZaGyrGhDRiA=; b=cG4ow4LHRj767jnNAQOpyl17Q+p40TAAcPfpSpHHXDGlrwj62Hpbce+n9FDrk+qkc/ hF5ZyqmmFsJTtYTiw79voWF6jUJzD3jMMLxaKlR24Yfx0wH19vRA84WzFpBPdLB301Wn oDHYiFn+x4VsG0+cQjGtKP+AgiFhJEl2gny+42Vv2QuoSuDmtZTYXxHfkb2SYQSXio5l 4izdl3cbPeqe/fUEgmo7jINRJHhXeZzjP7rcRM1zIfCdONmAYkusOFVw3KH4tD5KGrsX B2TTgSy+6TGCiaGzC+uIdpJ7YevNhC6HmCAOCMdMswOZwgLLOkvTEExLz90pSslcmLhv 3Jtg== 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:content-transfer-encoding; bh=m2l4ZP00y1MciphnLaoZDMF/+IkQks5KZaGyrGhDRiA=; b=RIZEakYqg+NySL/DEX7TtuRdcYDBSnUR4KDqBYX1F0kaIloAi7TdSt/H5zzoKpHQLV ZhSkOco2dv4VYDA02IrYpvqHC3UXjHWL/UfaRdS6IpZQGN1K9DQHHvZf1iLF7Liln0Lv 5x45qQfhdW8U2hpS3pgQgdV0aQaWANtYYTp3KkGOUxPjlyLOEdKO7CCdcLAAwOSbpGOj 0z+hRipgy0OAdjcSxwKb3P3GD2AhpAjv//lq4jZcDuuJPMWdZFq1Sc//DVjGx4Gv3etW eb/MemVzc4qwZ5hjZ7Oedj/FjQU2YxgS+AP5PSgcln7LzSNzw5h8vr2xwzSA7fxdxwPX VcFw== X-Gm-Message-State: APjAAAUgUSm84lUUfp3yAOFCFqSqHSCtroIt4JzsYaRwuPkfyxYkeIrH ZEMCfXg/rCSDlgKvO44WavHcagCwYHKnoWxRn91sXQ== X-Received: by 2002:a37:6255:: with SMTP id w82mr71281142qkb.330.1578045080489; Fri, 03 Jan 2020 01:51:20 -0800 (PST) MIME-Version: 1.0 References: <20191230133852.5890-1-geert+renesas@glider.be> In-Reply-To: <20191230133852.5890-1-geert+renesas@glider.be> From: Bartosz Golaszewski Date: Fri, 3 Jan 2020 10:51:09 +0100 Message-ID: Subject: Re: [PATCH/RFC 0/2] gpio: of: Add DT overlay support for GPIO hogs To: Geert Uytterhoeven Cc: Linus Walleij , Pantelis Antoniou , Frank Rowand , Rob Herring , Peter Ujfalusi , Chris Brandt , linux-gpio , linux-devicetree , Linux-Renesas , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pon., 30 gru 2019 o 14:38 Geert Uytterhoeven napisa=C5=82(a): > > Hi all, > > As GPIO hogs are configured at GPIO controller initialization time, > adding/removing GPIO hogs in Device Tree overlays currently does not > work. Hence this patch series adds support for that, by registering an > of_reconfig notifier, as is already done for platform, i2c, and SPI > devices. > > Perhaps this would be better served through a pinctrl-gpio driver? > Pinctrl is already working fine with DT overlays, as the pinctrl-* > properties are part of the slave device node, and thus looked up at > slave device node attachment time, not at pin controller initialization > time. > > In my particular use case (talking to SPI devices connected to a PMOD > connector on the RSK+RZA1 development board), the GPIO performs board > level muxing of a.o. the SPI MOSI/MISO/SCK signals. Hence the hog > really needs to be active only while talking to the SPI device, so the > muxing could (in theory) be done upon demand. > But how to describe that in DT, and implement it (using Runtime PM?)? > I may be missing the whole picture, but from your description this sounds like a job for the mux framework. Maybe we could make runtime PM aware of muxing for this type of use-cases? Bart