Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2917539ybb; Fri, 27 Mar 2020 14:38:14 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsgJ507uGKQGH8UheiUVIuA8w4SdYD5R9lnGJUzSwd6JhBDW+jrmUiMe4b1nZWY7n09ZHF8 X-Received: by 2002:a05:6830:146:: with SMTP id j6mr589695otp.352.1585345094269; Fri, 27 Mar 2020 14:38:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585345094; cv=none; d=google.com; s=arc-20160816; b=W+HLthuwJnDOCAbM3r6D5oha0AMEcf6r99QKREDO04zvOyvCCcOQb67klhxhfY5NUk Fye+BBbeibSwotHAmFJIpDHdsSI2iZc333GyLkroxejbid08lMi22NVnKqieZBohdYjP bPixw9peYHhDtrlgQ+ON6nGZb5yx+Oun/qCia5ldBDCXcSMftEXPsmxINXNMeZSI8Vbk qeW/+OntU1IoGRVbR7t3Kc8oOuVDKolVDEGkycL44BU4VyIGgmxrh9zji/bbXbcWyR5E FWFdNlQ+6NUvij61AObqvtZnq7N8AWS8QQYvEJGBaTmu4wssfPhFZ41PGzIHkZoVkQhF hxhw== 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=/6P/ugUG8QPN1PLqi6CLq7SxjX8NFnDCuavJA3Wde1E=; b=fzdOvAKZByuV++iU7RuqjKC3xd5yry0Fqf4siXpIv1/F0RxDMNA/AjN/hhKoc8Qvac d0090YgFIgk1srnQk0/buV0l/x20ou1RnvXqNBTOKo3jwEopsf0Yyq/mrrlYILTP8UEe vpoWB9NUBjKo3O9NJnbO5BxC0fQByShL4xGDT4U5Ty8UAO/Oo1amKzSYkM/zdj0ieWXb chEoPI9oU6PqJ/R5dnbd6sGUx2H+AMqXzvChflNO1ZbWiAJa79a0NQYHlZMkl/7/scAV 0eZohGAipl72odyJ+kpGXwIzje7OIv0jP6EYUlZNfwQCh9rTA7WSHUdkfwy1+H4rV7v2 88Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lahDEBVq; 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 m10si2753199ote.6.2020.03.27.14.38.00; Fri, 27 Mar 2020 14:38:14 -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=lahDEBVq; 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 S1727652AbgC0Vhg (ORCPT + 99 others); Fri, 27 Mar 2020 17:37:36 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:37875 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727607AbgC0Vhg (ORCPT ); Fri, 27 Mar 2020 17:37:36 -0400 Received: by mail-lf1-f68.google.com with SMTP id j11so9097538lfg.4 for ; Fri, 27 Mar 2020 14:37:34 -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=/6P/ugUG8QPN1PLqi6CLq7SxjX8NFnDCuavJA3Wde1E=; b=lahDEBVq+V7MEitEv24mEfdDx+ECSXtHN+KA62Gf5ItiJ1T+tDT8IWT4Oy22V9BsXC 6JaUyn62gDbbeAweC22pKUYqIidnovzsnM7DZS/3dAC/3/rSk5L52uSrG8+ZEpNokRoF DAcc3GvLOC/ssSMB8MQ5gqL2f74Gp6tRux0EURwEZRovg6fD33++EMNMJHG8TpO81M7J Mt83QcXquqLJVR9ORbRpZm1ECFmS406DJdA7rkOGaLuwywkPfYQtd7G56RMATPaHmnNG GJdQYRUgmxyx9hZzmpIXWlpouQK7AOtyGExNg/CAyJqJkZU/svLfvM9MdHzKmMqw3M9X 2vUQ== 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=/6P/ugUG8QPN1PLqi6CLq7SxjX8NFnDCuavJA3Wde1E=; b=YrcsuEafmz5xr+MEMlUcupvx9rDLiSE06CrCR0Ty2tWCnK9G7cvhutGVEE/XZX7CPr keBOB8Rtk9AyIjDXrJMKvwyhvq6DRLA+ystiSdwTJ9cJcu2Kc3TW8s6F45HqkHMjqmqr X4LaZ9mE2JcLPZ2GOMobTpzrkfiqVxJ4uSNFy+TEZ+7Db47Sle94GMFfcAK4OpHMMj+L YGSKM4EVtMgEcjQHmVIW/ijaeqsztrOUl6HzurK4bhaSkOrEaw3cItPJtZtDXMZ56CsC Za2PUkdrIxPXgW1c/d2k+6mRgTQ9LPtCR4luLeFtkokycM+l1qF/qwrIYOItyd6F+/fV YjvQ== X-Gm-Message-State: AGi0PuZj+/G3QJYwCf6yJm1L0kMfyqJtSz/43n8OGdnkce9jTKsHfNPC 6cS/OIzDbXrqPs8X5Wd/SNv8+aiqu/A5kFiC7HQM1Q== X-Received: by 2002:a05:6512:6c4:: with SMTP id u4mr806577lff.89.1585345054013; Fri, 27 Mar 2020 14:37:34 -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: Fri, 27 Mar 2020 22:37:22 +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. Patch applied in preparation for the next kernel cycle so we get Geert's patch stack down. Yours, Linus Walleij