Op 31 mei 2011, om 16:46 heeft Laurent Pinchart het volgende geschreven:

> On Tuesday 31 May 2011 15:55:04 Guennadi Liakhovetski wrote:
>> On Tue, 31 May 2011, Koen Kooi wrote:
>>> Op 31 mei 2011, om 11:46 heeft Javier Martin het volgende geschreven:
>>>> diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c
>>>> b/arch/arm/mach-omap2/board-omap3beagle-camera.c new file mode 100644
>>>> index 0000000..04365b2
>>>> --- /dev/null
>>>> +++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
>>>> 
>>>> +static int __init beagle_camera_init(void)
>>>> +{
>>>> +  reg_1v8 = regulator_get(NULL, "cam_1v8");
>>>> +  if (IS_ERR(reg_1v8))
>>>> +          pr_err("%s: cannot get cam_1v8 regulator\n", __func__);
>>>> +  else
>>>> +          regulator_enable(reg_1v8);
>>>> +
>>>> +  reg_2v8 = regulator_get(NULL, "cam_2v8");
>>>> +  if (IS_ERR(reg_2v8))
>>>> +          pr_err("%s: cannot get cam_2v8 regulator\n", __func__);
>>>> +  else
>>>> +          regulator_enable(reg_2v8);
>>>> +
>>>> +  omap_register_i2c_bus(2, 100, NULL, 0);
>>>> +  gpio_request(MT9P031_RESET_GPIO, "cam_rst");
>>>> +  gpio_direction_output(MT9P031_RESET_GPIO, 0);
>>>> +  omap3_init_camera(&beagle_isp_platform_data);
>>>> +  return 0;
>>>> +}
>>>> +late_initcall(beagle_camera_init);
>>> 
>>> There should probably a if (cpu_is_omap3630()) {} wrapped around that, so
>>> the camera doesn't get initted on a 3530 beagle.
>> 
>> ...speaking of which - if multiarch kernels are supported by OMAP3 you
>> probably want to use something like
>> 
>>      if (!machine_is_omap3_beagle() || !cpu_is_omap3630())
>>              return;
> 
> Shouldn't you check the Beagleboard version instead? The OMAP3530 has an ISP, 
> so there's nothing wrong with it per-se.

It has an ISP, but the pins aren't brought out, so you will never be able to 
use it. We could check the version, but that will look like:

if (omap3_beagle_get_rev() = OMAP3BEAGLE_BOARD_XM || omap3_beagle_get_rev() = 
OMAP3BEAGLE_BOARD_XMC || omap3_beagle_get_rev() = OMAP3BEAGLE_BOARD_XMD )

or check if you're not on     OMAP3BEAGLE_BOARD_AXBX, OMAP3BEAGLE_BOARD_C1_3 or 
OMAP3BEAGLE_BOARD_C4. I find the 3630 check a lot simpler :)

regards,

Koen



regards,

Koen--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to