Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp679470pxj; Wed, 2 Jun 2021 08:45:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/fQ0nZaVcMuUXLcvfZmHEN8UYkVjKFpZAEf7wvmssa9ZGcX+suHp2XUHVPHh/0uQU5Yeu X-Received: by 2002:a50:ed82:: with SMTP id h2mr5814576edr.140.1622648710752; Wed, 02 Jun 2021 08:45:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622648710; cv=none; d=google.com; s=arc-20160816; b=RruB9s+7rUg+iDcWxUhXNO9PMNp1i/NuKYOaFt+QJMyUu7VJ/LcMLSMn0pVxJZdV+U rKRnPGqd/QB/HZM1XOiynntGOg0QTx50N+hgKyT3YuZeyo41FDOMy+rfl46Rg5Hi0gLG yrRqrZLhkG2cRGDTk2fnH3N8+AT80KVZ752N+EFf6kjyZjJaohB+ooTGVEwDgA2VDjF8 Qyl4hvdlL2ZYEEXth9ImajHD9lTKpDYq2vciXqk4M/5cFtxMNpcY9yEoCvYVFZLISv6R dxhH3LbtUc4aBfGn1s++6jb+RfILNsPSAGApzkk3CjZ9iVaAi1esbjezl9V2BkOmpvDy abIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=oWXrHHprELFb//v5TfC6SsuMw2B4gL4tTU9qqe90irs=; b=deujMK9GtAe7TWHPZHcxgr34Qj67wewhD0kzSfX6Md6AcLmEQ8sWfV4aLZup0pKBHv ta4KDfpNqs9R6jnfBR7xzzh9BUI6/pkPFstZiS9chKrlwQWhXl0XwAG2p1/zK2NEGXd8 y0yWpYMNDHcpQD1mBmJPuMe1RksKrEqZyJcjHMn3S+FyUSWRW49uQjaSRfsTbbQwanIG sWJmAKMtfjbVj5mNa78Zvwzf8rtVGpmIhceu8SdhgF4yvSX0dqdBvfi1ynW3beCQ+YOx jiwy18Ea6KHgyFLqv+eAaCXF7eWSsZmW48MbD1ehNSxnprsdz5Rn0Xa4ydnuFPydHGik IRdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y13si180171ejk.111.2021.06.02.08.44.47; Wed, 02 Jun 2021 08:45:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232267AbhFBPmy (ORCPT + 99 others); Wed, 2 Jun 2021 11:42:54 -0400 Received: from mga17.intel.com ([192.55.52.151]:21723 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232143AbhFBPmx (ORCPT ); Wed, 2 Jun 2021 11:42:53 -0400 IronPort-SDR: E0CjcHGYWAXYyWvv/zl78j9BZGzK+Aic2Ep6r2Llk8chXgKkzA57VMYitrjCZFm+qW1BIWZPVs 2zPCDfy19RMg== X-IronPort-AV: E=McAfee;i="6200,9189,10003"; a="184185304" X-IronPort-AV: E=Sophos;i="5.83,242,1616482800"; d="scan'208";a="184185304" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2021 08:41:05 -0700 IronPort-SDR: dmRL/EnHUrnb3++01jCu6QmRSwK7sNLzM7SKFg0rCY6kIQeeNinfsBe7FWitid7W59MSCUxjDk zjI9b27TeQHA== X-IronPort-AV: E=Sophos;i="5.83,242,1616482800"; d="scan'208";a="617244221" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2021 08:41:02 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1loSzM-00Gk0t-4X; Wed, 02 Jun 2021 18:41:00 +0300 Date: Wed, 2 Jun 2021 18:41:00 +0300 From: Andy Shevchenko To: Serge Semin Cc: Serge Semin , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Hoan Tran , Linus Walleij , Bartosz Golaszewski Subject: Re: [PATCH v1 2/2] gpio: dwapb: Switch to use fwnode_irq_get() Message-ID: References: <20210601162128.35663-1-andriy.shevchenko@linux.intel.com> <20210601162128.35663-2-andriy.shevchenko@linux.intel.com> <20210602140546.b7o43jnrvdmtdam4@mobilestation> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210602140546.b7o43jnrvdmtdam4@mobilestation> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 02, 2021 at 05:05:46PM +0300, Serge Semin wrote: > On Tue, Jun 01, 2021 at 07:21:28PM +0300, Andy Shevchenko wrote: > > We have open coded variant of fwnode_irq_get() in dwapb_get_irq(). > > Replace it with a simple call. > > Sometime ago I was trying to figure out a way to simplify this part of > the driver by using the platform_get_irq_optional() method for both > ACPI and OF cases. As you must have already found out by yourself it > didn't work out because of DW APB GPIO DT-nodes are supposed to have > sub-nodes with ports description. The OF-descriptors of these > sub-nodes aren't touched by the platform_get_irq_optional() method, it > just fails to detect IRQ-controller because it only works with the > device OF-node. So I gave up and decided to leave the code as is. I > can't remember now why I haven't used fwnode_irq_get() here. Most > likely I just preferred a direct of_irq_get() invocation here just for > clarity, since the only way we'd be calling fwnode_irq_get() here is > to actually get IRQ number from the OF-node anyway, while the > acpi_irq_get() method call made from the method fwnode_irq_get() will > hardly ever be required here. If you think otherwise or I missing > something please tell me. > > Anyway by applying your patch at least we'll save a few lines of the > code and may in future have swnode-base IRQs support in the > fwnode_irq_get() method. So it still worths merging in. Thanks for > suggesting this change. > > Acked-by: Serge Semin > Tested-by: Serge Semin Thanks for testing! -- With Best Regards, Andy Shevchenko