From patchwork Mon Dec 3 03:15:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jay Fang X-Patchwork-Id: 10708561 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 748DA17F0 for ; Mon, 3 Dec 2018 03:15:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67CB42A2A4 for ; Mon, 3 Dec 2018 03:15:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B6E52A4A1; Mon, 3 Dec 2018 03:15:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03ED72A452 for ; Mon, 3 Dec 2018 03:15:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725833AbeLCDP6 (ORCPT ); Sun, 2 Dec 2018 22:15:58 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:16063 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725805AbeLCDP6 (ORCPT ); Sun, 2 Dec 2018 22:15:58 -0500 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 4BA982B390E9; Mon, 3 Dec 2018 11:15:54 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.408.0; Mon, 3 Dec 2018 11:15:49 +0800 From: Jay Fang To: CC: , , , , , , , Subject: [PATCH 0/3] spi: dw-mmio: add ACPI support Date: Mon, 3 Dec 2018 11:15:48 +0800 Message-ID: <1543806951-61848-1-git-send-email-f.fangjian@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.67.212.132] X-CFilter-Loop: Reflected Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Everyone: This series adds ACPI support for the Designware SPI MMIO-based controller. The Hisilicon Hip08 platform, that uses ACPI, has this controller. However, the spi-dw-mmio driver only supports Device Tree now. ACPI also supports function names for GPIOs in a similar fashion to DT. A example from ACPI which uses cs-gpios: Device(SPI0) { Name(_HID, ...) Name (RBUF, ResourceTemplate () { GpioIo(Exclusive, PullUp, 0, 0, IoRestrictionNone, "\\_SB.GPO1", 0, ResourceConsumer, , ) { 6 } }) Method (_CRS, 0, NotSerialized) { Return (RBUF) } Name(_DSD, Package () { ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package () {"num-cs", 1}, Package () { "cs-gpios", Package () { ^SPI0, 0, 0, 0, }, }, } }) } [1] https://www.kernel.org/doc/Documentation/acpi/gpio-properties.txt Thank you, Jay Jay Fang (3): ACPI / APD: Add clock frequency for Hisilicon Hip08 SPI controller spi: dw-mmio: add ACPI support spi: add ACPI support for SPI controller chip select lines(cs-gpios) drivers/acpi/acpi_apd.c | 6 ++++++ drivers/spi/spi-dw-mmio.c | 8 ++++++++ drivers/spi/spi-dw.c | 1 + drivers/spi/spi.c | 32 ++++++++++++++++---------------- 4 files changed, 31 insertions(+), 16 deletions(-)