• Jacopo Mondi's avatar
    media: pxa_camera: Use the new set_mbus_config op · ebb965ac
    Jacopo Mondi authored
    Move the PXA camera driver to use the new set_mbus_config pad operation.
    For this platform the change is not only cosmetic, as the pxa driver is
    currently the only driver in mainline to make use of the g_mbus_config
    and s_mbus_config video operations.
    
    The existing driver semantic is the following:
    - Collect all supported mbus config flags from the remote end
    - Match them with the supported PXA mbus configuration flags
    - If the remote subdevice allows multiple options for for VSYNC, HSYNC
      and PCLK polarity, use platform data requested settings
    
    The semantic of the new get_mbus_config and set_mbus_config differs from
    the corresponding video ops, particularly in the fact get_mbus_config
    reports the current mbus configuration and not the set of supported
    configuration options, with set_mbus_config always reporting the actual
    mbus configuration applied to the remote subdevice.
    
    Adapt the driver to perform the following
    - Set the remote subdevice mbus configuration according to the PXA
      platform data preferences.
    - If the applied configuration differs from the requested one (i.e. the
      remote subdevice does not allow changing one setting) make sure that
      - The remote end does not claim for DATA_ACTIVE_LOW, which seems not
        supported by the platform
      - The bus mastering roles match
    
    While at there remove a few checks performed on the media bus
    configuration at get_format() time as they do not belong there.
    
    Compile-tested only.
    Signed-off-by: default avatarJacopo Mondi <jacopo+renesas@jmondi.org>
    Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
    ebb965ac
pxa_camera.c 66.2 KB