Re: [PATCH] i2c: ocores: Fix pointer to integer cast warning

2013-02-19 Thread Andreas Larsson
ize Jayachandran> Fix it by casting the pointer to long. I've CC'ed Andreas who made the change. Acked-by: Peter Korsgaard Thanks! Acked-by: Andreas Larsson -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a mess

Re: [PATCH 0/2] sparc: Enable OF functionality for sparc for i2c and spi

2012-12-04 Thread Andreas Larsson
On 2012-12-04 15:44, Grant Likely wrote: On Tue, Dec 4, 2012 at 2:09 PM, Andreas Larsson wrote: This series removes the dependency on !SPARC for OF_I2C and removes the depencency of !defined(CONFIG_SPARC) for the function of_register_spi_devices. I find no reason for these to be unavailable

[PATCH 2/2] spi: sparc: Allow of_register_spi_devices for sparc

2012-12-04 Thread Andreas Larsson
Signed-off-by: Andreas Larsson --- drivers/spi/spi.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index c4f7d71..d8339fe 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -812,7 +812,7 @@ err_init_queue

[PATCH 1/2] of_i2c: sparc: Allow OF_I2C for sparc

2012-12-04 Thread Andreas Larsson
Signed-off-by: Andreas Larsson --- drivers/of/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index dfba3e6..d37bfcf 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@ -53,7 +53,7 @@ config OF_DEVICE config

[PATCH 0/2] sparc: Enable OF functionality for sparc for i2c and spi

2012-12-04 Thread Andreas Larsson
trees. Andreas Larsson (2): of_i2c: sparc: Allow OF_I2C for sparc spi: sparc: Allow of_register_spi_devices for sparc drivers/of/Kconfig |2 +- drivers/spi/spi.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe

[PATCH] i2c: i2c-ocores: Move grlib set/get functions into #ifdef CONFIG_OF block

2012-11-19 Thread Andreas Larsson
This moves the grlib set and get functions into the #ifdef CONFIG_OF block to avoid warnings of unimplemented functions when compiling with -Wunused-function when CONFIG_OF is not defined. Signed-off-by: Andreas Larsson --- To be applied to the for-next tree drivers/i2c/busses/i2c-ocores.c

[PATCH v6 1/2] i2c: i2c-ocores: Add irq support for sparc

2012-11-15 Thread Andreas Larsson
Add sparc support by using platform_get_irq instead of platform_get_resource. There are no platform resources of type IORESOURCE_IRQ for sparc, but platform_get_irq works for sparc. In the non-sparc case platform_get_irq internally uses platform_get_resource. Signed-off-by: Andreas Larsson Acked

[PATCH v6 2/2] i2c: i2c-ocores: Add support for the GRLIB port of the controller and use function pointers for getreg and setreg functions

2012-11-15 Thread Andreas Larsson
added to the table. The type of that entry triggers usage of the custom grlib functions by setting the setreg and getreg function pointers. Signed-off-by: Andreas Larsson --- Changes since v5: - Function pointers for different widths are set together - oc_setreg and oc_getreg are kept as wrappers

[PATCH v6 0/2] i2c: i2c-ocores: Add support for sparc, custom set and get functions, and the GRLIB port of the controller

2012-11-15 Thread Andreas Larsson
register access and to deal with the fact that the PRELOW and PREHIGH registers have been merged into one register. Signed-off-by: Andreas Larsson Changes since v5: - Function pointers for different widths are set together - oc_setreg and oc_getreg are kept as wrappers Andreas Larsson (2): i2c: i2c

[PATCH v5 1/2] i2c: i2c-ocores: Add irq support for sparc

2012-11-15 Thread Andreas Larsson
Add sparc support by using platform_get_irq instead of platform_get_resource. There are no platform resources of type IORESOURCE_IRQ for sparc, but platform_get_irq works for sparc. In the non-sparc case platform_get_irq internally uses platform_get_resource. Signed-off-by: Andreas Larsson Acked

[PATCH v5 2/2] i2c: i2c-ocores: Add support for the GRLIB port of the controller and use function pointers for getreg and setreg functions

2012-11-15 Thread Andreas Larsson
-off-by: Andreas Larsson --- Changes since v4: - Replace the ocores_get_type function with inline code in the probe function - Replace the oc_(get|set)reg functions with oc_(get|set)reg_(8|16|32) functions and always use the function pointers to call them. .../devicetree/bindings/i2c/i2c

[PATCH v5 0/2] i2c: i2c-ocores: Add support for sparc, custom set and get functions, and the GRLIB port of the controller

2012-11-15 Thread Andreas Larsson
register access and to deal with the fact that the PRELOW and PREHIGH registers have been merged into one register. Signed-off-by: Andreas Larsson Changes since v4: - Replace the ocores_get_type function with inline code in the probe function - Replace the oc_(get|set)reg functions with oc_(get|set)reg_

[PATCH v4 0/2] i2c: i2c-ocores: Add support for sparc, custom set and get functions, and the GRLIB port of the controller

2012-11-15 Thread Andreas Larsson
register access and to deal with the fact that the PRELOW and PREHIGH registers have been merged into one register. Signed-off-by: Andreas Larsson Changes since v3: - Use a separate entry in the of match table for the grlib variant and trigger grlib function usage on type put in the data field of

[PATCH v4 1/2] i2c: i2c-ocores: Add irq support for sparc

2012-11-15 Thread Andreas Larsson
Add sparc support by using platform_get_irq instead of platform_get_resource. There are no platform resources of type IORESOURCE_IRQ for sparc, but platform_get_irq works for sparc. In the non-sparc case platform_get_irq internally uses platform_get_resource. Signed-off-by: Andreas Larsson Acked

[PATCH v4 2/2] i2c: i2c-ocores: Add support for the GRLIB port of the controller and custom getreg and setreg functions

2012-11-15 Thread Andreas Larsson
custom getreg and setreg functions. A type is added as the data of the of match table entries. A new entry with a different compatible string is added to the table. The type of that entry triggers usage of the grlib functions. Signed-off-by: Andreas Larsson --- Changes since v3: - Use a separate

Re: [PATCH v3 2/2] i2c: i2c-ocores: Add support for the GRLIB port of the controller and custom getreg and setreg functions

2012-11-15 Thread Andreas Larsson
On 2012-11-13 23:45, Peter Korsgaard wrote: "Andreas" == Andreas Larsson writes: Hi, Andreas> The registers in the GRLIB port of the controller are 32-bit Andreas> and in big endian byte order. The PRELOW and PREHIGH registers Andreas> are merged into one regis

[PATCH v3 2/2] i2c: i2c-ocores: Add support for the GRLIB port of the controller and custom getreg and setreg functions

2012-11-13 Thread Andreas Larsson
custom getreg and setreg functions. Signed-off-by: Andreas Larsson Acked-by: Peter Korsgaard --- Changes since v2: - Trigger usage of the the grlib specific functions on compatible property instead of name drivers/i2c/busses/i2c-ocores.c | 55 +- 1

[PATCH v3 0/2] i2c: i2c-ocores: Add support for sparc, custom set and get functions, and the GRLIB port of the controller

2012-11-13 Thread Andreas Larsson
register access and to deal with the fact that the PRELOW and PREHIGH registers have been merged into one register. Signed-off-by: Andreas Larsson Changes since v2: - Return error from platform_get_irq on error - Trigger usage of the grlib specific functions on compatible property instead of name

[PATCH v3 1/2] i2c: i2c-ocores: Add irq support for sparc

2012-11-13 Thread Andreas Larsson
Add sparc support by using platform_get_irq instead of platform_get_resource. There are no platform resources of type IORESOURCE_IRQ for sparc, but platform_get_irq works for sparc. In the non-sparc case platform_get_irq internally uses platform_get_resource. Signed-off-by: Andreas Larsson Acked

[PATCH v2 1/2] i2c: i2c-ocores: Add irq support for sparc

2012-11-12 Thread Andreas Larsson
Add sparc support by using platform_get_irq instead of platform_get_resource. There are no platform resources of type IORESOURCE_IRQ for sparc, but platform_get_irq works for sparc. In the non-sparc case platform_get_irq internally uses platform_get_resource. Signed-off-by: Andreas Larsson Acked

[PATCH v2 0/2] i2c: i2c-ocores: Add support for sparc, custom set and get functions, and the GRLIB port of the controller

2012-11-12 Thread Andreas Larsson
register access and to deal with the fact that the PRELOW and PREHIGH registers have been merged into one register. Signed-off-by: Andreas Larsson Changes since v1: - platform_get_irq now works for sparc, so that is used for all platforms - Acks by Peter Korsgaard Andreas Larsson (2): i2c: i2c

[PATCH v2 2/2] i2c: i2c-ocores: Add support for the GRLIB port of the controller and custom getreg and setreg functions

2012-11-12 Thread Andreas Larsson
custom getreg and setreg functions. Signed-off-by: Andreas Larsson Acked-by: Peter Korsgaard --- Changes since v1: - Acked by Peter Korsgaard drivers/i2c/busses/i2c-ocores.c | 57 +- 1 files changed, 55 insertions(+), 2 deletions(-) diff --git a/drivers

Re: [PATCH 2/2] i2c: i2c-ocores: Add support for the GRLIB port of the controller and custom getreg and setreg functions

2012-10-24 Thread Andreas Larsson
On 10/23/2012 10:24 PM, Peter Korsgaard wrote: "Andreas" == Andreas Larsson writes: [...] Andreas> +/* Read and write functions for the GRLIB port of the controller. Registers are Andreas> + * 32-bit big endian and the PRELOW and PREHIGH registers are merged in

Re: [PATCH 1/2] i2c: i2c-ocores: Add irq support for sparc

2012-10-24 Thread Andreas Larsson
On 10/23/2012 10:13 PM, Peter Korsgaard wrote: "Andreas" == Andreas Larsson writes: Andreas> There are no platform resources of type IORESOURCE_IRQ on Andreas> sparc, so the irq number is acquired in a different manner for Andreas> sparc. The general case uses pla

[PATCH 2/2] i2c: i2c-ocores: Add support for the GRLIB port of the controller and custom getreg and setreg functions

2012-10-23 Thread Andreas Larsson
custom getreg and setreg functions. Signed-off-by: Andreas Larsson --- drivers/i2c/busses/i2c-ocores.c | 57 +- 1 files changed, 55 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c index 1eb8a65

[PATCH 0/2] i2c: i2c-ocores: Add support for sparc, custom set and get functions, and the GRLIB port of the controller

2012-10-23 Thread Andreas Larsson
deal with the fact that the PRELOW and PREHIGH registers have been merged into one register. Signed-off-by: Andreas Larsson Andreas Larsson (2): i2c: i2c-ocores: Add irq support for sparc i2c: i2c-ocores: Add support for the GRLIB port of the controller and custom getreg and setreg

[PATCH 1/2] i2c: i2c-ocores: Add irq support for sparc

2012-10-23 Thread Andreas Larsson
There are no platform resources of type IORESOURCE_IRQ on sparc, so the irq number is acquired in a different manner for sparc. The general case uses platform_get_irq, that internally still uses platform_get_resource. Signed-off-by: Andreas Larsson --- drivers/i2c/busses/i2c-ocores.c | 13

[PATCH 3/3] i2c-ocores: Add support for the GRLIB port of the controller.

2012-10-11 Thread Andreas Larsson
The registers are 32-bit and in big endian byte order. The PRELOW and PREHIGH registers are merged into one register. The subsequent registers have their offset decreased accordingly. Signed-off-by: Andreas Larsson --- drivers/i2c/busses/i2c-ocores.c | 47

[PATCH 1/3] i2c-ocores: Add irq support for sparc

2012-10-11 Thread Andreas Larsson
There are no platform resources of type IORESOURCE_IRQ on sparc, so irq number needs to be acquired in a different manner. Signed-off-by: Andreas Larsson --- drivers/i2c/busses/i2c-ocores.c | 16 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/i2c

[PATCH 2/3] i2c-ocores: Add support for custom getreg and setreg functions

2012-10-11 Thread Andreas Larsson
Signed-off-by: Andreas Larsson --- drivers/i2c/busses/i2c-ocores.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c index d62cb3f..de93b2d 100644 --- a/drivers/i2c/busses/i2c-ocores.c +++ b

[PATCH 0/3] Add support for sparc, custom set and get functions, and the GRLIB port of the controller

2012-10-11 Thread Andreas Larsson
returns an irq number. The GRLIB port of the controller needs custom getreg and setreg functions to allow for big endian register access and to deal with the fact that the PRELOW and PREHIGH registers have been merged into one register. Cheers, Andreas Andreas Larsson (3): i2c-ocores: Add irq support