All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Serge Semin <fancer.lancer@gmail.com>
Cc: Serge Semin <Sergey.Semin@baikalelectronics.ru>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Hoan Tran <hoan@os.amperecomputing.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: Re: [PATCH v1 2/2] gpio: dwapb: Switch to use fwnode_irq_get()
Date: Wed, 2 Jun 2021 18:41:00 +0300	[thread overview]
Message-ID: <YLemjDc1hhuXUojl@smile.fi.intel.com> (raw)
In-Reply-To: <20210602140546.b7o43jnrvdmtdam4@mobilestation>

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 <fancer.lancer@gmail.com>
> Tested-by: Serge Semin <fancer.lancer@gmail.com>

Thanks for testing!

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2021-06-02 15:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 16:21 [PATCH v1 1/2] gpio: dwapb: Drop redundant check in dwapb_irq_set_type() Andy Shevchenko
2021-06-01 16:21 ` [PATCH v1 2/2] gpio: dwapb: Switch to use fwnode_irq_get() Andy Shevchenko
2021-06-02 13:35   ` Bartosz Golaszewski
2021-06-02 14:05   ` Serge Semin
2021-06-02 15:41     ` Andy Shevchenko [this message]
2021-06-02 13:34 ` [PATCH v1 1/2] gpio: dwapb: Drop redundant check in dwapb_irq_set_type() Bartosz Golaszewski
2021-06-02 14:07 ` Serge Semin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YLemjDc1hhuXUojl@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=Sergey.Semin@baikalelectronics.ru \
    --cc=bgolaszewski@baylibre.com \
    --cc=fancer.lancer@gmail.com \
    --cc=hoan@os.amperecomputing.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.