[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231108165359.33dccef0@xps-13>
Date: Wed, 8 Nov 2023 16:53:59 +0100
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Aaro Koskinen <aaro.koskinen@....fi>,
Janusz Krzysztofik <jmkrzyszt@...il.com>,
Tony Lindgren <tony@...mide.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Ben Dooks <ben.dooks@...ethink.co.uk>,
linux-omap@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org,
devicetree@...r.kernel.org, linux-mips@...r.kernel.org
Subject: Re: [PATCH 4/6] mtd: rawnand: gpio: Use device properties
Hi Linus,
linus.walleij@...aro.org wrote on Wed, 08 Nov 2023 15:33:52 +0100:
> The platform data (struct gpio_nand_platdata) isn't really used
> in any boardfile in the kernel: the only probe path is from
> device tree.
>
> Convert the driver to not use the platform data header at all
> and read out the device tree properties using device
> properties so we don't need to have the driver be exclusively
> device tree either: ACPI or software nodes work fine if
> need be. Drop the ifdeffery around CONFIG_OF as a consequence.
>
> The code reads "bank-width" to plat->options flags and passes
> it directly to the NAND chip struct, so just assign this
> directly to the chip instead.
>
> The code reads one property "chip-delay" that it stores
> in pdata->delay and never use, so drop this altogether.
> If timings should be supported this can probably be done in
> a more detailed way using the new elaborate timings structs
> that exist for NAND.
>
> The platform data contains a callback to augment partitions,
> but since there are no board files using this platform
> data to define a gpio NAND device, this is never used so
> the code handling it can be deleted.
Nice cleanup. I'm a bit more reluctant on the bindings side, I'll come
back to it later, but the driver side looks neat.
Thanks,
Miquèl
Powered by blists - more mailing lists