From: sre@kernel.org (Sebastian Reichel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7 5/7] power: act8945a_charger: Add capacity level property
Date: Tue, 23 Aug 2016 04:40:59 +0200 [thread overview]
Message-ID: <20160823024059.i7mvsef4t7flskcv@earth> (raw)
In-Reply-To: <1471848557-27278-6-git-send-email-wenyou.yang@atmel.com>
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160823/034aade0/attachment.sig>
next prev parent reply other threads:[~2016-08-23 2:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-22 6:49 [PATCH v7 0/7] power: act8945a_charger: Improvements Wenyou Yang
2016-08-22 6:49 ` [PATCH v7 1/7] power: act8945a_charger: Remove "battery_temperature" Wenyou Yang
2016-08-22 6:49 ` [PATCH v7 2/7] power: act8945a_charger: Improve Wenyou Yang
2016-08-22 6:49 ` [PATCH v7 3/7] power: act8945a_charger: Add status change update support Wenyou Yang
2016-08-22 6:49 ` [PATCH v7 4/7] power: act8945a_charger: Fix the power supply type Wenyou Yang
2016-08-22 6:49 ` [PATCH v7 5/7] power: act8945a_charger: Add capacity level property Wenyou Yang
2016-08-23 2:40 ` Sebastian Reichel [this message]
2016-08-22 6:49 ` [PATCH v7 6/7] power: act8945a_charger: Add max current property Wenyou Yang
2016-08-23 2:43 ` Sebastian Reichel
2016-08-22 6:49 ` [PATCH v7 7/7] doc: bindings: act8945a-charger: Update properties Wenyou Yang
2016-08-23 3:03 ` Sebastian Reichel
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=20160823024059.i7mvsef4t7flskcv@earth \
--to=sre@kernel.org \
--cc=linux-arm-kernel@lists.infradead.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