From patchwork Sun Dec 13 11:15:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Ricard X-Patchwork-Id: 7839041 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 12D049FC45 for ; Sun, 13 Dec 2015 11:16:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 442B320340 for ; Sun, 13 Dec 2015 11:16:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 720B220361 for ; Sun, 13 Dec 2015 11:16:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751759AbbLMLQM (ORCPT ); Sun, 13 Dec 2015 06:16:12 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:38629 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751828AbbLMLQJ (ORCPT ); Sun, 13 Dec 2015 06:16:09 -0500 Received: by wmpp66 with SMTP id p66so26645803wmp.1; Sun, 13 Dec 2015 03:16:08 -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=orHTV9jJIF3amv7ie6kQ+S4U3jYzj8ctrcPLH2PwByjtQiZInxMVChBpU4CLq6hmZr LD901y+nXeNKOoYnRBHFynL770mz8efOYpT/zNirxNjsR17iCk6wAkXCt1bH4/M/hUeL g/RtSpakj+95gKoMGOYrt2i3I78B4bFHi3HXRrQ4nwRHi5SbqOl+pfL4D+fRlw3DNrMs kQKG583HU33dU6jJUvk4+TU5mBsLzG2ja5SKo89AjfJf9g/+s+fHK/WSY+L5hgh01rH1 oFeshi0tplCBor83bP8qpIYQ9jksYEn98orZ4AnNUSq4h44gfsydb1KEml7vhuOw03mg kGeg== X-Received: by 10.194.62.14 with SMTP id u14mr31548360wjr.24.1450005368198; Sun, 13 Dec 2015 03:16:08 -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 193sm11265773wmp.16.2015.12.13.03.16.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 13 Dec 2015 03:16:07 -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 v6 3/3] ACPI / spi: attach gpio irq from acpi description to spi device Date: Sun, 13 Dec 2015 12:15:55 +0100 Message-Id: <1450005355-6633-4-git-send-email-christophe-h.ricard@st.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1450005355-6633-1-git-send-email-christophe-h.ricard@st.com> References: <1450005355-6633-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 --- 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 */