Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 1 | /* |
| 2 | * i.MX drm driver - parallel display implementation |
| 3 | * |
| 4 | * Copyright (C) 2012 Sascha Hauer, Pengutronix |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; either version 2 |
| 9 | * of the License, or (at your option) any later version. |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 14 | */ |
| 15 | |
Russell King | 17b5001 | 2013-11-03 11:23:34 +0000 | [diff] [blame] | 16 | #include <linux/component.h> |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 17 | #include <linux/module.h> |
| 18 | #include <drm/drmP.h> |
| 19 | #include <drm/drm_fb_helper.h> |
| 20 | #include <drm/drm_crtc_helper.h> |
Philipp Zabel | 628f435b | 2014-02-25 11:55:04 +0100 | [diff] [blame] | 21 | #include <drm/drm_panel.h> |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 22 | #include <linux/videodev2.h> |
Lothar Waßmann | 075c457 | 2014-01-13 11:24:33 +0100 | [diff] [blame] | 23 | #include <video/of_display_timing.h> |
Philipp Zabel | 553a59f | 2015-05-19 16:28:12 +0200 | [diff] [blame] | 24 | #include <linux/of_graph.h> |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 25 | |
| 26 | #include "imx-drm.h" |
| 27 | |
| 28 | #define con_to_imxpd(x) container_of(x, struct imx_parallel_display, connector) |
| 29 | #define enc_to_imxpd(x) container_of(x, struct imx_parallel_display, encoder) |
| 30 | |
| 31 | struct imx_parallel_display { |
| 32 | struct drm_connector connector; |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 33 | struct drm_encoder encoder; |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 34 | struct device *dev; |
| 35 | void *edid; |
| 36 | int edid_len; |
Philipp Zabel | 2872c80 | 2015-02-02 17:25:59 +0100 | [diff] [blame] | 37 | u32 bus_format; |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 38 | int mode_valid; |
| 39 | struct drm_display_mode mode; |
Philipp Zabel | 628f435b | 2014-02-25 11:55:04 +0100 | [diff] [blame] | 40 | struct drm_panel *panel; |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 41 | }; |
| 42 | |
| 43 | static enum drm_connector_status imx_pd_connector_detect( |
| 44 | struct drm_connector *connector, bool force) |
| 45 | { |
| 46 | return connector_status_connected; |
| 47 | } |
| 48 | |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 49 | static int imx_pd_connector_get_modes(struct drm_connector *connector) |
| 50 | { |
| 51 | struct imx_parallel_display *imxpd = con_to_imxpd(connector); |
Marek Vasut | afb12ed | 2013-04-03 12:36:28 -0300 | [diff] [blame] | 52 | struct device_node *np = imxpd->dev->of_node; |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 53 | int num_modes = 0; |
| 54 | |
Philipp Zabel | 628f435b | 2014-02-25 11:55:04 +0100 | [diff] [blame] | 55 | if (imxpd->panel && imxpd->panel->funcs && |
| 56 | imxpd->panel->funcs->get_modes) { |
Philipp Zabel | 9832e81 | 2015-11-13 18:10:04 +0100 | [diff] [blame] | 57 | struct drm_display_info *di = &connector->display_info; |
| 58 | |
Philipp Zabel | 628f435b | 2014-02-25 11:55:04 +0100 | [diff] [blame] | 59 | num_modes = imxpd->panel->funcs->get_modes(imxpd->panel); |
Philipp Zabel | 9832e81 | 2015-11-13 18:10:04 +0100 | [diff] [blame] | 60 | if (!imxpd->bus_format && di->num_bus_formats) |
| 61 | imxpd->bus_format = di->bus_formats[0]; |
Philipp Zabel | 628f435b | 2014-02-25 11:55:04 +0100 | [diff] [blame] | 62 | if (num_modes > 0) |
| 63 | return num_modes; |
| 64 | } |
| 65 | |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 66 | if (imxpd->edid) { |
| 67 | drm_mode_connector_update_edid_property(connector, imxpd->edid); |
| 68 | num_modes = drm_add_edid_modes(connector, imxpd->edid); |
| 69 | } |
| 70 | |
| 71 | if (imxpd->mode_valid) { |
| 72 | struct drm_display_mode *mode = drm_mode_create(connector->dev); |
Quentin Lambert | 63bc516 | 2014-08-04 21:07:07 +0200 | [diff] [blame] | 73 | |
Fabio Estevam | 39dcf4f | 2014-02-26 20:53:42 -0300 | [diff] [blame] | 74 | if (!mode) |
| 75 | return -EINVAL; |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 76 | drm_mode_copy(mode, &imxpd->mode); |
| 77 | mode->type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, |
| 78 | drm_mode_probed_add(connector, mode); |
| 79 | num_modes++; |
| 80 | } |
| 81 | |
Marek Vasut | afb12ed | 2013-04-03 12:36:28 -0300 | [diff] [blame] | 82 | if (np) { |
| 83 | struct drm_display_mode *mode = drm_mode_create(connector->dev); |
Quentin Lambert | 63bc516 | 2014-08-04 21:07:07 +0200 | [diff] [blame] | 84 | |
Fabio Estevam | 39dcf4f | 2014-02-26 20:53:42 -0300 | [diff] [blame] | 85 | if (!mode) |
| 86 | return -EINVAL; |
Lothar Waßmann | 075c457 | 2014-01-13 11:24:33 +0100 | [diff] [blame] | 87 | of_get_drm_display_mode(np, &imxpd->mode, OF_USE_NATIVE_MODE); |
Marek Vasut | afb12ed | 2013-04-03 12:36:28 -0300 | [diff] [blame] | 88 | drm_mode_copy(mode, &imxpd->mode); |
| 89 | mode->type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, |
| 90 | drm_mode_probed_add(connector, mode); |
| 91 | num_modes++; |
| 92 | } |
| 93 | |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 94 | return num_modes; |
| 95 | } |
| 96 | |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 97 | static struct drm_encoder *imx_pd_connector_best_encoder( |
| 98 | struct drm_connector *connector) |
| 99 | { |
| 100 | struct imx_parallel_display *imxpd = con_to_imxpd(connector); |
| 101 | |
| 102 | return &imxpd->encoder; |
| 103 | } |
| 104 | |
| 105 | static void imx_pd_encoder_dpms(struct drm_encoder *encoder, int mode) |
| 106 | { |
Philipp Zabel | 628f435b | 2014-02-25 11:55:04 +0100 | [diff] [blame] | 107 | struct imx_parallel_display *imxpd = enc_to_imxpd(encoder); |
| 108 | |
| 109 | if (mode != DRM_MODE_DPMS_ON) |
| 110 | drm_panel_disable(imxpd->panel); |
| 111 | else |
| 112 | drm_panel_enable(imxpd->panel); |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 113 | } |
| 114 | |
| 115 | static bool imx_pd_encoder_mode_fixup(struct drm_encoder *encoder, |
| 116 | const struct drm_display_mode *mode, |
| 117 | struct drm_display_mode *adjusted_mode) |
| 118 | { |
| 119 | return true; |
| 120 | } |
| 121 | |
| 122 | static void imx_pd_encoder_prepare(struct drm_encoder *encoder) |
| 123 | { |
| 124 | struct imx_parallel_display *imxpd = enc_to_imxpd(encoder); |
| 125 | |
Philipp Zabel | 2872c80 | 2015-02-02 17:25:59 +0100 | [diff] [blame] | 126 | imx_drm_set_bus_format(encoder, imxpd->bus_format); |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 127 | } |
| 128 | |
| 129 | static void imx_pd_encoder_commit(struct drm_encoder *encoder) |
| 130 | { |
Philipp Zabel | ad92c8b | 2014-11-03 15:54:47 +0100 | [diff] [blame] | 131 | struct imx_parallel_display *imxpd = enc_to_imxpd(encoder); |
| 132 | |
| 133 | drm_panel_prepare(imxpd->panel); |
| 134 | drm_panel_enable(imxpd->panel); |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 135 | } |
| 136 | |
| 137 | static void imx_pd_encoder_mode_set(struct drm_encoder *encoder, |
Steve Longerbeam | eb10d63 | 2014-12-18 18:00:24 -0800 | [diff] [blame] | 138 | struct drm_display_mode *orig_mode, |
| 139 | struct drm_display_mode *mode) |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 140 | { |
| 141 | } |
| 142 | |
| 143 | static void imx_pd_encoder_disable(struct drm_encoder *encoder) |
| 144 | { |
Philipp Zabel | ad92c8b | 2014-11-03 15:54:47 +0100 | [diff] [blame] | 145 | struct imx_parallel_display *imxpd = enc_to_imxpd(encoder); |
| 146 | |
| 147 | drm_panel_disable(imxpd->panel); |
| 148 | drm_panel_unprepare(imxpd->panel); |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 149 | } |
| 150 | |
Ville Syrjälä | 7ae847d | 2015-12-15 12:21:09 +0100 | [diff] [blame] | 151 | static const struct drm_connector_funcs imx_pd_connector_funcs = { |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 152 | .dpms = drm_helper_connector_dpms, |
| 153 | .fill_modes = drm_helper_probe_single_connector_modes, |
| 154 | .detect = imx_pd_connector_detect, |
Russell King | 1b3f767 | 2013-11-03 13:30:48 +0000 | [diff] [blame] | 155 | .destroy = imx_drm_connector_destroy, |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 156 | }; |
| 157 | |
Ville Syrjälä | 7ae847d | 2015-12-15 12:21:09 +0100 | [diff] [blame] | 158 | static const struct drm_connector_helper_funcs imx_pd_connector_helper_funcs = { |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 159 | .get_modes = imx_pd_connector_get_modes, |
| 160 | .best_encoder = imx_pd_connector_best_encoder, |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 161 | }; |
| 162 | |
Ville Syrjälä | 7ae847d | 2015-12-15 12:21:09 +0100 | [diff] [blame] | 163 | static const struct drm_encoder_funcs imx_pd_encoder_funcs = { |
Russell King | 1b3f767 | 2013-11-03 13:30:48 +0000 | [diff] [blame] | 164 | .destroy = imx_drm_encoder_destroy, |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 165 | }; |
| 166 | |
Ville Syrjälä | 7ae847d | 2015-12-15 12:21:09 +0100 | [diff] [blame] | 167 | static const struct drm_encoder_helper_funcs imx_pd_encoder_helper_funcs = { |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 168 | .dpms = imx_pd_encoder_dpms, |
| 169 | .mode_fixup = imx_pd_encoder_mode_fixup, |
| 170 | .prepare = imx_pd_encoder_prepare, |
| 171 | .commit = imx_pd_encoder_commit, |
| 172 | .mode_set = imx_pd_encoder_mode_set, |
| 173 | .disable = imx_pd_encoder_disable, |
| 174 | }; |
| 175 | |
Russell King | 1b3f767 | 2013-11-03 13:30:48 +0000 | [diff] [blame] | 176 | static int imx_pd_register(struct drm_device *drm, |
| 177 | struct imx_parallel_display *imxpd) |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 178 | { |
| 179 | int ret; |
| 180 | |
Russell King | 1b3f767 | 2013-11-03 13:30:48 +0000 | [diff] [blame] | 181 | ret = imx_drm_encoder_parse_of(drm, &imxpd->encoder, |
| 182 | imxpd->dev->of_node); |
| 183 | if (ret) |
| 184 | return ret; |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 185 | |
Denis Carikli | c026a3f | 2014-06-17 15:34:51 +0200 | [diff] [blame] | 186 | /* set the connector's dpms to OFF so that |
| 187 | * drm_helper_connector_dpms() won't return |
| 188 | * immediately since the current state is ON |
| 189 | * at this point. |
| 190 | */ |
| 191 | imxpd->connector.dpms = DRM_MODE_DPMS_OFF; |
| 192 | |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 193 | drm_encoder_helper_add(&imxpd->encoder, &imx_pd_encoder_helper_funcs); |
Russell King | 1b3f767 | 2013-11-03 13:30:48 +0000 | [diff] [blame] | 194 | drm_encoder_init(drm, &imxpd->encoder, &imx_pd_encoder_funcs, |
Ville Syrjälä | 13a3d91 | 2015-12-09 16:20:18 +0200 | [diff] [blame] | 195 | DRM_MODE_ENCODER_NONE, NULL); |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 196 | |
| 197 | drm_connector_helper_add(&imxpd->connector, |
| 198 | &imx_pd_connector_helper_funcs); |
Russell King | 1b3f767 | 2013-11-03 13:30:48 +0000 | [diff] [blame] | 199 | drm_connector_init(drm, &imxpd->connector, &imx_pd_connector_funcs, |
| 200 | DRM_MODE_CONNECTOR_VGA); |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 201 | |
Philipp Zabel | 628f435b | 2014-02-25 11:55:04 +0100 | [diff] [blame] | 202 | if (imxpd->panel) |
| 203 | drm_panel_attach(imxpd->panel, &imxpd->connector); |
| 204 | |
Russell King | 1b3f767 | 2013-11-03 13:30:48 +0000 | [diff] [blame] | 205 | drm_mode_connector_attach_encoder(&imxpd->connector, &imxpd->encoder); |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 206 | |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 207 | return 0; |
| 208 | } |
| 209 | |
Russell King | 17b5001 | 2013-11-03 11:23:34 +0000 | [diff] [blame] | 210 | static int imx_pd_bind(struct device *dev, struct device *master, void *data) |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 211 | { |
Russell King | 1b3f767 | 2013-11-03 13:30:48 +0000 | [diff] [blame] | 212 | struct drm_device *drm = data; |
Russell King | 17b5001 | 2013-11-03 11:23:34 +0000 | [diff] [blame] | 213 | struct device_node *np = dev->of_node; |
Philipp Zabel | 553a59f | 2015-05-19 16:28:12 +0200 | [diff] [blame] | 214 | struct device_node *port; |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 215 | const u8 *edidp; |
| 216 | struct imx_parallel_display *imxpd; |
| 217 | int ret; |
| 218 | const char *fmt; |
| 219 | |
Russell King | 17b5001 | 2013-11-03 11:23:34 +0000 | [diff] [blame] | 220 | imxpd = devm_kzalloc(dev, sizeof(*imxpd), GFP_KERNEL); |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 221 | if (!imxpd) |
| 222 | return -ENOMEM; |
| 223 | |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 224 | edidp = of_get_property(np, "edid", &imxpd->edid_len); |
| 225 | if (edidp) |
| 226 | imxpd->edid = kmemdup(edidp, imxpd->edid_len, GFP_KERNEL); |
| 227 | |
| 228 | ret = of_property_read_string(np, "interface-pix-fmt", &fmt); |
| 229 | if (!ret) { |
| 230 | if (!strcmp(fmt, "rgb24")) |
Philipp Zabel | 2872c80 | 2015-02-02 17:25:59 +0100 | [diff] [blame] | 231 | imxpd->bus_format = MEDIA_BUS_FMT_RGB888_1X24; |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 232 | else if (!strcmp(fmt, "rgb565")) |
Philipp Zabel | 2872c80 | 2015-02-02 17:25:59 +0100 | [diff] [blame] | 233 | imxpd->bus_format = MEDIA_BUS_FMT_RGB565_1X16; |
Marek Vasut | 7d0a66c | 2013-04-22 23:19:31 +0200 | [diff] [blame] | 234 | else if (!strcmp(fmt, "bgr666")) |
Philipp Zabel | 2872c80 | 2015-02-02 17:25:59 +0100 | [diff] [blame] | 235 | imxpd->bus_format = MEDIA_BUS_FMT_RGB666_1X18; |
Emil Renner Berthing | 9e74d29 | 2014-03-29 13:57:44 +0100 | [diff] [blame] | 236 | else if (!strcmp(fmt, "lvds666")) |
Philipp Zabel | 2872c80 | 2015-02-02 17:25:59 +0100 | [diff] [blame] | 237 | imxpd->bus_format = MEDIA_BUS_FMT_RGB666_1X24_CPADHI; |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 238 | } |
| 239 | |
Philipp Zabel | 553a59f | 2015-05-19 16:28:12 +0200 | [diff] [blame] | 240 | /* port@1 is the output port */ |
| 241 | port = of_graph_get_port_by_id(np, 1); |
| 242 | if (port) { |
| 243 | struct device_node *endpoint, *remote; |
| 244 | |
| 245 | endpoint = of_get_child_by_name(port, "endpoint"); |
| 246 | if (endpoint) { |
| 247 | remote = of_graph_get_remote_port_parent(endpoint); |
| 248 | if (remote) |
| 249 | imxpd->panel = of_drm_find_panel(remote); |
| 250 | if (!imxpd->panel) |
| 251 | return -EPROBE_DEFER; |
| 252 | } |
Liu Ying | d70e96a | 2015-02-23 11:09:51 +0800 | [diff] [blame] | 253 | } |
Philipp Zabel | 628f435b | 2014-02-25 11:55:04 +0100 | [diff] [blame] | 254 | |
Russell King | 17b5001 | 2013-11-03 11:23:34 +0000 | [diff] [blame] | 255 | imxpd->dev = dev; |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 256 | |
Russell King | 1b3f767 | 2013-11-03 13:30:48 +0000 | [diff] [blame] | 257 | ret = imx_pd_register(drm, imxpd); |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 258 | if (ret) |
| 259 | return ret; |
| 260 | |
Russell King | 17b5001 | 2013-11-03 11:23:34 +0000 | [diff] [blame] | 261 | dev_set_drvdata(dev, imxpd); |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 262 | |
| 263 | return 0; |
| 264 | } |
| 265 | |
Russell King | 17b5001 | 2013-11-03 11:23:34 +0000 | [diff] [blame] | 266 | static void imx_pd_unbind(struct device *dev, struct device *master, |
| 267 | void *data) |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 268 | { |
Russell King | 17b5001 | 2013-11-03 11:23:34 +0000 | [diff] [blame] | 269 | struct imx_parallel_display *imxpd = dev_get_drvdata(dev); |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 270 | |
Russell King | 1b3f767 | 2013-11-03 13:30:48 +0000 | [diff] [blame] | 271 | imxpd->encoder.funcs->destroy(&imxpd->encoder); |
| 272 | imxpd->connector.funcs->destroy(&imxpd->connector); |
Peter Seiderer | dcbc9eb | 2013-12-08 22:03:58 +0100 | [diff] [blame] | 273 | |
| 274 | kfree(imxpd->edid); |
Russell King | 17b5001 | 2013-11-03 11:23:34 +0000 | [diff] [blame] | 275 | } |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 276 | |
Russell King | 17b5001 | 2013-11-03 11:23:34 +0000 | [diff] [blame] | 277 | static const struct component_ops imx_pd_ops = { |
| 278 | .bind = imx_pd_bind, |
| 279 | .unbind = imx_pd_unbind, |
| 280 | }; |
| 281 | |
| 282 | static int imx_pd_probe(struct platform_device *pdev) |
| 283 | { |
| 284 | return component_add(&pdev->dev, &imx_pd_ops); |
| 285 | } |
| 286 | |
| 287 | static int imx_pd_remove(struct platform_device *pdev) |
| 288 | { |
| 289 | component_del(&pdev->dev, &imx_pd_ops); |
Peter Seiderer | dcbc9eb | 2013-12-08 22:03:58 +0100 | [diff] [blame] | 290 | |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 291 | return 0; |
| 292 | } |
| 293 | |
| 294 | static const struct of_device_id imx_pd_dt_ids[] = { |
| 295 | { .compatible = "fsl,imx-parallel-display", }, |
| 296 | { /* sentinel */ } |
| 297 | }; |
Jiada Wang | fa45f2c | 2013-06-07 18:36:46 +0900 | [diff] [blame] | 298 | MODULE_DEVICE_TABLE(of, imx_pd_dt_ids); |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 299 | |
| 300 | static struct platform_driver imx_pd_driver = { |
| 301 | .probe = imx_pd_probe, |
Bill Pemberton | 99c28f1 | 2012-11-19 13:20:51 -0500 | [diff] [blame] | 302 | .remove = imx_pd_remove, |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 303 | .driver = { |
| 304 | .of_match_table = imx_pd_dt_ids, |
| 305 | .name = "imx-parallel-display", |
Sascha Hauer | 19022aa | 2012-09-21 10:07:48 +0200 | [diff] [blame] | 306 | }, |
| 307 | }; |
| 308 | |
| 309 | module_platform_driver(imx_pd_driver); |
| 310 | |
| 311 | MODULE_DESCRIPTION("i.MX parallel display driver"); |
| 312 | MODULE_AUTHOR("Sascha Hauer, Pengutronix"); |
| 313 | MODULE_LICENSE("GPL"); |
Fabio Estevam | b2da05f | 2013-08-18 21:40:05 -0300 | [diff] [blame] | 314 | MODULE_ALIAS("platform:imx-parallel-display"); |