From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
"russianneuromancer @ ya . ru" <russianneuromancer@ya.ru>,
Gregor Riepl <onitake@gmail.com>,
linux-input@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH v2] Input: silead - Do not try to directly access the GPIO when using ACPI pm
Date: Thu, 2 Feb 2017 16:18:03 +0200 [thread overview]
Message-ID: <20170202141803.GW2053@lahna.fi.intel.com> (raw)
In-Reply-To: <b9a6a4d7-a6c9-ca0e-41d3-98039352471c@redhat.com>
On Thu, Feb 02, 2017 at 02:55:57PM +0100, Hans de Goede wrote:
> Hi,
>
> On 02-02-17 14:44, Mika Westerberg wrote:
> > On Thu, Feb 02, 2017 at 02:27:28PM +0100, Hans de Goede wrote:
> > > > Actually what is wrong here is that your gpiod_get(dev, "power") falls
> > > > back to use plain indexes and returns the first GPIO even though it
> > > > should not as the driver specifically requests GPIO with name "power"
> > > > and there is no _DSD.
> > >
> > > There is no clear "binding" for this device in ACPI, so the fallback
> > > is actually used as a feature by the Silead driver (more or less),
> > > the use of "power" as name here is for the ARM + devicetree usage
> > > of the driver really, so IOW the series:
> > >
> > > >
> > > > Andy (Cc'd) has a patch that tries to make the fallback mechanism more
> > > > stricter which should in theory fix the problem as well. The patch
> > > > series is here:
> > > >
> > > > https://bitbucket.org/andy-shev/linux/commits/338c0226b631b8b497d143070a301d8b8883c349?at=master
> > >
> > > You are referring to might fix this, but then we may need to add an
> > > attempt to get the gpio by index for some boards which do not control
> > > it themselves from _PS#.
> > >
> > > I can give the linked series a try, but I would still like a fallback
> > > plan if we indeed encounter boards where we need to fallback to
> > > getting the gpio by index. Once we do that we're back to having the
> > > same problem as then we would do the same fallback on boards where
> > > the pin is reserved for _PS# usage, and end up with an -EBUSY error
> > > again. I guess we could ignore -EBUSY in the fallback path, or only
> > > do the fallback if acpi_bus_power_manageable() returns false.
> >
> > I don't think using acpi_bus_power_manageable() is a proper way to fix
> > this.
>
> Ok.
>
> > This can be fixed without the fallback so that for the boards you know
> > need to handle the GPIO themselves (based on the _HID for example),
>
> The _HID is the same everywhere, these boards dstd's are mostly a copy
> and paste fest. So this would to be DMI based.
:(
I suppose the Windows driver just works everywhere, right?
> > they
> > will call acpi_dev_add_driver_gpios() passing the mapping for "power".
> > The other boards then just don't get the GPIO.
>
> The list of boards needing this might be huge. Anyways we will figure
> this out as we encounter boards needing some form of fallback to
> getting gpios based on index. If you think using acpi_bus_power_manageable()
> is a bad way to detect that no gpio is needed then we may just end up ignoring
> the -EBUSY return from gpiod_get_by_index
Well, that is certainly better than using acpi_bus_power_manageable() if
nothing else can be done here.
next prev parent reply other threads:[~2017-02-02 14:18 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-22 20:00 [PATCH v2] Input: silead - Do not try to directly access the GPIO when using ACPI pm Hans de Goede
2017-01-22 22:20 ` Dmitry Torokhov
2017-01-23 10:05 ` Hans de Goede
2017-02-01 17:42 ` Dmitry Torokhov
2017-02-02 10:41 ` Mika Westerberg
2017-02-02 11:57 ` Hans de Goede
2017-02-02 12:10 ` Mika Westerberg
2017-02-02 12:32 ` Mika Westerberg
2017-02-02 12:50 ` Hans de Goede
2017-02-02 13:12 ` Mika Westerberg
2017-02-02 13:27 ` Hans de Goede
2017-02-02 13:44 ` Mika Westerberg
2017-02-02 13:55 ` Hans de Goede
2017-02-02 14:18 ` Mika Westerberg [this message]
2017-02-02 14:24 ` Gregor Riepl
2017-03-14 10:21 ` Linus Walleij
2017-03-14 11:07 ` Hans de Goede
2017-03-14 13:09 ` Andy Shevchenko
2017-03-14 18:12 ` Gregor Riepl
2017-02-10 11:52 ` Hans de Goede
2017-02-10 13:02 ` Mika Westerberg
2017-02-12 10:40 ` Hans de Goede
2017-02-13 11:00 ` Andy Shevchenko
2017-02-22 15:52 ` Andy Shevchenko
2017-02-23 14:19 ` Hans de Goede
2017-03-02 11:38 ` Andy Shevchenko
2017-03-02 15:34 ` Hans de Goede
2017-03-03 14:57 ` Andy Shevchenko
2017-03-03 15:19 ` Hans de Goede
2017-03-03 15:23 ` Andy Shevchenko
2017-03-06 9:31 ` Hans de Goede
2017-03-07 11:51 ` Andy Shevchenko
2017-03-07 13:55 ` Hans de Goede
2017-03-08 9:08 ` Hans de Goede
2017-03-08 10:30 ` Andy Shevchenko
2017-03-08 11:27 ` Hans de Goede
2017-03-08 11:46 ` Andy Shevchenko
2017-03-08 17:01 ` Andy Shevchenko
2017-03-08 17:08 ` Hans de Goede
2017-03-08 17:14 ` Andy Shevchenko
2017-03-08 17:05 ` Hans de Goede
2017-03-08 18:25 ` Andy Shevchenko
2017-03-09 13:57 ` Hans de Goede
2017-03-09 14:03 ` Andy Shevchenko
2017-03-09 14:45 ` Hans de Goede
2017-03-09 15:03 ` Andy Shevchenko
2017-03-09 15:40 ` Hans de Goede
2017-03-09 18:48 ` Hans de Goede
2017-03-09 21:32 ` Dmitry Torokhov
2017-03-10 10:35 ` Mika Westerberg
2017-03-10 11:33 ` Andy Shevchenko
2017-03-10 11:58 ` Andy Shevchenko
2017-03-10 20:49 ` 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=20170202141803.GW2053@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hdegoede@redhat.com \
--cc=linus.walleij@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=onitake@gmail.com \
--cc=russianneuromancer@ya.ru \
/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.