Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp56320ybl; Tue, 7 Jan 2020 02:04:29 -0800 (PST) X-Google-Smtp-Source: APXvYqyhls+WzxLMFug8W0CGorfS5zGPOPX2n6Qz9YPzW8JEaSr0otueczmDnXwlNLR0bE52A7tu X-Received: by 2002:a9d:23b5:: with SMTP id t50mr115811172otb.122.1578391469066; Tue, 07 Jan 2020 02:04:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578391469; cv=none; d=google.com; s=arc-20160816; b=NCLJs1mhYehTSotFmQ4hxqfhkyPjHsZIDcEnEErwX76FA6tzuXTpoA81uD6B8udtzY BtKlmHkP0HOeAn5fK7PIZ8SrBDD9vxRKZq60c3pj295IQsHywVOsTdUDrqLlsTGvJNDu cSCpbo5rWqiqnRmC5SoZZ9piIlMqlrqWU48MAftsaUlUo1QTDeK6GbBEHFBRkNHWFu5W 58plX+9qlfJ2GgyBPRoe5Eq3wQrZ+NnoHGfPnk2McqeHA7nXPFjdf7qaVNkOa3zYrvbr S8Gu3BJR5HZej/LmBDmX2eDVMko9yNSAUkWAcebUr/aSz5eXVdA3L/GEfIQYH2hpIzLG KSIA== 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=oKol1E5uFe81KlR9aKnDvrtZf1SzxED4CQaA/7Xrzzg=; b=hYA903Z8ng/gnw0OJ/SOMIzozTQ5m19FDW5hLS7So22n2zSJbPVyi/psg0qkAkeYhm s4YI8hPvygLOkipg+KKP2wQnIHEaonn3POFeWtgK4cQ40p+fqkaUflTknqz1qsyzduzN xPt5Vv40z6dxRBOG3c52WVAJrjVr8b/vQZzxlQ7TnnT1QnEfKbXRYcOUbs6R1nFLhmr9 xsKNKnzv2XzQ73jFxX8QfdaoQs8DKnfzr8ReEOknUipaYQ/ENVxGoNJUrqbQdFxJuq9j tGPvXjF4Kbb5UcmbADb5SWKg121ka9OlB+YLpfbWZTBpl/pTOS0SZ6qPAoptghwEPDy3 RX/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tuhkklja; 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 i124si34397046oif.214.2020.01.07.02.04.15; Tue, 07 Jan 2020 02:04:29 -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=tuhkklja; 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 S1727743AbgAGKDH (ORCPT + 99 others); Tue, 7 Jan 2020 05:03:07 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:46662 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727705AbgAGKDH (ORCPT ); Tue, 7 Jan 2020 05:03:07 -0500 Received: by mail-lf1-f67.google.com with SMTP id f15so38413864lfl.13 for ; Tue, 07 Jan 2020 02:03:06 -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=oKol1E5uFe81KlR9aKnDvrtZf1SzxED4CQaA/7Xrzzg=; b=tuhkkljaIaiJJmUSutuX9s49tqJJqqkeBY1ys9QSuul3nan94u8dWFgVt3mkhvDSL7 EDUhKOUpqXWFMEnWjZbKjyfAI8UqHcUtDKq3ouBGxUTnWwieRa+yRkYhErpu/llu5eaN qkxjtVsp6ULjQmqaFBeFW9JN5YjEysKwOSox7x1yzuJZsuZSW19h6N2LLqtFBO3gf71a Fwb5Eq+c4UZ/4V64JiipmIfK4IO0154Od9v/4lGOP8UtsjUOAd/bT2TG+8JfueUtuaAe yFVZMyYKJ0Lm5NhUomnxkSePElrk45XMm5qnowkk175wim6tQxv6HsSpy3+OVK40ciyL XmgQ== 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=oKol1E5uFe81KlR9aKnDvrtZf1SzxED4CQaA/7Xrzzg=; b=OxvyIS7UQdIKCTa1gqJnJhJpErMMMEuNVlTS0ou10jXwS67c1t7RDO0ij97wpfPWgy ygNT1f3r0JYENhhAd8S8zTO4ThpkbHuCiNI8Nm0Kj9gmicc21g42Rn2K1aojnOQuQi6e VQO2Ot8ApMFYgQli994ncE3/SG5vTlNvG/7OKwfI5xYSALqbPrxZBABC/LSJ65IEgBKa 5KhH8p1gK4T3s/yHcGrc0+KBQXkbRbTA6v7p4JtnHbPj90FSo4u6LVWgmlnLlhTkTBoT LP8XcPUncL5pyuZdqGPuqP8RAL4WxbOxrhuLsj1KiPQ4w0WseI7ToGd4NVYem/j6KouB 4UDQ== X-Gm-Message-State: APjAAAUY+oeCsKLeUY/cWizbpo5YF9oUkws2nXquT0kR7VUGYj4ZpvWm evy6SuoldgwMqsL3J4bn5cE71rpWH5xgvEa1Y/OfaA== X-Received: by 2002:ac2:55a8:: with SMTP id y8mr58521415lfg.117.1578391385288; Tue, 07 Jan 2020 02:03:05 -0800 (PST) MIME-Version: 1.0 References: <20191224120709.18247-1-brgl@bgdev.pl> <20191224120709.18247-3-brgl@bgdev.pl> In-Reply-To: <20191224120709.18247-3-brgl@bgdev.pl> From: Linus Walleij Date: Tue, 7 Jan 2020 11:02:54 +0100 Message-ID: Subject: Re: [PATCH v4 02/13] gpiolib: have a single place of calling set_config() To: Bartosz Golaszewski Cc: Kent Gibson , Andy Shevchenko , Greg Kroah-Hartman , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , Bartosz Golaszewski , Andy Shevchenko 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, Dec 24, 2019 at 1:07 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 performs > 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 Reviewed-by: Linus Walleij Yours, Linus Walleij