of: Add Device Tree support for SPMI
This change adds SPMI Device Tree parsing. The of_spmi_register_devices() API should be called from the probe() routine of each SPMI controller to parse the subtree and add the respective SPMI devices. The SPMI subtree is nested up to two levels deep. The first level is the most basic and treats the address as the SPMI slave ID. This should be used for simple devices that has no notion of segmented SPMI address spaces. An optional second level specifies the address as an offset within the outer layer's slave ID. This is used to specify multiple devices on the same slave ID that have different address ranges. In fact, it's reasonable to specify any number of address ranges at this level. Devices can also specify any number of interrupts that's decoding is done by an external interrupt device. Sections of this code were taken from drivers/of/platform.c. Change-Id: Ib9f06764a9bd85e3b2aab43b72aa7132885aa044 Signed-off-by:Michael Bohan <mbohan@codeaurora.org> Signed-off-by:
David Brown <davidb@codeaurora.org>
Loading
Please register or sign in to comment