Re: [RFC 0/9] i2c: slave: improve i2c client address spaces and their DT support

2015-07-21 Thread Wolfram Sang
On Mon, Jul 20, 2015 at 04:13:13PM -0600, Stephen Warren wrote:
 On 07/17/2015 08:08 AM, Wolfram Sang wrote:
 As promised here is my RFC to improve address spaces for I2C. This should 
 give
 i2c seperate address spaces for standard clients, 10 bit clients, and our own
 slave clients. So, you can now have a 7 bit slave at 0x50 and a 10 bit slave 
 at
 0x050. Or, you can have a slave driver listening at some address and at the
 same time have a client driver talking to this address. Note that this is 
 only
 the core support for that separation, I am still not sure if there is 
 hardware
 being able talking to its own slave address, but we will see.
 
 This RFC and while I did some quick tests, it is not thoroughly tested. But I
 wanted to push it out before I leave the computer for the weekend. It still
 shows what path I chose to solve the problem. So, comments on that and 
 further
 testing are more than welcome!
 
 BTW Andrey, I did not modify your patch and couldn't get the 
 i2c-slave-eeprom driver
 to work with my Jetson TK1. Does this work for you?
 
 This approach makes sense to me.

\o/

 I'd expect patch 2/9 dt-bindings: add header for generic I2C flags in
 bindings to document the flags (or at least mention their existence, and
 point at the new header file) in the core I2C bindings document.

Yes. I forgot to say that docs are missing. I wanted to get some
feedback first. This series is a good reason to finally start the core
I2C binding document.

 Please consider the series,
 Acked-by: Stephen Warren swar...@nvidia.com

 (ack rather than review since I didn't review patch 1, and mostly
 concentrated on reviewing the concepts of how slaves were represented rather
 than the coding details).

Thanks, exactly that I was looking for this RFC. Will try to send out
proper patches this week.



signature.asc
Description: Digital signature


Re: [RFC 0/9] i2c: slave: improve i2c client address spaces and their DT support

2015-07-20 Thread Andrey Danin

Hello Wolfram,

On 17.07.2015 17:08, Wolfram Sang wrote:

As promised here is my RFC to improve address spaces for I2C. This should give
i2c seperate address spaces for standard clients, 10 bit clients, and our own
slave clients. So, you can now have a 7 bit slave at 0x50 and a 10 bit slave at
0x050. Or, you can have a slave driver listening at some address and at the
same time have a client driver talking to this address. Note that this is only
the core support for that separation, I am still not sure if there is hardware
being able talking to its own slave address, but we will see.

This RFC and while I did some quick tests, it is not thoroughly tested. But I
wanted to push it out before I leave the computer for the weekend. It still
shows what path I chose to solve the problem. So, comments on that and further
testing are more than welcome!

BTW Andrey, I did not modify your patch and couldn't get the i2c-slave-eeprom 
driver
to work with my Jetson TK1. Does this work for you?

Thanks,

Wolfram



Thanks for the patches. Slave mode works for me.

The series looks good. Only hardcoded values in patch 4 confuse me a little.
--
To unsubscribe from this list: send the line unsubscribe linux-i2c in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 0/9] i2c: slave: improve i2c client address spaces and their DT support

2015-07-20 Thread Wolfram Sang

 Thanks for the patches. Slave mode works for me.

Okay, need to have a closer look this week. I combined two I2C busses on
my Jetson TK1. While the initialization of the slave works fine, reading
from the slave via the second I2C controller does not work (yet).

 The series looks good.

Great. I'd be happy for Acked-by or Tested-by tags if possible.

 Only hardcoded values in patch 4 confuse me a little.

Yes, they will most likely be replaced by defines in the next series. We
will need them in another place, too. However, since userspace relies on
them, they should never be changed.



signature.asc
Description: Digital signature


Re: [RFC 0/9] i2c: slave: improve i2c client address spaces and their DT support

2015-07-20 Thread Andrey Danin

On 17.07.2015 17:08, Wolfram Sang wrote:

As promised here is my RFC to improve address spaces for I2C. This should give
i2c seperate address spaces for standard clients, 10 bit clients, and our own
slave clients. So, you can now have a 7 bit slave at 0x50 and a 10 bit slave at
0x050. Or, you can have a slave driver listening at some address and at the
same time have a client driver talking to this address. Note that this is only
the core support for that separation, I am still not sure if there is hardware
being able talking to its own slave address, but we will see.

This RFC and while I did some quick tests, it is not thoroughly tested. But I
wanted to push it out before I leave the computer for the weekend. It still
shows what path I chose to solve the problem. So, comments on that and further
testing are more than welcome!

BTW Andrey, I did not modify your patch and couldn't get the i2c-slave-eeprom 
driver
to work with my Jetson TK1. Does this work for you?

Thanks,

Wolfram


Andrey Danin (1):
   i2c: tegra: implement slave mode

Wolfram Sang (8):
   dt-bindings: add header for generic I2C flags in bindings
   i2c: add a flag to mark clients as slaves
   i2c: apply address offset for slaves, too
   i2c: rename address check functions
   i2c: make address check indpendent from client struct
   i2c: apply DT flags when probing
   i2c: take address space into account when checking for used addresses
   dts: tegra: WIP: hack dts to test new dt flags for i2c

  arch/arm/boot/dts/tegra124-jetson-tk1.dts |   7 ++
  drivers/i2c/busses/Kconfig|   1 +
  drivers/i2c/busses/i2c-tegra.c| 119 ++
  drivers/i2c/i2c-core.c|  69 +++--
  include/dt-bindings/i2c/i2c.h |  18 +
  include/linux/i2c.h   |   9 ++-
  6 files changed, 197 insertions(+), 26 deletions(-)
  create mode 100644 include/dt-bindings/i2c/i2c.h



The series is
Tested-by: Andrey Danin danind...@mail.ru
--
To unsubscribe from this list: send the line unsubscribe linux-i2c in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 0/9] i2c: slave: improve i2c client address spaces and their DT support

2015-07-20 Thread Stephen Warren

On 07/17/2015 08:08 AM, Wolfram Sang wrote:

As promised here is my RFC to improve address spaces for I2C. This should give
i2c seperate address spaces for standard clients, 10 bit clients, and our own
slave clients. So, you can now have a 7 bit slave at 0x50 and a 10 bit slave at
0x050. Or, you can have a slave driver listening at some address and at the
same time have a client driver talking to this address. Note that this is only
the core support for that separation, I am still not sure if there is hardware
being able talking to its own slave address, but we will see.

This RFC and while I did some quick tests, it is not thoroughly tested. But I
wanted to push it out before I leave the computer for the weekend. It still
shows what path I chose to solve the problem. So, comments on that and further
testing are more than welcome!

BTW Andrey, I did not modify your patch and couldn't get the i2c-slave-eeprom 
driver
to work with my Jetson TK1. Does this work for you?


This approach makes sense to me.

I'd expect patch 2/9 dt-bindings: add header for generic I2C flags in 
bindings to document the flags (or at least mention their existence, 
and point at the new header file) in the core I2C bindings document.


Please consider the series,
Acked-by: Stephen Warren swar...@nvidia.com

(ack rather than review since I didn't review patch 1, and mostly 
concentrated on reviewing the concepts of how slaves were represented 
rather than the coding details).

--
To unsubscribe from this list: send the line unsubscribe linux-i2c in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC 0/9] i2c: slave: improve i2c client address spaces and their DT support

2015-07-17 Thread Wolfram Sang
As promised here is my RFC to improve address spaces for I2C. This should give
i2c seperate address spaces for standard clients, 10 bit clients, and our own
slave clients. So, you can now have a 7 bit slave at 0x50 and a 10 bit slave at
0x050. Or, you can have a slave driver listening at some address and at the
same time have a client driver talking to this address. Note that this is only
the core support for that separation, I am still not sure if there is hardware
being able talking to its own slave address, but we will see.

This RFC and while I did some quick tests, it is not thoroughly tested. But I
wanted to push it out before I leave the computer for the weekend. It still
shows what path I chose to solve the problem. So, comments on that and further
testing are more than welcome!

BTW Andrey, I did not modify your patch and couldn't get the i2c-slave-eeprom 
driver
to work with my Jetson TK1. Does this work for you?

Thanks,

   Wolfram


Andrey Danin (1):
  i2c: tegra: implement slave mode

Wolfram Sang (8):
  dt-bindings: add header for generic I2C flags in bindings
  i2c: add a flag to mark clients as slaves
  i2c: apply address offset for slaves, too
  i2c: rename address check functions
  i2c: make address check indpendent from client struct
  i2c: apply DT flags when probing
  i2c: take address space into account when checking for used addresses
  dts: tegra: WIP: hack dts to test new dt flags for i2c

 arch/arm/boot/dts/tegra124-jetson-tk1.dts |   7 ++
 drivers/i2c/busses/Kconfig|   1 +
 drivers/i2c/busses/i2c-tegra.c| 119 ++
 drivers/i2c/i2c-core.c|  69 +++--
 include/dt-bindings/i2c/i2c.h |  18 +
 include/linux/i2c.h   |   9 ++-
 6 files changed, 197 insertions(+), 26 deletions(-)
 create mode 100644 include/dt-bindings/i2c/i2c.h

-- 
2.1.4

--
To unsubscribe from this list: send the line unsubscribe linux-i2c in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html