Re: [PATCH v2 1/7] spi: spi-ep93xx: remove io wrappers

2017-08-08 Thread Chris Packham
On 08/08/17 21:42, Mark Brown wrote: > On Fri, Aug 04, 2017 at 12:00:17PM +1200, Chris Packham wrote: >> From: H Hartley Sweeten >> >> The io wrappers just add obfuscation to the driver. Remove them. >> >> Signed-off-by: H Hartley Sweeten >> --- > >

[RESEND PATCH 2/4] dt-bindings: add "reduced-width" property for Armada XP SDRAM controller

2017-08-06 Thread Chris Packham
Some SoC implementations that use this controller have a reduced pin count so the meaning of "full" and "half" with change. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- .../bindings/memory-controllers/mvebu-sdram-controller.txt | 6

[RESEND PATCH 1/4] ARM: dts: enable L2 cache parity and ecc on db-xc3-24g4xg board

2017-08-06 Thread Chris Packham
Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts b/arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts index 06fce3

[RESEND PATCH 4/4] EDAC: add support for reduced-width Armada-XP SDRAM

2017-08-06 Thread Chris Packham
Some integrated Armada XP SoCs use a reduced pin count so the width of the SDRAM interface is smaller than the traditional discrete SoCs. This means that the definition of "full" and "half" width is further reduced. Signed-off-by: Chris Packham <chris.pack...@alliedtele

[RESEND PATCH 1/4] ARM: dts: enable L2 cache parity and ecc on db-xc3-24g4xg board

2017-08-06 Thread Chris Packham
Signed-off-by: Chris Packham --- arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts b/arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts index 06fce35d7491..00ca489fc788 100644 --- a/arch/arm/boot/dts

[RESEND PATCH 4/4] EDAC: add support for reduced-width Armada-XP SDRAM

2017-08-06 Thread Chris Packham
Some integrated Armada XP SoCs use a reduced pin count so the width of the SDRAM interface is smaller than the traditional discrete SoCs. This means that the definition of "full" and "half" width is further reduced. Signed-off-by: Chris Packham --- drivers/edac/armada_xp_ed

[RESEND PATCH 2/4] dt-bindings: add "reduced-width" property for Armada XP SDRAM controller

2017-08-06 Thread Chris Packham
Some SoC implementations that use this controller have a reduced pin count so the meaning of "full" and "half" with change. Signed-off-by: Chris Packham --- .../bindings/memory-controllers/mvebu-sdram-controller.txt | 6 ++ 1 file changed, 6 inser

[RESEND PATCH 3/4] ARM: dts: mvebu: set reduced-width property for SDRAM on 98dx3236

2017-08-06 Thread Chris Packham
amc node to indicate this. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- arch/arm/boot/dts/armada-xp-98dx3236.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/armada-xp-98dx3236.dtsi b/arch/arm/boot/dts/armada-xp-98dx3236.dtsi index 0e12816

[RESEND PATCH 0/4] EDAC: support reduce bus width on 98dx3236

2017-08-06 Thread Chris Packham
ring a reduced pin-count when going from an external SoC to an integrated one will be reasonably common as we see more an more of these switches with integrated ARM cores. [1] - http://marc.info/?l=linux-edac=150167758312924 Chris Packham (4): ARM: dts: enable L2 cache parity and ecc on db-xc3-24g4xg

[RESEND PATCH 3/4] ARM: dts: mvebu: set reduced-width property for SDRAM on 98dx3236

2017-08-06 Thread Chris Packham
amc node to indicate this. Signed-off-by: Chris Packham --- arch/arm/boot/dts/armada-xp-98dx3236.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/armada-xp-98dx3236.dtsi b/arch/arm/boot/dts/armada-xp-98dx3236.dtsi index 0e12816d961e..4d6a2acc1b55 100644 --- a/arch/ar

[RESEND PATCH 0/4] EDAC: support reduce bus width on 98dx3236

2017-08-06 Thread Chris Packham
ring a reduced pin-count when going from an external SoC to an integrated one will be reasonably common as we see more an more of these switches with integrated ARM cores. [1] - http://marc.info/?l=linux-edac=150167758312924 Chris Packham (4): ARM: dts: enable L2 cache parity and ecc on db-xc3-24g4xg

[PATCH 1/3] dt-bindings: add "reduced-width" property for Armada XP SDRAM controller

2017-08-06 Thread Chris Packham
Some SoC implementations that use this controller have a reduced pin count so the meaning of "full" and "half" with change. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- .../bindings/memory-controllers/mvebu-sdram-controller.txt | 6

[PATCH 1/3] dt-bindings: add "reduced-width" property for Armada XP SDRAM controller

2017-08-06 Thread Chris Packham
Some SoC implementations that use this controller have a reduced pin count so the meaning of "full" and "half" with change. Signed-off-by: Chris Packham --- .../bindings/memory-controllers/mvebu-sdram-controller.txt | 6 ++ 1 file changed, 6 inser

[PATCH 3/3] EDAC: add support for reduced-width Armada-XP SDRAM

2017-08-06 Thread Chris Packham
Some integrated Armada XP SoCs use a reduced pin count so the width of the SDRAM interface is smaller than the traditional discrete SoCs. This means that the definition of "full" and "half" width is further reduced. Signed-off-by: Chris Packham <chris.pack...@alliedtele

[PATCH 2/3] ARM: dts: mvebu: set reduced-width property for SDRAM on 98dx3236

2017-08-06 Thread Chris Packham
amc node to indicate this. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- arch/arm/boot/dts/armada-xp-98dx3236.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/armada-xp-98dx3236.dtsi b/arch/arm/boot/dts/armada-xp-98dx3236.dtsi index 0e12816

[PATCH 3/3] EDAC: add support for reduced-width Armada-XP SDRAM

2017-08-06 Thread Chris Packham
Some integrated Armada XP SoCs use a reduced pin count so the width of the SDRAM interface is smaller than the traditional discrete SoCs. This means that the definition of "full" and "half" width is further reduced. Signed-off-by: Chris Packham --- drivers/edac/armada_xp_ed

[PATCH 2/3] ARM: dts: mvebu: set reduced-width property for SDRAM on 98dx3236

2017-08-06 Thread Chris Packham
amc node to indicate this. Signed-off-by: Chris Packham --- arch/arm/boot/dts/armada-xp-98dx3236.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/armada-xp-98dx3236.dtsi b/arch/arm/boot/dts/armada-xp-98dx3236.dtsi index 0e12816d961e..4d6a2acc1b55 100644 --- a/arch/ar

[PATCH v2 1/7] spi: spi-ep93xx: remove io wrappers

2017-08-03 Thread Chris Packham
From: H Hartley Sweeten The io wrappers just add obfuscation to the driver. Remove them. Signed-off-by: H Hartley Sweeten --- drivers/spi/spi-ep93xx.c | 72 +--- 1 file changed, 25

[PATCH v2 1/7] spi: spi-ep93xx: remove io wrappers

2017-08-03 Thread Chris Packham
From: H Hartley Sweeten The io wrappers just add obfuscation to the driver. Remove them. Signed-off-by: H Hartley Sweeten --- drivers/spi/spi-ep93xx.c | 72 +--- 1 file changed, 25 insertions(+), 47 deletions(-) diff --git

[PATCH v2 5/7] spi: spi-ep93xx: pass the spi_master pointer around

2017-08-03 Thread Chris Packham
From: H Hartley Sweeten Change the parameters for some of the functions so that the spi_master pointer is passed around instead of the private data ep93xx_spi pointer. This allows removing the 'pdev' member of the private data and will help with some later cleanup.

[PATCH v2 2/7] spi: spi-ep93xx: use 32-bit read/write for all registers

2017-08-03 Thread Chris Packham
32-bit read/write's for all of the registers. Signed-off-by: H Hartley Sweeten <hswee...@visionengravers.com> [chris: use u32 instead of unsigned int] Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> --- drive

[PATCH v2 5/7] spi: spi-ep93xx: pass the spi_master pointer around

2017-08-03 Thread Chris Packham
From: H Hartley Sweeten Change the parameters for some of the functions so that the spi_master pointer is passed around instead of the private data ep93xx_spi pointer. This allows removing the 'pdev' member of the private data and will help with some later cleanup. Signed-off-by: H Hartley

[PATCH v2 2/7] spi: spi-ep93xx: use 32-bit read/write for all registers

2017-08-03 Thread Chris Packham
of the registers. Signed-off-by: H Hartley Sweeten [chris: use u32 instead of unsigned int] Signed-off-by: Chris Packham Reviewed-by: Andy Shevchenko --- drivers/spi/spi-ep93xx.c | 83 ++-- 1 file changed, 38 insertions(+), 45 deletions(-) diff --git a/drivers

[PATCH v2 4/7] spi: spi-ep93xx: absorb the interrupt enable/disable helpers

2017-08-03 Thread Chris Packham
From: H Hartley Sweeten <hswee...@visionengravers.com> These are each only called once. Just absorb them into the callers. Signed-off-by: H Hartley Sweeten <hswee...@visionengravers.com> [chris: use u32 instead of unsigned int] Signed-off-by: Chris Packham <chris.pack...@alli

[PATCH v2 6/7] spi: spi-ep93xx: remove private data 'current_msg'

2017-08-03 Thread Chris Packham
From: H Hartley Sweeten The currently in-flight message can be found from the spi master. Use that instead and remove the private data pointer. Signed-off-by: H Hartley Sweeten Reviewed-by: Andy Shevchenko

[PATCH v2 3/7] spi: spi-ep93xx: add spi master prepare_transfer_hardware()

2017-08-03 Thread Chris Packham
cks so that the core can enable/disable the hardware based on spi message queue. Signed-off-by: H Hartley Sweeten <hswee...@visionengravers.com> [chris: use u32 instead of unsigned int] Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> Reviewed-by: Andy Shevchenko <andy

[PATCH v2 4/7] spi: spi-ep93xx: absorb the interrupt enable/disable helpers

2017-08-03 Thread Chris Packham
From: H Hartley Sweeten These are each only called once. Just absorb them into the callers. Signed-off-by: H Hartley Sweeten [chris: use u32 instead of unsigned int] Signed-off-by: Chris Packham Reviewed-by: Andy Shevchenko --- drivers/spi/spi-ep93xx.c | 32

[PATCH v2 6/7] spi: spi-ep93xx: remove private data 'current_msg'

2017-08-03 Thread Chris Packham
From: H Hartley Sweeten The currently in-flight message can be found from the spi master. Use that instead and remove the private data pointer. Signed-off-by: H Hartley Sweeten Reviewed-by: Andy Shevchenko --- drivers/spi/spi-ep93xx.c | 16 +--- 1 file changed, 5 insertions(+),

[PATCH v2 3/7] spi: spi-ep93xx: add spi master prepare_transfer_hardware()

2017-08-03 Thread Chris Packham
the hardware based on spi message queue. Signed-off-by: H Hartley Sweeten [chris: use u32 instead of unsigned int] Signed-off-by: Chris Packham Reviewed-by: Andy Shevchenko --- drivers/spi/spi-ep93xx.c | 72 ++-- 1 file changed, 33 insertions(+), 39 deletions

[PATCH v2 0/7] spi: spi-ep93xx: cleanup and update driver to modern API

2017-08-03 Thread Chris Packham
Cleanup and update this driver to use the default master transfer queueing mechanism provided by the core. I've been carrying these changes locally to use as a basis for other SPI work. Mark Brown pointed out that he's simply missed seeing it, Andy Shevchenko had some minor comment's which I've

[PATCH v2 7/7] spi: spi-ep93xx: use the default master transfer queueing mechanism

2017-08-03 Thread Chris Packham
From: H Hartley Sweeten Update this driver to the default implementation of transfer_one_message(). Signed-off-by: H Hartley Sweeten Reviewed-by: Andy Shevchenko --- drivers/spi/spi-ep93xx.c | 322

[PATCH v2 0/7] spi: spi-ep93xx: cleanup and update driver to modern API

2017-08-03 Thread Chris Packham
Cleanup and update this driver to use the default master transfer queueing mechanism provided by the core. I've been carrying these changes locally to use as a basis for other SPI work. Mark Brown pointed out that he's simply missed seeing it, Andy Shevchenko had some minor comment's which I've

[PATCH v2 7/7] spi: spi-ep93xx: use the default master transfer queueing mechanism

2017-08-03 Thread Chris Packham
From: H Hartley Sweeten Update this driver to the default implementation of transfer_one_message(). Signed-off-by: H Hartley Sweeten Reviewed-by: Andy Shevchenko --- drivers/spi/spi-ep93xx.c | 322 --- 1 file changed, 108 insertions(+), 214

Re: [PATCH v2 0/4] i2c: pca-platform: additional improvements

2017-07-05 Thread Chris Packham
On 05/07/17 23:49, Andy Shevchenko wrote: > On Wed, Jul 5, 2017 at 1:13 PM, Chris Packham > <chris.pack...@alliedtelesis.co.nz> wrote: >> This series addresses some of the points identified by Andy. The series is >> based on top of i2c/for-next. 2 of the patches f

Re: [PATCH v2 0/4] i2c: pca-platform: additional improvements

2017-07-05 Thread Chris Packham
On 05/07/17 23:49, Andy Shevchenko wrote: > On Wed, Jul 5, 2017 at 1:13 PM, Chris Packham > wrote: >> This series addresses some of the points identified by Andy. The series is >> based on top of i2c/for-next. 2 of the patches from v1 have already been >> applied s

[PATCH v2 4/4] i2c: pca-platform: drop gpio from platform data

2017-07-05 Thread Chris Packham
Now that the i2c-pca-plaform driver is using the device managed API for gpios there is no need for the reset gpio to be specified via i2c_pca9564_pf_platform_data. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- arch/blackfin/mach-bf561/boards/acvilon.c | 1 - arch/sh/

[PATCH v2 4/4] i2c: pca-platform: drop gpio from platform data

2017-07-05 Thread Chris Packham
Now that the i2c-pca-plaform driver is using the device managed API for gpios there is no need for the reset gpio to be specified via i2c_pca9564_pf_platform_data. Signed-off-by: Chris Packham --- arch/blackfin/mach-bf561/boards/acvilon.c | 1 - arch/sh/boards/board-sh7785lcr.c | 1

[PATCH v2 1/4] sh: sh7785lcr: add GPIO lookup table for i2c controller reset

2017-07-05 Thread Chris Packham
Define the GPIO connected to the PCA9564 using a GPIO lookup table. This will allow the i2c-pca-platform driver to use the device managed APIs to lookup the gpio instead of using platform_data. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- Changes in v2: - use corre

[PATCH v2 1/4] sh: sh7785lcr: add GPIO lookup table for i2c controller reset

2017-07-05 Thread Chris Packham
Define the GPIO connected to the PCA9564 using a GPIO lookup table. This will allow the i2c-pca-platform driver to use the device managed APIs to lookup the gpio instead of using platform_data. Signed-off-by: Chris Packham --- Changes in v2: - use correct API (gpio_add_lookup_table) and compile

[PATCH v2 3/4] i2c: pca-platform: use device_property_read_u32

2017-07-05 Thread Chris Packham
Use device_property_read_u32 instead of of_property_read_u32_index to lookup the "clock-frequency" property. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- Changes in v2: - move call to device_property_read_u32 to above platform_data usage. This allows the

[PATCH v2 3/4] i2c: pca-platform: use device_property_read_u32

2017-07-05 Thread Chris Packham
Use device_property_read_u32 instead of of_property_read_u32_index to lookup the "clock-frequency" property. Signed-off-by: Chris Packham --- Changes in v2: - move call to device_property_read_u32 to above platform_data usage. This allows the device property/device tree t

[PATCH v2 2/4] i2c: pca-platform: unconditionally use devm_gpiod_get_optional

2017-07-05 Thread Chris Packham
Allow for the reset-gpios property to be defined in the device tree or via a GPIO lookup table. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- Changes in v2: - move call up above platform_data usage drivers/i2c/busses/i2c-pca-platform.c | 21 -

[PATCH v2 2/4] i2c: pca-platform: unconditionally use devm_gpiod_get_optional

2017-07-05 Thread Chris Packham
Allow for the reset-gpios property to be defined in the device tree or via a GPIO lookup table. Signed-off-by: Chris Packham --- Changes in v2: - move call up above platform_data usage drivers/i2c/busses/i2c-pca-platform.c | 21 - 1 file changed, 4 insertions(+), 17

[PATCH v2 0/4] i2c: pca-platform: additional improvements

2017-07-05 Thread Chris Packham
on. Chris Packham (4): sh: sh7785lcr: add GPIO lookup table for i2c controller reset i2c: pca-platform: unconditionally use devm_gpiod_get_optional i2c: pca-platform: use device_property_read_u32 i2c: pca-platform: drop gpio from platform data arch/blackfin/mach-bf561/boards/acvilon.c | 1

[PATCH v2 0/4] i2c: pca-platform: additional improvements

2017-07-05 Thread Chris Packham
on. Chris Packham (4): sh: sh7785lcr: add GPIO lookup table for i2c controller reset i2c: pca-platform: unconditionally use devm_gpiod_get_optional i2c: pca-platform: use device_property_read_u32 i2c: pca-platform: drop gpio from platform data arch/blackfin/mach-bf561/boards/acvilon.c | 1

Re: [PATCH v5 3/5] mtd: handle partitioning on devices with 0 erasesize

2017-07-03 Thread Chris Packham
Hi, On 02/06/17 15:21, Chris Packham wrote: > erasesize is meaningful for flash devices but for SRAM there is no > concept of an erase block so erasesize is set to 0. When partitioning > these devices instead of ensuring partitions fall on erasesize > boundaries we ensure they fall

Re: [PATCH v5 3/5] mtd: handle partitioning on devices with 0 erasesize

2017-07-03 Thread Chris Packham
Hi, On 02/06/17 15:21, Chris Packham wrote: > erasesize is meaningful for flash devices but for SRAM there is no > concept of an erase block so erasesize is set to 0. When partitioning > these devices instead of ensuring partitions fall on erasesize > boundaries we ensure they fall

Re: [PATCH 5/6] i2c: pca-platform: use device_property_read_u32

2017-07-02 Thread Chris Packham
On 30/06/17 22:56, Andy Shevchenko wrote: > On Fri, Jun 30, 2017 at 12:03 PM, Wolfram Sang wrote: >> - i2c->algo_data.i2c_clock = 59000; + ret = device_property_read_u32(>dev, "clock-frequency", +

Re: [PATCH 5/6] i2c: pca-platform: use device_property_read_u32

2017-07-02 Thread Chris Packham
On 30/06/17 22:56, Andy Shevchenko wrote: > On Fri, Jun 30, 2017 at 12:03 PM, Wolfram Sang wrote: >> - i2c->algo_data.i2c_clock = 59000; + ret = device_property_read_u32(>dev, "clock-frequency", +

Re: [PATCH 3/6] i2c: pca-platform: propagate error from i2c_pca_add_numbered_bus

2017-07-02 Thread Chris Packham
On 30/06/17 20:40, Andy Shevchenko wrote: > On Fri, Jun 30, 2017 at 3:54 AM, Chris Packham > <chris.pack...@alliedtelesis.co.nz> wrote: >> Rather than returning -ENODEV if i2c_pca_add_numbered_bus() fails, >> propagate the error to aid debugging. >> > > + Su

Re: [PATCH 3/6] i2c: pca-platform: propagate error from i2c_pca_add_numbered_bus

2017-07-02 Thread Chris Packham
On 30/06/17 20:40, Andy Shevchenko wrote: > On Fri, Jun 30, 2017 at 3:54 AM, Chris Packham > wrote: >> Rather than returning -ENODEV if i2c_pca_add_numbered_bus() fails, >> propagate the error to aid debugging. >> > > + Suggested-by ? > > You or Wolfram c

[PATCH 6/6] i2c: pca-platform: drop gpio from platform data

2017-06-29 Thread Chris Packham
Now that the i2c-pca-plaform driver is using the device managed API for gpios there is no need for the reset gpio to be specified via i2c_pca9564_pf_platform_data. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- arch/blackfin/mach-bf561/boards/acvilon.c | 1 - arch/sh/

[PATCH 6/6] i2c: pca-platform: drop gpio from platform data

2017-06-29 Thread Chris Packham
Now that the i2c-pca-plaform driver is using the device managed API for gpios there is no need for the reset gpio to be specified via i2c_pca9564_pf_platform_data. Signed-off-by: Chris Packham --- arch/blackfin/mach-bf561/boards/acvilon.c | 1 - arch/sh/boards/board-sh7785lcr.c | 1

[PATCH 1/6] sh: sh7785lcr: add GPIO lookup table for i2c controller reset

2017-06-29 Thread Chris Packham
Define the GPIO connected to the PCA9564 using a GPIO lookup table. This will allow the i2c-pca-platform driver to use the device managed APIs to lookup the gpio instead of using platform_data. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- arch/sh/boards/board-sh778

[PATCH 5/6] i2c: pca-platform: use device_property_read_u32

2017-06-29 Thread Chris Packham
Use device_property_read_u32 instead of of_property_read_u32_index to lookup the "clock-frequency" property. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- drivers/i2c/busses/i2c-pca-platform.c | 9 - 1 file changed, 4 insertions(+), 5 deletion

[PATCH 1/6] sh: sh7785lcr: add GPIO lookup table for i2c controller reset

2017-06-29 Thread Chris Packham
Define the GPIO connected to the PCA9564 using a GPIO lookup table. This will allow the i2c-pca-platform driver to use the device managed APIs to lookup the gpio instead of using platform_data. Signed-off-by: Chris Packham --- arch/sh/boards/board-sh7785lcr.c | 10 ++ 1 file changed, 10

[PATCH 5/6] i2c: pca-platform: use device_property_read_u32

2017-06-29 Thread Chris Packham
Use device_property_read_u32 instead of of_property_read_u32_index to lookup the "clock-frequency" property. Signed-off-by: Chris Packham --- drivers/i2c/busses/i2c-pca-platform.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-pca-

[PATCH 3/6] i2c: pca-platform: propagate error from i2c_pca_add_numbered_bus

2017-06-29 Thread Chris Packham
Rather than returning -ENODEV if i2c_pca_add_numbered_bus() fails, propagate the error to aid debugging. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- drivers/i2c/busses/i2c-pca-platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/d

[PATCH 2/6] i2c: pca-platform: correctly set algo_data.reset_chip

2017-06-29 Thread Chris Packham
that however the reset gpio is defined the correct reset_chip function is used. Fixes: commit 4cc7229daa46 ("i2c: pca-platform: switch to struct gpio_desc") Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- drivers/i2c/busses/i2c-pca-platform.c | 6 -- 1 file chang

[PATCH 3/6] i2c: pca-platform: propagate error from i2c_pca_add_numbered_bus

2017-06-29 Thread Chris Packham
Rather than returning -ENODEV if i2c_pca_add_numbered_bus() fails, propagate the error to aid debugging. Signed-off-by: Chris Packham --- drivers/i2c/busses/i2c-pca-platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-pca-platform.c b

[PATCH 2/6] i2c: pca-platform: correctly set algo_data.reset_chip

2017-06-29 Thread Chris Packham
that however the reset gpio is defined the correct reset_chip function is used. Fixes: commit 4cc7229daa46 ("i2c: pca-platform: switch to struct gpio_desc") Signed-off-by: Chris Packham --- drivers/i2c/busses/i2c-pca-platform.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)

[PATCH 4/6] i2c: pca-platform: unconditionally use devm_gpiod_get_optional

2017-06-29 Thread Chris Packham
Allow for the reset-gpios property to be defined in the device tree or via a GPIO lookup table. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- drivers/i2c/busses/i2c-pca-platform.c | 21 - 1 file changed, 4 insertions(+), 17 deletions(-) diff

[PATCH 4/6] i2c: pca-platform: unconditionally use devm_gpiod_get_optional

2017-06-29 Thread Chris Packham
Allow for the reset-gpios property to be defined in the device tree or via a GPIO lookup table. Signed-off-by: Chris Packham --- drivers/i2c/busses/i2c-pca-platform.c | 21 - 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/drivers/i2c/busses/i2c-pca-platform.c

Re: [PATCH v3 2/5] i2c: pca-platform: switch to struct gpio_desc

2017-06-28 Thread Chris Packham
On 28/06/17 21:25, Andy Shevchenko wrote: > On Mon, Jun 26, 2017 at 3:44 AM, Chris Packham > <chris.pack...@alliedtelesis.co.nz> wrote: >> Make use of struct gpio_desc which allows us to specify the active state >> of the reset pin. > >> + if (

Re: [PATCH v3 2/5] i2c: pca-platform: switch to struct gpio_desc

2017-06-28 Thread Chris Packham
On 28/06/17 21:25, Andy Shevchenko wrote: > On Mon, Jun 26, 2017 at 3:44 AM, Chris Packham > wrote: >> Make use of struct gpio_desc which allows us to specify the active state >> of the reset pin. > >> + if (gpio_is_valid(platform_data->gpio)) { >

Re: [PATCH v3 3/5] i2c: pca-platform: add devicetree awareness

2017-06-28 Thread Chris Packham
On 28/06/17 21:20, Andy Shevchenko wrote: >> + i2c->adap.dev.of_node = np; >> + } else if (np) { >> + i2c->adap.timeout = HZ; >> + i2c->gpio = devm_gpiod_get_optional(>dev, >> "reset-gpios", GPIOD_OUT_LOW); >> + if (IS_ERR(i2c->gpio)) >> +

Re: [PATCH v3 3/5] i2c: pca-platform: add devicetree awareness

2017-06-28 Thread Chris Packham
On 28/06/17 21:20, Andy Shevchenko wrote: >> + i2c->adap.dev.of_node = np; >> + } else if (np) { >> + i2c->adap.timeout = HZ; >> + i2c->gpio = devm_gpiod_get_optional(>dev, >> "reset-gpios", GPIOD_OUT_LOW); >> + if (IS_ERR(i2c->gpio)) >> +

Re: [PATCH v3 4/5] i2c: pca-platform: use device managed allocations

2017-06-28 Thread Chris Packham
On 28/06/17 22:54, Andy Shevchenko wrote: > On Wed, Jun 28, 2017 at 12:38 PM, Wolfram Sang wrote: >> if (i2c_pca_add_numbered_bus(>adap) < 0) { - ret = -ENODEV; - goto e_adapt; + return -ENODEV; >>> >>>

Re: [PATCH v3 4/5] i2c: pca-platform: use device managed allocations

2017-06-28 Thread Chris Packham
On 28/06/17 22:54, Andy Shevchenko wrote: > On Wed, Jun 28, 2017 at 12:38 PM, Wolfram Sang wrote: >> if (i2c_pca_add_numbered_bus(>adap) < 0) { - ret = -ENODEV; - goto e_adapt; + return -ENODEV; >>> >>> This is still shadows

[PATCH v3 5/5] i2c: pca-platform: use dev_warn/dev_info instead of printk

2017-06-25 Thread Chris Packham
Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- drivers/i2c/busses/i2c-pca-platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c index 7db481cbf402..395eca

[PATCH v3 5/5] i2c: pca-platform: use dev_warn/dev_info instead of printk

2017-06-25 Thread Chris Packham
Signed-off-by: Chris Packham --- drivers/i2c/busses/i2c-pca-platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c index 7db481cbf402..395eca0cbb1f 100644 --- a/drivers/i2c/busses/i2c-pca

[PATCH v3 2/5] i2c: pca-platform: switch to struct gpio_desc

2017-06-25 Thread Chris Packham
Make use of struct gpio_desc which allows us to specify the active state of the reset pin. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- Changes in v3: - New, replaces "i2c: pca-platform: use gpio_is_valid" - Using struct gpio_desc is required to make

[PATCH v3 2/5] i2c: pca-platform: switch to struct gpio_desc

2017-06-25 Thread Chris Packham
Make use of struct gpio_desc which allows us to specify the active state of the reset pin. Signed-off-by: Chris Packham --- Changes in v3: - New, replaces "i2c: pca-platform: use gpio_is_valid" - Using struct gpio_desc is required to make the flags stick. Because those flags now

[PATCH v3 1/5] dt-bindings: add bindings for i2c-pca-platform

2017-06-25 Thread Chris Packham
Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- Changes in v2: - Split dt-binding to separate patch, use "reset-gpios" instead of "gpios". Changes in v3: - State the gpio is active low - Add example .../devicetree/bindings/i2c/i

[PATCH v3 4/5] i2c: pca-platform: use device managed allocations

2017-06-25 Thread Chris Packham
Switch to using the devm_ APIs and remove the now unnecessary error handling and most of the device removal code. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- drivers/i2c/busses/i2c-pca-platform.c | 53 +++ 1 file changed, 10 inse

[PATCH v3 1/5] dt-bindings: add bindings for i2c-pca-platform

2017-06-25 Thread Chris Packham
Signed-off-by: Chris Packham --- Changes in v2: - Split dt-binding to separate patch, use "reset-gpios" instead of "gpios". Changes in v3: - State the gpio is active low - Add example .../devicetree/bindings/i2c/i2c-pca-platform.txt | 29 ++ 1 file ch

[PATCH v3 4/5] i2c: pca-platform: use device managed allocations

2017-06-25 Thread Chris Packham
Switch to using the devm_ APIs and remove the now unnecessary error handling and most of the device removal code. Signed-off-by: Chris Packham --- drivers/i2c/busses/i2c-pca-platform.c | 53 +++ 1 file changed, 10 insertions(+), 43 deletions(-) diff --git

[PATCH v3 0/5] i2c: pca-platform: updates

2017-06-25 Thread Chris Packham
We're using a PCA9564 on an embedded platform to provide an i2c controller. This adds devicetree support and I've included some cleanups for the driver while I was at it. Chris Packham (5): dt-bindings: add bindings for i2c-pca-platform i2c: pca-platform: switch to struct gpio_desc i2c: pca

[PATCH v3 3/5] i2c: pca-platform: add devicetree awareness

2017-06-25 Thread Chris Packham
Allow devices that use this driver to be registered via a devicetree. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- Changes in v2: - Set i2c->adap.dev.of_node so that child nodes are automatically probed - Split dt-binding to separate patch, use "reset-

[PATCH v3 0/5] i2c: pca-platform: updates

2017-06-25 Thread Chris Packham
We're using a PCA9564 on an embedded platform to provide an i2c controller. This adds devicetree support and I've included some cleanups for the driver while I was at it. Chris Packham (5): dt-bindings: add bindings for i2c-pca-platform i2c: pca-platform: switch to struct gpio_desc i2c: pca

[PATCH v3 3/5] i2c: pca-platform: add devicetree awareness

2017-06-25 Thread Chris Packham
Allow devices that use this driver to be registered via a devicetree. Signed-off-by: Chris Packham --- Changes in v2: - Set i2c->adap.dev.of_node so that child nodes are automatically probed - Split dt-binding to separate patch, use "reset-gpios" instead of "gpios"

Re: [RFC PATCH 3/4] ARM: l2x0: add arm,ecc-enable property for aurora

2017-06-22 Thread Chris Packham
On 23/06/17 02:46, Jan Lübbe wrote: > Chris, > > On So, 2017-06-11 at 22:55 +0000, Chris Packham wrote: >> On 09/06/17 20:58, Jan Lübbe wrote: >>> On Do, 2017-06-08 at 16:11 +1200, Chris Packham wrote: >>>> + if (of_property_read_bool(np, "arm,

Re: [RFC PATCH 3/4] ARM: l2x0: add arm,ecc-enable property for aurora

2017-06-22 Thread Chris Packham
On 23/06/17 02:46, Jan Lübbe wrote: > Chris, > > On So, 2017-06-11 at 22:55 +0000, Chris Packham wrote: >> On 09/06/17 20:58, Jan Lübbe wrote: >>> On Do, 2017-06-08 at 16:11 +1200, Chris Packham wrote: >>>> + if (of_property_read_bool(np, "arm,

Re: [RFC PATCH 1/4] EDAC: mvebu: Add driver for Marvell Armada SoCs

2017-06-22 Thread Chris Packham
On 23/06/17 02:37, Jan Lübbe wrote: > Hi Chris, > > On Fr, 2017-06-09 at 15:14 +0200, Jan Lübbe wrote: >>> +static void mvebu_init_csrows(struct mem_ctl_info *mci, >>> + struct mvebu_mc_pdata *pdata) >> [...] >>> + devtype = (ctl >> 20) & 0x3; >>> + switch

Re: [RFC PATCH 1/4] EDAC: mvebu: Add driver for Marvell Armada SoCs

2017-06-22 Thread Chris Packham
On 23/06/17 02:37, Jan Lübbe wrote: > Hi Chris, > > On Fr, 2017-06-09 at 15:14 +0200, Jan Lübbe wrote: >>> +static void mvebu_init_csrows(struct mem_ctl_info *mci, >>> + struct mvebu_mc_pdata *pdata) >> [...] >>> + devtype = (ctl >> 20) & 0x3; >>> + switch

Re: [PATCH v2 1/5] dt-bindings: add bindings for i2c-pca-platform

2017-06-22 Thread Chris Packham
On 22/06/17 20:23, Wolfram Sang wrote: > >> + - reset-gpios : gpio specifier for gpio connected to RESET_N pin. > > What about the 'active' state that Rob mentioned in his last review? > My intention was that by saying it is connected to the RESET_N bin the active state is covered. I

Re: [PATCH v2 1/5] dt-bindings: add bindings for i2c-pca-platform

2017-06-22 Thread Chris Packham
On 22/06/17 20:23, Wolfram Sang wrote: > >> + - reset-gpios : gpio specifier for gpio connected to RESET_N pin. > > What about the 'active' state that Rob mentioned in his last review? > My intention was that by saying it is connected to the RESET_N bin the active state is covered. I

[PATCH v2 2/5] i2c: pca-platform: add devicetree awareness

2017-06-19 Thread Chris Packham
Allow devices that use this driver to be registered via a devicetree. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- Changes in v2: - Set i2c->adap.dev.of_node so that child nodes are automatically probed - Split dt-binding to separate patch, use "reset-

[PATCH v2 2/5] i2c: pca-platform: add devicetree awareness

2017-06-19 Thread Chris Packham
Allow devices that use this driver to be registered via a devicetree. Signed-off-by: Chris Packham --- Changes in v2: - Set i2c->adap.dev.of_node so that child nodes are automatically probed - Split dt-binding to separate patch, use "reset-gpios" instead of "gpios". dri

[PATCH v2 5/5] i2c: pca-platform: use dev_warn/dev_info instead of printk

2017-06-19 Thread Chris Packham
Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- drivers/i2c/busses/i2c-pca-platform.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c index 12ab0cafa7c9..27175d

[PATCH v2 5/5] i2c: pca-platform: use dev_warn/dev_info instead of printk

2017-06-19 Thread Chris Packham
Signed-off-by: Chris Packham --- drivers/i2c/busses/i2c-pca-platform.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c index 12ab0cafa7c9..27175d681548 100644 --- a/drivers/i2c/busses/i2c

[PATCH v2 4/5] i2c: pca-platform: use device managed allocations

2017-06-19 Thread Chris Packham
Switch to using the devm_ APIs and remove the now unnecessary error handling and most of the device removal code. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- drivers/i2c/busses/i2c-pca-platform.c | 61 +++ 1 file changed, 11 inse

[PATCH v2 4/5] i2c: pca-platform: use device managed allocations

2017-06-19 Thread Chris Packham
Switch to using the devm_ APIs and remove the now unnecessary error handling and most of the device removal code. Signed-off-by: Chris Packham --- drivers/i2c/busses/i2c-pca-platform.c | 61 +++ 1 file changed, 11 insertions(+), 50 deletions(-) diff --git

[PATCH v2 3/5] i2c: pca-platform: use gpio_is_valid

2017-06-19 Thread Chris Packham
Use gpio_is_valid() instead of gpio > -1. Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- drivers/i2c/busses/i2c-pca-platform.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busse

[PATCH v2 3/5] i2c: pca-platform: use gpio_is_valid

2017-06-19 Thread Chris Packham
Use gpio_is_valid() instead of gpio > -1. Signed-off-by: Chris Packham --- drivers/i2c/busses/i2c-pca-platform.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c index 87ca2f02f

[PATCH v2 1/5] dt-bindings: add bindings for i2c-pca-platform

2017-06-19 Thread Chris Packham
Signed-off-by: Chris Packham <chris.pack...@alliedtelesis.co.nz> --- Changes in v2: - Split dt-binding to separate patch, use "reset-gpios" instead of "gpios". .../devicetree/bindings/i2c/i2c-pca-platform.txt | 18 ++ 1 file changed, 18 inserti

[PATCH v2 1/5] dt-bindings: add bindings for i2c-pca-platform

2017-06-19 Thread Chris Packham
Signed-off-by: Chris Packham --- Changes in v2: - Split dt-binding to separate patch, use "reset-gpios" instead of "gpios". .../devicetree/bindings/i2c/i2c-pca-platform.txt | 18 ++ 1 file changed, 18 insertions(+) create mode 100644 Documentation/dev

[PATCH v2 0/5] i2c: pca-platform: updates

2017-06-19 Thread Chris Packham
We're using a PCA9564 on an embedded platform to provide an i2c controller. This adds devicetree support and I've included some cleanups for the driver while I was at it. Chris Packham (5): dt-bindings: add bindings for i2c-pca-platform i2c: pca-platform: add devicetree awareness i2c: pca

[PATCH v2 0/5] i2c: pca-platform: updates

2017-06-19 Thread Chris Packham
We're using a PCA9564 on an embedded platform to provide an i2c controller. This adds devicetree support and I've included some cleanups for the driver while I was at it. Chris Packham (5): dt-bindings: add bindings for i2c-pca-platform i2c: pca-platform: add devicetree awareness i2c: pca

Re: [PATCH 0/4] i2c: pca-platform: updates

2017-06-19 Thread Chris Packham
On 20/06/17 03:01, Wolfram Sang wrote: > On Tue, Jun 13, 2017 at 01:56:37PM +1200, Chris Packham wrote: > >> We're using a PCA9564 on an embedded platform to provide an i2c >> controller. This adds devicetree support and I've included some >> cleanup

<    3   4   5   6   7   8   9   10   11   12   >