lkml.org 
[lkml]   [2018]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] mtd: rawnand: ams-delta: use ->exec_op()
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)
{
...
}

>
> > > otherwise that function would probabaly have to be
> >
> > ^ probably
>
> Do you think other drivers which now provide ->dev_ready() won't require
> reimplementation of nand_wait_ready()?

It depends. I mean, most controllers support native R/B sensing, and in
case they do actually require you to poll the RB pin status, duplicating
the wait_ready() logic shouldn't be a problem. On the other hand, I
really want to get rid of ->dev_ready().

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