1010
1111#include <linux/delay.h>
1212#include <linux/err.h>
13- #include <linux/fb.h>
1413#include <linux/init.h>
1514#include <linux/lcd.h>
1615#include <linux/module.h>
@@ -121,7 +120,7 @@ static inline int ili9320_power_off(struct ili9320 *lcd)
121120 return 0 ;
122121}
123122
124- #define POWER_IS_ON (pwr ) ((pwr) <= FB_BLANK_NORMAL )
123+ #define POWER_IS_ON (pwr ) ((pwr) <= LCD_POWER_REDUCED )
125124
126125static int ili9320_power (struct ili9320 * lcd , int power )
127126{
@@ -223,7 +222,7 @@ int ili9320_probe_spi(struct spi_device *spi,
223222
224223 ili -> dev = dev ;
225224 ili -> client = client ;
226- ili -> power = FB_BLANK_POWERDOWN ;
225+ ili -> power = LCD_POWER_OFF ;
227226 ili -> platdata = cfg ;
228227
229228 spi_set_drvdata (spi , ili );
@@ -241,7 +240,7 @@ int ili9320_probe_spi(struct spi_device *spi,
241240
242241 dev_info (dev , "initialising %s\n" , client -> name );
243242
244- ret = ili9320_power (ili , FB_BLANK_UNBLANK );
243+ ret = ili9320_power (ili , LCD_POWER_ON );
245244 if (ret != 0 ) {
246245 dev_err (dev , "failed to set lcd power state\n" );
247246 return ret ;
@@ -253,7 +252,7 @@ EXPORT_SYMBOL_GPL(ili9320_probe_spi);
253252
254253void ili9320_remove (struct ili9320 * ili )
255254{
256- ili9320_power (ili , FB_BLANK_POWERDOWN );
255+ ili9320_power (ili , LCD_POWER_OFF );
257256}
258257EXPORT_SYMBOL_GPL (ili9320_remove );
259258
@@ -262,7 +261,7 @@ int ili9320_suspend(struct ili9320 *lcd)
262261{
263262 int ret ;
264263
265- ret = ili9320_power (lcd , FB_BLANK_POWERDOWN );
264+ ret = ili9320_power (lcd , LCD_POWER_OFF );
266265
267266 if (lcd -> platdata -> suspend == ILI9320_SUSPEND_DEEP ) {
268267 ili9320_write (lcd , ILI9320_POWER1 , lcd -> power1 |
@@ -282,15 +281,15 @@ int ili9320_resume(struct ili9320 *lcd)
282281 if (lcd -> platdata -> suspend == ILI9320_SUSPEND_DEEP )
283282 ili9320_write (lcd , ILI9320_POWER1 , 0x00 );
284283
285- return ili9320_power (lcd , FB_BLANK_UNBLANK );
284+ return ili9320_power (lcd , LCD_POWER_ON );
286285}
287286EXPORT_SYMBOL_GPL (ili9320_resume );
288287#endif
289288
290289/* Power down all displays on reboot, poweroff or halt */
291290void ili9320_shutdown (struct ili9320 * lcd )
292291{
293- ili9320_power (lcd , FB_BLANK_POWERDOWN );
292+ ili9320_power (lcd , LCD_POWER_OFF );
294293}
295294EXPORT_SYMBOL_GPL (ili9320_shutdown );
296295
0 commit comments