diff options
| author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2016-05-26 09:27:16 -0400 |
|---|---|---|
| committer | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2016-06-03 09:06:21 -0400 |
| commit | d8647f9e1eda9f4d8df6b4e67bd8389c38c72a85 (patch) | |
| tree | 4e9703e9476d5b059369011219141228f3cb34c8 | |
| parent | 97177bdd49137c8b622a7f5fcf42f4bd93cd7d1b (diff) | |
omapfb: panel-sharp-ls037v7dw01: Remove legacy boot support
The panel is not used by any legacy board files so the legacy (pdata) boot
support can be dropped.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
| -rw-r--r-- | drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c | 81 | ||||
| -rw-r--r-- | include/video/omap-panel-data.h | 24 |
2 files changed, 6 insertions, 99 deletions
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c index 1954ec913ce5..a1e590155a26 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c | |||
| @@ -18,7 +18,6 @@ | |||
| 18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
| 19 | #include <linux/regulator/consumer.h> | 19 | #include <linux/regulator/consumer.h> |
| 20 | #include <video/omapdss.h> | 20 | #include <video/omapdss.h> |
| 21 | #include <video/omap-panel-data.h> | ||
| 22 | 21 | ||
| 23 | struct panel_drv_data { | 22 | struct panel_drv_data { |
| 24 | struct omap_dss_device dssdev; | 23 | struct omap_dss_device dssdev; |
| @@ -197,69 +196,6 @@ static struct omap_dss_driver sharp_ls_ops = { | |||
| 197 | .get_resolution = omapdss_default_get_resolution, | 196 | .get_resolution = omapdss_default_get_resolution, |
| 198 | }; | 197 | }; |
| 199 | 198 | ||
| 200 | static int sharp_ls_get_gpio(struct device *dev, int gpio, unsigned long flags, | ||
| 201 | char *desc, struct gpio_desc **gpiod) | ||
| 202 | { | ||
| 203 | int r; | ||
| 204 | |||
| 205 | r = devm_gpio_request_one(dev, gpio, flags, desc); | ||
| 206 | if (r) { | ||
| 207 | *gpiod = NULL; | ||
| 208 | return r == -ENOENT ? 0 : r; | ||
| 209 | } | ||
| 210 | |||
| 211 | *gpiod = gpio_to_desc(gpio); | ||
| 212 | |||
| 213 | return 0; | ||
| 214 | } | ||
| 215 | |||
| 216 | static int sharp_ls_probe_pdata(struct platform_device *pdev) | ||
| 217 | { | ||
| 218 | const struct panel_sharp_ls037v7dw01_platform_data *pdata; | ||
| 219 | struct panel_drv_data *ddata = platform_get_drvdata(pdev); | ||
| 220 | struct omap_dss_device *dssdev, *in; | ||
| 221 | int r; | ||
| 222 | |||
| 223 | pdata = dev_get_platdata(&pdev->dev); | ||
| 224 | |||
| 225 | in = omap_dss_find_output(pdata->source); | ||
| 226 | if (in == NULL) { | ||
| 227 | dev_err(&pdev->dev, "failed to find video source '%s'\n", | ||
| 228 | pdata->source); | ||
| 229 | return -EPROBE_DEFER; | ||
| 230 | } | ||
| 231 | |||
| 232 | ddata->in = in; | ||
| 233 | |||
| 234 | ddata->data_lines = pdata->data_lines; | ||
| 235 | |||
| 236 | dssdev = &ddata->dssdev; | ||
| 237 | dssdev->name = pdata->name; | ||
| 238 | |||
| 239 | r = sharp_ls_get_gpio(&pdev->dev, pdata->mo_gpio, GPIOF_OUT_INIT_LOW, | ||
| 240 | "lcd MO", &ddata->mo_gpio); | ||
| 241 | if (r) | ||
| 242 | return r; | ||
| 243 | r = sharp_ls_get_gpio(&pdev->dev, pdata->lr_gpio, GPIOF_OUT_INIT_HIGH, | ||
| 244 | "lcd LR", &ddata->lr_gpio); | ||
| 245 | if (r) | ||
| 246 | return r; | ||
| 247 | r = sharp_ls_get_gpio(&pdev->dev, pdata->ud_gpio, GPIOF_OUT_INIT_HIGH, | ||
| 248 | "lcd UD", &ddata->ud_gpio); | ||
| 249 | if (r) | ||
| 250 | return r; | ||
| 251 | r = sharp_ls_get_gpio(&pdev->dev, pdata->resb_gpio, GPIOF_OUT_INIT_LOW, | ||
| 252 | "lcd RESB", &ddata->resb_gpio); | ||
| 253 | if (r) | ||
| 254 | return r; | ||
| 255 | r = sharp_ls_get_gpio(&pdev->dev, pdata->ini_gpio, GPIOF_OUT_INIT_LOW, | ||
| 256 | "lcd INI", &ddata->ini_gpio); | ||
| 257 | if (r) | ||
| 258 | return r; | ||
| 259 | |||
| 260 | return 0; | ||
| 261 | } | ||
| 262 | |||
| 263 | static int sharp_ls_get_gpio_of(struct device *dev, int index, int val, | 199 | static int sharp_ls_get_gpio_of(struct device *dev, int index, int val, |
| 264 | const char *desc, struct gpio_desc **gpiod) | 200 | const char *desc, struct gpio_desc **gpiod) |
| 265 | { | 201 | { |
| @@ -330,23 +266,18 @@ static int sharp_ls_probe(struct platform_device *pdev) | |||
| 330 | struct omap_dss_device *dssdev; | 266 | struct omap_dss_device *dssdev; |
| 331 | int r; | 267 | int r; |
| 332 | 268 | ||
| 269 | if (!pdev->dev.of_node) | ||
| 270 | return -ENODEV; | ||
| 271 | |||
| 333 | ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); | 272 | ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); |
| 334 | if (ddata == NULL) | 273 | if (ddata == NULL) |
| 335 | return -ENOMEM; | 274 | return -ENOMEM; |
| 336 | 275 | ||
| 337 | platform_set_drvdata(pdev, ddata); | 276 | platform_set_drvdata(pdev, ddata); |
| 338 | 277 | ||
| 339 | if (dev_get_platdata(&pdev->dev)) { | 278 | r = sharp_ls_probe_of(pdev); |
| 340 | r = sharp_ls_probe_pdata(pdev); | 279 | if (r) |
| 341 | if (r) | 280 | return r; |
| 342 | return r; | ||
| 343 | } else if (pdev->dev.of_node) { | ||
| 344 | r = sharp_ls_probe_of(pdev); | ||
| 345 | if (r) | ||
| 346 | return r; | ||
| 347 | } else { | ||
| 348 | return -ENODEV; | ||
| 349 | } | ||
| 350 | 281 | ||
| 351 | ddata->videomode = sharp_ls_timings; | 282 | ddata->videomode = sharp_ls_timings; |
| 352 | 283 | ||
diff --git a/include/video/omap-panel-data.h b/include/video/omap-panel-data.h index 34ee7509752f..085b4171eb25 100644 --- a/include/video/omap-panel-data.h +++ b/include/video/omap-panel-data.h | |||
| @@ -165,28 +165,4 @@ struct panel_lb035q02_platform_data { | |||
| 165 | int enable_gpio; | 165 | int enable_gpio; |
| 166 | }; | 166 | }; |
| 167 | 167 | ||
| 168 | /** | ||
| 169 | * panel_sharp_ls037v7dw01 platform data | ||
| 170 | * @name: name for this display entity | ||
| 171 | * @source: name of the display entity used as a video source | ||
| 172 | * @data_lines: number of DPI datalines | ||
| 173 | * @resb_gpio: reset signal GPIO | ||
| 174 | * @ini_gpio: power on control GPIO | ||
| 175 | * @mo_gpio: selection for resolution(VGA/QVGA) GPIO | ||
| 176 | * @lr_gpio: selection for horizontal scanning direction GPIO | ||
| 177 | * @ud_gpio: selection for vertical scanning direction GPIO | ||
| 178 | */ | ||
| 179 | struct panel_sharp_ls037v7dw01_platform_data { | ||
| 180 | const char *name; | ||
| 181 | const char *source; | ||
| 182 | |||
| 183 | int data_lines; | ||
| 184 | |||
| 185 | int resb_gpio; | ||
| 186 | int ini_gpio; | ||
| 187 | int mo_gpio; | ||
| 188 | int lr_gpio; | ||
| 189 | int ud_gpio; | ||
| 190 | }; | ||
| 191 | |||
| 192 | #endif /* __OMAP_PANEL_DATA_H */ | 168 | #endif /* __OMAP_PANEL_DATA_H */ |
