From patchwork Wed Apr 28 16:33:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Bogendoerfer X-Patchwork-Id: 1471302 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4FVkj16jD4z9sW8 for ; Thu, 29 Apr 2021 02:33:41 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240643AbhD1QeZ (ORCPT ); Wed, 28 Apr 2021 12:34:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:33838 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240747AbhD1QeY (ORCPT ); Wed, 28 Apr 2021 12:34:24 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id AF240B122; Wed, 28 Apr 2021 16:33:38 +0000 (UTC) From: Thomas Bogendoerfer To: Jens Axboe , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] ata: pata_rb532: Make driver COMPILE_TESTable Date: Wed, 28 Apr 2021 18:33:34 +0200 Message-Id: <20210428163336.73125-1-tsbogend@alpha.franken.de> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org By removing the not needed #include driver could be COMPILE_TESTed. Signed-off-by: Thomas Bogendoerfer --- drivers/ata/Kconfig | 2 +- drivers/ata/pata_rb532_cf.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 030cb32da980..53f40f92e4eb 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -1139,7 +1139,7 @@ config PATA_QDI config PATA_RB532 tristate "RouterBoard 532 PATA CompactFlash support" - depends on MIKROTIK_RB532 + depends on MIKROTIK_RB532 || COMPILE_TEST help This option enables support for the RouterBoard 532 PATA CompactFlash controller. diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c index 479c4b29b856..529ba28f471f 100644 --- a/drivers/ata/pata_rb532_cf.c +++ b/drivers/ata/pata_rb532_cf.c @@ -28,8 +28,6 @@ #include #include -#include - #define DRV_NAME "pata-rb532-cf" #define DRV_VERSION "0.1.0" #define DRV_DESC "PATA driver for RouterBOARD 532 Compact Flash" From patchwork Wed Apr 28 16:33:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Bogendoerfer X-Patchwork-Id: 1471303 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4FVkj23YjFz9sWW for ; Thu, 29 Apr 2021 02:33:42 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240955AbhD1Qe0 (ORCPT ); Wed, 28 Apr 2021 12:34:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:33858 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230470AbhD1QeZ (ORCPT ); Wed, 28 Apr 2021 12:34:25 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id BAB8FB1BB; Wed, 28 Apr 2021 16:33:39 +0000 (UTC) From: Thomas Bogendoerfer To: Jens Axboe , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/3] ata: pata_rb532: Add device tree support Date: Wed, 28 Apr 2021 18:33:35 +0200 Message-Id: <20210428163336.73125-2-tsbogend@alpha.franken.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210428163336.73125-1-tsbogend@alpha.franken.de> References: <20210428163336.73125-1-tsbogend@alpha.franken.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Make driver also available via device tree binding. Signed-off-by: Thomas Bogendoerfer --- drivers/ata/pata_rb532_cf.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c index 529ba28f471f..93d839ab9654 100644 --- a/drivers/ata/pata_rb532_cf.c +++ b/drivers/ata/pata_rb532_cf.c @@ -162,11 +162,20 @@ static int rb532_pata_driver_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id pata_rb532_match[] = { + { .compatible = "mikrotik,rb532-pata", }, + { } +}; +MODULE_DEVICE_TABLE(of, pata_rb532_match); +#endif + static struct platform_driver rb532_pata_platform_driver = { .probe = rb532_pata_driver_probe, .remove = rb532_pata_driver_remove, .driver = { .name = DRV_NAME, + .of_match_table = of_match_ptr(pata_rb532_match), }, }; From patchwork Wed Apr 28 16:33:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Bogendoerfer X-Patchwork-Id: 1471304 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4FVkj404Wmz9sWW for ; Thu, 29 Apr 2021 02:33:44 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241010AbhD1Qe1 (ORCPT ); Wed, 28 Apr 2021 12:34:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:33896 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240929AbhD1Qe0 (ORCPT ); Wed, 28 Apr 2021 12:34:26 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A5DD8B122; Wed, 28 Apr 2021 16:33:40 +0000 (UTC) From: Thomas Bogendoerfer To: Jens Axboe , Rob Herring , linux-ide@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] dt-bindings: ata: Add device tree binding fir Mikrotik RB532 PATA controller Date: Wed, 28 Apr 2021 18:33:36 +0200 Message-Id: <20210428163336.73125-3-tsbogend@alpha.franken.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210428163336.73125-1-tsbogend@alpha.franken.de> References: <20210428163336.73125-1-tsbogend@alpha.franken.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Add YAML devicetree binding for Mikrotik RB532 PATA controller. Signed-off-by: Thomas Bogendoerfer --- .../bindings/ata/mikrotek,rb532-pata.yaml | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Documentation/devicetree/bindings/ata/mikrotek,rb532-pata.yaml diff --git a/Documentation/devicetree/bindings/ata/mikrotek,rb532-pata.yaml b/Documentation/devicetree/bindings/ata/mikrotek,rb532-pata.yaml new file mode 100644 index 000000000000..f74880c4fd82 --- /dev/null +++ b/Documentation/devicetree/bindings/ata/mikrotek,rb532-pata.yaml @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/ata/mikrotek,rb532-pata.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mikrotek RB532 PATA Controller bindings + +maintainers: + - Thomas Bogendoerfer + +properties: + compatible: + const: mikrotik,rb532-pata + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + gpio: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - gpio + +additionalProperties: false + +examples: + - | + cf@18a10000 { + compatible = "mikrotik,rb532-pata"; + reg = <0x18a10000 0xc04>; + + gpio = <&gpio0 13 0>; + + interrupt-parent = <&gpio0>; + interrupts = <13 0>; + };