Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1748011imj; Fri, 8 Feb 2019 06:45:57 -0800 (PST) X-Google-Smtp-Source: AHgI3IbvtmNikanqaVZHBgaBBbyUL0KQzYAQkuPl4zCFeYEBQvG4aDAajFeHvmj+4wppjx6ovB4j X-Received: by 2002:a63:5b1c:: with SMTP id p28mr20330160pgb.73.1549637157515; Fri, 08 Feb 2019 06:45:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549637157; cv=none; d=google.com; s=arc-20160816; b=TXx3Ywn2kie5c/EU0RlJUzXgAbVeU9U1+vZvUbnFQp9j9206gDNnohYESKZbPz/7xP MP++bVd57htcoLUkkkSIcGjiXwyaLTPEiCxJzhoVA0Ktic/xLWXtA9g0pqCBc1YngKNT FiYst/DJbtaKAEEqwtXkTpcgMyG0ZPg1Z0i5RQnkAVXDVaxw2L3Icfyrzi8cCm7qkXcg DoPTMQIUykPR6tSljf5jDLh2VuVh1iOeUoRh2RoZnIu/oRfZognHERTakAcv1WJgmysg zaQ1ABm+ihbRaGDxqwtr070CE4qT8JWrZOsZaei2hod82aMQ0VN/5ltZ3X+CSInaHjrl b7ig== 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=d7mpthh9qbBpbstylm66N0YWNLkrVz8Hxq03Nwpfug8=; b=wWybQFdB2E0BFLwSnduyRLbTM0pH/JSG3OdKm/R7AoBnD5KDKoIcN8+NWdE/FGzOEw mpKNA9p6cyeoKdwdZfcys5aiU7fU1EcJxVCmxc7ECAu7/3i+ummIDJTs3hNjU7xh82rC X1e+fWv9+0TH0Zdvf2Pe8CKWcx+6nWXivy+Pj60DUeUaA5n12IHM9w1DzyA5hDhXSNvm 9GOU2dSPNqMJfZ5DeT+YwWg0nyO5JlLqCWvTae+Z06JBnj7oLpycppGUhyFPjiPzIHGf FswPlCuqhNZJdFL1N4U8J+O1WPl4DNpTp1d4tLfig9jL63LHjzDpcjel74YnVa7GA8wO XIqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tRGU+Wpo; 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 p1si2172980pgb.192.2019.02.08.06.45.41; Fri, 08 Feb 2019 06:45:57 -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=tRGU+Wpo; 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 S1727945AbfBHOoZ (ORCPT + 99 others); Fri, 8 Feb 2019 09:44:25 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:39317 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726641AbfBHOoZ (ORCPT ); Fri, 8 Feb 2019 09:44:25 -0500 Received: by mail-lf1-f65.google.com with SMTP id m11so2706433lfc.6 for ; Fri, 08 Feb 2019 06:44:24 -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=d7mpthh9qbBpbstylm66N0YWNLkrVz8Hxq03Nwpfug8=; b=tRGU+WpouAW40ri0fonKY9shTTmpVfJsUFK8OPGchqNcyNHHH+ZLtN8ceJ0Pb/RkIx CpXmj+5qR03V5jjf06OxEmIDKzZWTSRIqEa4oxkGq/qv20x1McQ7tpLPkYk0p9UwS5Bz 7Iz8GTk4ndvgpctuJZsbHkqhskrU00xKTMRwfuZJgNOIDGZXOJsI26ei3Qsm8G7uBPBG m7dikTXVBqAIa/qJCadxIByLBWTI7Su8LnBTRGA7NmIyluSoxAw6gKCmqIoWiMuAyjTE 7n0TTnCRmvVQexm8C0m7+SF2X1G/L9/0hVyvF2a2kFdgh39PSdy9hWtBGNBCmPbeih/4 mI1A== 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=d7mpthh9qbBpbstylm66N0YWNLkrVz8Hxq03Nwpfug8=; b=CoR0cldQf8/rTJAIK0rmVJaNFQcyX/rzaHM6zZl5NkVsP0A3EFeWIkoK4zEOJ+07uR lekD8IEf/7ljv3ArqE+CCZMEe0hDIs0KS/Zjny5mz0aAB6mYy32XskedQC1CwvCejrng qHwIkl7g9WIeDKR8qEAFKibeVpyctoMIEDBckECWdhYVqL6l9sO/xpacT4bpX5jJ+Aqv iUpK9fwWzgydrSibOTrvSef638zmBx/a0wNJtQMk1h5sALZIwYCHempJu6hU2GZIdu4a 0AbktKhVzJ0DylRWGidW7TxP+IKNXkigtM/U2MiWPl/PvuXeWXdGNHmVqsXsbkZqlvYE 9YdQ== X-Gm-Message-State: AHQUAuY51JSDzFCLZYqa+y09ckfpFzsZXd55HLFyW42MhkluKc4Ftn4Z MHTPc8JYZwDayzYVsuZTPj+t7PfEXmejpc8FmmF+9w== X-Received: by 2002:ac2:4219:: with SMTP id y25mr13585359lfh.130.1549637063340; Fri, 08 Feb 2019 06:44:23 -0800 (PST) MIME-Version: 1.0 References: <20190208115201.7518-1-thomas.petazzoni@bootlin.com> In-Reply-To: <20190208115201.7518-1-thomas.petazzoni@bootlin.com> From: Linus Walleij Date: Fri, 8 Feb 2019 15:44:11 +0100 Message-ID: Subject: Re: [PATCH 0/3] gpio: drop a few unneeded irq_{request,release}_resources implementations To: Thomas Petazzoni Cc: Bartosz Golaszewski , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" 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, Feb 8, 2019 at 12:52 PM Thomas Petazzoni wrote: > Three GPIO drivers in the tree implement the > irq_{request,release}_resources hooks with what is in fact the default > implementation provided by the GPIO core, making this driver-specific > code redundant. So you could think! But the GPIOLIB_IRQCHIP code only kicks in if the GPIO driver is using the gpiolib irqchip helpers, i.e. calls gpiolib_irqchip_add_*. And those three are the ones that still have to implement their own irqchips. The helpers did come about because all drivers started to duplicate code like this. The designware chip should ideally be converted to use hierarchical irqdomain since that seems to be what it is doing, but I think the hierarchical irqdomain didn't even exist when that driver was submitted. Yours, Linus Walleij