From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pd0-x230.google.com ([2607:f8b0:400e:c02::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X9Pzy-0003qI-H8 for linux-mtd@lists.infradead.org; Tue, 22 Jul 2014 02:40:14 +0000 Received: by mail-pd0-f176.google.com with SMTP id y10so10184060pdj.7 for ; Mon, 21 Jul 2014 19:39:50 -0700 (PDT) Date: Mon, 21 Jul 2014 19:39:47 -0700 From: Brian Norris To: Boris BREZILLON Subject: Re: [PATCH 2/2] mtd: nand: add ONFI timing mode to nand_timings converter Message-ID: <20140722023947.GZ7537@ld-irv-0074> References: <1405064982-11456-1-git-send-email-boris.brezillon@free-electrons.com> <1405064982-11456-3-git-send-email-boris.brezillon@free-electrons.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1405064982-11456-3-git-send-email-boris.brezillon@free-electrons.com> Cc: linux-mtd@lists.infradead.org, Lee Jones , David Woodhouse , linux-kernel@vger.kernel.org List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, Jul 11, 2014 at 09:49:42AM +0200, Boris BREZILLON wrote: > --- /dev/null > +++ b/drivers/mtd/nand/nand_timings.c > @@ -0,0 +1,250 @@ > +/* > + * Copyright (C) 2014 Free Electrons > + * > + * Author: Boris BREZILLON > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + * > + */ > +#include [...] > +/** > + * onfi_async_timing_mode_to_sdr_timings - [NAND Interface] Retrieve NAND > + * timings according to the given ONFI timing mode > + * @mode: ONFI timing mode > + */ > +const struct nand_sdr_timings *onfi_async_timing_mode_to_sdr_timings(int mode) > +{ > + if (mode < 0 || mode >= ARRAY_SIZE(onfi_sdr_timings)) Might need for this. > + return ERR_PTR(-EINVAL); And for this. > + > + return &onfi_sdr_timings[mode]; > +} > +EXPORT_SYMBOL(onfi_async_timing_mode_to_sdr_timings); for this. I'll squash in the appended diff. Brian diff --git a/drivers/mtd/nand/nand_timings.c b/drivers/mtd/nand/nand_timings.c index f154780cf60f..8b36253420fa 100644 --- a/drivers/mtd/nand/nand_timings.c +++ b/drivers/mtd/nand/nand_timings.c @@ -8,6 +8,9 @@ * published by the Free Software Foundation. * */ +#include +#include +#include #include static const struct nand_sdr_timings onfi_sdr_timings[] = {