Re: [PATCH v4 3/5] i2c: designware: Add slave definitions
From: Rob Herring <robh@kernel.org>
Date: 2016-12-12 23:16:23
Also in:
linux-i2c, lkml
From: Rob Herring <robh@kernel.org>
Date: 2016-12-12 23:16:23
Also in:
linux-i2c, lkml
On Mon, Dec 12, 2016 at 12:35 PM, Luis de Oliveira [off-list ref] wrote:
Hi all,
Please don't top post.
The slave address could be set by the I2C slave backend so I can't use it to setup the controller. A boolean property was my initial approach then Andy and Wolfram Sang suggested the use of compatible strings and later It was suggested to use a property to select mode but I can do it again if it's the best way. Can you please tell me where should it be documented?
bindings/i2c/i2c.txt. Actually, looking at this some more, we already have a way to describe the controller being a slave device with the I2C_OWN_SLAVE_ADDRESS flag in the reg property. We should just need a helper to read reg property of each child and check for the bit set. Rob