From patchwork Sat Dec 12 23:30:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Ricard X-Patchwork-Id: 7837961 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 BAAB69F350 for ; Sat, 12 Dec 2015 23:31:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EB6A62034C for ; Sat, 12 Dec 2015 23:30:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F5E820395 for ; Sat, 12 Dec 2015 23:30:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750926AbbLLXay (ORCPT ); Sat, 12 Dec 2015 18:30:54 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:34207 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751470AbbLLXai (ORCPT ); Sat, 12 Dec 2015 18:30:38 -0500 Received: by mail-wm0-f51.google.com with SMTP id p66so17713380wmp.1; Sat, 12 Dec 2015 15:30:37 -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=gqna8LfDQpqPLqO8IQjQuop/cKovuVhtKq9UqOEQ6oA=; b=k8R3sYisjLGDQeFxlBoTT0d5Sf61HTVr0XYKkclBMp9HM6aHaZRbjrqIdlOfFoJ41C rmiKJPhOmC9UfMm9hGl5BagfX44wvFFnQhCLBwBZMPjM62JJ97bw8SGq705idBYz05YO 6/aqxWm3zDjTQkfsbjw2eWXwofcPHowCW8y01qNesSUXsjBb4gdPmFLalJeFbRHHM9YC 027DwWv1CBwWwVgSszP3pYU1PrhLoc2b80kUoizkGV/ezXhJyRPq5wDIshyRwf0vaUFG fsesqP79rnz+V6YfIXwq+riQ1DuLHrNPj0E4mDbvgEPQOna4GW9RCnQMd1Uj3MXMd6lO lOhA== X-Received: by 10.194.63.238 with SMTP id j14mr32192484wjs.172.1449963035799; Sat, 12 Dec 2015 15:30:35 -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 a62sm5985356wmh.1.2015.12.12.15.30.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 12 Dec 2015 15:30:34 -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 v5 3/3] ACPI / spi: attach gpio irq from acpi description to spi device Date: Sun, 13 Dec 2015 00:30:04 +0100 Message-Id: <1449963004-8391-4-git-send-email-christophe-h.ricard@st.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1449963004-8391-1-git-send-email-christophe-h.ricard@st.com> References: <1449963004-8391-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=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. Signed-off-by: Christophe Ricard --- drivers/spi/spi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index a5f53de..d67c6fa 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1506,6 +1506,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 */