linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bastien Nocera <hadess@hadess.net>,
	Dmitry Mastykin <mastichi@gmail.com>,
	linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH v3] pinctrl: baytrail: Replace WARN with dev_info_once when setting direct-irq pin to output
Date: Thu, 9 Jan 2020 12:21:00 +0200	[thread overview]
Message-ID: <20200109102100.GK32742@smile.fi.intel.com> (raw)
In-Reply-To: <f1ace666-1c57-0688-9737-d3ab2f5a1073@redhat.com>

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



  reply	other threads:[~2020-01-09 10:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-01 14:52 [PATCH v3] pinctrl: baytrail: Replace WARN with dev_info_once when setting direct-irq pin to output Hans de Goede
2020-01-02  9:44 ` Mika Westerberg
2020-01-07 11:50 ` Linus Walleij
2020-01-08 17:47 ` Andy Shevchenko
2020-01-09  9:05   ` Hans de Goede
2020-01-09 10:21     ` Andy Shevchenko [this message]
2020-01-09 11:08       ` Hans de Goede

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=20200109102100.GK32742@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=hadess@hadess.net \
    --cc=hdegoede@redhat.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mastichi@gmail.com \
    --cc=mika.westerberg@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).