Re: [PATCH v3] i2c: Add support for NXP PCA984x family.

Adrian Fiergolski
2017-12-13T08:47:31Z

On 12.12.2017 at 20:03, Peter Rosin wrote:
> [Adding Wolfram]
>
> On 2017-12-12 18:14, Adrian Fiergolski wrote:
>> On 12.12.2017 at 16:25, Peter Rosin wrote:
>>> On 2017-12-12 13:06, Adrian Fiergolski wrote:
>>>> In a normal run scenario, I don't need it. I can imagine it may be a
>>>> problem, if the module
>>>> is suddenly unloaded and loaded: the mux remains set to some not default
>>>> bus and
>>>> the module is not aware of it. However, I agree then the bus could be
>>>> reset somewhere
>>>> at higher level.
>>> Think about what happens if you have more than one chip on some i2c bus
>>> that uses this reset mechanism. First you instantiate one of the drivers
>>> and both chips are reset. Then you carry on with careful configuration
>>> of that first chip. Then you instantiate the driver for the other chip
>>> and all you careful configuration of the first chip is lost as it is
>>> reset a second time. So, you just can't reset everything on the bus in
>>> any random driver, that has to be done on some other level.
>> That's all true. However, we are discussing an I2C mux/switch which is a
>> root
>> of an I2C sub-tree. It is initialized first, so the SOFTWARE_RESET command
>> would reset only mux/switch and all its nodes. The command would be followed
>> by the configuration of all its nodes, which anyway can't be performed
>> earlier.
> Have a look at Documentation/i2c/i2c-topology and think again.
And... ?

Cheers,
Adrian