[PATCH v5 12/17] mtd: rawnand: tegra: convert driver to nand_scan()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26.07.2018 20:01, Boris Brezillon wrote:
> On Thu, 26 Jul 2018 18:29:36 +0200
> Stefan Agner <stefan at agner.ch> wrote:
> 
>> On 25.07.2018 15:31, Miquel Raynal wrote:
>> > Two helpers have been added to the core to do all kind of controller
>> > side configuration/initialization between the detection phase and the
>> > final NAND scan. Implement these hooks so that we can convert the driver
>> > to just use nand_scan() instead of the nand_scan_ident() +
>> > nand_scan_tail() pair.
>> >
>>
>> While the patch looks technically correct, I wonder whether the driver
>> now does what we expect it from attach logically...
>>
>> E.g. shouldn't we get the wp_gpio in attach?
> 
> Well, this series does things mechanically to avoid breaking drivers (we
> just move all the code between ident and tail into the attach hook),
> but any resource that is not needed for the identification phase and is
> tied to the NAND chip could/should be requested in the attach hook (the
> WP pin is such a resource).

Ok, that makes completely sense and I agree with that approach! However,
it is not obvious when looking at the series.

Can we mention that fact in the commit log, e.g. something like:

"To avoid breaking this patch converts the driver mechanically by just
moving all the code between ...ident and ..tail into the attach hook.
Ideally driver should request all resources tied to the NAND chip in the
attach hook."

--
Stefan

> 
> Feel free to send a patch to change that.



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux