[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160823024059.i7mvsef4t7flskcv@earth>
Date: Tue, 23 Aug 2016 04:40:59 +0200
From: Sebastian Reichel <sre@...nel.org>
To: Wenyou Yang <wenyou.yang@...el.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
David Woodhouse <dwmw2@...radead.org>,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Brown <broonie@...nel.org>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
Nicolas Ferre <nicolas.ferre@...el.com>,
linux-pm@...r.kernel.org
Subject: Re: [PATCH v7 5/7] power: act8945a_charger: Add capacity level
property
Hi,
On Mon, Aug 22, 2016 at 02:49:15PM +0800, Wenyou Yang wrote:
> [...]
>
> + charger->lbo_gpio = gpiod_get(dev->parent, "active-semi,lbo", GPIOD_IN);
> + if (PTR_ERR(charger->lbo_gpio) == -EPROBE_DEFER) {
> + dev_info(dev, "probe retry requested for gpio \"lbo\"\n");
> + } else if (IS_ERR(charger->lbo_gpio)) {
> + dev_err(dev, "unable to claim gpio \"lbo\"\n");
> + charger->lbo_gpio = NULL;
> + }
> +
> + ret = devm_request_irq(dev, gpiod_to_irq(charger->lbo_gpio),
> + act8945a_status_changed,
> + (IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING),
> + "act8945a_lbo_detect", charger);
> + if (ret)
> + dev_info(dev, "failed to request gpio \"lbo\" IRQ\n");
that does not work, since you need to release the irq before
releasing the gpio. So if the gpio is not requested via devm_
than you can't request the irq via devm_ (actually you can by
using devm_free_irq in remove(), but then you can also drop
the devm_ alltogether).
> [...]
-- Sebastian
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists