Re: Request for Clarification: old - legacy - new driver model

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jean Delvare said the following:
> On Thu, 19 Feb 2009 15:17:13 +0100, Michael Lawnick wrote:
<snip>
>> Our situation: main board is up and running, all drivers loaded.
>> Now an extension board will be plugged in. It is detected by
>> periodically polling via I2C for MUX. After detection the drivers e.g.
> 
> This is totally unsupported. I2C isn't an hot-pluggable bus.
> 
<snip>
> 
> What you are missing, as far as I can see, is proper mux support.
> Rodolfo Giometti (Cc'd) is working on this, if you want to test his
> patches (which I still didn't have the time to look at, sadly.)
> 
I have seen the patches, I am planning based on them.

Well, thinking about it, I hope to have a solution.
Here is what a H/W might look like:
                          +-------+   +--------+
                          |  LM75 |   | EEPROM |
                          +-------+   +--------+
 Mainboard                    |           |
+------------+                |           |
| controller |----------------+-----+-----+---....
+------------+                      |
                                    |
                                    |
                                 +------+
                                 |      |
   ...>--------------------------| MUX1 |----------------------<...
               +-----------------|      |---------------+
               |                 +------+               |
               |                                        |
               |                                        |
               ^                                        ^
Plugin1        |                          Plugin2       |
            +------+                                +------+
            |      |   +-------+                    |      |   +-------+
        +---| MUX2 |---|  LM75 |                +---| MUX3 |---|  LM75 |
        |   |      |   +-------+                |   |      |   +-------+
        |   +------+                            |   +------+
        |                                       |
        |   +-------+                           |   +-------+
        +---|  LM75 |                           +---|  LM75 |
        |   +-------+                           |   +-------+
        |                                       |
        |   +--------+                          |   +--------+
        +---| EEPROM |                          +---| EEPROM |
        |   +--------+                          |   +--------+
        |                                       |


The idea: when deferring the instantiation of the adapters of MUX1,
there should be something like a hot-plug event.
AFAIK, after adding an adapter via i2c_add_numbered_adapter(), the I2C
subsystem will probe for all currently known clients on this new bus.
Correct?
If so, this should cascade through the newly plugged in board.

This defer could be implemented by removing auto instantiation (module
parameter) but adding a sysFs entry on MUX that does it on demand:
#start controller 5
echo 5 > /sys/bus/i2c/devices/1-0020/startAdapter
#stop controller 5
echo 5 > /sys/bus/i2c/devices/1-0020/stopAdapter

Any contradictions?

-- 
Regards,
Michael

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

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux