* [PATCH v2 1/3] ata: pata_rb532: Make driver COMPILE_TESTable @ 2021-04-28 16:33 Thomas Bogendoerfer 2021-04-28 16:33 ` [PATCH v2 2/3] ata: pata_rb532: Add device tree support Thomas Bogendoerfer 2021-04-28 16:33 ` [PATCH v2 3/3] dt-bindings: ata: Add device tree binding fir Mikrotik RB532 PATA controller Thomas Bogendoerfer 0 siblings, 2 replies; 5+ messages in thread From: Thomas Bogendoerfer @ 2021-04-28 16:33 UTC (permalink / raw) To: Jens Axboe, linux-ide, linux-kernel By removing the not needed #include <asm/mach-rc32434/rb.h> driver could be COMPILE_TESTed. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> --- 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 <linux/libata.h> #include <scsi/scsi_host.h> -#include <asm/mach-rc32434/rb.h> - #define DRV_NAME "pata-rb532-cf" #define DRV_VERSION "0.1.0" #define DRV_DESC "PATA driver for RouterBOARD 532 Compact Flash" -- 2.29.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/3] ata: pata_rb532: Add device tree support 2021-04-28 16:33 [PATCH v2 1/3] ata: pata_rb532: Make driver COMPILE_TESTable Thomas Bogendoerfer @ 2021-04-28 16:33 ` Thomas Bogendoerfer 2021-04-28 16:33 ` [PATCH v2 3/3] dt-bindings: ata: Add device tree binding fir Mikrotik RB532 PATA controller Thomas Bogendoerfer 1 sibling, 0 replies; 5+ messages in thread From: Thomas Bogendoerfer @ 2021-04-28 16:33 UTC (permalink / raw) To: Jens Axboe, linux-ide, linux-kernel Make driver also available via device tree binding. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> --- 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), }, }; -- 2.29.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 3/3] dt-bindings: ata: Add device tree binding fir Mikrotik RB532 PATA controller 2021-04-28 16:33 [PATCH v2 1/3] ata: pata_rb532: Make driver COMPILE_TESTable Thomas Bogendoerfer 2021-04-28 16:33 ` [PATCH v2 2/3] ata: pata_rb532: Add device tree support Thomas Bogendoerfer @ 2021-04-28 16:33 ` Thomas Bogendoerfer 2021-05-03 19:28 ` Rob Herring 1 sibling, 1 reply; 5+ messages in thread From: Thomas Bogendoerfer @ 2021-04-28 16:33 UTC (permalink / raw) To: Jens Axboe, Rob Herring, linux-ide, devicetree, linux-kernel Add YAML devicetree binding for Mikrotik RB532 PATA controller. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> --- .../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 <tsbogend@alpha.franken.de> + +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>; + }; -- 2.29.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: ata: Add device tree binding fir Mikrotik RB532 PATA controller 2021-04-28 16:33 ` [PATCH v2 3/3] dt-bindings: ata: Add device tree binding fir Mikrotik RB532 PATA controller Thomas Bogendoerfer @ 2021-05-03 19:28 ` Rob Herring 2021-05-03 20:58 ` Thomas Bogendoerfer 0 siblings, 1 reply; 5+ messages in thread From: Rob Herring @ 2021-05-03 19:28 UTC (permalink / raw) To: Thomas Bogendoerfer; +Cc: Jens Axboe, linux-ide, devicetree, linux-kernel On Wed, Apr 28, 2021 at 06:33:36PM +0200, Thomas Bogendoerfer wrote: > Add YAML devicetree binding for Mikrotik RB532 PATA controller. > > Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> > --- > .../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 We have a common binding for this (ata/pata-common.yaml). Really, all you'd gain is how to support 2 devices is defined. Should you use that? Is CompactFlash only a single device, I don't remember. If so, is that a limitation for the board or could 2 devices be supported? > + > +maintainers: > + - Thomas Bogendoerfer <tsbogend@alpha.franken.de> > + > +properties: > + compatible: > + const: mikrotik,rb532-pata > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + gpio: '<name>-gpios' is the preferred form (even for singular). > + 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>; > + }; > -- > 2.29.2 > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: ata: Add device tree binding fir Mikrotik RB532 PATA controller 2021-05-03 19:28 ` Rob Herring @ 2021-05-03 20:58 ` Thomas Bogendoerfer 0 siblings, 0 replies; 5+ messages in thread From: Thomas Bogendoerfer @ 2021-05-03 20:58 UTC (permalink / raw) To: Rob Herring; +Cc: Jens Axboe, linux-ide, devicetree, linux-kernel On Mon, May 03, 2021 at 02:28:05PM -0500, Rob Herring wrote: > On Wed, Apr 28, 2021 at 06:33:36PM +0200, Thomas Bogendoerfer wrote: > > Add YAML devicetree binding for Mikrotik RB532 PATA controller. > > > > Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> > > --- > > .../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 > > We have a common binding for this (ata/pata-common.yaml). Really, all > you'd gain is how to support 2 devices is defined. Should you use that? > Is CompactFlash only a single device, I don't remember. If so, is that a > limitation for the board or could 2 devices be supported? there is only one device possible. So what do I need to put into the yaml file for the driver ? Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-05-03 20:59 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-04-28 16:33 [PATCH v2 1/3] ata: pata_rb532: Make driver COMPILE_TESTable Thomas Bogendoerfer 2021-04-28 16:33 ` [PATCH v2 2/3] ata: pata_rb532: Add device tree support Thomas Bogendoerfer 2021-04-28 16:33 ` [PATCH v2 3/3] dt-bindings: ata: Add device tree binding fir Mikrotik RB532 PATA controller Thomas Bogendoerfer 2021-05-03 19:28 ` Rob Herring 2021-05-03 20:58 ` Thomas Bogendoerfer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox