Re: [PATCH V2 4/6] OMAPDSS: DSI: Move DSI specific reg_fields to dsi_feats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 2012-12-05 12:16, Chandrabhanu Mahapatra wrote:
> The DSI specific dss_reg_fields are moved to corresponding dsi_reg_fields
> initialized in dsi_feats. The dsi_feats structure is initialized as per
> corresponding DSS version in dsi_init_features().
> 
> Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@xxxxxx>
> ---
>  drivers/video/omap2/dss/dsi.c          |  126 +++++++++++++++++++++++++++++---
>  drivers/video/omap2/dss/dss_features.c |   16 ----
>  drivers/video/omap2/dss/dss_features.h |    4 -
>  3 files changed, 114 insertions(+), 32 deletions(-)
> 

> +static int __init dsi_init_features(struct platform_device *dsidev)
> +{
> +	const struct feats *src;
> +	struct feats *dst;
> +
> +	dst = devm_kzalloc(&dsidev->dev, sizeof(*dst), GFP_KERNEL);
> +	if (!dst) {
> +		dev_err(&dsidev->dev, "Failed to allocate DISPC Features\n");
> +		return -ENOMEM;
> +	}
> +
> +	switch (omapdss_get_version()) {
> +	case OMAPDSS_VER_OMAP24xx:
> +		src = &omap24xx_dsi_feats;
> +		break;
> +
> +	case OMAPDSS_VER_OMAP34xx_ES1:
> +	case OMAPDSS_VER_OMAP34xx_ES3:
> +	case OMAPDSS_VER_OMAP3630:
> +	case OMAPDSS_VER_AM35xx:
> +		src = &omap34xx_dsi_feats;
> +		break;
> +
> +	case OMAPDSS_VER_OMAP4430_ES1:
> +	case OMAPDSS_VER_OMAP4430_ES2:
> +	case OMAPDSS_VER_OMAP4:
> +		src = &omap44xx_dsi_feats;
> +		break;
> +
> +	case OMAPDSS_VER_OMAP5:
> +		src = &omap54xx_dsi_feats;
> +		break;
> +
> +	default:
> +		return -ENODEV;
> +	}

There's no DSI on OMAP2, so that case can be left out.

 Tomi


Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux