]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00275419-1 mxc dispdrv: introduce post init interface
authorLiu Ying <Ying.Liu@freescale.com>
Thu, 15 Aug 2013 10:01:40 +0000 (18:01 +0800)
committerJason Liu <r64343@freescale.com>
Wed, 30 Oct 2013 01:54:51 +0000 (09:54 +0800)
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>
drivers/video/mxc/mxc_dispdrv.c
drivers/video/mxc/mxc_dispdrv.h

index 2e6da99c4f6869a342aeb886d6e4cc5921596acd..5193c7deef00d06f371f4cacbc0a25a9c88f1efc 100644 (file)
@@ -18,6 +18,8 @@
  * 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;
index d6dcf19dc4048c473bc3603e6b07d9410cff319d..127fd08ea391b13df979ad672b8ce9cfc2d51b70 100644 (file)
@@ -33,6 +33,8 @@ struct mxc_dispdrv_setting {
 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 *);