Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2914877ybb; Fri, 27 Mar 2020 14:34:53 -0700 (PDT) X-Google-Smtp-Source: ADFU+vth70uHfVFLmBOZHwr0cTlLPTrD8emGIDvPHZv1sVd3prmBNqH+cAnjttp0OebtpdX/fQE9 X-Received: by 2002:aca:4986:: with SMTP id w128mr701558oia.46.1585344893647; Fri, 27 Mar 2020 14:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585344893; cv=none; d=google.com; s=arc-20160816; b=PGRxRKWZAVdYWPEshzh5E1D426K0E+5zVD1SOjJbZTVxmSRA0B9Sq3yCiu4oNlxs+1 AwNwgRSkNXwG2G1gdJwKa5K2p1uIH+9v+tLFyOhoLHp9g62rOygq5f91e5b/NYzDDbGY uMK67futI0sYLP69/aR0IuDJt2yB/j2g1c98jaslSdIO08tIYzSGT7r/0UQhu2aAE5T5 RyhbTXMrRB5VWBRu5DugB0LEN1ESGF+k5wfyJal3tR847AFDtY+k6R3NegZJKur/GEiB oIu4s/i7Y+wSA+fDVrGX81XZ8RDtsm3tP2fdkndfyoin36vIXZq1xBAlT7+Syewn5kci Zdqw== 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=dzvDwMUyG06J3AV5cwO/m7cs6Sh4fmPAAPA7hxTv980=; b=CUbw6cEz5UN1joxWkbEnHJpMZ7GSbi97SXxw8Ij/+f0lUeo8XFrQi9j1npyDSDQ7Kq k/lUovark4uGLyTnJXuko0tt0z6cBGJydD3qh+dDTIbGXHmHDylFbSj5esxEKFrHNLM2 chgdhlqUq3Gu++c8CtCmP0EWOcPZcBpR4Y64qiZy9xHYhIS6nt5gC2WpFW7suqSr4XTF CMG8ZQXcP5EVly8/yG3nCMrSvUF/x51msDEGY32mQ+FtelnDpYEweeQ8r+lo3M4Xs+fP RBghQtrZvUgaLbrqWjN9RaPovKOGV1sIwXPpuNynuyJtonk20Z+6c4vatKLqMaosH7Aw ia8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gRSIg1Qw; 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 j12si3037688otq.21.2020.03.27.14.34.40; Fri, 27 Mar 2020 14:34:53 -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=gRSIg1Qw; 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 S1727809AbgC0Vdy (ORCPT + 99 others); Fri, 27 Mar 2020 17:33:54 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45446 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727781AbgC0Vdw (ORCPT ); Fri, 27 Mar 2020 17:33:52 -0400 Received: by mail-lf1-f66.google.com with SMTP id v4so9055898lfo.12 for ; Fri, 27 Mar 2020 14:33:51 -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=dzvDwMUyG06J3AV5cwO/m7cs6Sh4fmPAAPA7hxTv980=; b=gRSIg1QwEzIrjZsOKmca5lM0DJGUPgYdVr2fCBp18i17PUM79/QbUfa9whxB1yleIu 19uOZ+GytcxmNRc+uGdfToX3iDfx/vj5Kkp0opY6r+xrlOGCbN5MmsDlz21KklP+n7hQ MpylNrstB6SstKltT48fN3JOCTPNt4jT6z/fjF0dX9tM8PbnFU0oJer4qREeeUNAKSpX 6MKL5IavYbzJ1uANrnLVHQGFD6Y5HLW5QSK2FzMDh807/dLrnRAMUw/QJgFrV0cgo2Q+ Qet9m7dtlAssP+WFw0OjcCXKeYbPU6jo6nm6uKCq3kYu0//UDnT30vx9p2BejYcVUvZh ZO1w== 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=dzvDwMUyG06J3AV5cwO/m7cs6Sh4fmPAAPA7hxTv980=; b=uEn2IGL/yqBaxTApdJfD9iEkOhB4PCBsdLueTpgtiKSC1Ct9SbmRtqvyIsVBUzC1Y1 g+rgYrq5TSrUFsZqzhNpMXv21FpW1GVwcEFf4Fc9XF0Re753YeJXZNZOQ1DNdQY/LEYU vRgK7IORnVC5JFZfL1T2bs5ssORgirhW+BFci09tMEp1bS3sfoTje3HUiR9Vva/ir9+T Qh1yCDTx8azAQ57TaHuHih+DbNROl8x7IWqdWTxT92DoLLH5AB80pahL8t6B+fARJn85 TyIIHIQPUtZxtHuEpXUDit6cjSwbWRmR0oNivWMHMVh7hhx4lAzt8HBfVqLqnNyMP7lE rftw== X-Gm-Message-State: AGi0PubTsQL9PuGwLmtzrNsx35hfJZqYrjer8R71AN3ELghPPFGHSV+H CH+7tP5DMF3j72mjpv/nStzrqO+GWPbTOgI9a7WKxw== X-Received: by 2002:a19:be92:: with SMTP id o140mr740571lff.217.1585344830265; Fri, 27 Mar 2020 14:33:50 -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: From: Linus Walleij Date: Fri, 27 Mar 2020 22:33:38 +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 Fri, Mar 27, 2020 at 9:45 AM Geert Uytterhoeven wrote: > On Thu, Mar 26, 2020 at 10:26 PM Linus Walleij wrote: > > 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 :/ > > /me confused. > > That commit was reverted later, so it shouldn't matter. > > I have just verified, and both my full series and just this single > patch, do apply fine to all of current gpio/for-next, linus/master, and > next-20200327. They even apply fine to gpio/for-next before or after > the two cleanups I sent, too. > > What am I missing? Ah I see, it is because my development branch is based on v5.6-rc1. So I have to merge in a later -rc where this revert is applied so that this applies. Yours, Linus Walleij