> > Some resources might differ based on platforms and we need platform > > specific functions to initialize or alter them. For better code > > re-usability, making a separate res_ops which will hold all such > > function pointers or other resource specific data. Include ops like > > - init_regulator (initialize the regulator data) > > - pcie_irq_handler (interrupt handler for PCIe) > > - set_device_mode (set device mode to EP or RC) > > > > Some operations maybe specific to certain SoCs and not applicable > > to others. For such use cases, adding an SoC variant data field > > which can be used to distinguish between the variants. > > > > Some SoCs may have dual-role PCIe controller which can work as > > RC or EP. Add device_mode to store the role and take decisions > > accordingly. > > > > Make enable/disable of regulator and initialization of IRQ as > > common functions to be used by all Samsung SoCs. > > As hinted above, this patch ends up being a mixture of several things > that makes this kind of hard to review. Separating these into their > own patches would make it easier. > Will split into multiple patches