Hi Javier

On Tue, 3 Jan 2012, javier Martin wrote:

> Guennadi,
> probably you could answer me some question:
> 
> as we agreed I'm trying to implement ENUM_INPUT support to soc-camera
> through pads.

No, you probably mean in the subdev driver, not in soc-camera core.

> This means I must be able to pass the tvp5150 decoder
> some platform_data in order to configure what inputs are really routed
> in my board.
> 
> For that purpose I do the following in my board specific code:
> 
>  static struct tvp5150_platform_data visstrim_tvp5150_data = {
>       .inputs = 55,
> };
> 
> static struct i2c_board_info visstrim_i2c_camera =  {
>       .type = "tvp5150",
>       .addr = 0x5d,
>       .platform_data = &visstrim_tvp5150_data,
> };
> 
> static struct soc_camera_link iclink_tvp5150 = {
>       .bus_id         = 0,            /* Must match with the camera ID */
>       .board_info     = &visstrim_i2c_camera,
>       .i2c_adapter_id = 0,
>       .power = visstrim_camera_power,
>       .reset = visstrim_camera_reset,
> };
> 
> static struct platform_device visstrim_tvp5150_soc = {
>       .name   = "soc-camera-pdrv",
>       .id     = 0,
>       .dev    = {
>               .platform_data = &iclink_tvp5150,
>       },
> };
> 
> 
> However, it seems soc-camera ignores "board_info.platform_data" field
> and assigns a value of its own:
> 
> http://lxr.linux.no/#linux+v3.1.6/drivers/media/video/soc_camera.c#L1006
> 
> 
> How am I suppose to pass that information to the tvp5150 then?

Have a look at some examples, e.g., arch/sh/boards/mach-migor/setup.c:

static struct soc_camera_link ov7725_link = {
        .power          = ov7725_power,
        .board_info     = &migor_i2c_camera[0],
        .i2c_adapter_id = 0,
        .priv           = &ov7725_info,
};

I.e., soc-camera expects you to use the struct soc_camera_link::priv field 
for subdevice private platform data.

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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to