[U-Boot] [PATCH v4 3/9] rockchip: video: refactor rk_vop and split RK3328-specific code off

Simon Glass sjg at chromium.org
Fri Jun 2 02:54:44 UTC 2017


On 31 May 2017 at 09:59, Philipp Tomsich
<philipp.tomsich at theobroma-systems.com> wrote:
> To prepare for adding the RK3399 VOP driver (which shares most of its
> registers and config logic with the RK3228 VOP), this change refactors
> the driver and splits the RK3288-specific driver off.
>
> The changes in detail are:
> - introduces a data-structure for chip-specific drivers to register
>   features/callbacks with the common driver: at this time, this is
>   limited to a callback for setting the pin polarities (between the
>   VOP and the encoder modules) and a flag to signal 10bit RGB
>   capability
> - refactors the probing of regulators into a helper function that
>   can take a list of regulator names to probe and autoset
> - moves the priv data-structure into a (common) header file to be
>   used by the chip-specific drivers to provide base addresses to
>   the common driver
> - uses a callback into the chip-specific driver to set pin polarities
>   (replacing the direct register accesses previously used)
> - splits enabling the output (towards an encoder) into a separate
>   help function withint the common driver
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
>
> ---
>
> Changes in v4:
> - added to break down into smaller changes
>
> Changes in v3: None
> Changes in v2: None
>
>  arch/arm/include/asm/arch-rockchip/vop_rk3288.h |   1 +
>  drivers/video/rockchip/Makefile                 |   1 +
>  drivers/video/rockchip/rk3288_vop.c             |  95 +++++++++++++
>  drivers/video/rockchip/rk_vop.c                 | 182 ++++++++++++------------
>  drivers/video/rockchip/rk_vop.h                 |  32 +++++
>  5 files changed, 217 insertions(+), 94 deletions(-)
>  create mode 100644 drivers/video/rockchip/rk3288_vop.c
>  create mode 100644 drivers/video/rockchip/rk_vop.h

Reviewed-by: Simon Glass <sjg at chromium.org>

But please comment the functions in the header files:

> +
> +int rk_vop_probe(struct udevice *dev);
> +int rk_vop_bind(struct udevice *dev);
> +void rk_vop_probe_regulators(struct udevice *dev,
> +                            const char * const *names, int cnt);
> +
> +#endif
> --
> 1.9.1
>


More information about the U-Boot mailing list