[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 03 Mar 2015 17:43:47 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Alexey Brodkin <Alexey.Brodkin@...opsys.com>
Cc: "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Vineet.Gupta1@...opsys.com" <Vineet.Gupta1@...opsys.com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"alan@...ux.intel.com" <alan@...ux.intel.com>
Subject: Re: [PATCH v2] serial/8250_dw: use platform_get_irq() instead of
platform_get_resource()
On Tue, 2015-03-03 at 15:33 +0000, Alexey Brodkin wrote:
> Hi Andy,
>
> On Tue, 2015-03-03 at 17:26 +0200, Andy Shevchenko wrote:
> > On Tue, 2015-03-03 at 18:11 +0300, Alexey Brodkin wrote:
> > > It is not recommened to use platform_get_resource(pdev, IORESOURCE_IRQ)
> > > for requesting IRQ's resources any more, as they can be not ready yet in
> > > case of DT-booting.
> > >
> > > platform_get_irq() instead is a recommended way for getting IRQ even if
> > > it was not retrieved earlier.
> > >
> > > It also makes code simpler because we're getting "int" value right away
> > > and no conversion from resource to int is required.
> > >
> > > Changes in v2:
> > > * Suppress error message if platform_get_irq() returns -EPROBE_DEFER
> >
> > Do we really need that message at all?
>
> IMHO it makes sense.
>
> For example it was useful for me when debugging stacked interrupt
> controllers setup - I got explicitly notified why this particular device
> failed on probe.
There are so many device drivers which prints similar message that you
would consider to make a separate patch to platform.c code to do that
stuff there once for all.
> Note that IRQ is a pretty specific resource due to the fact of INTC
> stacking and situations when each and every INTC gets finally probed.
>
> Still if you believe we may drop this message with no loss of usability
> - I'm fine with that as well.
If no one else has an objection I would prefer to skip it. You always
may get the return code from probe(), though it's not exactly mapped to
the reason why it failed.
--
Andy Shevchenko <andriy.shevchenko@...el.com>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists