corgi_lcd.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. /*
  2. * linux/drivers/video/w100fb.c
  3. *
  4. * Corgi/Spitz LCD Specific Code
  5. *
  6. * Copyright (C) 2005 Richard Purdie
  7. *
  8. * Connectivity:
  9. * Corgi - LCD to ATI Imageon w100 (Wallaby)
  10. * Spitz - LCD to PXA Framebuffer
  11. *
  12. * This program is free software; you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License version 2 as
  14. * published by the Free Software Foundation.
  15. *
  16. */
  17. #include <linux/delay.h>
  18. #include <linux/kernel.h>
  19. #include <linux/device.h>
  20. #include <linux/module.h>
  21. #include <asm/arch/akita.h>
  22. #include <asm/arch/corgi.h>
  23. #include <asm/arch/hardware.h>
  24. #include <asm/arch/pxa-regs.h>
  25. #include <asm/arch/sharpsl.h>
  26. #include <asm/arch/spitz.h>
  27. #include <asm/hardware/scoop.h>
  28. #include <asm/mach/sharpsl_param.h>
  29. #include "generic.h"
  30. /* Register Addresses */
  31. #define RESCTL_ADRS 0x00
  32. #define PHACTRL_ADRS 0x01
  33. #define DUTYCTRL_ADRS 0x02
  34. #define POWERREG0_ADRS 0x03
  35. #define POWERREG1_ADRS 0x04
  36. #define GPOR3_ADRS 0x05
  37. #define PICTRL_ADRS 0x06
  38. #define POLCTRL_ADRS 0x07
  39. /* Resgister Bit Definitions */
  40. #define RESCTL_QVGA 0x01
  41. #define RESCTL_VGA 0x00
  42. #define POWER1_VW_ON 0x01 /* VW Supply FET ON */
  43. #define POWER1_GVSS_ON 0x02 /* GVSS(-8V) Power Supply ON */
  44. #define POWER1_VDD_ON 0x04 /* VDD(8V),SVSS(-4V) Power Supply ON */
  45. #define POWER1_VW_OFF 0x00 /* VW Supply FET OFF */
  46. #define POWER1_GVSS_OFF 0x00 /* GVSS(-8V) Power Supply OFF */
  47. #define POWER1_VDD_OFF 0x00 /* VDD(8V),SVSS(-4V) Power Supply OFF */
  48. #define POWER0_COM_DCLK 0x01 /* COM Voltage DC Bias DAC Serial Data Clock */
  49. #define POWER0_COM_DOUT 0x02 /* COM Voltage DC Bias DAC Serial Data Out */
  50. #define POWER0_DAC_ON 0x04 /* DAC Power Supply ON */
  51. #define POWER0_COM_ON 0x08 /* COM Powewr Supply ON */
  52. #define POWER0_VCC5_ON 0x10 /* VCC5 Power Supply ON */
  53. #define POWER0_DAC_OFF 0x00 /* DAC Power Supply OFF */
  54. #define POWER0_COM_OFF 0x00 /* COM Powewr Supply OFF */
  55. #define POWER0_VCC5_OFF 0x00 /* VCC5 Power Supply OFF */
  56. #define PICTRL_INIT_STATE 0x01
  57. #define PICTRL_INIOFF 0x02
  58. #define PICTRL_POWER_DOWN 0x04
  59. #define PICTRL_COM_SIGNAL_OFF 0x08
  60. #define PICTRL_DAC_SIGNAL_OFF 0x10
  61. #define POLCTRL_SYNC_POL_FALL 0x01
  62. #define POLCTRL_EN_POL_FALL 0x02
  63. #define POLCTRL_DATA_POL_FALL 0x04
  64. #define POLCTRL_SYNC_ACT_H 0x08
  65. #define POLCTRL_EN_ACT_L 0x10
  66. #define POLCTRL_SYNC_POL_RISE 0x00
  67. #define POLCTRL_EN_POL_RISE 0x00
  68. #define POLCTRL_DATA_POL_RISE 0x00
  69. #define POLCTRL_SYNC_ACT_L 0x00
  70. #define POLCTRL_EN_ACT_H 0x00
  71. #define PHACTRL_PHASE_MANUAL 0x01
  72. #define DEFAULT_PHAD_QVGA (9)
  73. #define DEFAULT_COMADJ (125)
  74. /*
  75. * This is only a psuedo I2C interface. We can't use the standard kernel
  76. * routines as the interface is write only. We just assume the data is acked...
  77. */
  78. static void lcdtg_ssp_i2c_send(u8 data)
  79. {
  80. corgi_ssp_lcdtg_send(POWERREG0_ADRS, data);
  81. udelay(10);
  82. }
  83. static void lcdtg_i2c_send_bit(u8 data)
  84. {
  85. lcdtg_ssp_i2c_send(data);
  86. lcdtg_ssp_i2c_send(data | POWER0_COM_DCLK);
  87. lcdtg_ssp_i2c_send(data);
  88. }
  89. static void lcdtg_i2c_send_start(u8 base)
  90. {
  91. lcdtg_ssp_i2c_send(base | POWER0_COM_DCLK | POWER0_COM_DOUT);
  92. lcdtg_ssp_i2c_send(base | POWER0_COM_DCLK);
  93. lcdtg_ssp_i2c_send(base);
  94. }
  95. static void lcdtg_i2c_send_stop(u8 base)
  96. {
  97. lcdtg_ssp_i2c_send(base);
  98. lcdtg_ssp_i2c_send(base | POWER0_COM_DCLK);
  99. lcdtg_ssp_i2c_send(base | POWER0_COM_DCLK | POWER0_COM_DOUT);
  100. }
  101. static void lcdtg_i2c_send_byte(u8 base, u8 data)
  102. {
  103. int i;
  104. for (i = 0; i < 8; i++) {
  105. if (data & 0x80)
  106. lcdtg_i2c_send_bit(base | POWER0_COM_DOUT);
  107. else
  108. lcdtg_i2c_send_bit(base);
  109. data <<= 1;
  110. }
  111. }
  112. static void lcdtg_i2c_wait_ack(u8 base)
  113. {
  114. lcdtg_i2c_send_bit(base);
  115. }
  116. static void lcdtg_set_common_voltage(u8 base_data, u8 data)
  117. {
  118. /* Set Common Voltage to M62332FP via I2C */
  119. lcdtg_i2c_send_start(base_data);
  120. lcdtg_i2c_send_byte(base_data, 0x9c);
  121. lcdtg_i2c_wait_ack(base_data);
  122. lcdtg_i2c_send_byte(base_data, 0x00);
  123. lcdtg_i2c_wait_ack(base_data);
  124. lcdtg_i2c_send_byte(base_data, data);
  125. lcdtg_i2c_wait_ack(base_data);
  126. lcdtg_i2c_send_stop(base_data);
  127. }
  128. /* Set Phase Adjuct */
  129. static void lcdtg_set_phadadj(int mode)
  130. {
  131. int adj;
  132. switch(mode) {
  133. case 480:
  134. case 640:
  135. /* Setting for VGA */
  136. adj = sharpsl_param.phadadj;
  137. if (adj < 0) {
  138. adj = PHACTRL_PHASE_MANUAL;
  139. } else {
  140. adj = ((adj & 0x0f) << 1) | PHACTRL_PHASE_MANUAL;
  141. }
  142. break;
  143. case 240:
  144. case 320:
  145. default:
  146. /* Setting for QVGA */
  147. adj = (DEFAULT_PHAD_QVGA << 1) | PHACTRL_PHASE_MANUAL;
  148. break;
  149. }
  150. corgi_ssp_lcdtg_send(PHACTRL_ADRS, adj);
  151. }
  152. static int lcd_inited;
  153. static void lcdtg_hw_init(int mode)
  154. {
  155. if (!lcd_inited) {
  156. int comadj;
  157. /* Initialize Internal Logic & Port */
  158. corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_POWER_DOWN | PICTRL_INIOFF | PICTRL_INIT_STATE
  159. | PICTRL_COM_SIGNAL_OFF | PICTRL_DAC_SIGNAL_OFF);
  160. corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_COM_DCLK | POWER0_COM_DOUT | POWER0_DAC_OFF
  161. | POWER0_COM_OFF | POWER0_VCC5_OFF);
  162. corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_OFF);
  163. /* VDD(+8V), SVSS(-4V) ON */
  164. corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_ON);
  165. mdelay(3);
  166. /* DAC ON */
  167. corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_COM_DCLK | POWER0_COM_DOUT | POWER0_DAC_ON
  168. | POWER0_COM_OFF | POWER0_VCC5_OFF);
  169. /* INIB = H, INI = L */
  170. /* PICTL[0] = H , PICTL[1] = PICTL[2] = PICTL[4] = L */
  171. corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_INIT_STATE | PICTRL_COM_SIGNAL_OFF);
  172. /* Set Common Voltage */
  173. comadj = sharpsl_param.comadj;
  174. if (comadj < 0)
  175. comadj = DEFAULT_COMADJ;
  176. lcdtg_set_common_voltage((POWER0_DAC_ON | POWER0_COM_OFF | POWER0_VCC5_OFF), comadj);
  177. /* VCC5 ON, DAC ON */
  178. corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_COM_DCLK | POWER0_COM_DOUT | POWER0_DAC_ON |
  179. POWER0_COM_OFF | POWER0_VCC5_ON);
  180. /* GVSS(-8V) ON, VDD ON */
  181. corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_ON | POWER1_VDD_ON);
  182. mdelay(2);
  183. /* COM SIGNAL ON (PICTL[3] = L) */
  184. corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_INIT_STATE);
  185. /* COM ON, DAC ON, VCC5_ON */
  186. corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_COM_DCLK | POWER0_COM_DOUT | POWER0_DAC_ON
  187. | POWER0_COM_ON | POWER0_VCC5_ON);
  188. /* VW ON, GVSS ON, VDD ON */
  189. corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_ON | POWER1_GVSS_ON | POWER1_VDD_ON);
  190. /* Signals output enable */
  191. corgi_ssp_lcdtg_send(PICTRL_ADRS, 0);
  192. /* Set Phase Adjuct */
  193. lcdtg_set_phadadj(mode);
  194. /* Initialize for Input Signals from ATI */
  195. corgi_ssp_lcdtg_send(POLCTRL_ADRS, POLCTRL_SYNC_POL_RISE | POLCTRL_EN_POL_RISE
  196. | POLCTRL_DATA_POL_RISE | POLCTRL_SYNC_ACT_L | POLCTRL_EN_ACT_H);
  197. udelay(1000);
  198. lcd_inited=1;
  199. } else {
  200. lcdtg_set_phadadj(mode);
  201. }
  202. switch(mode) {
  203. case 480:
  204. case 640:
  205. /* Set Lcd Resolution (VGA) */
  206. corgi_ssp_lcdtg_send(RESCTL_ADRS, RESCTL_VGA);
  207. break;
  208. case 240:
  209. case 320:
  210. default:
  211. /* Set Lcd Resolution (QVGA) */
  212. corgi_ssp_lcdtg_send(RESCTL_ADRS, RESCTL_QVGA);
  213. break;
  214. }
  215. }
  216. static void lcdtg_suspend(void)
  217. {
  218. /* 60Hz x 2 frame = 16.7msec x 2 = 33.4 msec */
  219. mdelay(34);
  220. /* (1)VW OFF */
  221. corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_ON | POWER1_VDD_ON);
  222. /* (2)COM OFF */
  223. corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_COM_SIGNAL_OFF);
  224. corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_DAC_ON | POWER0_COM_OFF | POWER0_VCC5_ON);
  225. /* (3)Set Common Voltage Bias 0V */
  226. lcdtg_set_common_voltage(POWER0_DAC_ON | POWER0_COM_OFF | POWER0_VCC5_ON, 0);
  227. /* (4)GVSS OFF */
  228. corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_ON);
  229. /* (5)VCC5 OFF */
  230. corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_DAC_ON | POWER0_COM_OFF | POWER0_VCC5_OFF);
  231. /* (6)Set PDWN, INIOFF, DACOFF */
  232. corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_INIOFF | PICTRL_DAC_SIGNAL_OFF |
  233. PICTRL_POWER_DOWN | PICTRL_COM_SIGNAL_OFF);
  234. /* (7)DAC OFF */
  235. corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_DAC_OFF | POWER0_COM_OFF | POWER0_VCC5_OFF);
  236. /* (8)VDD OFF */
  237. corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_OFF);
  238. lcd_inited = 0;
  239. }
  240. /*
  241. * Corgi w100 Frame Buffer Device
  242. */
  243. #ifdef CONFIG_PXA_SHARP_C7xx
  244. #include <video/w100fb.h>
  245. static void w100_lcdtg_suspend(struct w100fb_par *par)
  246. {
  247. lcdtg_suspend();
  248. }
  249. static void w100_lcdtg_init(struct w100fb_par *par)
  250. {
  251. lcdtg_hw_init(par->xres);
  252. }
  253. static struct w100_tg_info corgi_lcdtg_info = {
  254. .change = w100_lcdtg_init,
  255. .suspend = w100_lcdtg_suspend,
  256. .resume = w100_lcdtg_init,
  257. };
  258. static struct w100_mem_info corgi_fb_mem = {
  259. .ext_cntl = 0x00040003,
  260. .sdram_mode_reg = 0x00650021,
  261. .ext_timing_cntl = 0x10002a4a,
  262. .io_cntl = 0x7ff87012,
  263. .size = 0x1fffff,
  264. };
  265. static struct w100_gen_regs corgi_fb_regs = {
  266. .lcd_format = 0x00000003,
  267. .lcdd_cntl1 = 0x01CC0000,
  268. .lcdd_cntl2 = 0x0003FFFF,
  269. .genlcd_cntl1 = 0x00FFFF0D,
  270. .genlcd_cntl2 = 0x003F3003,
  271. .genlcd_cntl3 = 0x000102aa,
  272. };
  273. static struct w100_gpio_regs corgi_fb_gpio = {
  274. .init_data1 = 0x000000bf,
  275. .init_data2 = 0x00000000,
  276. .gpio_dir1 = 0x00000000,
  277. .gpio_oe1 = 0x03c0feff,
  278. .gpio_dir2 = 0x00000000,
  279. .gpio_oe2 = 0x00000000,
  280. };
  281. static struct w100_mode corgi_fb_modes[] = {
  282. {
  283. .xres = 480,
  284. .yres = 640,
  285. .left_margin = 0x56,
  286. .right_margin = 0x55,
  287. .upper_margin = 0x03,
  288. .lower_margin = 0x00,
  289. .crtc_ss = 0x82360056,
  290. .crtc_ls = 0xA0280000,
  291. .crtc_gs = 0x80280028,
  292. .crtc_vpos_gs = 0x02830002,
  293. .crtc_rev = 0x00400008,
  294. .crtc_dclk = 0xA0000000,
  295. .crtc_gclk = 0x8015010F,
  296. .crtc_goe = 0x80100110,
  297. .crtc_ps1_active = 0x41060010,
  298. .pll_freq = 75,
  299. .fast_pll_freq = 100,
  300. .sysclk_src = CLK_SRC_PLL,
  301. .sysclk_divider = 0,
  302. .pixclk_src = CLK_SRC_PLL,
  303. .pixclk_divider = 2,
  304. .pixclk_divider_rotated = 6,
  305. },{
  306. .xres = 240,
  307. .yres = 320,
  308. .left_margin = 0x27,
  309. .right_margin = 0x2e,
  310. .upper_margin = 0x01,
  311. .lower_margin = 0x00,
  312. .crtc_ss = 0x81170027,
  313. .crtc_ls = 0xA0140000,
  314. .crtc_gs = 0xC0140014,
  315. .crtc_vpos_gs = 0x00010141,
  316. .crtc_rev = 0x00400008,
  317. .crtc_dclk = 0xA0000000,
  318. .crtc_gclk = 0x8015010F,
  319. .crtc_goe = 0x80100110,
  320. .crtc_ps1_active = 0x41060010,
  321. .pll_freq = 0,
  322. .fast_pll_freq = 0,
  323. .sysclk_src = CLK_SRC_XTAL,
  324. .sysclk_divider = 0,
  325. .pixclk_src = CLK_SRC_XTAL,
  326. .pixclk_divider = 1,
  327. .pixclk_divider_rotated = 1,
  328. },
  329. };
  330. static struct w100fb_mach_info corgi_fb_info = {
  331. .tg = &corgi_lcdtg_info,
  332. .init_mode = INIT_MODE_ROTATED,
  333. .mem = &corgi_fb_mem,
  334. .regs = &corgi_fb_regs,
  335. .modelist = &corgi_fb_modes[0],
  336. .num_modes = 2,
  337. .gpio = &corgi_fb_gpio,
  338. .xtal_freq = 12500000,
  339. .xtal_dbl = 0,
  340. };
  341. static struct resource corgi_fb_resources[] = {
  342. [0] = {
  343. .start = 0x08000000,
  344. .end = 0x08ffffff,
  345. .flags = IORESOURCE_MEM,
  346. },
  347. };
  348. struct platform_device corgifb_device = {
  349. .name = "w100fb",
  350. .id = -1,
  351. .num_resources = ARRAY_SIZE(corgi_fb_resources),
  352. .resource = corgi_fb_resources,
  353. .dev = {
  354. .platform_data = &corgi_fb_info,
  355. .parent = &corgissp_device.dev,
  356. },
  357. };
  358. #endif
  359. /*
  360. * Spitz PXA Frame Buffer Device
  361. */
  362. #ifdef CONFIG_PXA_SHARP_Cxx00
  363. #include <asm/arch/pxafb.h>
  364. void spitz_lcd_power(int on)
  365. {
  366. if (on)
  367. lcdtg_hw_init(480);
  368. else
  369. lcdtg_suspend();
  370. }
  371. #endif
  372. /*
  373. * Corgi/Spitz Touchscreen to LCD interface
  374. */
  375. static unsigned long (*get_hsync_time)(struct device *dev);
  376. static void inline sharpsl_wait_sync(int gpio)
  377. {
  378. while((GPLR(gpio) & GPIO_bit(gpio)) == 0);
  379. while((GPLR(gpio) & GPIO_bit(gpio)) != 0);
  380. }
  381. #ifdef CONFIG_PXA_SHARP_C7xx
  382. unsigned long corgi_get_hsync_len(void)
  383. {
  384. if (!get_hsync_time)
  385. get_hsync_time = symbol_get(w100fb_get_hsynclen);
  386. if (!get_hsync_time)
  387. return 0;
  388. return get_hsync_time(&corgifb_device.dev);
  389. }
  390. void corgi_put_hsync(void)
  391. {
  392. if (get_hsync_time)
  393. symbol_put(w100fb_get_hsynclen);
  394. }
  395. void corgi_wait_hsync(void)
  396. {
  397. sharpsl_wait_sync(CORGI_GPIO_HSYNC);
  398. }
  399. #endif
  400. #ifdef CONFIG_PXA_SHARP_Cxx00
  401. unsigned long spitz_get_hsync_len(void)
  402. {
  403. if (!get_hsync_time)
  404. get_hsync_time = symbol_get(pxafb_get_hsync_time);
  405. if (!get_hsync_time)
  406. return 0;
  407. return pxafb_get_hsync_time(&pxafb_device.dev);
  408. }
  409. void spitz_put_hsync(void)
  410. {
  411. if (get_hsync_time)
  412. symbol_put(pxafb_get_hsync_time);
  413. }
  414. void spitz_wait_hsync(void)
  415. {
  416. sharpsl_wait_sync(SPITZ_GPIO_HSYNC);
  417. }
  418. #endif
  419. /*
  420. * Corgi/Spitz Backlight Power
  421. */
  422. #ifdef CONFIG_PXA_SHARP_C7xx
  423. void corgi_bl_set_intensity(int intensity)
  424. {
  425. if (intensity > 0x10)
  426. intensity += 0x10;
  427. /* Bits 0-4 are accessed via the SSP interface */
  428. corgi_ssp_blduty_set(intensity & 0x1f);
  429. /* Bit 5 is via SCOOP */
  430. if (intensity & 0x0020)
  431. set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_BACKLIGHT_CONT);
  432. else
  433. reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_BACKLIGHT_CONT);
  434. }
  435. #endif
  436. #if defined(CONFIG_MACH_SPITZ) || defined(CONFIG_MACH_BORZOI)
  437. void spitz_bl_set_intensity(int intensity)
  438. {
  439. if (intensity > 0x10)
  440. intensity += 0x10;
  441. /* Bits 0-4 are accessed via the SSP interface */
  442. corgi_ssp_blduty_set(intensity & 0x1f);
  443. /* Bit 5 is via SCOOP */
  444. if (intensity & 0x0020)
  445. reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_BACKLIGHT_CONT);
  446. else
  447. set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_BACKLIGHT_CONT);
  448. if (intensity)
  449. set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_BACKLIGHT_ON);
  450. else
  451. reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_BACKLIGHT_ON);
  452. }
  453. #endif
  454. #ifdef CONFIG_MACH_AKITA
  455. void akita_bl_set_intensity(int intensity)
  456. {
  457. if (intensity > 0x10)
  458. intensity += 0x10;
  459. /* Bits 0-4 are accessed via the SSP interface */
  460. corgi_ssp_blduty_set(intensity & 0x1f);
  461. /* Bit 5 is via IO-Expander */
  462. if (intensity & 0x0020)
  463. akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_BACKLIGHT_CONT);
  464. else
  465. akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_BACKLIGHT_CONT);
  466. if (intensity)
  467. akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_BACKLIGHT_ON);
  468. else
  469. akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_BACKLIGHT_ON);
  470. }
  471. #endif