lkml.org 
[lkml]   [2018]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [RFC PATCH] mtd: rawnand: ams-delta: use ->exec_op()
    Date
    On Thursday, October 4, 2018 3:59:33 PM CEST Boris Brezillon wrote:
    > On Thu, 04 Oct 2018 15:52:57 +0200
    > Janusz Krzysztofik <jmkrzyszt@gmail.com> wrote:
    >
    > > Hi Boris,
    > >
    > > On Wednesday, October 3, 2018 4:06:34 PM CEST Boris Brezillon wrote:
    > > > On Wed, 03 Oct 2018 15:55:25 +0200
    > > > Janusz Krzysztofik <jmkrzyszt@gmail.com> wrote:
    > > >
    > > > > > >
    > > > > > > Implementation of NAND_OP_WAITRDY_INSTR has been based on legacy
    > > > > > > nand_wait_ready(),
    > > > > >
    > > > > > I don't remember what the ams-delta ->dev_ready()/->waitfunc() hooks
    > > > > > are doing, but is shouldn't be too hard to replace them by an
    > > > > > ams_delta_wait_ready() func.
    > > > >
    > > > > Default nand_wait() is used as ->waitfunc(), and ->dev_ready() returns
    R/B
    > > > > GPIO pin status.
    > > >
    > > > Okay. Then it might make sense to provide a generic helper to poll a
    > > > gpio.
    > > >
    > > > void nand_gpio_waitrdy(struct nand_chip *chip, struct gpio_desc *gpiod)
    > > > {
    > > > ...
    > > > }
    > >
    > > How about a still more generic helper which accepts dev_ready() callback
    as an
    > > argument?
    >
    > Nope, I still prefer the GPIO based one. We'll see if others need a
    > a more generic helper, but I doubt it.

    OK.

    Legacy nand_wait_ready() uses a hardcoded timeout value of 400 ms. Should we
    follow the same approach in nand_gpio_waitrdy(), or should we rather let
    drivers pass the timeout value, like in case of nand_soft_waitrdy()?

    Thanks,
    Janusz


    \
     
     \ /
      Last update: 2018-10-04 16:11    [W:3.518 / U:0.660 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site