Re: [PATCH v3] pinctrl: baytrail: Replace WARN with dev_info_once when setting direct-irq pin to output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 09, 2020 at 10:05:47AM +0100, Hans de Goede wrote:
> On 08-01-2020 18:47, Andy Shevchenko wrote:
> > On Wed, Jan 01, 2020 at 03:52:43PM +0100, Hans de Goede wrote:

...

> > >   		/*
> > >   		 * Before making any direction modifications, do a check if gpio
> > >   		 * is set for direct IRQ.  On baytrail, setting GPIO to output
> > >   		 * does not make sense, so let's at least warn the caller before
> > 
> > ...if it's a warning, perhaps do a warning instead of info?
> > Otherwise, we probably need to change a comment here.
> 
> I went with info on purpose since this will trigger on all BYT devices with
> a Goodix touchscreens of which we have quite a few, so my vote goes to maybe
> the comment. Note that although the log level is info (because it is somewhat
> expected to happen), the content of the log msg is still warning-ish.
> 
> I guess we could replace "let's at least warn the caller before" with
> "let's at least let the caller know before"

What about simple 'warn -> inform' ?
(I can update myself)

> > >   		 * they shoot themselves in the foot.
> > >   		 */
> > > -		WARN(readl(conf_reg) & BYT_DIRECT_IRQ_EN,
> > > -		     "Potential Error: Setting GPIO with direct_irq_en to output");
> > > +		dev_info_once(vg->dev, "Potential Error: Setting GPIO with direct_irq_en to output");

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux