leds-lp5523.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. /*
  2. * lp5523.c - LP5523 LED Driver
  3. *
  4. * Copyright (C) 2010 Nokia Corporation
  5. *
  6. * Contact: Samu Onkalo <samu.p.onkalo@nokia.com>
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * version 2 as published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  20. * 02110-1301 USA
  21. */
  22. #include <linux/module.h>
  23. #include <linux/init.h>
  24. #include <linux/i2c.h>
  25. #include <linux/mutex.h>
  26. #include <linux/gpio.h>
  27. #include <linux/interrupt.h>
  28. #include <linux/delay.h>
  29. #include <linux/ctype.h>
  30. #include <linux/spinlock.h>
  31. #include <linux/wait.h>
  32. #include <linux/leds.h>
  33. #include <linux/leds-lp5523.h>
  34. #include <linux/workqueue.h>
  35. #include <linux/slab.h>
  36. #include <linux/platform_data/leds-lp55xx.h>
  37. #include <linux/firmware.h>
  38. #include "leds-lp55xx-common.h"
  39. #define LP5523_REG_ENABLE 0x00
  40. #define LP5523_REG_OP_MODE 0x01
  41. #define LP5523_REG_RATIOMETRIC_MSB 0x02
  42. #define LP5523_REG_RATIOMETRIC_LSB 0x03
  43. #define LP5523_REG_ENABLE_LEDS_MSB 0x04
  44. #define LP5523_REG_ENABLE_LEDS_LSB 0x05
  45. #define LP5523_REG_LED_CNTRL_BASE 0x06
  46. #define LP5523_REG_LED_PWM_BASE 0x16
  47. #define LP5523_REG_LED_CURRENT_BASE 0x26
  48. #define LP5523_REG_CONFIG 0x36
  49. #define LP5523_REG_CHANNEL1_PC 0x37
  50. #define LP5523_REG_CHANNEL2_PC 0x38
  51. #define LP5523_REG_CHANNEL3_PC 0x39
  52. #define LP5523_REG_STATUS 0x3a
  53. #define LP5523_REG_GPO 0x3b
  54. #define LP5523_REG_VARIABLE 0x3c
  55. #define LP5523_REG_RESET 0x3d
  56. #define LP5523_REG_TEMP_CTRL 0x3e
  57. #define LP5523_REG_TEMP_READ 0x3f
  58. #define LP5523_REG_TEMP_WRITE 0x40
  59. #define LP5523_REG_LED_TEST_CTRL 0x41
  60. #define LP5523_REG_LED_TEST_ADC 0x42
  61. #define LP5523_REG_ENG1_VARIABLE 0x45
  62. #define LP5523_REG_ENG2_VARIABLE 0x46
  63. #define LP5523_REG_ENG3_VARIABLE 0x47
  64. #define LP5523_REG_MASTER_FADER1 0x48
  65. #define LP5523_REG_MASTER_FADER2 0x49
  66. #define LP5523_REG_MASTER_FADER3 0x4a
  67. #define LP5523_REG_CH1_PROG_START 0x4c
  68. #define LP5523_REG_CH2_PROG_START 0x4d
  69. #define LP5523_REG_CH3_PROG_START 0x4e
  70. #define LP5523_REG_PROG_PAGE_SEL 0x4f
  71. #define LP5523_REG_PROG_MEM 0x50
  72. #define LP5523_CMD_LOAD 0x15 /* 00010101 */
  73. #define LP5523_CMD_RUN 0x2a /* 00101010 */
  74. #define LP5523_CMD_DISABLED 0x00 /* 00000000 */
  75. #define LP5523_ENABLE 0x40
  76. #define LP5523_AUTO_INC 0x40
  77. #define LP5523_PWR_SAVE 0x20
  78. #define LP5523_PWM_PWR_SAVE 0x04
  79. #define LP5523_CP_1 0x08
  80. #define LP5523_CP_1_5 0x10
  81. #define LP5523_CP_AUTO 0x18
  82. #define LP5523_INT_CLK 0x01
  83. #define LP5523_AUTO_CLK 0x02
  84. #define LP5523_EN_LEDTEST 0x80
  85. #define LP5523_LEDTEST_DONE 0x80
  86. #define LP5523_RESET 0xFF
  87. #define LP5523_DEFAULT_CURRENT 50 /* microAmps */
  88. #define LP5523_PROGRAM_LENGTH 32 /* in bytes */
  89. #define LP5523_PROGRAM_PAGES 6
  90. #define LP5523_ADC_SHORTCIRC_LIM 80
  91. #define LP5523_MAX_LEDS 9
  92. #define LP5523_ENGINES 3
  93. #define LP5523_ENG_MASK_BASE 0x30 /* 00110000 */
  94. #define LP5523_ENG_STATUS_MASK 0x07 /* 00000111 */
  95. #define LP5523_IRQ_FLAGS IRQF_TRIGGER_FALLING
  96. #define LP5523_EXT_CLK_USED 0x08
  97. #define LED_ACTIVE(mux, led) (!!(mux & (0x0001 << led)))
  98. #define SHIFT_MASK(id) (((id) - 1) * 2)
  99. /* Memory Page Selection */
  100. #define LP5523_PAGE_ENG1 0
  101. #define LP5523_PAGE_ENG2 1
  102. #define LP5523_PAGE_ENG3 2
  103. /* Program Memory Operations */
  104. #define LP5523_MODE_ENG1_M 0x30 /* Operation Mode Register */
  105. #define LP5523_MODE_ENG2_M 0x0C
  106. #define LP5523_MODE_ENG3_M 0x03
  107. #define LP5523_LOAD_ENG1 0x10
  108. #define LP5523_LOAD_ENG2 0x04
  109. #define LP5523_LOAD_ENG3 0x01
  110. #define LP5523_ENG1_IS_LOADING(mode) \
  111. ((mode & LP5523_MODE_ENG1_M) == LP5523_LOAD_ENG1)
  112. #define LP5523_ENG2_IS_LOADING(mode) \
  113. ((mode & LP5523_MODE_ENG2_M) == LP5523_LOAD_ENG2)
  114. #define LP5523_ENG3_IS_LOADING(mode) \
  115. ((mode & LP5523_MODE_ENG3_M) == LP5523_LOAD_ENG3)
  116. #define LP5523_EXEC_ENG1_M 0x30 /* Enable Register */
  117. #define LP5523_EXEC_ENG2_M 0x0C
  118. #define LP5523_EXEC_ENG3_M 0x03
  119. #define LP5523_EXEC_M 0x3F
  120. #define LP5523_RUN_ENG1 0x20
  121. #define LP5523_RUN_ENG2 0x08
  122. #define LP5523_RUN_ENG3 0x02
  123. enum lp5523_chip_id {
  124. LP5523,
  125. LP55231,
  126. };
  127. struct lp5523_led {
  128. int id;
  129. u8 chan_nr;
  130. u8 led_current;
  131. u8 max_current;
  132. struct led_classdev cdev;
  133. struct work_struct brightness_work;
  134. u8 brightness;
  135. };
  136. struct lp5523_chip {
  137. struct mutex lock; /* Serialize control */
  138. struct i2c_client *client;
  139. struct lp5523_led leds[LP5523_MAX_LEDS];
  140. struct lp5523_platform_data *pdata;
  141. u8 num_channels;
  142. u8 num_leds;
  143. };
  144. static inline void lp5523_wait_opmode_done(void)
  145. {
  146. usleep_range(1000, 2000);
  147. }
  148. static void lp5523_set_led_current(struct lp55xx_led *led, u8 led_current)
  149. {
  150. led->led_current = led_current;
  151. lp55xx_write(led->chip, LP5523_REG_LED_CURRENT_BASE + led->chan_nr,
  152. led_current);
  153. }
  154. static int lp5523_write(struct i2c_client *client, u8 reg, u8 value)
  155. {
  156. return i2c_smbus_write_byte_data(client, reg, value);
  157. }
  158. static int lp5523_post_init_device(struct lp55xx_chip *chip)
  159. {
  160. int ret;
  161. ret = lp55xx_write(chip, LP5523_REG_ENABLE, LP5523_ENABLE);
  162. if (ret)
  163. return ret;
  164. /* Chip startup time is 500 us, 1 - 2 ms gives some margin */
  165. usleep_range(1000, 2000);
  166. ret = lp55xx_write(chip, LP5523_REG_CONFIG,
  167. LP5523_AUTO_INC | LP5523_PWR_SAVE |
  168. LP5523_CP_AUTO | LP5523_AUTO_CLK |
  169. LP5523_PWM_PWR_SAVE);
  170. if (ret)
  171. return ret;
  172. /* turn on all leds */
  173. ret = lp55xx_write(chip, LP5523_REG_ENABLE_LEDS_MSB, 0x01);
  174. if (ret)
  175. return ret;
  176. return lp55xx_write(chip, LP5523_REG_ENABLE_LEDS_LSB, 0xff);
  177. }
  178. static void lp5523_load_engine(struct lp55xx_chip *chip)
  179. {
  180. enum lp55xx_engine_index idx = chip->engine_idx;
  181. u8 mask[] = {
  182. [LP55XX_ENGINE_1] = LP5523_MODE_ENG1_M,
  183. [LP55XX_ENGINE_2] = LP5523_MODE_ENG2_M,
  184. [LP55XX_ENGINE_3] = LP5523_MODE_ENG3_M,
  185. };
  186. u8 val[] = {
  187. [LP55XX_ENGINE_1] = LP5523_LOAD_ENG1,
  188. [LP55XX_ENGINE_2] = LP5523_LOAD_ENG2,
  189. [LP55XX_ENGINE_3] = LP5523_LOAD_ENG3,
  190. };
  191. u8 page_sel[] = {
  192. [LP55XX_ENGINE_1] = LP5523_PAGE_ENG1,
  193. [LP55XX_ENGINE_2] = LP5523_PAGE_ENG2,
  194. [LP55XX_ENGINE_3] = LP5523_PAGE_ENG3,
  195. };
  196. lp55xx_update_bits(chip, LP5523_REG_OP_MODE, mask[idx], val[idx]);
  197. lp5523_wait_opmode_done();
  198. lp55xx_write(chip, LP5523_REG_PROG_PAGE_SEL, page_sel[idx]);
  199. }
  200. static void lp5523_stop_engine(struct lp55xx_chip *chip)
  201. {
  202. lp55xx_write(chip, LP5523_REG_OP_MODE, 0);
  203. lp5523_wait_opmode_done();
  204. }
  205. static void lp5523_turn_off_channels(struct lp55xx_chip *chip)
  206. {
  207. int i;
  208. for (i = 0; i < LP5523_MAX_LEDS; i++)
  209. lp55xx_write(chip, LP5523_REG_LED_PWM_BASE + i, 0);
  210. }
  211. static void lp5523_run_engine(struct lp55xx_chip *chip, bool start)
  212. {
  213. int ret;
  214. u8 mode;
  215. u8 exec;
  216. /* stop engine */
  217. if (!start) {
  218. lp5523_stop_engine(chip);
  219. lp5523_turn_off_channels(chip);
  220. return;
  221. }
  222. /*
  223. * To run the engine,
  224. * operation mode and enable register should updated at the same time
  225. */
  226. ret = lp55xx_read(chip, LP5523_REG_OP_MODE, &mode);
  227. if (ret)
  228. return;
  229. ret = lp55xx_read(chip, LP5523_REG_ENABLE, &exec);
  230. if (ret)
  231. return;
  232. /* change operation mode to RUN only when each engine is loading */
  233. if (LP5523_ENG1_IS_LOADING(mode)) {
  234. mode = (mode & ~LP5523_MODE_ENG1_M) | LP5523_RUN_ENG1;
  235. exec = (exec & ~LP5523_EXEC_ENG1_M) | LP5523_RUN_ENG1;
  236. }
  237. if (LP5523_ENG2_IS_LOADING(mode)) {
  238. mode = (mode & ~LP5523_MODE_ENG2_M) | LP5523_RUN_ENG2;
  239. exec = (exec & ~LP5523_EXEC_ENG2_M) | LP5523_RUN_ENG2;
  240. }
  241. if (LP5523_ENG3_IS_LOADING(mode)) {
  242. mode = (mode & ~LP5523_MODE_ENG3_M) | LP5523_RUN_ENG3;
  243. exec = (exec & ~LP5523_EXEC_ENG3_M) | LP5523_RUN_ENG3;
  244. }
  245. lp55xx_write(chip, LP5523_REG_OP_MODE, mode);
  246. lp5523_wait_opmode_done();
  247. lp55xx_update_bits(chip, LP5523_REG_ENABLE, LP5523_EXEC_M, exec);
  248. }
  249. static int lp5523_update_program_memory(struct lp55xx_chip *chip,
  250. const u8 *data, size_t size)
  251. {
  252. u8 pattern[LP5523_PROGRAM_LENGTH] = {0};
  253. unsigned cmd;
  254. char c[3];
  255. int update_size;
  256. int nrchars;
  257. int offset = 0;
  258. int ret;
  259. int i;
  260. /* clear program memory before updating */
  261. for (i = 0; i < LP5523_PROGRAM_LENGTH; i++)
  262. lp55xx_write(chip, LP5523_REG_PROG_MEM + i, 0);
  263. i = 0;
  264. while ((offset < size - 1) && (i < LP5523_PROGRAM_LENGTH)) {
  265. /* separate sscanfs because length is working only for %s */
  266. ret = sscanf(data + offset, "%2s%n ", c, &nrchars);
  267. if (ret != 1)
  268. goto err;
  269. ret = sscanf(c, "%2x", &cmd);
  270. if (ret != 1)
  271. goto err;
  272. pattern[i] = (u8)cmd;
  273. offset += nrchars;
  274. i++;
  275. }
  276. /* Each instruction is 16bit long. Check that length is even */
  277. if (i % 2)
  278. goto err;
  279. update_size = i;
  280. for (i = 0; i < update_size; i++)
  281. lp55xx_write(chip, LP5523_REG_PROG_MEM + i, pattern[i]);
  282. return 0;
  283. err:
  284. dev_err(&chip->cl->dev, "wrong pattern format\n");
  285. return -EINVAL;
  286. }
  287. static void lp5523_firmware_loaded(struct lp55xx_chip *chip)
  288. {
  289. const struct firmware *fw = chip->fw;
  290. if (fw->size > LP5523_PROGRAM_LENGTH) {
  291. dev_err(&chip->cl->dev, "firmware data size overflow: %zu\n",
  292. fw->size);
  293. return;
  294. }
  295. /*
  296. * Program momery sequence
  297. * 1) set engine mode to "LOAD"
  298. * 2) write firmware data into program memory
  299. */
  300. lp5523_load_engine(chip);
  301. lp5523_update_program_memory(chip, fw->data, fw->size);
  302. }
  303. static ssize_t lp5523_selftest(struct device *dev,
  304. struct device_attribute *attr,
  305. char *buf)
  306. {
  307. struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev));
  308. struct lp55xx_chip *chip = led->chip;
  309. struct lp55xx_platform_data *pdata = chip->pdata;
  310. int i, ret, pos = 0;
  311. u8 status, adc, vdd;
  312. mutex_lock(&chip->lock);
  313. ret = lp55xx_read(chip, LP5523_REG_STATUS, &status);
  314. if (ret < 0)
  315. goto fail;
  316. /* Check that ext clock is really in use if requested */
  317. if (pdata->clock_mode == LP55XX_CLOCK_EXT) {
  318. if ((status & LP5523_EXT_CLK_USED) == 0)
  319. goto fail;
  320. }
  321. /* Measure VDD (i.e. VBAT) first (channel 16 corresponds to VDD) */
  322. lp55xx_write(chip, LP5523_REG_LED_TEST_CTRL, LP5523_EN_LEDTEST | 16);
  323. usleep_range(3000, 6000); /* ADC conversion time is typically 2.7 ms */
  324. ret = lp55xx_read(chip, LP5523_REG_STATUS, &status);
  325. if (ret < 0)
  326. goto fail;
  327. if (!(status & LP5523_LEDTEST_DONE))
  328. usleep_range(3000, 6000); /* Was not ready. Wait little bit */
  329. ret = lp55xx_read(chip, LP5523_REG_LED_TEST_ADC, &vdd);
  330. if (ret < 0)
  331. goto fail;
  332. vdd--; /* There may be some fluctuation in measurement */
  333. for (i = 0; i < LP5523_MAX_LEDS; i++) {
  334. /* Skip non-existing channels */
  335. if (pdata->led_config[i].led_current == 0)
  336. continue;
  337. /* Set default current */
  338. lp55xx_write(chip, LP5523_REG_LED_CURRENT_BASE + i,
  339. pdata->led_config[i].led_current);
  340. lp55xx_write(chip, LP5523_REG_LED_PWM_BASE + i, 0xff);
  341. /* let current stabilize 2 - 4ms before measurements start */
  342. usleep_range(2000, 4000);
  343. lp55xx_write(chip, LP5523_REG_LED_TEST_CTRL,
  344. LP5523_EN_LEDTEST | i);
  345. /* ADC conversion time is 2.7 ms typically */
  346. usleep_range(3000, 6000);
  347. ret = lp55xx_read(chip, LP5523_REG_STATUS, &status);
  348. if (ret < 0)
  349. goto fail;
  350. if (!(status & LP5523_LEDTEST_DONE))
  351. usleep_range(3000, 6000);/* Was not ready. Wait. */
  352. ret = lp55xx_read(chip, LP5523_REG_LED_TEST_ADC, &adc);
  353. if (ret < 0)
  354. goto fail;
  355. if (adc >= vdd || adc < LP5523_ADC_SHORTCIRC_LIM)
  356. pos += sprintf(buf + pos, "LED %d FAIL\n", i);
  357. lp55xx_write(chip, LP5523_REG_LED_PWM_BASE + i, 0x00);
  358. /* Restore current */
  359. lp55xx_write(chip, LP5523_REG_LED_CURRENT_BASE + i,
  360. led->led_current);
  361. led++;
  362. }
  363. if (pos == 0)
  364. pos = sprintf(buf, "OK\n");
  365. goto release_lock;
  366. fail:
  367. pos = sprintf(buf, "FAIL\n");
  368. release_lock:
  369. mutex_unlock(&chip->lock);
  370. return pos;
  371. }
  372. static void lp5523_led_brightness_work(struct work_struct *work)
  373. {
  374. struct lp55xx_led *led = container_of(work, struct lp55xx_led,
  375. brightness_work);
  376. struct lp55xx_chip *chip = led->chip;
  377. mutex_lock(&chip->lock);
  378. lp55xx_write(chip, LP5523_REG_LED_PWM_BASE + led->chan_nr,
  379. led->brightness);
  380. mutex_unlock(&chip->lock);
  381. }
  382. static DEVICE_ATTR(selftest, S_IRUGO, lp5523_selftest, NULL);
  383. static struct attribute *lp5523_attributes[] = {
  384. &dev_attr_selftest.attr,
  385. NULL,
  386. };
  387. static const struct attribute_group lp5523_group = {
  388. .attrs = lp5523_attributes,
  389. };
  390. static void lp5523_unregister_sysfs(struct i2c_client *client)
  391. {
  392. struct device *dev = &client->dev;
  393. sysfs_remove_group(&dev->kobj, &lp5523_group);
  394. }
  395. /* Chip specific configurations */
  396. static struct lp55xx_device_config lp5523_cfg = {
  397. .reset = {
  398. .addr = LP5523_REG_RESET,
  399. .val = LP5523_RESET,
  400. },
  401. .enable = {
  402. .addr = LP5523_REG_ENABLE,
  403. .val = LP5523_ENABLE,
  404. },
  405. .max_channel = LP5523_MAX_LEDS,
  406. .post_init_device = lp5523_post_init_device,
  407. .brightness_work_fn = lp5523_led_brightness_work,
  408. .set_led_current = lp5523_set_led_current,
  409. .firmware_cb = lp5523_firmware_loaded,
  410. .run_engine = lp5523_run_engine,
  411. .dev_attr_group = &lp5523_group,
  412. };
  413. static int lp5523_probe(struct i2c_client *client,
  414. const struct i2c_device_id *id)
  415. {
  416. int ret;
  417. struct lp55xx_chip *chip;
  418. struct lp55xx_led *led;
  419. struct lp55xx_platform_data *pdata = client->dev.platform_data;
  420. if (!pdata) {
  421. dev_err(&client->dev, "no platform data\n");
  422. return -EINVAL;
  423. }
  424. chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
  425. if (!chip)
  426. return -ENOMEM;
  427. led = devm_kzalloc(&client->dev,
  428. sizeof(*led) * pdata->num_channels, GFP_KERNEL);
  429. if (!led)
  430. return -ENOMEM;
  431. chip->cl = client;
  432. chip->pdata = pdata;
  433. chip->cfg = &lp5523_cfg;
  434. mutex_init(&chip->lock);
  435. i2c_set_clientdata(client, led);
  436. ret = lp55xx_init_device(chip);
  437. if (ret)
  438. goto err_init;
  439. dev_info(&client->dev, "%s Programmable led chip found\n", id->name);
  440. ret = lp55xx_register_leds(led, chip);
  441. if (ret)
  442. goto err_register_leds;
  443. ret = lp55xx_register_sysfs(chip);
  444. if (ret) {
  445. dev_err(&client->dev, "registering sysfs failed\n");
  446. goto err_register_sysfs;
  447. }
  448. return 0;
  449. err_register_sysfs:
  450. lp55xx_unregister_leds(led, chip);
  451. err_register_leds:
  452. lp55xx_deinit_device(chip);
  453. err_init:
  454. return ret;
  455. }
  456. static int lp5523_remove(struct i2c_client *client)
  457. {
  458. struct lp55xx_led *led = i2c_get_clientdata(client);
  459. struct lp55xx_chip *chip = led->chip;
  460. /* Disable engine mode */
  461. lp5523_write(client, LP5523_REG_OP_MODE, LP5523_CMD_DISABLED);
  462. lp5523_unregister_sysfs(client);
  463. lp55xx_unregister_leds(led, chip);
  464. lp55xx_deinit_device(chip);
  465. return 0;
  466. }
  467. static const struct i2c_device_id lp5523_id[] = {
  468. { "lp5523", LP5523 },
  469. { "lp55231", LP55231 },
  470. { }
  471. };
  472. MODULE_DEVICE_TABLE(i2c, lp5523_id);
  473. static struct i2c_driver lp5523_driver = {
  474. .driver = {
  475. .name = "lp5523x",
  476. },
  477. .probe = lp5523_probe,
  478. .remove = lp5523_remove,
  479. .id_table = lp5523_id,
  480. };
  481. module_i2c_driver(lp5523_driver);
  482. MODULE_AUTHOR("Mathias Nyman <mathias.nyman@nokia.com>");
  483. MODULE_DESCRIPTION("LP5523 LED engine");
  484. MODULE_LICENSE("GPL");