This patch adds a new post init interface in the mxc display
driver. It may do necessary deferred operations after a
display device's dev_id and disp_id pass usage check. This
is a feasible way to avoid any setup being overwitten or
damaged by a late coming display device which uses the same
dev_id and disp_id with a display already registered.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
* A display device driver could call mxc_dispdrv_register(drv) in its dev_probe() function.
* Move all dev_probe() things into mxc_dispdrv_driver->init(), init() function should init
* and feedback setting;
+ * Necessary deferred operations can be done in mxc_dispdrv_driver->post_init(),
+ * after dev_id and disp_id pass usage check;
* Move all dev_remove() things into mxc_dispdrv_driver->deinit();
* Move all dev_suspend() things into fb_notifier for SUSPEND, if there is;
* Move all dev_resume() things into fb_notifier for RESUME, if there is;
struct mxc_dispdrv_driver {
const char *name;
int (*init) (struct mxc_dispdrv_handle *, struct mxc_dispdrv_setting *);
+ /* deferred operations after dev_id and disp_id pass usage check */
+ int (*post_init) (struct mxc_dispdrv_handle *, int dev_id, int disp_id);
void (*deinit) (struct mxc_dispdrv_handle *);
/* display driver enable function for extension */
int (*enable) (struct mxc_dispdrv_handle *);