From: Takashi Iwai <tiwai@suse.de>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
Darren Hart <dvhart@infradead.org>,
Andy Shevchenko <andy@infradead.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
Platform Driver <platform-driver-x86@vger.kernel.org>
Subject: Re: [PATCH] drivers/platform/x86: Add driver for INT0002 ACPI device
Date: Fri, 21 Apr 2017 11:06:15 +0200 [thread overview]
Message-ID: <s5h7f2em8oo.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAHp75Vd0SCJuFtPPV1KPu5+r8UtY2hXS=HTVF6QT6ZAr4EgZBw@mail.gmail.com>
On Fri, 21 Apr 2017 11:02:20 +0200,
Andy Shevchenko wrote:
>
> On Fri, Apr 21, 2017 at 11:38 AM, Takashi Iwai <tiwai@suse.de> wrote:
> > On Fri, 21 Apr 2017 10:27:32 +0200,
> > Andy Shevchenko wrote:
> >> On Fri, Apr 21, 2017 at 11:17 AM, Takashi Iwai <tiwai@suse.de> wrote:
> >> > On Fri, 21 Apr 2017 09:41:57 +0200,
> >> > Hans de Goede wrote:
>
> >> >> + char ev_name[5];
> >> >
> >> > Are 5 bytes enough? I see the code below:
> >> >
> >> >> + snprintf(data->ev_name, sizeof(data->ev_name), "_%c%02X",
> >> >> + res->data.gpio.triggering ? 'E' : 'L',
> >> >> + res->data.gpio.pin_table[0]);
> >> >
> >> > So it counts 6 including NUL.
> >>
> >> How? 4 + NUL = 5.
> >
> > Well, "_E00X" is 5 letters, IIUC.
>
> Well, today is Friday, yes.
> But %02X means two capitalized hex characters.
Bah, of course, Friday morning, and I have to take a coffee.
> >> >> +static int int0002_runtime_resume(struct device *dev)
> >> >> +{
> >> >> + return 0;
> >> >> +}
> >> >> +
> >> >> +static const struct dev_pm_ops int0002_pm_ops = {
> >> >> + .runtime_suspend = int0002_runtime_suspend,
> >> >> + .runtime_resume = int0002_runtime_resume,
> >> >> +};
> >> >
> >> > Do we need these runtime PM? If not, we can remove the header
> >> > inclusion, too.
> >>
> >> Yeah, and it needs attention when built with !CONFIG_PM.
> >
> > Practically seen, we may build this only with CONFIG_PM, too.
> > The virtual GPIO thing happens only when the machine gets resumed.
>
> Perhaps depend on PM then?
Yes, it may make our lives a bit easier.
We stumbled on this driver just because of the hang at resume, and who
wants Cherrytrail device without PM?
thanks,
Takashi
next prev parent reply other threads:[~2017-04-21 9:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-21 7:41 [PATCH] drivers/platform/x86: Add driver for INT0002 ACPI device Hans de Goede
2017-04-21 8:17 ` Takashi Iwai
2017-04-21 8:27 ` Andy Shevchenko
2017-04-21 8:38 ` Takashi Iwai
2017-04-21 9:02 ` Andy Shevchenko
2017-04-21 9:06 ` Takashi Iwai [this message]
2017-04-21 10:11 ` Hans de Goede
2017-04-21 11:52 ` Hans de Goede
2017-04-21 10:28 ` joeyli
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=s5h7f2em8oo.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=andy.shevchenko@gmail.com \
--cc=andy@infradead.org \
--cc=dvhart@infradead.org \
--cc=hdegoede@redhat.com \
--cc=linux-acpi@vger.kernel.org \
--cc=platform-driver-x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox