From patchwork Wed Dec 23 22:25:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Ricard X-Patchwork-Id: 7914821 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BEDE09F350 for ; Wed, 23 Dec 2015 22:25:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EA90920453 for ; Wed, 23 Dec 2015 22:25:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EAC1020600 for ; Wed, 23 Dec 2015 22:25:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932650AbbLWWZy (ORCPT ); Wed, 23 Dec 2015 17:25:54 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:34497 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933051AbbLWWZr (ORCPT ); Wed, 23 Dec 2015 17:25:47 -0500 Received: by mail-wm0-f45.google.com with SMTP id l126so161871728wml.1; Wed, 23 Dec 2015 14:25:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=X9I91IKOqAI7p3u7H48+ZEDbnoJiAj4FP8bG5sU4mKY=; b=Cf+7EImXKQLNq/o7JwBlylOKRzVMCKVtxn/HNHT2F7LgSzQxi6LeeGviwGRBLHUG2P woIo7w69ZXOyULErL8itm+V8Pr1Os/fAfL3xL9Pqp6BHu1MMmNuQ9uWvCtIx+I2KIhwP tR5tmHxPgIwpAo1l9znpUEeel2rmOuH6Qii2bE0llNUB6E+a7w3F2obXGk1bL3IziR6d uLvEsQx1neqo2vtiFkCil1+/2v72wsAp+S7+hpl+UPC03LGoSzfMT1GmGEZ2H8bEaPA5 itZhuKCQ8KVqj8a+XZudUmCfbdQ4HkdrL2NB+jNxI9ELae3TYA4f+DUIQJw7RB1+RYXi sseQ== X-Received: by 10.194.204.232 with SMTP id lb8mr43226352wjc.112.1450909545541; Wed, 23 Dec 2015 14:25:45 -0800 (PST) Received: from localhost.localdomain (ax113-6-78-236-204-66.fbx.proxad.net. [78.236.204.66]) by smtp.gmail.com with ESMTPSA id l184sm30886480wmf.6.2015.12.23.14.25.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Dec 2015 14:25:44 -0800 (PST) From: Christophe Ricard X-Google-Original-From: Christophe Ricard To: rjw@rjwysocki.net, lenb@kernel.org, linus.walleij@linaro.org, gnurou@gmail.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com, broonie@kernel.org Cc: linux-spi@vger.kernel.org, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, Christophe Ricard Subject: [PATCH v8 3/3] ACPI / spi: attach gpio irq from acpi description to spi device Date: Wed, 23 Dec 2015 23:25:35 +0100 Message-Id: <1450909535-32138-4-git-send-email-christophe-h.ricard@st.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1450909535-32138-1-git-send-email-christophe-h.ricard@st.com> References: <1450909535-32138-1-git-send-email-christophe-h.ricard@st.com> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP spi->irq was ignoring GpioInt property setting it to -1. acpi_dev_gpio_irq_get returns and configure the slave irq according to the acpi slave node description. It is now inline with devicetree behavior. Acked-by: Mark Brown Signed-off-by: Christophe Ricard Acked-by: Mika Westerberg --- drivers/spi/spi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 2b0a8ec..f1723bb 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1623,6 +1623,9 @@ static acpi_status acpi_spi_add_device(acpi_handle handle, u32 level, return AE_OK; } + if (spi->irq < 0) + spi->irq = acpi_dev_gpio_irq_get(adev, 0); + adev->power.flags.ignore_parent = true; strlcpy(spi->modalias, acpi_device_hid(adev), sizeof(spi->modalias)); if (spi_add_device(spi)) {