10
10
11
11
#include <linux/backlight.h>
12
12
#include <linux/delay.h>
13
- #include <linux/fb.h>
14
13
#include <linux/lcd.h>
15
14
#include <linux/module.h>
16
15
#include <linux/spi/spi.h>
@@ -300,7 +299,7 @@ static int ams369fg06_ldi_disable(struct ams369fg06 *lcd)
300
299
301
300
static int ams369fg06_power_is_on (int power )
302
301
{
303
- return power <= FB_BLANK_NORMAL ;
302
+ return power <= BACKLIGHT_POWER_REDUCED ;
304
303
}
305
304
306
305
static int ams369fg06_power_on (struct ams369fg06 * lcd )
@@ -396,8 +395,8 @@ static int ams369fg06_set_power(struct lcd_device *ld, int power)
396
395
{
397
396
struct ams369fg06 * lcd = lcd_get_data (ld );
398
397
399
- if (power != FB_BLANK_UNBLANK && power != FB_BLANK_POWERDOWN &&
400
- power != FB_BLANK_NORMAL ) {
398
+ if (power != BACKLIGHT_POWER_ON && power != BACKLIGHT_POWER_OFF &&
399
+ power != BACKLIGHT_POWER_REDUCED ) {
401
400
dev_err (lcd -> dev , "power value should be 0, 1 or 4.\n" );
402
401
return - EINVAL ;
403
402
}
@@ -492,11 +491,11 @@ static int ams369fg06_probe(struct spi_device *spi)
492
491
* current lcd status is powerdown and then
493
492
* it enables lcd panel.
494
493
*/
495
- lcd -> power = FB_BLANK_POWERDOWN ;
494
+ lcd -> power = BACKLIGHT_POWER_OFF ;
496
495
497
- ams369fg06_power (lcd , FB_BLANK_UNBLANK );
496
+ ams369fg06_power (lcd , BACKLIGHT_POWER_ON );
498
497
} else {
499
- lcd -> power = FB_BLANK_UNBLANK ;
498
+ lcd -> power = BACKLIGHT_POWER_ON ;
500
499
}
501
500
502
501
spi_set_drvdata (spi , lcd );
@@ -510,7 +509,7 @@ static void ams369fg06_remove(struct spi_device *spi)
510
509
{
511
510
struct ams369fg06 * lcd = spi_get_drvdata (spi );
512
511
513
- ams369fg06_power (lcd , FB_BLANK_POWERDOWN );
512
+ ams369fg06_power (lcd , BACKLIGHT_POWER_OFF );
514
513
}
515
514
516
515
#ifdef CONFIG_PM_SLEEP
@@ -524,16 +523,16 @@ static int ams369fg06_suspend(struct device *dev)
524
523
* when lcd panel is suspend, lcd panel becomes off
525
524
* regardless of status.
526
525
*/
527
- return ams369fg06_power (lcd , FB_BLANK_POWERDOWN );
526
+ return ams369fg06_power (lcd , BACKLIGHT_POWER_OFF );
528
527
}
529
528
530
529
static int ams369fg06_resume (struct device * dev )
531
530
{
532
531
struct ams369fg06 * lcd = dev_get_drvdata (dev );
533
532
534
- lcd -> power = FB_BLANK_POWERDOWN ;
533
+ lcd -> power = BACKLIGHT_POWER_OFF ;
535
534
536
- return ams369fg06_power (lcd , FB_BLANK_UNBLANK );
535
+ return ams369fg06_power (lcd , BACKLIGHT_POWER_ON );
537
536
}
538
537
#endif
539
538
@@ -544,7 +543,7 @@ static void ams369fg06_shutdown(struct spi_device *spi)
544
543
{
545
544
struct ams369fg06 * lcd = spi_get_drvdata (spi );
546
545
547
- ams369fg06_power (lcd , FB_BLANK_POWERDOWN );
546
+ ams369fg06_power (lcd , BACKLIGHT_POWER_OFF );
548
547
}
549
548
550
549
static struct spi_driver ams369fg06_driver = {
0 commit comments