Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp2388985pja; Thu, 26 Mar 2020 14:28:03 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs/XMkHreX+qfadvxONNhqtz6XgMwvBoN5dSvxUOmh5FQhneEAX9fTJ8U8oCYR5if2HjzPr X-Received: by 2002:aca:adc7:: with SMTP id w190mr1858711oie.42.1585258083412; Thu, 26 Mar 2020 14:28:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585258083; cv=none; d=google.com; s=arc-20160816; b=LmWVXUqZrxBWORl2V2JmMb7EgHGSSxjHYybvKJWfQsysU7M79xKysaQuUB2Ij+O1kn kiB4OoNJpVQxXStULSmz9KfRCeNrLo5JKmwF79MjAv7SMuLiG8vzyD41k70guJBDrXCQ zwK7uHp7G89RtG5LwOR2lXsvp0GGZQmEC/2UZRO2J04ncBbaadnhgFRPmZeVHpLaWwRq EpJvDL3dODoFQni1Opw4HJGj7Ec86gxmslvg4PcYw5SvkN0mWdr2xxDCSEMMUK0UI+Cl y2JbdszCIqFHis2kRv66hyUvgqjhmmUXI6ikIksubE2NNBW6hSymrrI4VshS73nuF9vs a+mQ== 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=K6HhQ5CXYnVrjzdCb0GiH9KRJ8oDBIqHlDAtHtGoEj0=; b=Co+nuhYr3aM+vcmmL50QIQ01ui6sp2VC6Tzzc/3v7JPRHPaYTOzm+OeBwAt4U0m3/O foRqaPi7rdlcx6wkvbEUwfH/g7cL+/XtwkuLODZfJwpFgxzDK+nTWU6ds3zOijBDy7b6 GR0sWD2JlEPrAzciS9ztjq8UAHD+eBcINEq/K0tPqlYfX3bsaba6wkLhK74XImpeYMB6 ob1ksimeFJ4JKC99AA0l7RsT69ir4i6uzknIxFMpEeP7xwbHFvqo5h2qHeSEiygZTAih 2nOpP0lfp+SReF5jT42nNPZxki6fr38xk39/2mN/n+9cy/wg4yP7MRO8WCLn40vbnMNU pWAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=R1ZbV8ZH; 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 v22si1510907oia.165.2020.03.26.14.27.49; Thu, 26 Mar 2020 14:28:03 -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=R1ZbV8ZH; 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 S1726496AbgCZV0q (ORCPT + 99 others); Thu, 26 Mar 2020 17:26:46 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:46667 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726067AbgCZV0q (ORCPT ); Thu, 26 Mar 2020 17:26:46 -0400 Received: by mail-lj1-f195.google.com with SMTP id r7so398021ljg.13 for ; Thu, 26 Mar 2020 14:26:42 -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=K6HhQ5CXYnVrjzdCb0GiH9KRJ8oDBIqHlDAtHtGoEj0=; b=R1ZbV8ZHF2uNrvQMw6yLPcZXYX/L1Bi1ZDegFPmpGCQZQxDo4xJstG1+5lxSGccQjM DtHC3HQ/jx2YMTytcd6ultwEU/i0RlVnZivmFm9vimqHtelawlsMju+sVKJ7lHhUFclt CAT0JwPBKGwAs7QH0zYIR8ngkUu1HqQt+JNM8LA/bSlIAM7ldYL3U3TWwGQQsnl/Hel9 6kj0OiO6KeusAjhbIL7po4EZAoa2QzUuNNDHmg7OdxCfj5w04nJlHikrm/4rjGHXVBbt BztQyx2aUzDzf8VaHiOVqUzXyYasFaATNZCxsfBVkbIyEnDecxq0KQKBEI2iK76fHmnY Nh5Q== 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=K6HhQ5CXYnVrjzdCb0GiH9KRJ8oDBIqHlDAtHtGoEj0=; b=ICeRPZKjIzMPYGdAJEDOFoXv0q3U0+PBH2+d7pQhv4g6cyXvKBxuSHEWzBRavWrEaZ s5ZAJEt7U8F+jpXVWZL2VH6F4+ZGlU0Ocup66yCs7Bu/1iSajZ/2W4PEf8vTFJDh9016 Pl8gIt6WtwTeFGWJpmJfPuEPwQOjk7b2wOl7kXxH5L/LSFrZfBzHJ3cJbLZvd4DQuMAe TmrAoElcjqPpkLkod6FqDYvAWpX5KOIS3umpejDCDo5q7IkZgmnZWF29xaxfL6O7Ovng DlcuhvmAs9mX+/etE8FlHse8rPQvnWiooW4q1iJwqyQCOHjDpRIrFPccaJNuWXO12EE8 ak+A== X-Gm-Message-State: AGi0PuYGd7uwv9VxqNcF6JQ75kyA8N6VMKM/2d8cv1eqv5ACQ8NTdswm xg2Qc/OIppmLk4Tsk/o2a1ff8Hym/c3gXKysp9lKTA== X-Received: by 2002:a2e:9c48:: with SMTP id t8mr568502ljj.168.1585258002139; Thu, 26 Mar 2020 14:26:42 -0700 (PDT) MIME-Version: 1.0 References: <20200324135328.5796-1-geert+renesas@glider.be> <20200324135653.6676-1-geert+renesas@glider.be> <20200324135653.6676-5-geert+renesas@glider.be> In-Reply-To: <20200324135653.6676-5-geert+renesas@glider.be> From: Linus Walleij Date: Thu, 26 Mar 2020 22:26:30 +0100 Message-ID: Subject: Re: [PATCH v6 5/8] gpiolib: Introduce gpiod_set_config() To: Geert Uytterhoeven Cc: Bartosz Golaszewski , Jonathan Corbet , Harish Jenny K N , Eugeniu Rosca , Alexander Graf , Peter Maydell , Paolo Bonzini , Phil Reid , Marc Zyngier , Christoffer Dall , Magnus Damm , Rob Herring , Mark Rutland , "open list:GPIO SUBSYSTEM" , Linux Doc Mailing List , Linux-Renesas , "linux-kernel@vger.kernel.org" , QEMU Developers 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, Mar 24, 2020 at 2:57 PM Geert Uytterhoeven wrote: > The GPIO Aggregator will need a method to forward a .set_config() call > to its parent gpiochip. This requires obtaining the gpio_chip and > offset for a given gpio_desc. While gpiod_to_chip() is public, > gpio_chip_hwgpio() is not, so there is currently no method to obtain the > needed GPIO offset parameter. > > Hence introduce a public gpiod_set_config() helper, which invokes the > .set_config() callback through a gpio_desc pointer, like is done for > most other gpio_chip callbacks. > > Rewrite the existing gpiod_set_debounce() helper as a wrapper around > gpiod_set_config(), to avoid duplication. > > Signed-off-by: Geert Uytterhoeven > --- > v6: > - New. This is nice, I tried to actually just apply this (you also sent some two cleanups that I tried to apply) byt Yue's cleanup patch commit d18fddff061d2796525e6d4a958cb3d30aed8efd "gpiolib: Remove duplicated function gpio_do_set_config()" makes none of them apply :/ Yours, Linus Walleij