[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 --- include/li

[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 --- arch/blackfin/mach-bf537/boards/stamp.c | 2 +- arch/blackfin/mach-bf561/boards/acvilon.c | 2 +- 2 fi

[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 --- drivers/mtd/nand/cafe_nand.c | 34 ++ drivers/mtd/nand/pxa3xx_na

[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 --- arch/cris/arch-v32/drivers/mach-a3/nandflash.c | 2 +- arch/cris/arch-v32/drivers/mach-fs/nandflash.c | 2 +-

[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 --- Documentation/DocBook/mtdnand.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[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 --- arch/mips/alchemy/devboards/db1200.c | 2 +- arch/mips/alchemy/devboards/db1300.c | 2 +- arch/mips/alch

[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 --- drivers/mtd/nand/nand_base.c | 84 ++-- drivers/mtd/nand/nand_bbt.c |

[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 --- arch/sh/boards/mach-migor/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch

[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 --- drivers/staging/mt29f_spinand/mt29f_spinand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/mt29f_spin

[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 --- Documentation/DocBook/mtdnand.tmpl | 31 +++ 1 file changed, 15 insertions

[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 Cc: Julia Lawall --- Most of those changes were generate with this coccinelle

[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 --- 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 index 056d165..c4e39ff 100644 --- a/include

[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 --- drivers/staging/mt29f_spinand/mt29f_spinand.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/mt29f_spinand/mt29f_spinand.c b/drivers

[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 --- Most of those changes were generate with this coccinelle script: http

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

2015-11-16 Thread Boris Brezillon
l NAND controller drivers. Signed-off-by: Boris Brezillon --- 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/nand.h +++ b/include/linux/mtd/nand.h @@

[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 --- Patch generated with the following coccinelle script: ---8< virtual

[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 --- Patch generated with the following coccinelle script: ---8< virtual

[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 --- Patch generated with the following coccinelle script: ---8< virtual

[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 --- driv

[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 --- include/linux/mtd/nand.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/linux

[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 --- drivers/staging/mt29f_spinand/mt29f_spinand.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/mt29f_spin

[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 --- arch/arm/mach-ixp4xx/ixdp425-setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/m

[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 --- 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 c4e39ff..8ec071e 100644 --- a/include/linux/mtd

[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 --- drivers/mtd/nand/nand_base.c

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

2015-10-27 Thread Boris Brezillon
ed 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 m

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

2015-10-27 Thread Boris Brezillon
don't think there are multiple gpios 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 ev

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 wrote: > On 07/09, Boris Brezillon wrote: > > Hi Stephen, > > > > On Wed, 08 Jul 2015 11:07:42 -0700 > > Stephen Boyd wrote: > > > > > On 07/08/2015 02:00 AM, Boris Brezillon wrote: > > > > H

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 wrote: > On 07/08/2015 02:00 AM, Boris Brezillon wrote: > > Hi Stephen, > > > > On Tue, 7 Jul 2015 17:57:48 -0700 > > Stephen Boyd wrote: > > > >> On 07/07, Boris Brezillon wrote: > >

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 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

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

2015-07-07 Thread Boris Brezillon
aximum clock inaccuracy or other things that are not yet supported by the CCF (power consumption constraints ?). Signed-off-by: Boris Brezillon CC: Jonathan Corbet CC: Tony Lindgren CC: Ralf Baechle CC: "Emilio López" CC: Maxime Ripard CC: Tero Kristo CC: Peter De Schrijver CC:

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 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

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 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 us

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

2015-07-06 Thread Boris Brezillon
aximum clock inaccuracy or other things that are not yet supported by the CCF (power consumption constraints ?). Signed-off-by: Boris Brezillon CC: Jonathan Corbet CC: Tony Lindgren CC: Ralf Baechle CC: "Emilio López" CC: Maxime Ripard CC: Tero Kristo CC: Peter De Schrijver CC:

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 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

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 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 return

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

2015-06-03 Thread Boris Brezillon
Hi Stefen, On Wed, 3 Jun 2015 16:37:28 -0700 Stephen Boyd 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

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 wrote: > Signed-off-by: Geert Uytterhoeven Acked-by: Boris Brezillon > --- > drivers/clk/at91/clk-main.c | 2 +- > drivers/clk/at91/clk-master.c | 2 +- > drivers/clk/at91/clk-programmable.c | 2 +- > dr

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 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 reque

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

2015-04-17 Thread Boris Brezillon
ype 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 --- CC: Jonathan Corbet CC: Tony Lindgren CC: Ralf Baechle CC: "Emilio López" CC: Maxime Ripard CC: Tero K

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 wrote: > Use the new handle_domain_irq method to handle interrupts. > > Signed-off-by: Marc Zyngier Acked-by: Boris Brezillon > --- > drivers/irqchip/irq-atmel-aic.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-)

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 wrote: > Use the new handle_domain_irq method to handle interrupts. > > Signed-off-by: Marc Zyngier Acked-by: Boris Brezillon > --- > drivers/irqchip/irq-atmel-aic5.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(

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

<    1   2