From patchwork Mon Aug 3 06:59:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 6927731 Return-Path: X-Original-To: patchwork-linux-arm@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 8599E9F373 for ; Mon, 3 Aug 2015 07:06:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BB689203E3 for ; Mon, 3 Aug 2015 07:06:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B5D8203A5 for ; Mon, 3 Aug 2015 07:06:12 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZM9nT-00048p-Mt; Mon, 03 Aug 2015 07:04:31 +0000 Received: from szxga01-in.huawei.com ([58.251.152.64]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZM9nQ-0003pO-1k for linux-arm-kernel@lists.infradead.org; Mon, 03 Aug 2015 07:04:29 +0000 Received: from 172.24.1.48 (EHLO szxeml432-hub.china.huawei.com) ([172.24.1.48]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CSF60714; Mon, 03 Aug 2015 15:00:25 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml432-hub.china.huawei.com (10.82.67.209) with Microsoft SMTP Server id 14.3.158.1; Mon, 3 Aug 2015 15:00:14 +0800 From: Shannon Zhao To: , , Subject: [PATCH 2/2] drivers: PL061: add ACPI probing for PL061 Date: Mon, 3 Aug 2015 14:59:58 +0800 Message-ID: <1438585198-8764-3-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1438585198-8764-1-git-send-email-zhaoshenglong@huawei.com> References: <1438585198-8764-1-git-send-email-zhaoshenglong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150803_000428_510939_774F2EF3 X-CRM114-Status: GOOD ( 11.86 ) X-Spam-Score: -4.3 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: shannon.zhao@linaro.org, zhaoshenglong@huawei.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 From: Shannon Zhao Add the necessary driver boilerplate to let the driver be used when the respective ACPI table is discovered by the ACPI subsystem. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- drivers/gpio/gpio-pl061.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c index 64c10eb..41fcf7b 100644 --- a/drivers/gpio/gpio-pl061.c +++ b/drivers/gpio/gpio-pl061.c @@ -25,6 +25,7 @@ #include #include #include +#include #define GPIODIR 0x400 #define GPIOIS 0x404 @@ -471,10 +472,17 @@ static const struct of_device_id pl061_of_match[] = { }; MODULE_DEVICE_TABLE(of, pl061_of_match); +static const struct acpi_device_id pl061_acpi_match[] = { + { "ARMH0061",}, + { } +}; +MODULE_DEVICE_TABLE(acpi, pl061_acpi_match); + static struct platform_driver pl061_gpio_platform_driver = { .driver = { .name = "pl061_gpio", .of_match_table = pl061_of_match, + .acpi_match_table = ACPI_PTR(pl061_acpi_match), #ifdef CONFIG_PM .pm = &pl061_dev_pm_ops, #endif