All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Greer <mgreer-luAo+O/VEmrlveNOaEYElw@public.gmane.org>
To: Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	Lauro Ramos Venancio
	<lauro.venancio-430g2QfJUUCGglJvpFV4uA@public.gmane.org>,
	Aloisio Almeida Jr
	<aloisio.almeida-430g2QfJUUCGglJvpFV4uA@public.gmane.org>
Cc: linux-nfc-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Mark Greer <mgreer-luAo+O/VEmrlveNOaEYElw@public.gmane.org>
Subject: [PATCH v3 1/7] NFC: trf7970a: Don't de-assert EN2 unless it was asserted
Date: Fri, 20 Jan 2017 12:17:39 -0700	[thread overview]
Message-ID: <20170120191745.29255-2-mgreer@animalcreek.com> (raw)
In-Reply-To: <20170120191745.29255-1-mgreer-luAo+O/VEmrlveNOaEYElw@public.gmane.org>

When the trf7970a part has the bug related to 'en2-rf-quirk',
the GPIO connected to the EN2 pin will not be asserted by the
driver when powering up so it shouldn't be de-asserted when
powering down.

Signed-off-by: Mark Greer <mgreer-luAo+O/VEmrlveNOaEYElw@public.gmane.org>
---
 drivers/nfc/trf7970a.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c
index 26c9dbbccb0c..92f3cf3e012a 100644
--- a/drivers/nfc/trf7970a.c
+++ b/drivers/nfc/trf7970a.c
@@ -1914,7 +1914,9 @@ static int trf7970a_power_down(struct trf7970a *trf)
 	}
 
 	gpio_set_value(trf->en_gpio, 0);
-	gpio_set_value(trf->en2_gpio, 0);
+
+	if (!(trf->quirks & TRF7970A_QUIRK_EN2_MUST_STAY_LOW))
+		gpio_set_value(trf->en2_gpio, 0);
 
 	ret = regulator_disable(trf->regulator);
 	if (ret)
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-01-20 19:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-20 19:17 [PATCH v3 0/7] NFC: trf7970a: Fixups & convert to desc-based GPIO Mark Greer
     [not found] ` <20170120191745.29255-1-mgreer-luAo+O/VEmrlveNOaEYElw@public.gmane.org>
2017-01-20 19:17   ` Mark Greer [this message]
2017-01-20 19:17   ` [PATCH v3 2/7] NFC: trf7970a: Don't manage EN2 when not specified in DT Mark Greer
2017-01-20 19:17   ` [PATCH v3 3/7] NFC: trf7970a: Convert to descriptor based GPIO interface Mark Greer
2017-01-20 19:17   ` [PATCH v3 4/7] NFC: trf7970a: Remove useless comment Mark Greer
2017-01-20 19:17   ` [PATCH v3 5/7] NFC: trf7970a: Remove support for 'vin-voltage-override' DT property Mark Greer
     [not found]     ` <20170120191745.29255-6-mgreer-luAo+O/VEmrlveNOaEYElw@public.gmane.org>
2017-01-23 16:26       ` Rob Herring
2017-01-20 19:17   ` [PATCH v3 6/7] NFC: trf7970a: Enable pins are active high not active low Mark Greer
2017-01-20 19:17   ` [PATCH v3 7/7] MAINTAINERS: NFC: trf7970a: Add Mark Greer as maintainer Mark Greer
2017-04-18 22:26   ` [PATCH v3 0/7] NFC: trf7970a: Fixups & convert to desc-based GPIO Mark Greer
2017-04-25  0:19 ` Mark Greer
2017-04-25  0:19   ` Mark Greer

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=20170120191745.29255-2-mgreer@animalcreek.com \
    --to=mgreer-luao+o/vemrlvenoaeyelw@public.gmane.org \
    --cc=aloisio.almeida-430g2QfJUUCGglJvpFV4uA@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lauro.venancio-430g2QfJUUCGglJvpFV4uA@public.gmane.org \
    --cc=linux-nfc-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org \
    --cc=sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.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 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.