• Michael Tretter's avatar
    media: allegro: add pm_runtime support · 83cc5fd9
    Michael Tretter authored
    The allegro driver must ensure that the mcu and core clocks are enabled
    and set to the expected clock rate before trying to load the firmware
    and to reset the MCU.
    
    Up until now, the driver assumed that the clocks are always enabled in
    the PL (programming logic), because the xlnx_vcu driver did not export
    the clocks to other drivers. This has changed and by explicitly enabling
    the clocks in the driver, this assumption can be dropped.
    
    It might even be possible to disable the clocks for the encoder if the
    encoder is not used. However, the behavior is not documented and it
    might be necessary to reinitialize the encoder after deactivating the
    clocks. Play it safe by sticking to the current behavior.
    Signed-off-by: default avatarMichael Tretter <m.tretter@pengutronix.de>
    Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
    83cc5fd9
allegro-core.c 106 KB