From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32B8AC2D0C2 for ; Fri, 3 Jan 2020 09:51:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 08EA32053B for ; Fri, 3 Jan 2020 09:51:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="cG4ow4LH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725972AbgACJvV (ORCPT ); Fri, 3 Jan 2020 04:51:21 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:42003 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727313AbgACJvV (ORCPT ); Fri, 3 Jan 2020 04:51:21 -0500 Received: by mail-qk1-f195.google.com with SMTP id z14so32074420qkg.9 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=GD+jHeO8SqkVI+2hljKj7/kYBs83tvq141qAdnzXscoS1Bdw4Ini/P34glylxg/k0g 4QiMaDvyQKVZqq2qfiEBFsZEXqoOJ4NrhydmM81NE5oIUHbskNquiSYplt26Np2T8KgL COow6vTvhVWL246Rx6pk/X+WcLdTqYM1C+MUx8UJFhxdfzNBPep4sziSI8YJ0MXTO/Y5 VygbGGEMxtM8jJRsYFJnNOwvwWZk/kFMFZePsw3uQyP+Frs6arNIqXGZ7SpfKHccZqmJ a7Y9QH+H1aC7/09KW4zf6PhPMWwNyEqkiFoknKER6DdGbU34xHCITyTjXIoSzXs09psl MaHQ== X-Gm-Message-State: APjAAAXMnIY/7BH5nRLKMfvfesa0gPavzheCliaY/WBHF/cj94mL/t1J 6ueixyBvclDvSfH7/0xt74HiPGXtciAJffxDX8ItYA== X-Google-Smtp-Source: APXvYqzAZelvEL1bp9L+Dip8BtcvxrfIeDBmaKGivW0X8lJb2LdaJs31IH9b2gpMP+zcFkudxHBKRdWDiyhDv4QqwCw= 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-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@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