From patchwork Tue Apr 25 22:43:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Greer X-Patchwork-Id: 9699993 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 EC82060245 for ; Tue, 25 Apr 2017 22:44:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2C4821E5A for ; Tue, 25 Apr 2017 22:44:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7A1A2846B; Tue, 25 Apr 2017 22:44:13 +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 6358721E5A for ; Tue, 25 Apr 2017 22:44:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1953207AbdDYWoM (ORCPT ); Tue, 25 Apr 2017 18:44:12 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:35415 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1953167AbdDYWn7 (ORCPT ); Tue, 25 Apr 2017 18:43:59 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 20C4D2191B; Tue, 25 Apr 2017 18:43:58 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute3.internal (MEProxy); Tue, 25 Apr 2017 18:43:58 -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=SpXP79mqCypln1kfb6u xvnLvvC7mzmPwMtn3OoZLFLN+lJ0F7flMptPGCaYmuNjz5wn9GDsk76nYi9PmnfK 1ffvIjGnNPdmd9uB7xuCVGLIIq24LdqUGB+GdbeYImCmRv/u9ieU0DHfqMHrzHmM evui+3JfGuu5rKiZBnqco2Sw= 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=LYR8AnnLLJ2aPbZrATFqgDIQFH8zwhiBtyUxd/ORII3eXej90dFq1lFwX dsZj4xpgD+X8Jy1ypevcerXcH+x08lJrMiSkEyQ4QT9Nozuhx5LFqQugVgFmDbQf 9SF4f2KKx4cCQP6XNzXh2XGwu400Aqv5r1Ss2ZSFhbCxgygLnux6HBnG2G6X4S4b W1h6ZzHykNY7qhGJSbkH6dfYGL3Nm5LoPwvbXuEu7rw9OPau6xYFNgetdo42Mm7j IJ1p+xGOJ/R/FSPsrI6hDxUR77fAMjjjnTO2469pSqlkNXzijUDT/wVl1oKGN8dR k50p4ONXSZng3P1KDhV8N0vxHJbxA== X-ME-Sender: X-Sasl-enc: /xlcEFmGueF17Dx61cNa+n52ZoWpB7W1ZRMIRjfa7dJL 1493160237 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 D201C2473E; Tue, 25 Apr 2017 18:43:57 -0400 (EDT) Received: from blue.animalcreek.com (localhost [127.0.0.1]) by blue.animalcreek.com (Postfix) with ESMTP id 4F331A222F2; Tue, 25 Apr 2017 15:43:57 -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 v5 4/9] NFC: trf7970a: Only check 'en2-rf-quirk' if EN2 is specified Date: Tue, 25 Apr 2017 15:43:51 -0700 Message-Id: <20170425224356.11498-5-mgreer@animalcreek.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170425224356.11498-1-mgreer@animalcreek.com> References: <20170425224356.11498-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);