admin管理员组

文章数量:1188831

I have been doing work embedded Linux work for the past few years without any real formal training on it. I'd like to better understand how device drivers handle nested devices/buses. For example, a processor might have an AXI bus as one of its main forms of communication with hardware. Off of that AXI bus could be any number of other devices or even more buses such as I2C or SPI with their own devices.

axi {
   compatible = "axi-driver";

   spi {
      compatible = "spi-driver";        
      temp-sensor {
         compatible = "temp-driver";
       };
   };

   i2c {
      compatible = "i2c-driver";
       humidity-sensor {
          compatible = "humidity-driver";
       };
   };
};

I imagine that a majority of devices have at least one level of nesting like this. How is this handled in the kernel? My understanding of drivers is that they mostly operate by themselves and do not interact. Does Linux use drivers for busses differently than what I am used to for devices? Or is the device tree misleading and a device off a bus doesn't actually rely on the bus driver?

本文标签: How does Linux handle a driver for a device which lives on a bus requiring another driverStack Overflow