Message ID | Pine.LNX.4.64.0905151824040.4658@axis700.grange (mailing list archive) |
---|---|
State | RFC |
Headers | show |
On Fri, May 15, 2009 at 07:19:10PM +0200, Guennadi Liakhovetski wrote: > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> > --- > > This is actually a completion to the other single patches I've sent > earlier for various boards. As I said, pcm037 doesn't have all its > outstanding patches in next yet, so, you'll need to collect them from > trees / lists, or get them when I upload them. As I haven't got camera support for pcm037 in my tree yet, you can combine this with the patch which adds camera support. How are we going to sync this with the according changes to soc-camera? Sascha > > arch/arm/mach-mx3/pcm037.c | 26 ++++++++++++++++++-------- > 1 files changed, 18 insertions(+), 8 deletions(-) > > diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c > index bfa814d..af49f03 100644 > --- a/arch/arm/mach-mx3/pcm037.c > +++ b/arch/arm/mach-mx3/pcm037.c > @@ -293,9 +293,18 @@ static int pcm037_camera_power(struct device *dev, int on) > return 0; > } > > +static struct i2c_board_info pcm037_i2c_2_devices[] = { > + { > + I2C_BOARD_INFO("mt9t031", 0x5d), > + }, > +}; > + > static struct soc_camera_link iclink = { > - .bus_id = 0, /* Must match with the camera ID */ > - .power = pcm037_camera_power, > + .bus_id = 0, /* Must match with the camera ID */ > + .power = pcm037_camera_power, > + .board_info = &pcm037_i2c_2_devices[0], > + .i2c_adapter_id = 2, > + .module_name = "mt9t031", > }; > > static struct i2c_board_info pcm037_i2c_devices[] = { > @@ -308,9 +317,10 @@ static struct i2c_board_info pcm037_i2c_devices[] = { > } > }; > > -static struct i2c_board_info pcm037_i2c_2_devices[] = { > - { > - I2C_BOARD_INFO("mt9t031", 0x5d), > +static struct platform_device pcm037_camera = { > + .name = "soc-camera-pdrv", > + .id = 0, > + .dev = { > .platform_data = &iclink, > }, > }; > @@ -390,6 +400,9 @@ static struct platform_device *devices[] __initdata = { > &pcm037_flash, > &pcm037_eth, > &pcm037_sram_device, > +#if defined(CONFIG_I2C_IMX) || defined(CONFIG_I2C_IMX_MODULE) > + &pcm037_camera, > +#endif > }; > > static struct ipu_platform_data mx3_ipu_data = { > @@ -447,9 +460,6 @@ static void __init mxc_board_init(void) > i2c_register_board_info(1, pcm037_i2c_devices, > ARRAY_SIZE(pcm037_i2c_devices)); > > - i2c_register_board_info(2, pcm037_i2c_2_devices, > - ARRAY_SIZE(pcm037_i2c_2_devices)); > - > mxc_register_device(&mxc_i2c_device1, &pcm037_i2c_1_data); > mxc_register_device(&mxc_i2c_device2, &pcm037_i2c_2_data); > #endif > -- > 1.6.2.4 > >
On Wed, 20 May 2009, Sascha Hauer wrote: > On Fri, May 15, 2009 at 07:19:10PM +0200, Guennadi Liakhovetski wrote: > > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> > > --- > > > > This is actually a completion to the other single patches I've sent > > earlier for various boards. As I said, pcm037 doesn't have all its > > outstanding patches in next yet, so, you'll need to collect them from > > trees / lists, or get them when I upload them. > > As I haven't got camera support for pcm037 in my tree yet, you can > combine this with the patch which adds camera support. Hm, so, I will have to redo that:-( > How are we going to sync this with the according changes to soc-camera? As I already replied to Russell, there's just one requirement for _this_ patch - it has to go in after this one: http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-next.git;a=commit;h=2bda41a0e9d42cf977a99e8df4fd6e331bb4f50d Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, May 20, 2009 at 11:01:46AM +0200, Guennadi Liakhovetski wrote: > On Wed, 20 May 2009, Sascha Hauer wrote: > > > On Fri, May 15, 2009 at 07:19:10PM +0200, Guennadi Liakhovetski wrote: > > > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> > > > --- > > > > > > This is actually a completion to the other single patches I've sent > > > earlier for various boards. As I said, pcm037 doesn't have all its > > > outstanding patches in next yet, so, you'll need to collect them from > > > trees / lists, or get them when I upload them. > > > > As I haven't got camera support for pcm037 in my tree yet, you can > > combine this with the patch which adds camera support. > > Hm, so, I will have to redo that:-( > > > How are we going to sync this with the according changes to soc-camera? > > As I already replied to Russell, there's just one requirement for _this_ > patch - it has to go in after this one: > > http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-next.git;a=commit;h=2bda41a0e9d42cf977a99e8df4fd6e331bb4f50d Ok, then Russell can pull my tree containing the camera patch for pcm037 and he will take care of the correct order, right? Sascha
On Wed, 20 May 2009, Sascha Hauer wrote: > On Wed, May 20, 2009 at 11:01:46AM +0200, Guennadi Liakhovetski wrote: > > On Wed, 20 May 2009, Sascha Hauer wrote: > > > > > On Fri, May 15, 2009 at 07:19:10PM +0200, Guennadi Liakhovetski wrote: > > > > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> > > > > --- > > > > > > > > This is actually a completion to the other single patches I've sent > > > > earlier for various boards. As I said, pcm037 doesn't have all its > > > > outstanding patches in next yet, so, you'll need to collect them from > > > > trees / lists, or get them when I upload them. > > > > > > As I haven't got camera support for pcm037 in my tree yet, you can > > > combine this with the patch which adds camera support. > > > > Hm, so, I will have to redo that:-( > > > > > How are we going to sync this with the according changes to soc-camera? > > > > As I already replied to Russell, there's just one requirement for _this_ > > patch - it has to go in after this one: > > > > http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-next.git;a=commit;h=2bda41a0e9d42cf977a99e8df4fd6e331bb4f50d > > Ok, then Russell can pull my tree containing the camera patch for pcm037 > and he will take care of the correct order, right? It would be correct, yes, if your tree was completely on one side of the above patch. But if you apply patches as you have them in your tree, i.e., first add camera support, then convert to platform driver, then Russell would have to first pull the first part of your tree, then v4l, then the econd part of your tree... which, I think, wouldn't be fair to require from him:-) so, you either would have to send him two pull requests with a request to pull v4l inbetween, or merge the two patches. Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c index bfa814d..af49f03 100644 --- a/arch/arm/mach-mx3/pcm037.c +++ b/arch/arm/mach-mx3/pcm037.c @@ -293,9 +293,18 @@ static int pcm037_camera_power(struct device *dev, int on) return 0; } +static struct i2c_board_info pcm037_i2c_2_devices[] = { + { + I2C_BOARD_INFO("mt9t031", 0x5d), + }, +}; + static struct soc_camera_link iclink = { - .bus_id = 0, /* Must match with the camera ID */ - .power = pcm037_camera_power, + .bus_id = 0, /* Must match with the camera ID */ + .power = pcm037_camera_power, + .board_info = &pcm037_i2c_2_devices[0], + .i2c_adapter_id = 2, + .module_name = "mt9t031", }; static struct i2c_board_info pcm037_i2c_devices[] = { @@ -308,9 +317,10 @@ static struct i2c_board_info pcm037_i2c_devices[] = { } }; -static struct i2c_board_info pcm037_i2c_2_devices[] = { - { - I2C_BOARD_INFO("mt9t031", 0x5d), +static struct platform_device pcm037_camera = { + .name = "soc-camera-pdrv", + .id = 0, + .dev = { .platform_data = &iclink, }, }; @@ -390,6 +400,9 @@ static struct platform_device *devices[] __initdata = { &pcm037_flash, &pcm037_eth, &pcm037_sram_device, +#if defined(CONFIG_I2C_IMX) || defined(CONFIG_I2C_IMX_MODULE) + &pcm037_camera, +#endif }; static struct ipu_platform_data mx3_ipu_data = { @@ -447,9 +460,6 @@ static void __init mxc_board_init(void) i2c_register_board_info(1, pcm037_i2c_devices, ARRAY_SIZE(pcm037_i2c_devices)); - i2c_register_board_info(2, pcm037_i2c_2_devices, - ARRAY_SIZE(pcm037_i2c_2_devices)); - mxc_register_device(&mxc_i2c_device1, &pcm037_i2c_1_data); mxc_register_device(&mxc_i2c_device2, &pcm037_i2c_2_data); #endif
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- This is actually a completion to the other single patches I've sent earlier for various boards. As I said, pcm037 doesn't have all its outstanding patches in next yet, so, you'll need to collect them from trees / lists, or get them when I upload them. arch/arm/mach-mx3/pcm037.c | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-)