Hi, There are two solutions. But it never looks nice. Does anyone have no idea ? 1. Save the struct s3c_fb in the v4l2_subdev.priv like: In the s3cfb_probe: v4l2_set_subdevdata(&sfb->sd, sfb); platform_set_drvdata(pdev, &sfb->sd); In the s3cfb_remove: struct v4l2_subdev *sd = platform_get_drvdata(pdev); struct s3c_fb *sfb = sd->priv; In the s5p-fimc driver: sd = dev_get_drvdata(dev); -> This bothers s3cfb due to s5p-fimc driver. 2. let sd locate top of the struct s3c_fb like: struct s3c_fb { struct v4l2_subdev sd; struct device *dev; -> and then don't save the sfb->sd in the platform driver data. It makes s3cfb driver use the platform driver data for its own purpose. But you can get the v4l2_subdev pointer in s5p-fimc driver using dev_get_drvdata. The reason how to get the pointer is that the address of v4l2_subdev is same with s3cfb's platform driver data. BRs, > -----Original Message----- > From: linux-media-owner@xxxxxxxxxxxxxxx [mailto:linux-media- > owner@xxxxxxxxxxxxxxx] On Behalf Of Sungchun Kang > Sent: Wednesday, February 23, 2011 8:17 PM > To: linux-media@xxxxxxxxxxxxxxx > Subject: Hello, how to control FrameBuffer device as v4l2 sub-device? > > FIMC is hardware function like csc, post, rotatin and so on. > It is necessary to send some data to FB from FIMC. > > So, I have registered FB driver as v4l2 sub-device of FIMC. > ---------------- > | v4l2_device | > ---------------- > | fimc-0 |---------------- > | | | > ---------------- | > | | > ---------------- ---------------- > | v4l2_subdev | | v4l2_subdeve | > ---------------- ---------------- > | FB1 | | mipi-csi, | > | FB2 | | senor | > ---------------- ---------------- > And, it is controlled using platform_get_drvdata and platform_set_drvdata > between FIMC and FB drvier. > But, FB driver uses drvdata for its own purpose. If I set v4l2_subdev ptr like this : > platform_set_drvdata(pdev, &sfb->sd); // v4l2_subdev sd; > > platform_device ptr is changed. > > Because FB driver aleady set like this : > platform_set_drvdata(pdev, sfb); > > So, I wonder how to control data between 2 hardware. > > If you have some idea, pls reply. > > BRs, > > -- > To unsubscribe from this list: send the line "unsubscribe linux-media" in the body > of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at > http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html