Re: [RFC PATCH] gpio: add GPIO hogging mechanism

2013-12-30 Thread boris brezillon
Hello, On 19/12/2013 19:22, Felipe Balbi wrote: On Thu, Dec 19, 2013 at 06:18:40PM +0100, boris brezillon wrote: Hello Felipe, On 19/12/2013 17:47, Felipe Balbi wrote: On Thu, Dec 19, 2013 at 08:41:09AM -0800, Greg Kroah-Hartman wrote: On Thu, Dec 19, 2013 at 03:34:31PM +0100, Boris

Re: [PATCH v2 20/26] irqchip: atmel-aic5: convert to handle_domain_irq

2014-09-01 Thread Boris BREZILLON
On Tue, 26 Aug 2014 11:03:35 +0100 Marc Zyngier marc.zyng...@arm.com wrote: Use the new handle_domain_irq method to handle interrupts. Signed-off-by: Marc Zyngier marc.zyng...@arm.com Acked-by: Boris Brezillon boris.brezil...@free-electrons.com --- drivers/irqchip/irq-atmel-aic5.c | 4

Re: [PATCH v2 19/26] irqchip: atmel-aic: convert to handle_domain_irq

2014-09-01 Thread Boris BREZILLON
On Tue, 26 Aug 2014 11:03:34 +0100 Marc Zyngier marc.zyng...@arm.com wrote: Use the new handle_domain_irq method to handle interrupts. Signed-off-by: Marc Zyngier marc.zyng...@arm.com Acked-by: Boris Brezillon boris.brezil...@free-electrons.com --- drivers/irqchip/irq-atmel-aic.c | 4

[PATCH 2/2] clk: change clk_ops' -determine_rate() prototype

2015-04-17 Thread Boris Brezillon
to return 0 or an error code, and pass the requested rate as a pointer so that it can be adjusted depending on hardware capabilities. Signed-off-by: Boris Brezillon boris.brezil...@free-electrons.com --- CC: Jonathan Corbet cor...@lwn.net CC: Tony Lindgren t...@atomide.com CC: Ralf Baechle r...@linux

Re: [PATCH 1/2] clk: change clk_ops' -round_rate() prototype

2015-04-19 Thread Boris Brezillon
Hi Heiko, On Sun, 19 Apr 2015 14:13:04 +0200 Heiko Stübner he...@sntech.de wrote: Hi Boris, Am Freitag, 17. April 2015, 09:29:28 schrieb Boris Brezillon: Clock rates are stored in an unsigned long field, but -round_rate() (which returns a rounded rate from a requested one) returns a long

Re: [PATCH v2 1/2] clk: change clk_ops' -round_rate() prototype

2015-06-05 Thread Boris Brezillon
Hi Jon, On Fri, 5 Jun 2015 09:46:09 +0100 Jon Hunter jonath...@nvidia.com wrote: On 05/06/15 00:02, Paul Walmsley wrote: Hi folks just a brief comment on this one: On Thu, 30 Apr 2015, Boris Brezillon wrote: Clock rates are stored in an unsigned long field, but -round_rate

Re: [PATCH v2 1/2] clk: change clk_ops' -round_rate() prototype

2015-06-05 Thread Boris Brezillon
Hi Paul, On Thu, 4 Jun 2015 23:02:25 + (UTC) Paul Walmsley p...@pwsan.com wrote: Hi folks just a brief comment on this one: On Thu, 30 Apr 2015, Boris Brezillon wrote: Clock rates are stored in an unsigned long field, but -round_rate() (which returns a rounded rate from

Re: [PATCH v3] clk: change clk_ops' -determine_rate() prototype

2015-06-04 Thread Boris Brezillon
Hi Stefen, On Wed, 3 Jun 2015 16:37:28 -0700 Stephen Boyd sb...@codeaurora.org wrote: On 05/20, Boris Brezillon wrote: Clock rates are stored in an unsigned long field, but -determine_rate() (which returns a rounded rate from a requested one) returns a long value (errors are reported

Re: [PATCH 1/5] clk: at91: Use of_clk_get_parent_count() instead of open coding

2015-05-30 Thread Boris Brezillon
On Fri, 29 May 2015 11:25:45 +0200 Geert Uytterhoeven geert+rene...@glider.be wrote: Signed-off-by: Geert Uytterhoeven geert+rene...@glider.be Acked-by: Boris Brezillon boris.brezil...@free-electrons.com --- drivers/clk/at91/clk-main.c | 2 +- drivers/clk/at91/clk-master.c

Re: [PATCH v3] clk: change clk_ops' -determine_rate() prototype

2015-07-06 Thread Boris Brezillon
On Wed, 3 Jun 2015 16:37:28 -0700 Stephen Boyd sb...@codeaurora.org wrote: On 05/20, Boris Brezillon wrote: Clock rates are stored in an unsigned long field, but -determine_rate() (which returns a rounded rate from a requested one) returns a long value (errors are reported using negative

[PATCH v4] clk: change clk_ops' -determine_rate() prototype

2015-07-06 Thread Boris Brezillon
clock inaccuracy or other things that are not yet supported by the CCF (power consumption constraints ?). Signed-off-by: Boris Brezillon boris.brezil...@free-electrons.com CC: Jonathan Corbet cor...@lwn.net CC: Tony Lindgren t...@atomide.com CC: Ralf Baechle r...@linux-mips.org CC: Emilio López emi

Re: [PATCH v4] clk: change clk_ops' -determine_rate() prototype

2015-07-06 Thread Boris Brezillon
Hi Stephen, On Mon, 6 Jul 2015 14:32:10 -0700 Stephen Boyd sb...@codeaurora.org wrote: On 07/06, Boris Brezillon wrote: Clock rates are stored in an unsigned long field, but -determine_rate() (which returns a rounded rate from a requested one) returns a long value (errors are reported

[PATCH v5] clk: change clk_ops' -determine_rate() prototype

2015-07-07 Thread Boris Brezillon
clock inaccuracy or other things that are not yet supported by the CCF (power consumption constraints ?). Signed-off-by: Boris Brezillon boris.brezil...@free-electrons.com CC: Jonathan Corbet cor...@lwn.net CC: Tony Lindgren t...@atomide.com CC: Ralf Baechle r...@linux-mips.org CC: Emilio López emi

Re: [PATCH v5] clk: change clk_ops' -determine_rate() prototype

2015-07-14 Thread Boris Brezillon
On Mon, 13 Jul 2015 16:02:18 -0700 Stephen Boyd sb...@codeaurora.org wrote: On 07/09, Boris Brezillon wrote: Hi Stephen, On Wed, 08 Jul 2015 11:07:42 -0700 Stephen Boyd sb...@codeaurora.org wrote: On 07/08/2015 02:00 AM, Boris Brezillon wrote: Hi Stephen, On Tue, 7 Jul

Re: [PATCH v3 18/27] mtd: nand: omap2: Implement NAND ready using gpiolib

2015-10-27 Thread Boris Brezillon
for r/b# function. Because it's supposed to be a generic binding, and some NAND chips embed several dies, thus exposing several CS and RB pins, hence the rb-gpios name. Also, as described here [1], the convention is to name your property -gpios even if you only need one gpio. Best Regards, Boris [

Re: [PATCH v3 18/27] mtd: nand: omap2: Implement NAND ready using gpiolib

2015-10-27 Thread Boris Brezillon
led the ->dev_ready() or ->waitfunc() fields, and to choose how to implement it he may need to know which kind of RB handler should be used (this is the case in the sunxi driver, where the user can either use a GPIO or native R/B pin directly connected to the controller). All this makes me thin

[PATCH 13/27] mtd: nand: add nand_to_mtd() helper

2015-11-16 Thread Boris Brezillon
Add a new helper to retrieve the MTD device attached to a NAND chip. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- include/linux/mtd/nand.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index c

[PATCH 22/27] mtd: nand: simplify nand_dt_init() usage

2015-11-16 Thread Boris Brezillon
nand_dt_init() function requires 3 arguments where it actually needs one (dn and mtd can both be retrieved from chip). Drop these parameters. Testing for dn != NULL inside nand_dt_init() also helps simplifying the caller code. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.

[PATCH 16/27] staging: mt29f_spinand: use the mtd instance embedded in struct nand_chip

2015-11-16 Thread Boris Brezillon
struct nand_chip now embeds an mtd device, use it instead of allocating a new one. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/staging/mt29f_spinand/mt29f_spinand.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/s

[PATCH 09/27] mtd: nand: make use of mtd_to_nand() in NAND core code

2015-11-16 Thread Boris Brezillon
mtd_to_nand() was recently introduced to avoid direct access to the mtd->priv field. Update core code to use mtd_to_nand(). Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/nand_base.c | 84 ++-- drivers

[PATCH 08/27] sh: nand: make use of mtd_to_nand() where appropriate

2015-11-16 Thread Boris Brezillon
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all SH specific implementations to use this helper. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- arch/sh/boards/mach-migor/setup.c | 2 +- 1 file changed, 1 insert

[PATCH 11/27] staging: mt29f_spinand: make use of mtd_to_nand()

2015-11-16 Thread Boris Brezillon
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Use it where appropriate. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/staging/mt29f_spinand/mt29f_spinand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH 07/27] mips: nand: make use of mtd_to_nand() where appropriate

2015-11-16 Thread Boris Brezillon
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all MIPS specific implementations to use this helper. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- arch/mips/alchemy/devboards/db1200.c | 2 +- arch/mips/alchemy/

[PATCH 25/27] ARM: make use of nand_set/get_controller_data() helpers

2015-11-16 Thread Boris Brezillon
New helpers have been added to avoid directly accessing chip->field. Use them where appropriate. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- arch/arm/mach-ixp4xx/ixdp425-setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH 27/27] staging: mt29f_spinand: make use of nand_set/get_controller_data() helpers

2015-11-16 Thread Boris Brezillon
New helpers have been added to avoid directly accessing chip->field. Use them where appropriate. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/staging/mt29f_spinand/mt29f_spinand.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) d

[PATCH 05/27] blackfin: nand: make use of mtd_to_nand() where appropriate

2015-11-16 Thread Boris Brezillon
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all blackfin specific implementations to use this helper. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- arch/blackfin/mach-bf537/boards/stamp.c | 2 +- arch/blac

[PATCH 01/27] mtd: nand: fix drivers abusing mtd->priv

2015-11-16 Thread Boris Brezillon
bit fragile. Fix that by setting mtd->priv to point the nand_chip field and assigning chip->priv to the private structure head. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/cafe_nand.c | 34 ++ drivers/mtd/nan

[PATCH 02/27] mtd: nand: add an mtd_to_nand() helper

2015-11-16 Thread Boris Brezillon
Some drivers are retrieving the nand_chip pointer using the container_of macro on a struct wrapping both the nand_chip and the mtd_info struct while the standard way of retrieving this pointer is through mtd->priv. Provide an helper to do that. Signed-off-by: Boris Brezillon <boris.brezil..

[PATCH 00/27] mtd: nand: refactor the NAND subsystem (part 1)

2015-11-16 Thread Boris Brezillon
ncepts, and getting rid of more boilerplate code in NAND controller drivers. Stay tuned ;-). Best Regards, Boris Boris Brezillon (27): mtd: nand: fix drivers abusing mtd->priv mtd: nand: add an mtd_to_nand() helper mtd: nand: update examples in the documentation to use mtd_to_nand()

[PATCH 06/27] cris: nand: make use of mtd_to_nand() where appropriate

2015-11-16 Thread Boris Brezillon
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all CRIS specific implementations to use this helper. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- arch/cris/arch-v32/drivers/mach-a3/nandflash.c | 2 +- arch/cris

[PATCH 03/27] mtd: nand: update examples in the documentation to use mtd_to_nand()

2015-11-16 Thread Boris Brezillon
mtd_to_nand() has been introduced to hide accesses to mtd->priv. All NAND controller drivers should use it instead of directly accessing the ->priv field. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Documentation/DocBook/mtdnand.tmpl | 4 ++-- 1 fil

[PATCH 15/27] mtd: nand: update the documentation to reflect framework changes

2015-11-16 Thread Boris Brezillon
The MTD device is now directly embedded in the nand_chip struct. Update the mtdnand documentation to mention this aspect and fix the different examples. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Documentation/DocBook/mtdnand.tmp

[PATCH 14/27] mtd: nand: use the mtd instance embedded in struct nand_chip

2015-11-16 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Patch all drivers to make use of this mtd instance instead of using the instance embedded in their private struct or dynamically allocated. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> Cc: Julia Lawall <julia.law..

[PATCH 12/27] mtd: nand: embed an mtd_info structure into nand_chip

2015-11-16 Thread Boris Brezillon
. This change will also help factorizing boilerplate code copied in all NAND drivers. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- include/linux/mtd/nand.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h

[PATCH 23/27] mtd: nand: kill the chip->flash_node field

2015-11-16 Thread Boris Brezillon
Now that the nand_chip struct directly embeds an mtd_info struct we can get rid of the ->flash_node field and forward set/get_flash_node requests to the MTD layer. As a side effect, we no longer need the mtd_set_of_node() call done in nand_dt_init(). Signed-off-by: Boris Brezillon <boris.

[PATCH 19/27] mtd: nand: remove useless mtd->priv = chip assignments

2015-11-16 Thread Boris Brezillon
mtd_to_nand_chip() now uses the container_of() approach to transform an mtd_info pointer into a nand_chip one. Drop useless mtd->priv assignments from NAND controller drivers. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Patch generated with the following c

[PATCH 24/27] mtd: nand: add helpers to access ->priv

2015-11-16 Thread Boris Brezillon
Add two helpers to access the field reserved for private controller data. This makes it clearer what this field is reserved for and ease future refactoring. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- include/linux/mtd/nand.h | 10 ++ 1 file chang

[PATCH 04/27] ARM: nand: make use of mtd_to_nand() where appropriate

2015-11-16 Thread Boris Brezillon
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all ARM specific implementations to use this helper. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- arch/arm/mach-ep93xx/snappercl15.c | 4 ++-- arch/arm/mach-ep93xx

[PATCH 20/27] cris: nand: remove useless mtd->priv = chip assignments

2015-11-16 Thread Boris Brezillon
mtd_to_nand_chip() now uses the container_of() approach to transform an mtd_info pointer into a nand_chip one. Drop useless mtd->priv assignments from NAND controller drivers. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Patch generated with the following c

[PATCH 21/27] staging: mt29f_spinand: remove useless mtd->priv = chip assignment

2015-11-16 Thread Boris Brezillon
mtd_to_nand_chip() now uses the container_of() approach to transform an mtd_info pointer into a nand_chip one. Drop useless mtd->priv assignments from NAND controller drivers. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Patch generated with the following c

[PATCH 17/27] cris: nand: use the mtd instance embedded in struct nand_chip

2015-11-16 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Patch all drivers to make use of this mtd instance instead of using the instance embedded in their private struct or dynamically allocated. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Most of those changes were ge

[PATCH 18/27] mtd: nand: update mtd_to_nand()

2015-11-16 Thread Boris Brezillon
l NAND controller drivers. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- include/linux/mtd/nand.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 8ec071e..873646d 100644 --- a/include/linux/mtd/

Re: [PATCH 14/27] mtd: nand: use the mtd instance embedded in struct nand_chip

2015-11-17 Thread Boris Brezillon
nditional statements). And, as you stated, we might want to keep direct calls to nand_to_mtd() if it's only called once in a function context. I'm pretty sure we could describe all those cases with specific context description, but I must admit that it takes less time for me to fix those specific

Re: [PATCH v5] clk: change clk_ops' -determine_rate() prototype

2015-07-08 Thread Boris Brezillon
Hi Stephen, On Tue, 7 Jul 2015 17:57:48 -0700 Stephen Boyd sb...@codeaurora.org wrote: On 07/07, Boris Brezillon wrote: Clock rates are stored in an unsigned long field, but -determine_rate() (which returns a rounded rate from a requested one) returns a long value (errors are reported

Re: [PATCH v5] clk: change clk_ops' -determine_rate() prototype

2015-07-09 Thread Boris Brezillon
Hi Stephen, On Wed, 08 Jul 2015 11:07:42 -0700 Stephen Boyd sb...@codeaurora.org wrote: On 07/08/2015 02:00 AM, Boris Brezillon wrote: Hi Stephen, On Tue, 7 Jul 2015 17:57:48 -0700 Stephen Boyd sb...@codeaurora.org wrote: On 07/07, Boris Brezillon wrote: } else

Re: [PATCH 14/27] mtd: nand: use the mtd instance embedded in struct nand_chip

2015-11-17 Thread Boris Brezillon
Hi Brian, On Mon, 16 Nov 2015 19:00:19 -0800 Brian Norris <computersforpe...@gmail.com> wrote: > Hi Boris, > > On Mon, Nov 16, 2015 at 02:37:47PM +0100, Boris Brezillon wrote: > > struct nand_chip now embeds an mtd device. Patch all drivers to make use > > of this mt

Re: [PATCH 18/27] mtd: nand: update mtd_to_nand()

2015-11-17 Thread Boris Brezillon
On Mon, 16 Nov 2015 19:03:53 -0800 Brian Norris <computersforpe...@gmail.com> wrote: > On Mon, Nov 16, 2015 at 02:37:51PM +0100, Boris Brezillon wrote: > > Now that all drivers are using the mtd instance embedded in the nand_chip > > Do you have a script that verifies th

[PATCH v3 17/25] mtd: nand: remove useless mtd->priv = chip assignments

2015-12-02 Thread Boris Brezillon
mtd_to_nand() now uses the container_of() approach to transform an mtd_info pointer into a nand_chip one. Drop useless mtd->priv assignments from NAND controller drivers. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Patch generated with the following coccinel

Re: [PATCH v2 17/25] mtd: nand: remove useless mtd->priv = chip assignments

2015-12-02 Thread Boris Brezillon
Hi Brian, On Tue, 1 Dec 2015 14:17:47 -0800 Brian Norris <computersforpe...@gmail.com> wrote: > On Tue, Dec 01, 2015 at 12:03:14PM +0100, Boris Brezillon wrote: > > mtd_to_nand() now uses the container_of() approach to transform an > > mtd_info pointer into a nand_chip

Re: [PATCH v3 18/27] mtd: nand: omap2: Implement NAND ready using gpiolib

2015-12-03 Thread Boris Brezillon
On Tue, Oct 27, 2015 at 09:28:32AM +0100, Boris Brezillon wrote: > > On Mon, 26 Oct 2015 13:49:00 -0700 > > Brian Norris <computersforpe...@gmail.com> wrote: > > > On Fri, Sep 18, 2015 at 05:53:40PM +0300, Roger Quadros wrote: > > > > @@ -1782,7

Re: [PATCH v2 00/25] mtd: nand: refactor the NAND subsystem (part 1)

2015-12-09 Thread Boris Brezillon
Hi Brian, On Tue, 8 Dec 2015 16:36:24 -0800 Brian Norris <computersforpe...@gmail.com> wrote: > Hi, > > On Tue, Dec 01, 2015 at 12:02:57PM +0100, Boris Brezillon wrote: > > Hello, > > > > This huge series aims at clarifying the relationship between the

Re: [PATCH v3 bis 12/25] mtd: nand: use the mtd instance embedded in struct nand_chip

2015-12-09 Thread Boris Brezillon
hose changes one more time, but from my experience, these kind of bugs are spotted more easily by people who didn't write the code, so other reviews are more than welcome. Also, as you suggested, I'll split the changes in several commits (one per driver) so that you can pick them independently. Than

[PATCH v5 41/58] mtd: nand: socrates: use the mtd instance embedded in struct nand_chip

2015-12-11 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes since v4: - fix build error --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __

[PATCH v5 15/58] mtd: nand: denali: use the mtd instance embedded in struct nand_chip

2015-12-11 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes since v4: - fix conflict after changes brought in v5 of patch 1 --- Changes generated with the following coccinelle script --->8--

[PATCH v5 01/58] mtd: nand: denali: add missing nand_release() call in denali_remove()

2015-12-11 Thread Boris Brezillon
Unregister the NAND device from the NAND subsystem when removing a denali NAND controller, otherwise the MTD attached to the NAND device is still exposed by the MTD layer, and accesses to this device will likely crash the system. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.

[PATCH v4 29/58] mtd: nand: nandsim: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/nandsim.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand/nandsim.c b/drive

[PATCH v4 42/58] mtd: nand: sunxi: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 37/58] mtd: nand: r852: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/r852.c | 34 +++--- drivers/mtd/nand/r852.h | 1 - 2 files changed, 15 insertions(+), 20 del

[PATCH v4 41/58] mtd: nand: socrates: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 36/58] mtd: nand: pxa3xx: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/pxa3xx_nand.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/drive

[PATCH v4 34/58] mtd: nand: pasemi: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/pasemi_nand.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/nand/pasemi_na

[PATCH v4 43/58] mtd: nand: tmio: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 15/58] mtd: nand: denali: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 18/58] mtd: nand: fsl_elbc: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 14/58] mtd: nand: davinci: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 16/58] mtd: nand: diskonchip: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/diskonchip.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/nand/diskonch

[PATCH v4 12/58] mtd: nand: cmx270: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/cmx270_nand.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/nand/cmx270_na

[PATCH v4 09/58] mtd: nand: bf5xx: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 39/58] mtd: nand: sh_flctl: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 40/58] mtd: nand: sharpsl: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 45/58] mtd: nand: vf610: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 26/58] mtd: nand: lpc32xx: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 11/58] mtd: nand: cafe: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/cafe_nand.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/nand/cafe_nand.c b/drive

[PATCH v4 13/58] mtd: nand: cs553x: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/cs553x_nand.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/mtd/nand/cs553x_na

[PATCH v4 10/58] mtd: nand: brcm: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 08/58] mtd: nand: bcm47xx: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 05/58] mtd: nand: ams-delta: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance instead of allocating our own. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/ams-delta.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/d

[PATCH v4 07/58] mtd: nand: au1550nd: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 04/58] mtd: nand: omap2: create and use mtd_to_omap()

2015-12-10 Thread Boris Brezillon
Define and use mtd_to_omap() instead of container_of(); Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/omap2.c | 55 ++-- 1 file changed, 21 insertions(+), 34 deletions(-) diff --git a/drivers/mtd/nand/o

[PATCH v4 01/58] mtd: nand: denali: add missing nand_release() call in denali_remove()

2015-12-10 Thread Boris Brezillon
Unregister the NAND device from the NAND subsystem when removing a denali NAND controller, otherwise the MTD attached to the NAND device is still exposed by the MTD layer, and accesses to this device will likely crash the system. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.

[PATCH v4 00/58] mtd: nand: refactor the NAND subsystem (part 1)

2015-12-10 Thread Boris Brezillon
fixed some modifications omitted by the coccinelle scripts - manually reworked modifactions done by coccinelle scripts to improve readability and fix coding style issues *** BLURB HERE *** Boris Brezillon (58): mtd: nand: denali: add missing nand_release() call in denali_remove() mtd: nand

[PATCH v4 06/58] mtd: nand: atmel: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 30/58] mtd: nand: ndfc: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 28/58] mtd: nand: mxc: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 33/58] mtd: nand: orion: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/orion_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mt

[PATCH v4 47/58] staging: mt29f_spinand: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device, use it instead of allocating a new one. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/staging/mt29f_spinand/mt29f_spinand.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/s

[PATCH v4 46/58] mtd: nand: update the documentation to reflect framework changes

2015-12-10 Thread Boris Brezillon
The MTD device is now directly embedded in the nand_chip struct. Update the mtdnand documentation to mention this aspect and fix the different examples. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Documentation/DocBook/mtdnand.tmp

[PATCH v4 49/58] mtd: nand: update mtd_to_nand()

2015-12-10 Thread Boris Brezillon
roller drivers. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- include/linux/mtd/nand.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index b614ed2..9cb7ace 100644 --- a/include/linux/mtd/

[PATCH v4 48/58] cris: nand: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Patch all drivers to make use of this mtd instance instead of using the instance embedded in their private struct or dynamically allocated. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Most of those changes were gen

[PATCH v4 50/58] mtd: nand: remove useless mtd->priv = chip assignments

2015-12-10 Thread Boris Brezillon
mtd_to_nand() now uses the container_of() approach to transform an mtd_info pointer into a nand_chip one. Drop useless mtd->priv assignments from NAND controller drivers. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Patch generated with the following coccinel

[PATCH v4 44/58] mtd: nand: txx9ndfmc: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; ty

[PATCH v4 03/58] mtd: nand: nuc900: create and use mtd_to_nuc900()

2015-12-10 Thread Boris Brezillon
Create and use mtd_to_nuc900() instead of direct container_of() calls. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/nuc900_nand.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/drivers/mt

[PATCH v4 02/58] mtd: nand: fsmc: create and use mtd_to_fsmc()

2015-12-10 Thread Boris Brezillon
Create and use mtd_to_fsmc() to avoid duplication of container_of(mtd, struct fsmc_nand_data, mtd) calls. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/fsmc_nand.c | 31 ++- 1 file changed, 14 insertions(+), 17 del

[PATCH v4 58/58] staging: mt29f_spinand: make use of nand_set/get_controller_data() helpers

2015-12-10 Thread Boris Brezillon
New helpers have been added to avoid directly accessing chip->field. Use them where appropriate. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/staging/mt29f_spinand/mt29f_spinand.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) d

[PATCH v4 55/58] mtd: nand: add helpers to access ->priv

2015-12-10 Thread Boris Brezillon
Add two helpers to access the field reserved for private controller data. This makes it clearer what this field is reserved for and ease future refactoring. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- include/linux/mtd/nand.h | 10 ++ 1 file chang

[PATCH v4 56/58] ARM: make use of nand_set/get_controller_data() helpers

2015-12-10 Thread Boris Brezillon
New helpers have been added to avoid directly accessing chip->field. Use them where appropriate. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- arch/arm/mach-ixp4xx/ixdp425-setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH v4 51/58] cris: nand: remove useless mtd->priv = chip assignments

2015-12-10 Thread Boris Brezillon
mtd_to_nand() now uses the container_of() approach to transform an mtd_info pointer into a nand_chip one. Drop useless mtd->priv assignments from NAND controller drivers. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Patch generated with the following coccinel

[PATCH v4 52/58] staging: mt29f_spinand: remove useless mtd->priv = chip assignment

2015-12-10 Thread Boris Brezillon
mtd_to_nand() now uses the container_of() approach to transform an mtd_info pointer into a nand_chip one. Drop useless mtd->priv assignments from NAND controller drivers. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Patch generated with the following coccinel

[PATCH v4 53/58] mtd: nand: simplify nand_dt_init() usage

2015-12-10 Thread Boris Brezillon
nand_dt_init() function requires 3 arguments where it actually needs one (dn and mtd can both be retrieved from chip). Drop these parameters. Testing for dn != NULL inside nand_dt_init() also helps simplifying the caller code. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.

[PATCH v4 54/58] mtd: nand: kill the chip->flash_node field

2015-12-10 Thread Boris Brezillon
Now that the nand_chip struct directly embeds an mtd_info struct we can get rid of the ->flash_node field and forward set/get_flash_node requests to the MTD layer. As a side effect, we no longer need the mtd_set_of_node() call done in nand_dt_init(). Signed-off-by: Boris Brezillon <boris.

  1   2   >