[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170322224830.bzlsrrl65nx6olou@earth>
Date: Wed, 22 Mar 2017 23:48:30 +0100
From: Sebastian Reichel <sre@...nel.org>
To: Rob Herring <robh+dt@...nel.org>
Cc: Marcel Holtmann <marcel@...tmann.org>,
Gustavo Padovan <gustavo@...ovan.org>,
Johan Hedberg <johan.hedberg@...il.com>,
Samuel Thibault <samuel.thibault@...-lyon.org>,
Pavel Machek <pavel@....cz>, Tony Lindgren <tony@...mide.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>,
Mark Rutland <mark.rutland@....com>,
"open list:BLUETOOTH DRIVERS" <linux-bluetooth@...r.kernel.org>,
"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCHv2 09/11] Bluetooth: add nokia driver
Hi,
On Wed, Mar 22, 2017 at 04:26:28PM -0500, Rob Herring wrote:
> On Tue, Mar 21, 2017 at 5:32 PM, Sebastian Reichel <sre@...nel.org> wrote:
> > This adds a driver for the Nokia H4+ protocol, which is used
> > at least on the Nokia N9, N900 & N950.
> >
> > Signed-off-by: Sebastian Reichel <sre@...nel.org>
> > ---
>
> > + btdev->wakeup_host = devm_gpiod_get(dev, "host-wakeup", GPIOD_IN);
> > + if (IS_ERR(btdev->wakeup_host)) {
> > + err = PTR_ERR(btdev->wakeup_host);
> > + dev_err(dev, "could not get host wakeup gpio: %d", err);
> > + return err;
> > + }
> > +
> > + btdev->wake_irq = gpiod_to_irq(btdev->wakeup_host);
>
> Missed this in the binding review, but generally, we make these
> interrupts rather than gpios in the binding.
I also read the state of the GPIO. AFAIK it's not possible to read
the state of an IRQ, so I can't switch to IRQ.
> > +
> > + err = devm_request_threaded_irq(dev, btdev->wake_irq, NULL,
> > + wakeup_handler,
> > + IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
> > + "wakeup", btdev);
> > + if (err) {
> > + dev_err(dev, "could request wakeup irq: %d", err);
> > + return err;
> > + }
-- Sebastian
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists