Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp22314735ybl; Mon, 6 Jan 2020 23:47:15 -0800 (PST) X-Google-Smtp-Source: APXvYqzQPFiQemMEqXR92cqvmZ62PQOOEV6r9lSDY98NeJZuIgE98CzHWjkiF5TBNAlLJxvE62s0 X-Received: by 2002:a9d:7ada:: with SMTP id m26mr24379397otn.111.1578383235480; Mon, 06 Jan 2020 23:47:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578383235; cv=none; d=google.com; s=arc-20160816; b=tbLM6tqgU9pra7sHaqF6qdrG/OFABQqZqHG8tTcGPMV/38CSVYhrHctKhshPYrm3wR aCzdlHy7KklEt5ZcF+BqeeD/oCN1z9X8ka0Fa10OB7/2M9UQJCG/OzVJUBpgmvnCfIta kL7kaN54wLoSCM58IEZQyRym9uLRBaum49bTCl9sFS2CrkC8Bugm+TLImbkRH/aVFAwj kKZLXgJMy/KaB4hKeXdQBxGzq20XRcqp9dBA6uBUDIyZ52SN14QLeAcWdOC1wu1ek0cb kugqL+kUZdBKX2IMJWBEtXGDCN8O98+lshedemQ1A8rEinuu26Dx+mmiFmWCW9Z9M5D2 7nQA== 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; bh=JlzDU6VNVvka2MCjewrOazmQLfTDwAe/NG/ynfZODGg=; b=lyb+iegGKHjKJ66m8mXP6yMhzsbiCGhOiB65SZW8yY22ZmxBiNIp8ANf50X65ZKC9m FeGO4YDMDNIlWwxrTUzIyLo38CTxTBfZcAqaM8ey4Lb/wjL1aqDFJS273TnxUreHkOKU MIqecjgKSuZCbM7DV2ZKqsXUu+ryvSllFn0diCFY3wV6LJsL3foUl6XGqUMU2DF7UGMx 41J1zL7/S0IdIV1uHtrKSEVun7r7ty1mfwtP8GPe65OqhYb4dVBZl3GoZ+UF66coLwjW b4sC0zMSbn9GVT1EJ+RhV56frc4IzJMH/xJ2vobkul73+Cj5lQiq8Ipk2N3x1VvwuC1A Fd3Q== ARC-Authentication-Results: i=1; mx.google.com; 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 b145si29852572oii.67.2020.01.06.23.47.03; Mon, 06 Jan 2020 23:47:15 -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; 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 S1727084AbgAGHqZ convert rfc822-to-8bit (ORCPT + 99 others); Tue, 7 Jan 2020 02:46:25 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:33706 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725781AbgAGHqY (ORCPT ); Tue, 7 Jan 2020 02:46:24 -0500 Received: by mail-ot1-f68.google.com with SMTP id b18so53444588otp.0; Mon, 06 Jan 2020 23:46:24 -0800 (PST) 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=iXV+laPsabNEeQDfZldsT+auKzTRBW/prszvDNqd6Fs=; b=pCfKxjODwfC8BwpTtQLuOxyMufZqcfWu/IFOL1cUbBrNEH0RPJZIoQ5W153ODpZoCk YNhBce1Hl8T+KdXJvPAoJHo5T1dXph8jBalP7HWaxl5t7ry92vHR9tK7sLOxct+Uz+i/ rEzBQi8eed9yQr/Zp/HbOj7rX/1c5VZeJVLlx3EYstZMLWvUm7YnUj5a2NH5e2zGwbnL GKTgaUj6ruYrmXhIYov0fwfsUg4h/YVqOMmAjH2Ba4269e0usPMZpi8ikcwynFT1F4Ao 6iQZlpaJWbRvUuZ9InyzmWZ6VRN/eza7S+A8X3AeFnTotDll8fcdX+1Ziq/0XekpODX3 F4vw== X-Gm-Message-State: APjAAAXcO1MDvCEr443pIauyvQyud3w0GlI2ESUJj36G6Hb9PLOvhsjS 6tGgDxn6ZBbofm2Td5mp5UessvcvBrcyD4oZb04= X-Received: by 2002:a9d:8f1:: with SMTP id 104mr112896481otf.107.1578383183750; Mon, 06 Jan 2020 23:46:23 -0800 (PST) MIME-Version: 1.0 References: <20191230133852.5890-1-geert+renesas@glider.be> In-Reply-To: From: Geert Uytterhoeven Date: Tue, 7 Jan 2020 08:46:12 +0100 Message-ID: Subject: Re: [PATCH/RFC 0/2] gpio: of: Add DT overlay support for GPIO hogs To: Bartosz Golaszewski Cc: Geert Uytterhoeven , 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: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bartosz, On Fri, Jan 3, 2020 at 10:51 AM Bartosz Golaszewski wrote: > pon., 30 gru 2019 o 14:38 Geert Uytterhoeven > napisaƂ(a): > > 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? I'm happy with a (static) GPIO hog. BTW, what exactly do you mean with "mux framework"? Pinctrl/pinmux? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds