From patchwork Tue Apr 25 18:40:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Greer X-Patchwork-Id: 9699397 X-Patchwork-Delegate: sameo@linux.intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B36F560245 for ; Tue, 25 Apr 2017 18:41:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3DCE28452 for ; Tue, 25 Apr 2017 18:41:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9864F284EE; Tue, 25 Apr 2017 18:41:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48AB028452 for ; Tue, 25 Apr 2017 18:41:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2993259AbdDYSlN (ORCPT ); Tue, 25 Apr 2017 14:41:13 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:33657 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1431404AbdDYSkt (ORCPT ); Tue, 25 Apr 2017 14:40:49 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 4C61C21B3D; Tue, 25 Apr 2017 14:40:43 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Tue, 25 Apr 2017 14:40:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=animalcreek.com; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=FW9 7qIhorTpim2Ztouo6V15ABE4E19JnFWBnGZu0Zn0=; b=XADebSDs131d5xon7Yj E7G2lwKh3CyL74WUPAQNWsXLw4418XOTs0AwvjPHwN+53RiArgOLv0tE83QajHci cvf2OPApUeAnYvPlxIBMJhexSF+zp0M8yoZwQFumTtRkBqy8AC8X41kcRSn31OuD wWcHr0cDCH9Q9ZPUpuuTXtY0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=FW97qIhorTpim2Ztouo6V15ABE4E19JnFWBnGZu0Z n0=; b=U1uu7X2Kh4angGOSqhqoRq1GpHIoabIlNCFQiDiXUIXQ/MZREPMKp4ZS4 PLY2Js8v/Q+tlsfj4u1xwi4+ykpvmuwtuJ6LlqWbt/V99MdYBwlxwg1ePm5DdGH3 nlYZJqOQwmV8+s+p7bKHGUiTSVrlCKKcGL4sVQhFHdAxC2XVZOzex3vVLbAHSPjg Yz3Yx2OgsaSSvYw6whRMLJDi9VNCiKgDE+41vwR/bIkC0wvm7Ot5D4J9K/lBlgHB ZAiIXm2wamp6W7utDiPw1NAhTbcuOEWhvpPhyFwaya9Xc7Ig+v5sjZVRR6dfus4T qOqvYbk81LBARwR5ykGmfR9acmd1A== X-ME-Sender: X-Sasl-enc: FSGhoNtUl4BVQTEHXHsm3Xx4BiCV5E2JiMvjuRWVJfKa 1493145643 Received: from blue.animalcreek.com (ip68-2-86-89.ph.ph.cox.net [68.2.86.89]) by mail.messagingengine.com (Postfix) with ESMTPA id 0A79E7E771; Tue, 25 Apr 2017 14:40:43 -0400 (EDT) Received: from blue.animalcreek.com (localhost [127.0.0.1]) by blue.animalcreek.com (Postfix) with ESMTP id 4F883A222F2; Tue, 25 Apr 2017 11:40:42 -0700 (MST) From: Mark Greer To: Samuel Ortiz Cc: linux-wireless@vger.kernel.org, linux-nfc@lists.01.org, devicetree@vger.kernel.org, Mark Greer Subject: [PATCH v4 4/9] NFC: trf7970a: Only check 'en2-rf-quirk' if EN2 is specified Date: Tue, 25 Apr 2017 11:40:31 -0700 Message-Id: <20170425184036.1212-5-mgreer@animalcreek.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170425184036.1212-1-mgreer@animalcreek.com> References: <20170425184036.1212-1-mgreer@animalcreek.com> Organization: Animal Creek Technologies, Inc. Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The quirk indicated by the 'en2-rf-quirk' device tree property is only relevant when there is a GPIO connected to the EN2 pin of the trf7970a. This means we should only check for 'en2-rf-quirk' when EN2 is specified in the 'ti,enable-gpios' property of the device tree. Signed-off-by: Mark Greer --- drivers/nfc/trf7970a.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c index 5d5a8b0e57d4..4655680b0e7b 100644 --- a/drivers/nfc/trf7970a.c +++ b/drivers/nfc/trf7970a.c @@ -2070,6 +2070,9 @@ static int trf7970a_probe(struct spi_device *spi) dev_err(trf->dev, "Can't request EN2 GPIO: %d\n", ret); return ret; } + + if (of_property_read_bool(np, "en2-rf-quirk")) + trf->quirks |= TRF7970A_QUIRK_EN2_MUST_STAY_LOW; } of_property_read_u32(np, "clock-frequency", &clk_freq); @@ -2081,9 +2084,6 @@ static int trf7970a_probe(struct spi_device *spi) return -EINVAL; } - if (of_property_read_bool(np, "en2-rf-quirk")) - trf->quirks |= TRF7970A_QUIRK_EN2_MUST_STAY_LOW; - ret = devm_request_threaded_irq(trf->dev, spi->irq, NULL, trf7970a_irq, IRQF_TRIGGER_RISING | IRQF_ONESHOT, "trf7970a", trf);