Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2060131ybv; Fri, 21 Feb 2020 08:11:28 -0800 (PST) X-Google-Smtp-Source: APXvYqwPErThSJUl4uwSIZ83pf2AyKWdmllnO9jbSJQc67HsF2efj0ki6zm0sNF7J2lKhN8joME/ X-Received: by 2002:aca:330b:: with SMTP id z11mr2518040oiz.96.1582301488537; Fri, 21 Feb 2020 08:11:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582301488; cv=none; d=google.com; s=arc-20160816; b=l6rtznSB8PNf3fFZd2P4XFLlUen2Wv/v5wEmx9CVbm1X0l8xf1IjlxDu/y23tp16yt m8WXGGZ77aZKr2aqdvbx9m2Q0qqOkCLzwS5rUFuhVZRTlTcEIyOGk5dKv+1SwcCjRGBT eNiJz4LWeAB4Z7aWBBy89XzQ1UEVR62qILjptARzI+9cnMM2nfEBSBZm0je34PGXsSzl CF8Dpqhce87sil9hVlErB1QcQikHmfC6hf97Ht4dHFeIN8N/X6/5RIfu3uB1PXohgxVm cEKKe1hqb6m99pxxV5yeMQqD3dReh3wtgrwwqYpLFEnkDCt6wxU7YRw6P/XQLjFHWh37 hz6A== 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=1fzmdPVewt4poXC+/NMgaFWzacayCygYoOgCnUFqrFA=; b=X6PZoPKP6khO9xdu1cIg4HxqOpAL1C3930DU7inghOO+zyZ+lGBjm7hGbMRFh2PE+9 xEeqGKlia8raq8NCKZLyvbC01f0uEh6/fwiricnr1hsvRGQnIYmSHObrfSBw5CGzgOno obaCl5R+byShZ7L4yU6ucI3khMiozZP5o2bRzajLDvUjUvbHaIIic/4zPYtKkrm6Otdo rAHLj5MahMspoga+2pZvzKFNYzFeNny1nsfRuVtbl5MFjaJAeYSxoGWmOtWkFhGsC/aQ ODEsuh49Sf6Zv5KBXxqB4W+p8wzE0WUDnxex1daVr0We3oOtN5zZKUvMFHqNxgcwPDKv VbhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fVdWb+3x; 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 d197si910820oig.115.2020.02.21.08.11.10; Fri, 21 Feb 2020 08:11:28 -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=@linaro.org header.s=google header.b=fVdWb+3x; 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 S1728130AbgBUQKj (ORCPT + 99 others); Fri, 21 Feb 2020 11:10:39 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:35905 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727213AbgBUQKj (ORCPT ); Fri, 21 Feb 2020 11:10:39 -0500 Received: by mail-lf1-f67.google.com with SMTP id f24so1894493lfh.3 for ; Fri, 21 Feb 2020 08:10:37 -0800 (PST) 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=1fzmdPVewt4poXC+/NMgaFWzacayCygYoOgCnUFqrFA=; b=fVdWb+3x5OJjWjTS8JQOQcRTidOkvjo2ir5U7PGAMVw5WxJMB39mldwFJOaGJBpPUy TygGJ4Dh2eYuVpqhNmTy3A+mpVuIa2KKYLFA3KwEZW7wHuF9sM0lfQDUBvctfKY5m1/w pO0dTq0SLvot91o2JkazTn4LiuQ4fl4I5uYWo0e5ArrD3w5jCckR3bFlT9HGTa+m8PiK 8VAPpY7zeJn+UMraJSLg7HWnf8dY0AdiTCeorPVYG50crBQzgoxJZ4GIyr4FyKjRhKom FwWdL94yUF4/ORBxgq/aGEs+gPSJnwmTca7vaVtED+YyMLd2N70TOhnvv4WIVVP46psz EG0g== 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=1fzmdPVewt4poXC+/NMgaFWzacayCygYoOgCnUFqrFA=; b=r2JBuTomV32nv1CZzof/oUeuEPcnjVoRhUjbK5TLBX9/zqO77x4d1rwPxUPjJjGnpC KMwKSsxupCrLY5GvqKeVe/daY1c0xzRWPTwKMiygJa455n4OL81F1W7wNH3Qqu1mHwoi uGm++XFn/xcimjaHEed+ubGAh/lGI3aLhSQ8C6cdaYXdxPh6/tfEPzke9wIJDKW2/lRM 6/CoJvl+FRIfT2qS38gl3GDlG41LOYu4o3gxzIgH5W3+9zsOsET79RtPDcShjBl4PFOp FOTgpMUML6sNW4IzKvij3ITbqIYmai9PSDrOjjl2I9+/bSSFaEKCy2IB/XKiftntGhdA NMug== X-Gm-Message-State: APjAAAWniG3qT6B4FE0S6nOVFzE3mOY6vBpla7i+/nYNPzBWzhOz7n0n c9cH3izPeaQtISu2tDpF5KNf6VeeCiVVYthRY/brRw== X-Received: by 2002:a19:5e1d:: with SMTP id s29mr20384167lfb.21.1582301436869; Fri, 21 Feb 2020 08:10:36 -0800 (PST) MIME-Version: 1.0 References: <20200220130149.26283-1-geert+renesas@glider.be> <20200220130149.26283-3-geert+renesas@glider.be> In-Reply-To: <20200220130149.26283-3-geert+renesas@glider.be> From: Linus Walleij Date: Fri, 21 Feb 2020 17:10:25 +0100 Message-ID: Subject: Re: [PATCH v2 2/2] gpio: of: Add DT overlay support for GPIO hogs To: Geert Uytterhoeven Cc: Bartosz Golaszewski , Pantelis Antoniou , Frank Rowand , Rob Herring , Mark Rutland , Peter Ujfalusi , Chris Brandt , "open list:GPIO SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux-Renesas , "linux-kernel@vger.kernel.org" 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 Thu, Feb 20, 2020 at 2:01 PM Geert Uytterhoeven wrote: > As GPIO hogs are configured at GPIO controller initialization time, > adding/removing GPIO hogs in DT overlays does not work. > > Add support for GPIO hogs described in DT overlays by registering an OF > reconfiguration notifier, to handle the addition and removal of GPIO hog > subnodes to/from a GPIO controller device node. > > Note that when a GPIO hog device node is being removed, its "gpios" > properties is no longer available, so we have to keep track of which > node a hog belongs to, which is done by adding a pointer to the hog's > device node to struct gpio_desc. > > Signed-off-by: Geert Uytterhoeven > --- > v2: > - Drop RFC state, > - Document that modifying existing gpio-hog nodes is not supported. Clean and well separated code, patch applied with Frank's review tag! Yours, Linus Walleij