Skip to contentSkip to conversation

i2c Mux support for LTC4306 multiplexers

DISCUSSION Rodolfo Giometti 3 participants 3 messages Sep 2, 2010 4 messages not in the archive I2C subsystem host drivers

lore
Share & tools
lore
#2 lore raw
In reply to a message not in the archive
Quoted 11 lines · Joe Ghalam

Hi,
I have been trying to include you i2c changes to bring in support for the i2c muxes in my system. I'm using Linux 2.6.33.2 with an MPC8547E. There are two IC2 buses hanging off the host processor. The 2nd I2C bus has 3 LT4306 multiplexers (4 ch per device).

My current setup (without the i2c-mux) uses the buses/i2c-mpc.c to create two adapters mapped to /dev/i2c-0 and /dev/i2c-1 (these devices are services by an i2c proxy). I would like to move away from this setup by using i2c-mux + mux specific drivers.

Quoted 6 lines

I have ported your changes in my version of Linux as best as I could, and I also used pca542x related files as templates to create support for ltc4306. During the system boot up, as usual, I see two "MPC adapter" adapters, 0 and 1, getting registered, and I also see my LTC4306 device registered. But I haven't been able to change the i2c-mpc to probe the already discovered buses for any muxes.

Maybe you should provide some code and/or debugging messages... I'm sorry but I don't understand your problem.

Ciao,

Rodolfo

Signature · 5 lines
GNU/Linux Solutions                  e-mail: giometti-AVVDYK/kqiJWk0Htik3J/[email protected]
Linux Device Driver                          [email protected]
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it
#4 lore raw
In reply to a message not in the archive

Rodolfo Giometti said the following:

Quoted 12 lines · Joe Ghalam
Quoted 11 lines

Hi, I have been trying to include you i2c changes to bring in support for the i2c muxes in my system. I'm using Linux 2.6.33.2 with an MPC8547E.There are two IC2 buses hanging off the host processor. The 2nd I2C bus has 3 LT4306 multiplexers (4 ch per device).

My current setup (without the i2c-mux) uses the buses/i2c-mpc.c to create two adapters mapped to /dev/i2c-0 and /dev/i2c-1 (these devices are services by an i2c proxy). I would like to move away from this setup by using i2c-mux + mux specific drivers.

Quoted 6 lines
Quoted 6 lines

I have ported your changes in my version of Linux as best as I could, and I also used pca542x related files as templates to create support for ltc4306. During the system boot up, as usual, I see two "MPC adapter" adapters, 0 and 1, getting registered, and I also see my LTC4306 device registered. But I haven't been able to change the i2c-mpc to probe the already discovered buses for any muxes.

There should be no need to change the (original) adapter code. You either need to enable automatic detection of your LT4306 via normal_i2c + proper class declaration in your lt4306 module or register it at startup via i2c_register_board_info() (e.g. in setup.c and/or using device tree).
For testing you can add it dynamically from shell with something like:
echo "lt4306 0x70" > /sys/bus/i2c/devices/i2c-1/new-device"

Quoted 4 lines

Maybe you should provide some code and/or debugging messages... I'm sorry but I don't understand your problem.

AOL.
What is this i2c proxy?

Signature · 2 lines
KR
Michael
#6 lore raw
In reply to a message not in the archive
Quoted 20 lines · Michael Lawnick

Rodolfo Giometti said the following:

Quoted 12 lines · Joe Ghalam
Quoted 11 lines

Hi, I have been trying to include you i2c changes to bring in support for the i2c muxes in my system. I'm using Linux 2.6.33.2 with an MPC8547E.There are two IC2 buses hanging off the host processor. The 2nd I2C bus has 3 LT4306 multiplexers (4 ch per device).

My current setup (without the i2c-mux) uses the buses/i2c-mpc.c to create two adapters mapped to /dev/i2c-0 and /dev/i2c-1 (these devices are services by an i2c proxy). I would like to move away from this setup by using i2c-mux + mux specific drivers.

Quoted 6 lines
Quoted 6 lines

I have ported your changes in my version of Linux as best as I could, and I also used pca542x related files as templates to create support for ltc4306. During the system boot up, as usual, I see two "MPC adapter" adapters, 0 and 1, getting registered, and I also see my LTC4306 device registered. But I haven't been able to change the i2c-mpc to probe the already discovered buses for any muxes.

Quoted 3 lines

There should be no need to change the (original) adapter code. You either need to enable automatic detection of your LT4306 via normal_i2c + proper class declaration in your lt4306 module or register

Note that there is no detection class for mux chips yet, because the only I2C-based mux chip family we support today can't be detected. It could be added if needed, but my feeling is that multiplexer chips aren't too common and often need platform data for proper operation anyway, so they'd rather be declared than detected.

Quoted 4 lines

it at startup via i2c_register_board_info() (e.g. in setup.c and/or using device tree).
For testing you can add it dynamically from shell with something like:
echo "lt4306 0x70" > /sys/bus/i2c/devices/i2c-1/new-device"

Signature · 1 line
Jean Delvare