switch (type) {
case RCAR_DU_ENCODER_LVDS:
return rcar_du_lvds_connector_init(rcdu, renc,
- &data->u.lvds.panel);
+ &data->connector.lvds.panel);
case RCAR_DU_ENCODER_VGA:
return rcar_du_vga_connector_init(rcdu, renc);
#ifndef __RCAR_DU_ENCODER_H__
#define __RCAR_DU_ENCODER_H__
+#include <linux/platform_data/rcar-du.h>
+
#include <drm/drm_crtc.h>
struct rcar_du_device;
-struct rcar_du_encoder_data;
struct rcar_du_encoder {
struct drm_encoder encoder;
const struct rcar_du_encoder_data *pdata =
&rcdu->pdata->encoders[i];
- if (pdata->encoder == RCAR_DU_ENCODER_UNUSED)
+ if (pdata->type == RCAR_DU_ENCODER_UNUSED)
continue;
if (pdata->output >= ARRAY_SIZE(rcdu->crtcs)) {
continue;
}
- rcar_du_encoder_init(rcdu, pdata->encoder, pdata->output,
- pdata);
+ rcar_du_encoder_init(rcdu, pdata->type, pdata->output, pdata);
}
/* Set the possible CRTCs and possible clones. All encoders can be
struct drm_mode_modeinfo mode;
};
-struct rcar_du_encoder_lvds_data {
+struct rcar_du_connector_lvds_data {
struct rcar_du_panel_data panel;
};
-struct rcar_du_encoder_vga_data {
+struct rcar_du_connector_vga_data {
/* TODO: Add DDC information for EDID retrieval */
};
+/*
+ * struct rcar_du_encoder_data - Encoder platform data
+ * @type: the encoder type (RCAR_DU_ENCODER_*)
+ * @output: the DU output the connector is connected to
+ * @connector.lvds: platform data for LVDS connectors
+ * @connector.vga: platform data for VGA connectors
+ */
struct rcar_du_encoder_data {
- enum rcar_du_encoder_type encoder;
+ enum rcar_du_encoder_type type;
unsigned int output;
union {
- struct rcar_du_encoder_lvds_data lvds;
- struct rcar_du_encoder_vga_data vga;
- } u;
+ struct rcar_du_connector_lvds_data lvds;
+ struct rcar_du_connector_vga_data vga;
+ } connector;
};
struct rcar_du_platform_data {