A question on device initialization ordering

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

 




Hi,

I have a question about the order in which devices are initialized.

The simpler case is this: A device X needs to be taken out of reset by 
another device Y before it can be used.

To get this to work, one option is to modify the driver for Y to use 
arch_initcall instead of device_initcall. This results in it being run 
first, so that the other device X is out of reset by the time it is 
initialized.

Is it possible within the devicetree to specify that one device must be 
initialized before attempting to initialize another (to avoid needing to 
modify the driver)?



A chicken-and-egg case: What if two devices use a common driver, but one 
must first be used to bring the other out of reset? Eg: A GPIO expander 
that is held in reset by another GPIO expander.

The goal would be to:
  1. Initialize the first GPIO expander
  2. Run a driver that takes the second expander out of reset using the 
first
  3. Initialize the second GPIO expander (which uses the same driver as 
the first).

In this case, because the drivers for step 1 and step 3 are the same 
driver, it is not possible to adjust the _initcall of the driver for 
step 2 to be in-between them.

Is there a way to describe this situation in a devicetree such that the 
driver for step 2 gets run in-between when the first and second GPIO 
expanders are initialized?


Thank you,
Joshua Scott��.n��������+%������w��{.n����z�{��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux