Re: [PATCH v3 1/4] i2c: tegra: implement slave mode

2015-09-08 Thread Andrey Danin
Wolfram, thanks! On 08.09.2015 14:46, Wolfram Sang wrote: Sorry for the long delay. I tried to analyze the issue. Attached patch works on AC100 (Misha Komarovsky helped me with testing). Wolfram could you please try the patch with your environment? No change, sadly. I don't get slave

Re: [PATCH v3 1/4] i2c: tegra: implement slave mode

2015-09-08 Thread Andrey Danin
Wolfram, thanks! On 08.09.2015 14:46, Wolfram Sang wrote: Sorry for the long delay. I tried to analyze the issue. Attached patch works on AC100 (Misha Komarovsky helped me with testing). Wolfram could you please try the patch with your environment? No change, sadly. I don't get slave

Re: [PATCH v3 1/4] i2c: tegra: implement slave mode

2015-08-20 Thread Andrey Danin
. >From 0927b4007786b19e51415c4900863dd4e74fa034 Mon Sep 17 00:00:00 2001 From: Andrey Danin Date: Thu, 20 Aug 2015 00:41:39 +0300 Subject: [PATCH] i2c: tegra: don't reset I2C slave address on init Init function is called multuple times. If I2C controller works in slave mode, then driver must k

Re: [PATCH v3 1/4] i2c: tegra: implement slave mode

2015-08-20 Thread Andrey Danin
. From 0927b4007786b19e51415c4900863dd4e74fa034 Mon Sep 17 00:00:00 2001 From: Andrey Danin danind...@mail.ru Date: Thu, 20 Aug 2015 00:41:39 +0300 Subject: [PATCH] i2c: tegra: don't reset I2C slave address on init Init function is called multuple times. If I2C controller works in slave mode

Re: [PATCH v3 1/4] i2c: tegra: implement slave mode

2015-07-24 Thread Andrey Danin
On 24.07.2015 12:27, Wolfram Sang wrote: Still doesn't work for me and I think I understand why. Do you run your I2C controller in slave mode only? Yes. That might work, but using it in master/slave mode simultanously won't work yet as I see it: * After every transfer (as master), clocks

Re: [PATCH v3 1/4] i2c: tegra: implement slave mode

2015-07-24 Thread Andrey Danin
On 24.07.2015 12:27, Wolfram Sang wrote: Still doesn't work for me and I think I understand why. Do you run your I2C controller in slave mode only? Yes. That might work, but using it in master/slave mode simultanously won't work yet as I see it: * After every transfer (as master), clocks

Re: [PATCH v3 4/4] dt: paz00: define nvec as child of i2c bus

2015-07-21 Thread Andrey Danin
On 21.07.2015 11:25, Marc Dietrich wrote: I think in this case it would be better to leave nvec and dt as it is for now, and just add the slave function to tegra-i2c. Otherwise we will again have two different "nvidia,nvec-slave" bindings (one for the intermediate hack and one for the final

Re: [PATCH v3 0/4] arm: tegra: implement NVEC driver using tegra i2c.

2015-07-21 Thread Andrey Danin
On 20.07.2015 23:35, Andrey Danin wrote: This version (v3) is for pushing tegra i2c driver to i2c tree. NVEC driver will be reworked later to use i2c core slave framework. NVEC driver contains code to manage tegra i2c controller in slave mode. I2C slave support was implemented in linux kernel

Re: [PATCH v3 4/4] dt: paz00: define nvec as child of i2c bus

2015-07-21 Thread Andrey Danin
On 21.07.2015 1:19, Stephen Warren wrote: On 07/20/2015 02:35 PM, Andrey Danin wrote: NVEC driver was reimplemented to use tegra i2c. Use common i2c bindings for NVEC node. diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts +nvec: nvec@45

Re: [PATCH v3 4/4] dt: paz00: define nvec as child of i2c bus

2015-07-21 Thread Andrey Danin
On 21.07.2015 1:19, Stephen Warren wrote: On 07/20/2015 02:35 PM, Andrey Danin wrote: NVEC driver was reimplemented to use tegra i2c. Use common i2c bindings for NVEC node. diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts +nvec: nvec@45

Re: [PATCH v3 4/4] dt: paz00: define nvec as child of i2c bus

2015-07-21 Thread Andrey Danin
On 21.07.2015 11:25, Marc Dietrich wrote: I think in this case it would be better to leave nvec and dt as it is for now, and just add the slave function to tegra-i2c. Otherwise we will again have two different nvidia,nvec-slave bindings (one for the intermediate hack and one for the final

Re: [PATCH v3 0/4] arm: tegra: implement NVEC driver using tegra i2c.

2015-07-21 Thread Andrey Danin
On 20.07.2015 23:35, Andrey Danin wrote: This version (v3) is for pushing tegra i2c driver to i2c tree. NVEC driver will be reworked later to use i2c core slave framework. NVEC driver contains code to manage tegra i2c controller in slave mode. I2C slave support was implemented in linux kernel

[PATCH v3 1/4] i2c: tegra: implement slave mode

2015-07-20 Thread Andrey Danin
Initialization code is based on NVEC driver. There is a HW bug in AP20 that was also mentioned in kernel sources for Toshiba AC100. Signed-off-by: Andrey Danin --- Changes for v3: - handle 10-bit clients properly Changes for v2: - remove hack from tegra_i2c_clock_disable - replace slave status

[PATCH v3 0/4] arm: tegra: implement NVEC driver using tegra i2c.

2015-07-20 Thread Andrey Danin
in separate patch - documentation patch is integrated to main nvec patch Thanks in advance *** BLURB HERE *** Andrey Danin (4): i2c: tegra: implement slave mode staging/nvec: reimplement on top of tegra i2c driver staging/nvec: remove old code dt: paz00: define nvec as child of i2c bus

[PATCH v3 3/4] staging/nvec: remove old code

2015-07-20 Thread Andrey Danin
Signed-off-by: Andrey Danin --- No changes for v3 No changes for v2 Signed-off-by: Andrey Danin --- drivers/staging/nvec/nvec.c | 211 1 file changed, 211 deletions(-) diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index

[PATCH v3 2/4] staging/nvec: reimplement on top of tegra i2c driver

2015-07-20 Thread Andrey Danin
Remove i2c controller related code and use tegra i2c driver in slave mode. Update nvec documentation. Signed-off-by: Andrey Danin --- Changes for v3: - resolve conflict: 'nvec != NULL' changed to '!nvec' Changes for v2: - remove extra new line - keep old functions to simplify review - move

[PATCH v3 4/4] dt: paz00: define nvec as child of i2c bus

2015-07-20 Thread Andrey Danin
NVEC driver was reimplemented to use tegra i2c. Use common i2c bindings for NVEC node. Signed-off-by: Andrey Danin --- No changes for v3: Changes for v2: - swap reg and request-gpios properties - use nvec-slave instead of nvec to keep ABI compatibility - place doc in separate patch Signed-off

[PATCH v3 4/4] dt: paz00: define nvec as child of i2c bus

2015-07-20 Thread Andrey Danin
NVEC driver was reimplemented to use tegra i2c. Use common i2c bindings for NVEC node. Signed-off-by: Andrey Danin danind...@mail.ru --- No changes for v3: Changes for v2: - swap reg and request-gpios properties - use nvec-slave instead of nvec to keep ABI compatibility - place doc in separate

[PATCH v3 3/4] staging/nvec: remove old code

2015-07-20 Thread Andrey Danin
Signed-off-by: Andrey Danin danind...@mail.ru --- No changes for v3 No changes for v2 Signed-off-by: Andrey Danin danind...@mail.ru --- drivers/staging/nvec/nvec.c | 211 1 file changed, 211 deletions(-) diff --git a/drivers/staging/nvec/nvec.c b

[PATCH v3 0/4] arm: tegra: implement NVEC driver using tegra i2c.

2015-07-20 Thread Andrey Danin
in separate patch - documentation patch is integrated to main nvec patch Thanks in advance *** BLURB HERE *** Andrey Danin (4): i2c: tegra: implement slave mode staging/nvec: reimplement on top of tegra i2c driver staging/nvec: remove old code dt: paz00: define nvec as child of i2c bus

[PATCH v3 1/4] i2c: tegra: implement slave mode

2015-07-20 Thread Andrey Danin
Initialization code is based on NVEC driver. There is a HW bug in AP20 that was also mentioned in kernel sources for Toshiba AC100. Signed-off-by: Andrey Danin danind...@mail.ru --- Changes for v3: - handle 10-bit clients properly Changes for v2: - remove hack from tegra_i2c_clock_disable

[PATCH v3 2/4] staging/nvec: reimplement on top of tegra i2c driver

2015-07-20 Thread Andrey Danin
Remove i2c controller related code and use tegra i2c driver in slave mode. Update nvec documentation. Signed-off-by: Andrey Danin danind...@mail.ru --- Changes for v3: - resolve conflict: 'nvec != NULL' changed to '!nvec' Changes for v2: - remove extra new line - keep old functions to simplify

Re: [PATCH 3/3] dt: paz00: define nvec as child of i2c bus

2015-03-31 Thread Andrey Danin
Added Wolfram Sang and linux-i2c ML On 31.03.2015 18:46, Andrey Danin wrote: On 31.03.2015 17:09, Stephen Warren wrote: On 03/31/2015 12:40 AM, Andrey Danin wrote: Hi, Thanks for the review. On 03.02.2015 0:20, Stephen Warren wrote: On 01/29/2015 12:20 AM, Andrey Danin wrote: NVEC driver

Re: [PATCH 3/3] dt: paz00: define nvec as child of i2c bus

2015-03-31 Thread Andrey Danin
On 31.03.2015 17:09, Stephen Warren wrote: On 03/31/2015 12:40 AM, Andrey Danin wrote: Hi, Thanks for the review. On 03.02.2015 0:20, Stephen Warren wrote: On 01/29/2015 12:20 AM, Andrey Danin wrote: NVEC driver was reimplemented to use tegra i2c. Use common i2c bindings for NVEC node

Re: [PATCH 3/3] dt: paz00: define nvec as child of i2c bus

2015-03-31 Thread Andrey Danin
Hi, Thanks for the review. On 03.02.2015 0:20, Stephen Warren wrote: On 01/29/2015 12:20 AM, Andrey Danin wrote: NVEC driver was reimplemented to use tegra i2c. Use common i2c bindings for NVEC node. diff --git a/Documentation/devicetree/bindings/nvec/nvidia,nvec.txt b/Documentation

Re: [PATCH 1/3] i2c: tegra: implement slave mode

2015-03-31 Thread Andrey Danin
Hi, Sorry for long delay. And thanks for the quick review. It helped a lot! On 29.01.2015 14:41, Wolfram Sang wrote: Hi, Initialization code is based on NVEC driver. There is a HW bug in AP20 that was also mentioned in kernel sources for Toshiba AC100. Signed-off-by: Andrey Danin Cool

Re: [PATCH 1/3] i2c: tegra: implement slave mode

2015-03-31 Thread Andrey Danin
Hi, Sorry for long delay. And thanks for the quick review. It helped a lot! On 29.01.2015 14:41, Wolfram Sang wrote: Hi, Initialization code is based on NVEC driver. There is a HW bug in AP20 that was also mentioned in kernel sources for Toshiba AC100. Signed-off-by: Andrey Danin danind

Re: [PATCH 3/3] dt: paz00: define nvec as child of i2c bus

2015-03-31 Thread Andrey Danin
Hi, Thanks for the review. On 03.02.2015 0:20, Stephen Warren wrote: On 01/29/2015 12:20 AM, Andrey Danin wrote: NVEC driver was reimplemented to use tegra i2c. Use common i2c bindings for NVEC node. diff --git a/Documentation/devicetree/bindings/nvec/nvidia,nvec.txt b/Documentation

Re: [PATCH 3/3] dt: paz00: define nvec as child of i2c bus

2015-03-31 Thread Andrey Danin
On 31.03.2015 17:09, Stephen Warren wrote: On 03/31/2015 12:40 AM, Andrey Danin wrote: Hi, Thanks for the review. On 03.02.2015 0:20, Stephen Warren wrote: On 01/29/2015 12:20 AM, Andrey Danin wrote: NVEC driver was reimplemented to use tegra i2c. Use common i2c bindings for NVEC node

Re: [PATCH 3/3] dt: paz00: define nvec as child of i2c bus

2015-03-31 Thread Andrey Danin
Added Wolfram Sang and linux-i2c ML On 31.03.2015 18:46, Andrey Danin wrote: On 31.03.2015 17:09, Stephen Warren wrote: On 03/31/2015 12:40 AM, Andrey Danin wrote: Hi, Thanks for the review. On 03.02.2015 0:20, Stephen Warren wrote: On 01/29/2015 12:20 AM, Andrey Danin wrote: NVEC driver

[PATCH v2 3/4] staging/nvec: remove old code

2015-03-30 Thread Andrey Danin
Signed-off-by: Andrey Danin --- Changes for v2: - it is initial verion --- drivers/staging/nvec/nvec.c | 211 1 file changed, 211 deletions(-) diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index f4c5527..f39f516 100644

[PATCH v2 4/4] dt: paz00: define nvec as child of i2c bus

2015-03-30 Thread Andrey Danin
NVEC driver was reimplemented to use tegra i2c. Use common i2c bindings for NVEC node. Signed-off-by: Andrey Danin --- Changes for v2: - swap reg and request-gpios properties - use nvec-slave instead of nvec to keep ABI compatibility - place doc in separate patch --- arch/arm/boot/dts/tegra20

[PATCH v2 1/4] i2c: tegra: implement slave mode

2015-03-30 Thread Andrey Danin
Initialization code is based on NVEC driver. There is a HW bug in AP20 that was also mentioned in kernel sources for Toshiba AC100. Signed-off-by: Andrey Danin --- Changes for v2: - remove hack from tegra_i2c_clock_disable - replace slave status helper functions with local variables - add

[PATCH v2 0/4] arm: tegra: implement NVEC driver using tegra i2c.

2015-03-30 Thread Andrey Danin
on top of new i2c slave framework. - old code is removed in separate patch - documentation patch is integrated to main nvec patch Thanks in advance Andrey Danin (4): i2c: tegra: implement slave mode staging/nvec: reimplement on top of tegra i2c driver staging/nvec: remove old code dt: paz00

[PATCH v2 2/4] staging/nvec: reimplement on top of tegra i2c driver

2015-03-30 Thread Andrey Danin
Remove i2c controller related code and use tegra i2c driver in slave mode. Update nvec documentation. Signed-off-by: Andrey Danin --- Changes for v2: - remove extra new line - keep old functions to simplify review - move nvec_state enum to nvec.c - use nvec-slave instead of nvec in dts to keep

[PATCH v2 2/4] staging/nvec: reimplement on top of tegra i2c driver

2015-03-30 Thread Andrey Danin
Remove i2c controller related code and use tegra i2c driver in slave mode. Update nvec documentation. Signed-off-by: Andrey Danin danind...@mail.ru --- Changes for v2: - remove extra new line - keep old functions to simplify review - move nvec_state enum to nvec.c - use nvec-slave instead of nvec

[PATCH v2 0/4] arm: tegra: implement NVEC driver using tegra i2c.

2015-03-30 Thread Andrey Danin
on top of new i2c slave framework. - old code is removed in separate patch - documentation patch is integrated to main nvec patch Thanks in advance Andrey Danin (4): i2c: tegra: implement slave mode staging/nvec: reimplement on top of tegra i2c driver staging/nvec: remove old code dt: paz00

[PATCH v2 1/4] i2c: tegra: implement slave mode

2015-03-30 Thread Andrey Danin
Initialization code is based on NVEC driver. There is a HW bug in AP20 that was also mentioned in kernel sources for Toshiba AC100. Signed-off-by: Andrey Danin danind...@mail.ru --- Changes for v2: - remove hack from tegra_i2c_clock_disable - replace slave status helper functions with local

[PATCH v2 3/4] staging/nvec: remove old code

2015-03-30 Thread Andrey Danin
Signed-off-by: Andrey Danin danind...@mail.ru --- Changes for v2: - it is initial verion --- drivers/staging/nvec/nvec.c | 211 1 file changed, 211 deletions(-) diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index f4c5527

[PATCH v2 4/4] dt: paz00: define nvec as child of i2c bus

2015-03-30 Thread Andrey Danin
NVEC driver was reimplemented to use tegra i2c. Use common i2c bindings for NVEC node. Signed-off-by: Andrey Danin danind...@mail.ru --- Changes for v2: - swap reg and request-gpios properties - use nvec-slave instead of nvec to keep ABI compatibility - place doc in separate patch --- arch/arm

[PATCH 0/3] arm: tegra: implement NVEC driver using tegra i2c.

2015-01-28 Thread Andrey Danin
mode for tegra I2C controller. This patch was checked on tegra 2 device (Toshiba AC100) only. Please review carefully. Patch 2 reworks NVEC driver itself. I kept code close to original. Patch 3 fixes device tree and documentation. Thanks in advance Andrey Danin (3): i2c: tegra: implement

[PATCH 1/3] i2c: tegra: implement slave mode

2015-01-28 Thread Andrey Danin
Initialization code is based on NVEC driver. There is a HW bug in AP20 that was also mentioned in kernel sources for Toshiba AC100. Signed-off-by: Andrey Danin --- drivers/i2c/busses/i2c-tegra.c | 131 + 1 file changed, 131 insertions(+) diff --git

[PATCH 3/3] dt: paz00: define nvec as child of i2c bus

2015-01-28 Thread Andrey Danin
NVEC driver was reimplemented to use tegra i2c. Use common i2c bindings for NVEC node. Signed-off-by: Andrey Danin --- .../devicetree/bindings/nvec/nvidia,nvec.txt | 19 ++- arch/arm/boot/dts/tegra20-paz00.dts| 22 +- 2 files changed, 11

[PATCH 2/3] staging/nvec: reimplement on top of tegra i2c driver

2015-01-28 Thread Andrey Danin
Remove i2c controller related code and use tegra i2c driver in slave mode. Signed-off-by: Andrey Danin --- drivers/staging/nvec/nvec.c | 379 ++-- drivers/staging/nvec/nvec.h | 17 +- 2 files changed, 122 insertions(+), 274 deletions(-) diff --git

[PATCH 0/3] arm: tegra: implement NVEC driver using tegra i2c.

2015-01-28 Thread Andrey Danin
mode for tegra I2C controller. This patch was checked on tegra 2 device (Toshiba AC100) only. Please review carefully. Patch 2 reworks NVEC driver itself. I kept code close to original. Patch 3 fixes device tree and documentation. Thanks in advance Andrey Danin (3): i2c: tegra: implement

[PATCH 3/3] dt: paz00: define nvec as child of i2c bus

2015-01-28 Thread Andrey Danin
NVEC driver was reimplemented to use tegra i2c. Use common i2c bindings for NVEC node. Signed-off-by: Andrey Danin danind...@mail.ru --- .../devicetree/bindings/nvec/nvidia,nvec.txt | 19 ++- arch/arm/boot/dts/tegra20-paz00.dts| 22 +- 2

[PATCH 2/3] staging/nvec: reimplement on top of tegra i2c driver

2015-01-28 Thread Andrey Danin
Remove i2c controller related code and use tegra i2c driver in slave mode. Signed-off-by: Andrey Danin danind...@mail.ru --- drivers/staging/nvec/nvec.c | 379 ++-- drivers/staging/nvec/nvec.h | 17 +- 2 files changed, 122 insertions(+), 274 deletions

[PATCH 1/3] i2c: tegra: implement slave mode

2015-01-28 Thread Andrey Danin
Initialization code is based on NVEC driver. There is a HW bug in AP20 that was also mentioned in kernel sources for Toshiba AC100. Signed-off-by: Andrey Danin danind...@mail.ru --- drivers/i2c/busses/i2c-tegra.c | 131 + 1 file changed, 131 insertions