From patchwork Tue Dec 15 07:11:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Ricard X-Patchwork-Id: 7851771 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 7B4739F1C2 for ; Tue, 15 Dec 2015 07:11:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD4F020416 for ; Tue, 15 Dec 2015 07:11:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE1A82041F for ; Tue, 15 Dec 2015 07:11:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932077AbbLOHLr (ORCPT ); Tue, 15 Dec 2015 02:11:47 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:35027 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932078AbbLOHLp (ORCPT ); Tue, 15 Dec 2015 02:11:45 -0500 Received: by mail-wm0-f54.google.com with SMTP id p66so76990610wmp.0; Mon, 14 Dec 2015 23:11:44 -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=GZoCoPOiM+XMKFZEETx+G4xNoP2QQcUuwD8CrzGDPvE=; b=uSrDxUjL5EsCvdXzGBE9XGw7NtaizHut8BuNPC+qFkTT9w5jZ4MnisaOSx5dod27Ld UT4E1SazvYfTjSbzGLH22KDVMtB9nTJSREhw07XxPTHxQmruOfMa24elkR4SUhsoZV9/ iZ1QFK9/eVm4w9zPFc+t9FYGRFG+212C04Apy4RKO6V8qgSm0pt1WxNkKZcg69Zh24jB BAzWslOYvhhIo3JCUM1IwEIJLsiyE01iGvy3S/dRbceYqJ94xDBDdubK2GiPULacMoUB aztJ2CFmIO4ojLsAZlqHVrSB89C7yHF3FD3xeV621d8Qevf4MoeDEZ8sBZ2LO3Ah8xc/ O2tQ== X-Received: by 10.194.204.232 with SMTP id lb8mr50358666wjc.112.1450163504290; Mon, 14 Dec 2015 23:11:44 -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 jo6sm33097583wjb.48.2015.12.14.23.11.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Dec 2015 23:11:43 -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 v7 3/3] ACPI / spi: attach gpio irq from acpi description to spi device Date: Tue, 15 Dec 2015 08:11:33 +0100 Message-Id: <1450163493-4938-4-git-send-email-christophe-h.ricard@st.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1450163493-4938-1-git-send-email-christophe-h.ricard@st.com> References: <1450163493-4938-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, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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. Signed-off-by: Christophe Ricard Acked-by: Mark Brown --- drivers/spi/spi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 2b0a8ec..6e5d1f7 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1583,6 +1583,8 @@ static int acpi_spi_add_resource(struct acpi_resource *ares, void *data) if (acpi_dev_resource_interrupt(ares, 0, &r)) spi->irq = r.start; + else + spi->irq = acpi_dev_gpio_irq_get(ACPI_COMPANION(&spi->dev), 0); } /* Always tell the ACPI core to skip this resource */