diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c index c4e9c2b1b465..bd3ad8830a54 100644 --- a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c +++ b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c | |||
@@ -303,16 +303,22 @@ static int nec_8048_spi_remove(struct spi_device *spi) | |||
303 | return 0; | 303 | return 0; |
304 | } | 304 | } |
305 | 305 | ||
306 | static int nec_8048_spi_suspend(struct spi_device *spi, pm_message_t mesg) | 306 | #ifdef CONFIG_PM_SLEEP |
307 | |||
308 | static int nec_8048_spi_suspend(struct device *dev) | ||
307 | { | 309 | { |
310 | struct spi_device *spi = to_spi_device(dev); | ||
311 | |||
308 | nec_8048_spi_send(spi, 2, 0x01); | 312 | nec_8048_spi_send(spi, 2, 0x01); |
309 | mdelay(40); | 313 | mdelay(40); |
310 | 314 | ||
311 | return 0; | 315 | return 0; |
312 | } | 316 | } |
313 | 317 | ||
314 | static int nec_8048_spi_resume(struct spi_device *spi) | 318 | static int nec_8048_spi_resume(struct device *dev) |
315 | { | 319 | { |
320 | struct spi_device *spi = to_spi_device(dev); | ||
321 | |||
316 | /* reinitialize the panel */ | 322 | /* reinitialize the panel */ |
317 | spi_setup(spi); | 323 | spi_setup(spi); |
318 | nec_8048_spi_send(spi, 2, 0x00); | 324 | nec_8048_spi_send(spi, 2, 0x00); |
@@ -321,14 +327,20 @@ static int nec_8048_spi_resume(struct spi_device *spi) | |||
321 | return 0; | 327 | return 0; |
322 | } | 328 | } |
323 | 329 | ||
330 | static SIMPLE_DEV_PM_OPS(nec_8048_spi_pm_ops, nec_8048_spi_suspend, | ||
331 | nec_8048_spi_resume); | ||
332 | #define NEC_8048_SPI_PM_OPS (&nec_8048_spi_pm_ops) | ||
333 | #else | ||
334 | #define NEC_8048_SPI_PM_OPS NULL | ||
335 | #endif | ||
336 | |||
324 | static struct spi_driver nec_8048_spi_driver = { | 337 | static struct spi_driver nec_8048_spi_driver = { |
325 | .probe = nec_8048_spi_probe, | 338 | .probe = nec_8048_spi_probe, |
326 | .remove = nec_8048_spi_remove, | 339 | .remove = nec_8048_spi_remove, |
327 | .suspend = nec_8048_spi_suspend, | ||
328 | .resume = nec_8048_spi_resume, | ||
329 | .driver = { | 340 | .driver = { |
330 | .name = "nec_8048_spi", | 341 | .name = "nec_8048_spi", |
331 | .owner = THIS_MODULE, | 342 | .owner = THIS_MODULE, |
343 | .pm = NEC_8048_SPI_PM_OPS, | ||
332 | }, | 344 | }, |
333 | }; | 345 | }; |
334 | 346 | ||