rtc-pm8xxx.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. /* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #include <linux/module.h>
  13. #include <linux/init.h>
  14. #include <linux/rtc.h>
  15. #include <linux/pm.h>
  16. #include <linux/slab.h>
  17. #include <linux/spinlock.h>
  18. #include <linux/mfd/pm8xxx/core.h>
  19. #include <linux/mfd/pm8xxx/rtc.h>
  20. /* RTC Register offsets from RTC CTRL REG */
  21. #define PM8XXX_ALARM_CTRL_OFFSET 0x01
  22. #define PM8XXX_RTC_WRITE_OFFSET 0x02
  23. #define PM8XXX_RTC_READ_OFFSET 0x06
  24. #define PM8XXX_ALARM_RW_OFFSET 0x0A
  25. /* RTC_CTRL register bit fields */
  26. #define PM8xxx_RTC_ENABLE BIT(7)
  27. #define PM8xxx_RTC_ALARM_ENABLE BIT(1)
  28. #define PM8xxx_RTC_ALARM_CLEAR BIT(0)
  29. #define NUM_8_BIT_RTC_REGS 0x4
  30. /**
  31. * struct pm8xxx_rtc - rtc driver internal structure
  32. * @rtc: rtc device for this driver.
  33. * @rtc_alarm_irq: rtc alarm irq number.
  34. * @rtc_base: address of rtc control register.
  35. * @rtc_read_base: base address of read registers.
  36. * @rtc_write_base: base address of write registers.
  37. * @alarm_rw_base: base address of alarm registers.
  38. * @ctrl_reg: rtc control register.
  39. * @rtc_dev: device structure.
  40. * @ctrl_reg_lock: spinlock protecting access to ctrl_reg.
  41. */
  42. struct pm8xxx_rtc {
  43. struct rtc_device *rtc;
  44. int rtc_alarm_irq;
  45. int rtc_base;
  46. int rtc_read_base;
  47. int rtc_write_base;
  48. int alarm_rw_base;
  49. u8 ctrl_reg;
  50. struct device *rtc_dev;
  51. spinlock_t ctrl_reg_lock;
  52. };
  53. /*
  54. * The RTC registers need to be read/written one byte at a time. This is a
  55. * hardware limitation.
  56. */
  57. static int pm8xxx_read_wrapper(struct pm8xxx_rtc *rtc_dd, u8 *rtc_val,
  58. int base, int count)
  59. {
  60. int i, rc;
  61. struct device *parent = rtc_dd->rtc_dev->parent;
  62. for (i = 0; i < count; i++) {
  63. rc = pm8xxx_readb(parent, base + i, &rtc_val[i]);
  64. if (rc < 0) {
  65. dev_err(rtc_dd->rtc_dev, "PMIC read failed\n");
  66. return rc;
  67. }
  68. }
  69. return 0;
  70. }
  71. static int pm8xxx_write_wrapper(struct pm8xxx_rtc *rtc_dd, u8 *rtc_val,
  72. int base, int count)
  73. {
  74. int i, rc;
  75. struct device *parent = rtc_dd->rtc_dev->parent;
  76. for (i = 0; i < count; i++) {
  77. rc = pm8xxx_writeb(parent, base + i, rtc_val[i]);
  78. if (rc < 0) {
  79. dev_err(rtc_dd->rtc_dev, "PMIC write failed\n");
  80. return rc;
  81. }
  82. }
  83. return 0;
  84. }
  85. /*
  86. * Steps to write the RTC registers.
  87. * 1. Disable alarm if enabled.
  88. * 2. Write 0x00 to LSB.
  89. * 3. Write Byte[1], Byte[2], Byte[3] then Byte[0].
  90. * 4. Enable alarm if disabled in step 1.
  91. */
  92. static int pm8xxx_rtc_set_time(struct device *dev, struct rtc_time *tm)
  93. {
  94. int rc, i;
  95. unsigned long secs, irq_flags;
  96. u8 value[NUM_8_BIT_RTC_REGS], reg = 0, alarm_enabled = 0, ctrl_reg;
  97. struct pm8xxx_rtc *rtc_dd = dev_get_drvdata(dev);
  98. rtc_tm_to_time(tm, &secs);
  99. for (i = 0; i < NUM_8_BIT_RTC_REGS; i++) {
  100. value[i] = secs & 0xFF;
  101. secs >>= 8;
  102. }
  103. dev_dbg(dev, "Seconds value to be written to RTC = %lu\n", secs);
  104. spin_lock_irqsave(&rtc_dd->ctrl_reg_lock, irq_flags);
  105. ctrl_reg = rtc_dd->ctrl_reg;
  106. if (ctrl_reg & PM8xxx_RTC_ALARM_ENABLE) {
  107. alarm_enabled = 1;
  108. ctrl_reg &= ~PM8xxx_RTC_ALARM_ENABLE;
  109. rc = pm8xxx_write_wrapper(rtc_dd, &ctrl_reg, rtc_dd->rtc_base,
  110. 1);
  111. if (rc < 0) {
  112. dev_err(dev, "Write to RTC control register "
  113. "failed\n");
  114. goto rtc_rw_fail;
  115. }
  116. rtc_dd->ctrl_reg = ctrl_reg;
  117. } else
  118. spin_unlock_irqrestore(&rtc_dd->ctrl_reg_lock, irq_flags);
  119. /* Write 0 to Byte[0] */
  120. reg = 0;
  121. rc = pm8xxx_write_wrapper(rtc_dd, &reg, rtc_dd->rtc_write_base, 1);
  122. if (rc < 0) {
  123. dev_err(dev, "Write to RTC write data register failed\n");
  124. goto rtc_rw_fail;
  125. }
  126. /* Write Byte[1], Byte[2], Byte[3] */
  127. rc = pm8xxx_write_wrapper(rtc_dd, value + 1,
  128. rtc_dd->rtc_write_base + 1, 3);
  129. if (rc < 0) {
  130. dev_err(dev, "Write to RTC write data register failed\n");
  131. goto rtc_rw_fail;
  132. }
  133. /* Write Byte[0] */
  134. rc = pm8xxx_write_wrapper(rtc_dd, value, rtc_dd->rtc_write_base, 1);
  135. if (rc < 0) {
  136. dev_err(dev, "Write to RTC write data register failed\n");
  137. goto rtc_rw_fail;
  138. }
  139. if (alarm_enabled) {
  140. ctrl_reg |= PM8xxx_RTC_ALARM_ENABLE;
  141. rc = pm8xxx_write_wrapper(rtc_dd, &ctrl_reg, rtc_dd->rtc_base,
  142. 1);
  143. if (rc < 0) {
  144. dev_err(dev, "Write to RTC control register "
  145. "failed\n");
  146. goto rtc_rw_fail;
  147. }
  148. rtc_dd->ctrl_reg = ctrl_reg;
  149. }
  150. rtc_rw_fail:
  151. if (alarm_enabled)
  152. spin_unlock_irqrestore(&rtc_dd->ctrl_reg_lock, irq_flags);
  153. return rc;
  154. }
  155. static int pm8xxx_rtc_read_time(struct device *dev, struct rtc_time *tm)
  156. {
  157. int rc;
  158. u8 value[NUM_8_BIT_RTC_REGS], reg;
  159. unsigned long secs;
  160. struct pm8xxx_rtc *rtc_dd = dev_get_drvdata(dev);
  161. rc = pm8xxx_read_wrapper(rtc_dd, value, rtc_dd->rtc_read_base,
  162. NUM_8_BIT_RTC_REGS);
  163. if (rc < 0) {
  164. dev_err(dev, "RTC read data register failed\n");
  165. return rc;
  166. }
  167. /*
  168. * Read the LSB again and check if there has been a carry over.
  169. * If there is, redo the read operation.
  170. */
  171. rc = pm8xxx_read_wrapper(rtc_dd, &reg, rtc_dd->rtc_read_base, 1);
  172. if (rc < 0) {
  173. dev_err(dev, "RTC read data register failed\n");
  174. return rc;
  175. }
  176. if (unlikely(reg < value[0])) {
  177. rc = pm8xxx_read_wrapper(rtc_dd, value,
  178. rtc_dd->rtc_read_base, NUM_8_BIT_RTC_REGS);
  179. if (rc < 0) {
  180. dev_err(dev, "RTC read data register failed\n");
  181. return rc;
  182. }
  183. }
  184. secs = value[0] | (value[1] << 8) | (value[2] << 16) | (value[3] << 24);
  185. rtc_time_to_tm(secs, tm);
  186. rc = rtc_valid_tm(tm);
  187. if (rc < 0) {
  188. dev_err(dev, "Invalid time read from RTC\n");
  189. return rc;
  190. }
  191. dev_dbg(dev, "secs = %lu, h:m:s == %d:%d:%d, d/m/y = %d/%d/%d\n",
  192. secs, tm->tm_hour, tm->tm_min, tm->tm_sec,
  193. tm->tm_mday, tm->tm_mon, tm->tm_year);
  194. return 0;
  195. }
  196. static int pm8xxx_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
  197. {
  198. int rc, i;
  199. u8 value[NUM_8_BIT_RTC_REGS], ctrl_reg;
  200. unsigned long secs, irq_flags;
  201. struct pm8xxx_rtc *rtc_dd = dev_get_drvdata(dev);
  202. rtc_tm_to_time(&alarm->time, &secs);
  203. for (i = 0; i < NUM_8_BIT_RTC_REGS; i++) {
  204. value[i] = secs & 0xFF;
  205. secs >>= 8;
  206. }
  207. spin_lock_irqsave(&rtc_dd->ctrl_reg_lock, irq_flags);
  208. rc = pm8xxx_write_wrapper(rtc_dd, value, rtc_dd->alarm_rw_base,
  209. NUM_8_BIT_RTC_REGS);
  210. if (rc < 0) {
  211. dev_err(dev, "Write to RTC ALARM register failed\n");
  212. goto rtc_rw_fail;
  213. }
  214. ctrl_reg = rtc_dd->ctrl_reg;
  215. ctrl_reg = alarm->enabled ? (ctrl_reg | PM8xxx_RTC_ALARM_ENABLE) :
  216. (ctrl_reg & ~PM8xxx_RTC_ALARM_ENABLE);
  217. rc = pm8xxx_write_wrapper(rtc_dd, &ctrl_reg, rtc_dd->rtc_base, 1);
  218. if (rc < 0) {
  219. dev_err(dev, "Write to RTC control register failed\n");
  220. goto rtc_rw_fail;
  221. }
  222. rtc_dd->ctrl_reg = ctrl_reg;
  223. dev_dbg(dev, "Alarm Set for h:r:s=%d:%d:%d, d/m/y=%d/%d/%d\n",
  224. alarm->time.tm_hour, alarm->time.tm_min,
  225. alarm->time.tm_sec, alarm->time.tm_mday,
  226. alarm->time.tm_mon, alarm->time.tm_year);
  227. rtc_rw_fail:
  228. spin_unlock_irqrestore(&rtc_dd->ctrl_reg_lock, irq_flags);
  229. return rc;
  230. }
  231. static int pm8xxx_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
  232. {
  233. int rc;
  234. u8 value[NUM_8_BIT_RTC_REGS];
  235. unsigned long secs;
  236. struct pm8xxx_rtc *rtc_dd = dev_get_drvdata(dev);
  237. rc = pm8xxx_read_wrapper(rtc_dd, value, rtc_dd->alarm_rw_base,
  238. NUM_8_BIT_RTC_REGS);
  239. if (rc < 0) {
  240. dev_err(dev, "RTC alarm time read failed\n");
  241. return rc;
  242. }
  243. secs = value[0] | (value[1] << 8) | (value[2] << 16) | (value[3] << 24);
  244. rtc_time_to_tm(secs, &alarm->time);
  245. rc = rtc_valid_tm(&alarm->time);
  246. if (rc < 0) {
  247. dev_err(dev, "Invalid alarm time read from RTC\n");
  248. return rc;
  249. }
  250. dev_dbg(dev, "Alarm set for - h:r:s=%d:%d:%d, d/m/y=%d/%d/%d\n",
  251. alarm->time.tm_hour, alarm->time.tm_min,
  252. alarm->time.tm_sec, alarm->time.tm_mday,
  253. alarm->time.tm_mon, alarm->time.tm_year);
  254. return 0;
  255. }
  256. static int pm8xxx_rtc_alarm_irq_enable(struct device *dev, unsigned int enable)
  257. {
  258. int rc;
  259. unsigned long irq_flags;
  260. struct pm8xxx_rtc *rtc_dd = dev_get_drvdata(dev);
  261. u8 ctrl_reg;
  262. spin_lock_irqsave(&rtc_dd->ctrl_reg_lock, irq_flags);
  263. ctrl_reg = rtc_dd->ctrl_reg;
  264. ctrl_reg = (enable) ? (ctrl_reg | PM8xxx_RTC_ALARM_ENABLE) :
  265. (ctrl_reg & ~PM8xxx_RTC_ALARM_ENABLE);
  266. rc = pm8xxx_write_wrapper(rtc_dd, &ctrl_reg, rtc_dd->rtc_base, 1);
  267. if (rc < 0) {
  268. dev_err(dev, "Write to RTC control register failed\n");
  269. goto rtc_rw_fail;
  270. }
  271. rtc_dd->ctrl_reg = ctrl_reg;
  272. rtc_rw_fail:
  273. spin_unlock_irqrestore(&rtc_dd->ctrl_reg_lock, irq_flags);
  274. return rc;
  275. }
  276. static struct rtc_class_ops pm8xxx_rtc_ops = {
  277. .read_time = pm8xxx_rtc_read_time,
  278. .set_alarm = pm8xxx_rtc_set_alarm,
  279. .read_alarm = pm8xxx_rtc_read_alarm,
  280. .alarm_irq_enable = pm8xxx_rtc_alarm_irq_enable,
  281. };
  282. static irqreturn_t pm8xxx_alarm_trigger(int irq, void *dev_id)
  283. {
  284. struct pm8xxx_rtc *rtc_dd = dev_id;
  285. u8 ctrl_reg;
  286. int rc;
  287. unsigned long irq_flags;
  288. rtc_update_irq(rtc_dd->rtc, 1, RTC_IRQF | RTC_AF);
  289. spin_lock_irqsave(&rtc_dd->ctrl_reg_lock, irq_flags);
  290. /* Clear the alarm enable bit */
  291. ctrl_reg = rtc_dd->ctrl_reg;
  292. ctrl_reg &= ~PM8xxx_RTC_ALARM_ENABLE;
  293. rc = pm8xxx_write_wrapper(rtc_dd, &ctrl_reg, rtc_dd->rtc_base, 1);
  294. if (rc < 0) {
  295. spin_unlock_irqrestore(&rtc_dd->ctrl_reg_lock, irq_flags);
  296. dev_err(rtc_dd->rtc_dev, "Write to RTC control register "
  297. "failed\n");
  298. goto rtc_alarm_handled;
  299. }
  300. rtc_dd->ctrl_reg = ctrl_reg;
  301. spin_unlock_irqrestore(&rtc_dd->ctrl_reg_lock, irq_flags);
  302. /* Clear RTC alarm register */
  303. rc = pm8xxx_read_wrapper(rtc_dd, &ctrl_reg, rtc_dd->rtc_base +
  304. PM8XXX_ALARM_CTRL_OFFSET, 1);
  305. if (rc < 0) {
  306. dev_err(rtc_dd->rtc_dev, "RTC Alarm control register read "
  307. "failed\n");
  308. goto rtc_alarm_handled;
  309. }
  310. ctrl_reg &= ~PM8xxx_RTC_ALARM_CLEAR;
  311. rc = pm8xxx_write_wrapper(rtc_dd, &ctrl_reg, rtc_dd->rtc_base +
  312. PM8XXX_ALARM_CTRL_OFFSET, 1);
  313. if (rc < 0)
  314. dev_err(rtc_dd->rtc_dev, "Write to RTC Alarm control register"
  315. " failed\n");
  316. rtc_alarm_handled:
  317. return IRQ_HANDLED;
  318. }
  319. static int __devinit pm8xxx_rtc_probe(struct platform_device *pdev)
  320. {
  321. int rc;
  322. u8 ctrl_reg;
  323. bool rtc_write_enable = false;
  324. struct pm8xxx_rtc *rtc_dd;
  325. struct resource *rtc_resource;
  326. const struct pm8xxx_rtc_platform_data *pdata =
  327. dev_get_platdata(&pdev->dev);
  328. if (pdata != NULL)
  329. rtc_write_enable = pdata->rtc_write_enable;
  330. rtc_dd = kzalloc(sizeof(*rtc_dd), GFP_KERNEL);
  331. if (rtc_dd == NULL) {
  332. dev_err(&pdev->dev, "Unable to allocate memory!\n");
  333. return -ENOMEM;
  334. }
  335. /* Initialise spinlock to protect RTC control register */
  336. spin_lock_init(&rtc_dd->ctrl_reg_lock);
  337. rtc_dd->rtc_alarm_irq = platform_get_irq(pdev, 0);
  338. if (rtc_dd->rtc_alarm_irq < 0) {
  339. dev_err(&pdev->dev, "Alarm IRQ resource absent!\n");
  340. rc = -ENXIO;
  341. goto fail_rtc_enable;
  342. }
  343. rtc_resource = platform_get_resource_byname(pdev, IORESOURCE_IO,
  344. "pmic_rtc_base");
  345. if (!(rtc_resource && rtc_resource->start)) {
  346. dev_err(&pdev->dev, "RTC IO resource absent!\n");
  347. rc = -ENXIO;
  348. goto fail_rtc_enable;
  349. }
  350. rtc_dd->rtc_base = rtc_resource->start;
  351. /* Setup RTC register addresses */
  352. rtc_dd->rtc_write_base = rtc_dd->rtc_base + PM8XXX_RTC_WRITE_OFFSET;
  353. rtc_dd->rtc_read_base = rtc_dd->rtc_base + PM8XXX_RTC_READ_OFFSET;
  354. rtc_dd->alarm_rw_base = rtc_dd->rtc_base + PM8XXX_ALARM_RW_OFFSET;
  355. rtc_dd->rtc_dev = &pdev->dev;
  356. /* Check if the RTC is on, else turn it on */
  357. rc = pm8xxx_read_wrapper(rtc_dd, &ctrl_reg, rtc_dd->rtc_base, 1);
  358. if (rc < 0) {
  359. dev_err(&pdev->dev, "RTC control register read failed!\n");
  360. goto fail_rtc_enable;
  361. }
  362. if (!(ctrl_reg & PM8xxx_RTC_ENABLE)) {
  363. ctrl_reg |= PM8xxx_RTC_ENABLE;
  364. rc = pm8xxx_write_wrapper(rtc_dd, &ctrl_reg, rtc_dd->rtc_base,
  365. 1);
  366. if (rc < 0) {
  367. dev_err(&pdev->dev, "Write to RTC control register "
  368. "failed\n");
  369. goto fail_rtc_enable;
  370. }
  371. }
  372. rtc_dd->ctrl_reg = ctrl_reg;
  373. if (rtc_write_enable == true)
  374. pm8xxx_rtc_ops.set_time = pm8xxx_rtc_set_time;
  375. platform_set_drvdata(pdev, rtc_dd);
  376. /* Register the RTC device */
  377. rtc_dd->rtc = rtc_device_register("pm8xxx_rtc", &pdev->dev,
  378. &pm8xxx_rtc_ops, THIS_MODULE);
  379. if (IS_ERR(rtc_dd->rtc)) {
  380. dev_err(&pdev->dev, "%s: RTC registration failed (%ld)\n",
  381. __func__, PTR_ERR(rtc_dd->rtc));
  382. rc = PTR_ERR(rtc_dd->rtc);
  383. goto fail_rtc_enable;
  384. }
  385. /* Request the alarm IRQ */
  386. rc = request_any_context_irq(rtc_dd->rtc_alarm_irq,
  387. pm8xxx_alarm_trigger, IRQF_TRIGGER_RISING,
  388. "pm8xxx_rtc_alarm", rtc_dd);
  389. if (rc < 0) {
  390. dev_err(&pdev->dev, "Request IRQ failed (%d)\n", rc);
  391. goto fail_req_irq;
  392. }
  393. device_init_wakeup(&pdev->dev, 1);
  394. dev_dbg(&pdev->dev, "Probe success !!\n");
  395. return 0;
  396. fail_req_irq:
  397. rtc_device_unregister(rtc_dd->rtc);
  398. fail_rtc_enable:
  399. platform_set_drvdata(pdev, NULL);
  400. kfree(rtc_dd);
  401. return rc;
  402. }
  403. static int __devexit pm8xxx_rtc_remove(struct platform_device *pdev)
  404. {
  405. struct pm8xxx_rtc *rtc_dd = platform_get_drvdata(pdev);
  406. device_init_wakeup(&pdev->dev, 0);
  407. free_irq(rtc_dd->rtc_alarm_irq, rtc_dd);
  408. rtc_device_unregister(rtc_dd->rtc);
  409. platform_set_drvdata(pdev, NULL);
  410. kfree(rtc_dd);
  411. return 0;
  412. }
  413. #ifdef CONFIG_PM_SLEEP
  414. static int pm8xxx_rtc_resume(struct device *dev)
  415. {
  416. struct pm8xxx_rtc *rtc_dd = dev_get_drvdata(dev);
  417. if (device_may_wakeup(dev))
  418. disable_irq_wake(rtc_dd->rtc_alarm_irq);
  419. return 0;
  420. }
  421. static int pm8xxx_rtc_suspend(struct device *dev)
  422. {
  423. struct pm8xxx_rtc *rtc_dd = dev_get_drvdata(dev);
  424. if (device_may_wakeup(dev))
  425. enable_irq_wake(rtc_dd->rtc_alarm_irq);
  426. return 0;
  427. }
  428. #endif
  429. SIMPLE_DEV_PM_OPS(pm8xxx_rtc_pm_ops, pm8xxx_rtc_suspend, pm8xxx_rtc_resume);
  430. static struct platform_driver pm8xxx_rtc_driver = {
  431. .probe = pm8xxx_rtc_probe,
  432. .remove = __devexit_p(pm8xxx_rtc_remove),
  433. .driver = {
  434. .name = PM8XXX_RTC_DEV_NAME,
  435. .owner = THIS_MODULE,
  436. .pm = &pm8xxx_rtc_pm_ops,
  437. },
  438. };
  439. static int __init pm8xxx_rtc_init(void)
  440. {
  441. return platform_driver_register(&pm8xxx_rtc_driver);
  442. }
  443. module_init(pm8xxx_rtc_init);
  444. static void __exit pm8xxx_rtc_exit(void)
  445. {
  446. platform_driver_unregister(&pm8xxx_rtc_driver);
  447. }
  448. module_exit(pm8xxx_rtc_exit);
  449. MODULE_ALIAS("platform:rtc-pm8xxx");
  450. MODULE_DESCRIPTION("PMIC8xxx RTC driver");
  451. MODULE_LICENSE("GPL v2");
  452. MODULE_AUTHOR("Anirudh Ghayal <aghayal@codeaurora.org>");