Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp482154ybl; Thu, 23 Jan 2020 02:18:07 -0800 (PST) X-Google-Smtp-Source: APXvYqyPsC8MIdVLNKdyEKwgZ+gzc3MqFrz8FDHYq0AG7peEWSwB/8ZkEz71+okcG0jYLJc9c7DH X-Received: by 2002:aca:4809:: with SMTP id v9mr9774396oia.92.1579774687002; Thu, 23 Jan 2020 02:18:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579774686; cv=none; d=google.com; s=arc-20160816; b=tENC6w2bJfcGSE47mstqRVCA2JZFjzMxedLeE5U3PbYszBQhp7TVS32rbjC2N9vb6x YagpKtBejH5HIjux8kqwdFxVN+M16L1xqGWDvFs3DQX7288lfZS+vLe56pFK1REaVLJs /q/tGRaW6N3EsWyAihAYU0zFORfFAbkT45QtSeysD4zQ/omBKCFVtlFXVsaebXrwPrhd txBEHLbiFGYZURANeKeXxYA5Kddwifaf3knxDaIuFMLp/6WoswtGI8eMIVGbyA+6Rjc9 OP7TuzFweu4Qwkn0X78ZhK6Ppqhfgy1nu7AdEHS1USQEWJDR98BT27+yk1XE+OEwIKKz oSzg== 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 :dkim-signature; bh=Clq3TmE58JoFz2R4QbuECPlpViKppwwhqPhDFIlk7XI=; b=yRtOBquLUtlH6/Tj6HNyO+0xhf20LWEhQ3qM87mrxJ/mc33J/T9smlZvrESuqzz7EV f96MlFphtWWIoBNz9fSrbjNQ7pPk96dC5WX+b/SdheiQHojQOOqlbM4Wq+T7an1V7x2P tu4YESyQ8rsNeLapo0zR56Rt3MBMZJM9/+WvIKxvsNKMipL7qpYOR7X2uptra/T7nYDv NTujDM32jWrVeqXzviY6//dMk825c3kdsxRsM83aHxLKkINjG1iEdEuKYKaZ5EzHPK3r SY2tlA1JqnJAiDKB0Grtkjy21aXC3RkrESCWirMMtrL2rATKm38Px03cz4Z0ZVamgUcv ySOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=GAv2gEKp; 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 v5si622329oix.197.2020.01.23.02.17.55; Thu, 23 Jan 2020 02:18:06 -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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=GAv2gEKp; 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 S1728205AbgAWKQh (ORCPT + 99 others); Thu, 23 Jan 2020 05:16:37 -0500 Received: from mail-il1-f194.google.com ([209.85.166.194]:40581 "EHLO mail-il1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726099AbgAWKQg (ORCPT ); Thu, 23 Jan 2020 05:16:36 -0500 Received: by mail-il1-f194.google.com with SMTP id c4so1697066ilo.7 for ; Thu, 23 Jan 2020 02:16:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Clq3TmE58JoFz2R4QbuECPlpViKppwwhqPhDFIlk7XI=; b=GAv2gEKpKL5sHBs3QAQS2iZvBJhXMs9QZRTuUPyF+dSwktr7pB9Y24yb2tnqpcO5nJ zpMwoTtu+HKp9jT+CTc1c0WZqdqZo0qdImTkI0KvqEyXm8a527RFSYaIKZLPUjhwMEXH ow5d29nR9fonp+obMbxhKdZG6vo8h1U8qu0bKzNWx1LgfURiiaPkRGo3Siy4sZt/xuNN 2fdktMvl1yOpzPGBDDSH9HHJSo9qpDmCp0cBD4/M8dxrcWWMHsJwBGwTlPvl+CAfxM77 tffP4qi1otnlACyC7Q+UVYga6e+hvwKMD5bZwcTsLLXzSuzOxpN8SRiPm8zshrXcvEAo l9Tg== 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=Clq3TmE58JoFz2R4QbuECPlpViKppwwhqPhDFIlk7XI=; b=nu9WcZ2owDUM0Sm/n0+SCozB2mSWUZw7mhaUCv6C0yvUbrxrOhtlUUQ0h4P+nA/Qtx imKAnHvNrgY8jT9YcfiErPJ6W2A65GScsJGSPp09CvcRS+Q5voSXNvieJii4KYQr0KJ2 wucSAl7axGvbWnokoYQif4UZPNmc5OQ/6nmotq47ZGVTRVWfXDkeUG3Losb5Xq42EfJH wRcw89qgaOB0r1BJOYrngTx2La72zkftSmuTfPQUzfP0QxV3HPcYb9IyxqGBiPcXWWGa R8hea0twGxvi/w2/bZhEecw04Xiy7MraAN2ch20xaqldiExKvnr7y0ATEH8QZnoDSslA djwA== X-Gm-Message-State: APjAAAXRZB8JICFTW65/PqL/DLZm55IogJOfqAAeQFBDwq2aBj3C0HCx 3h9nSBadrurmA7/euec41b080HVZwl5iKBiNm37Szg== X-Received: by 2002:a92:3d9d:: with SMTP id k29mr2424144ilf.220.1579774595940; Thu, 23 Jan 2020 02:16:35 -0800 (PST) MIME-Version: 1.0 References: <20191224120709.18247-1-brgl@bgdev.pl> <20191224120709.18247-3-brgl@bgdev.pl> In-Reply-To: From: Bartosz Golaszewski Date: Thu, 23 Jan 2020 11:16:25 +0100 Message-ID: Subject: Re: [PATCH v4 02/13] gpiolib: have a single place of calling set_config() To: Geert Uytterhoeven Cc: Kent Gibson , Linus Walleij , Andy Shevchenko , Greg Kroah-Hartman , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Bartosz Golaszewski , Andy Shevchenko Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pon., 20 sty 2020 o 09:44 Geert Uytterhoeven napisa= =C5=82(a): > > Hi Bartosz, > > On Tue, Dec 24, 2019 at 1:08 PM Bartosz Golaszewski wrote= : > > From: Bartosz Golaszewski > > > > Instead of calling the gpiochip's set_config() callback directly and > > checking its existence every time - just add a new routine that perform= s > > this check internally. Call it in gpio_set_config() and > > gpiod_set_transitory(). Also call it in gpiod_set_debounce() and drop > > the check for chip->set() as it's irrelevant to this config option. > > > > Signed-off-by: Bartosz Golaszewski > > Reviewed-by: Andy Shevchenko > [snip!] > > These two lines are not equivalent: the new code no longer uses the > packed value of mode and arg! > Hence this leads to subsequent cleanups in commits e5e42ad224a040f9 > ("gpiolib: remove set but not used variable 'config'") and d18fddff061d27= 96 > ("gpiolib: Remove duplicated function gpio_do_set_config()"). > > However, what was the purpose of the PIN_CONF_PACKED() translation? > Why is it no longer needed? > Thanks for catching this. I was OoO for a couple days. I'll try to get through the mail today and address this as well. Bartosz