max8925_power.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. /*
  2. * Battery driver for Maxim MAX8925
  3. *
  4. * Copyright (c) 2009-2010 Marvell International Ltd.
  5. * Haojian Zhuang <haojian.zhuang@marvell.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #include <linux/module.h>
  12. #include <linux/err.h>
  13. #include <linux/slab.h>
  14. #include <linux/of.h>
  15. #include <linux/i2c.h>
  16. #include <linux/interrupt.h>
  17. #include <linux/platform_device.h>
  18. #include <linux/power_supply.h>
  19. #include <linux/mfd/max8925.h>
  20. /* registers in GPM */
  21. #define MAX8925_OUT5VEN 0x54
  22. #define MAX8925_OUT3VEN 0x58
  23. #define MAX8925_CHG_CNTL1 0x7c
  24. /* bits definition */
  25. #define MAX8925_CHG_STAT_VSYSLOW (1 << 0)
  26. #define MAX8925_CHG_STAT_MODE_MASK (3 << 2)
  27. #define MAX8925_CHG_STAT_EN_MASK (1 << 4)
  28. #define MAX8925_CHG_MBDET (1 << 1)
  29. #define MAX8925_CHG_AC_RANGE_MASK (3 << 6)
  30. /* registers in ADC */
  31. #define MAX8925_ADC_RES_CNFG1 0x06
  32. #define MAX8925_ADC_AVG_CNFG1 0x07
  33. #define MAX8925_ADC_ACQ_CNFG1 0x08
  34. #define MAX8925_ADC_ACQ_CNFG2 0x09
  35. /* 2 bytes registers in below. MSB is 1st, LSB is 2nd. */
  36. #define MAX8925_ADC_AUX2 0x62
  37. #define MAX8925_ADC_VCHG 0x64
  38. #define MAX8925_ADC_VBBATT 0x66
  39. #define MAX8925_ADC_VMBATT 0x68
  40. #define MAX8925_ADC_ISNS 0x6a
  41. #define MAX8925_ADC_THM 0x6c
  42. #define MAX8925_ADC_TDIE 0x6e
  43. #define MAX8925_CMD_AUX2 0xc8
  44. #define MAX8925_CMD_VCHG 0xd0
  45. #define MAX8925_CMD_VBBATT 0xd8
  46. #define MAX8925_CMD_VMBATT 0xe0
  47. #define MAX8925_CMD_ISNS 0xe8
  48. #define MAX8925_CMD_THM 0xf0
  49. #define MAX8925_CMD_TDIE 0xf8
  50. enum {
  51. MEASURE_AUX2,
  52. MEASURE_VCHG,
  53. MEASURE_VBBATT,
  54. MEASURE_VMBATT,
  55. MEASURE_ISNS,
  56. MEASURE_THM,
  57. MEASURE_TDIE,
  58. MEASURE_MAX,
  59. };
  60. struct max8925_power_info {
  61. struct max8925_chip *chip;
  62. struct i2c_client *gpm;
  63. struct i2c_client *adc;
  64. struct power_supply *ac;
  65. struct power_supply *usb;
  66. struct power_supply *battery;
  67. int irq_base;
  68. unsigned ac_online:1;
  69. unsigned usb_online:1;
  70. unsigned bat_online:1;
  71. unsigned chg_mode:2;
  72. unsigned batt_detect:1; /* detecing MB by ID pin */
  73. unsigned topoff_threshold:2;
  74. unsigned fast_charge:3;
  75. unsigned no_temp_support:1;
  76. unsigned no_insert_detect:1;
  77. int (*set_charger) (int);
  78. };
  79. static int __set_charger(struct max8925_power_info *info, int enable)
  80. {
  81. struct max8925_chip *chip = info->chip;
  82. if (enable) {
  83. /* enable charger in platform */
  84. if (info->set_charger)
  85. info->set_charger(1);
  86. /* enable charger */
  87. max8925_set_bits(info->gpm, MAX8925_CHG_CNTL1, 1 << 7, 0);
  88. } else {
  89. /* disable charge */
  90. max8925_set_bits(info->gpm, MAX8925_CHG_CNTL1, 1 << 7, 1 << 7);
  91. if (info->set_charger)
  92. info->set_charger(0);
  93. }
  94. dev_dbg(chip->dev, "%s\n", (enable) ? "Enable charger"
  95. : "Disable charger");
  96. return 0;
  97. }
  98. static irqreturn_t max8925_charger_handler(int irq, void *data)
  99. {
  100. struct max8925_power_info *info = (struct max8925_power_info *)data;
  101. struct max8925_chip *chip = info->chip;
  102. switch (irq - chip->irq_base) {
  103. case MAX8925_IRQ_VCHG_DC_R:
  104. info->ac_online = 1;
  105. __set_charger(info, 1);
  106. dev_dbg(chip->dev, "Adapter inserted\n");
  107. break;
  108. case MAX8925_IRQ_VCHG_DC_F:
  109. info->ac_online = 0;
  110. __set_charger(info, 0);
  111. dev_dbg(chip->dev, "Adapter removed\n");
  112. break;
  113. case MAX8925_IRQ_VCHG_THM_OK_F:
  114. /* Battery is not ready yet */
  115. dev_dbg(chip->dev, "Battery temperature is out of range\n");
  116. case MAX8925_IRQ_VCHG_DC_OVP:
  117. dev_dbg(chip->dev, "Error detection\n");
  118. __set_charger(info, 0);
  119. break;
  120. case MAX8925_IRQ_VCHG_THM_OK_R:
  121. /* Battery is ready now */
  122. dev_dbg(chip->dev, "Battery temperature is in range\n");
  123. break;
  124. case MAX8925_IRQ_VCHG_SYSLOW_R:
  125. /* VSYS is low */
  126. dev_info(chip->dev, "Sys power is too low\n");
  127. break;
  128. case MAX8925_IRQ_VCHG_SYSLOW_F:
  129. dev_dbg(chip->dev, "Sys power is above low threshold\n");
  130. break;
  131. case MAX8925_IRQ_VCHG_DONE:
  132. __set_charger(info, 0);
  133. dev_dbg(chip->dev, "Charging is done\n");
  134. break;
  135. case MAX8925_IRQ_VCHG_TOPOFF:
  136. dev_dbg(chip->dev, "Charging in top-off mode\n");
  137. break;
  138. case MAX8925_IRQ_VCHG_TMR_FAULT:
  139. __set_charger(info, 0);
  140. dev_dbg(chip->dev, "Safe timer is expired\n");
  141. break;
  142. case MAX8925_IRQ_VCHG_RST:
  143. __set_charger(info, 0);
  144. dev_dbg(chip->dev, "Charger is reset\n");
  145. break;
  146. }
  147. return IRQ_HANDLED;
  148. }
  149. static int start_measure(struct max8925_power_info *info, int type)
  150. {
  151. unsigned char buf[2] = {0, 0};
  152. int meas_cmd;
  153. int meas_reg = 0, ret;
  154. switch (type) {
  155. case MEASURE_VCHG:
  156. meas_cmd = MAX8925_CMD_VCHG;
  157. meas_reg = MAX8925_ADC_VCHG;
  158. break;
  159. case MEASURE_VBBATT:
  160. meas_cmd = MAX8925_CMD_VBBATT;
  161. meas_reg = MAX8925_ADC_VBBATT;
  162. break;
  163. case MEASURE_VMBATT:
  164. meas_cmd = MAX8925_CMD_VMBATT;
  165. meas_reg = MAX8925_ADC_VMBATT;
  166. break;
  167. case MEASURE_ISNS:
  168. meas_cmd = MAX8925_CMD_ISNS;
  169. meas_reg = MAX8925_ADC_ISNS;
  170. break;
  171. default:
  172. return -EINVAL;
  173. }
  174. max8925_reg_write(info->adc, meas_cmd, 0);
  175. max8925_bulk_read(info->adc, meas_reg, 2, buf);
  176. ret = ((buf[0]<<8) | buf[1]) >> 4;
  177. return ret;
  178. }
  179. static int max8925_ac_get_prop(struct power_supply *psy,
  180. enum power_supply_property psp,
  181. union power_supply_propval *val)
  182. {
  183. struct max8925_power_info *info = dev_get_drvdata(psy->dev.parent);
  184. int ret = 0;
  185. switch (psp) {
  186. case POWER_SUPPLY_PROP_ONLINE:
  187. val->intval = info->ac_online;
  188. break;
  189. case POWER_SUPPLY_PROP_VOLTAGE_NOW:
  190. if (info->ac_online) {
  191. ret = start_measure(info, MEASURE_VCHG);
  192. if (ret >= 0) {
  193. val->intval = ret * 2000; /* unit is uV */
  194. goto out;
  195. }
  196. }
  197. ret = -ENODATA;
  198. break;
  199. default:
  200. ret = -ENODEV;
  201. break;
  202. }
  203. out:
  204. return ret;
  205. }
  206. static enum power_supply_property max8925_ac_props[] = {
  207. POWER_SUPPLY_PROP_ONLINE,
  208. POWER_SUPPLY_PROP_VOLTAGE_NOW,
  209. };
  210. static int max8925_usb_get_prop(struct power_supply *psy,
  211. enum power_supply_property psp,
  212. union power_supply_propval *val)
  213. {
  214. struct max8925_power_info *info = dev_get_drvdata(psy->dev.parent);
  215. int ret = 0;
  216. switch (psp) {
  217. case POWER_SUPPLY_PROP_ONLINE:
  218. val->intval = info->usb_online;
  219. break;
  220. case POWER_SUPPLY_PROP_VOLTAGE_NOW:
  221. if (info->usb_online) {
  222. ret = start_measure(info, MEASURE_VCHG);
  223. if (ret >= 0) {
  224. val->intval = ret * 2000; /* unit is uV */
  225. goto out;
  226. }
  227. }
  228. ret = -ENODATA;
  229. break;
  230. default:
  231. ret = -ENODEV;
  232. break;
  233. }
  234. out:
  235. return ret;
  236. }
  237. static enum power_supply_property max8925_usb_props[] = {
  238. POWER_SUPPLY_PROP_ONLINE,
  239. POWER_SUPPLY_PROP_VOLTAGE_NOW,
  240. };
  241. static int max8925_bat_get_prop(struct power_supply *psy,
  242. enum power_supply_property psp,
  243. union power_supply_propval *val)
  244. {
  245. struct max8925_power_info *info = dev_get_drvdata(psy->dev.parent);
  246. int ret = 0;
  247. switch (psp) {
  248. case POWER_SUPPLY_PROP_ONLINE:
  249. val->intval = info->bat_online;
  250. break;
  251. case POWER_SUPPLY_PROP_VOLTAGE_NOW:
  252. if (info->bat_online) {
  253. ret = start_measure(info, MEASURE_VMBATT);
  254. if (ret >= 0) {
  255. val->intval = ret * 2000; /* unit is uV */
  256. ret = 0;
  257. break;
  258. }
  259. }
  260. ret = -ENODATA;
  261. break;
  262. case POWER_SUPPLY_PROP_CURRENT_NOW:
  263. if (info->bat_online) {
  264. ret = start_measure(info, MEASURE_ISNS);
  265. if (ret >= 0) {
  266. /* assume r_sns is 0.02 */
  267. ret = ((ret * 6250) - 3125) /* uA */;
  268. val->intval = 0;
  269. if (ret > 0)
  270. val->intval = ret; /* unit is mA */
  271. ret = 0;
  272. break;
  273. }
  274. }
  275. ret = -ENODATA;
  276. break;
  277. case POWER_SUPPLY_PROP_CHARGE_TYPE:
  278. if (!info->bat_online) {
  279. ret = -ENODATA;
  280. break;
  281. }
  282. ret = max8925_reg_read(info->gpm, MAX8925_CHG_STATUS);
  283. ret = (ret & MAX8925_CHG_STAT_MODE_MASK) >> 2;
  284. switch (ret) {
  285. case 1:
  286. val->intval = POWER_SUPPLY_CHARGE_TYPE_FAST;
  287. break;
  288. case 0:
  289. case 2:
  290. val->intval = POWER_SUPPLY_CHARGE_TYPE_TRICKLE;
  291. break;
  292. case 3:
  293. val->intval = POWER_SUPPLY_CHARGE_TYPE_NONE;
  294. break;
  295. }
  296. ret = 0;
  297. break;
  298. case POWER_SUPPLY_PROP_STATUS:
  299. if (!info->bat_online) {
  300. ret = -ENODATA;
  301. break;
  302. }
  303. ret = max8925_reg_read(info->gpm, MAX8925_CHG_STATUS);
  304. if (info->usb_online || info->ac_online) {
  305. val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
  306. if (ret & MAX8925_CHG_STAT_EN_MASK)
  307. val->intval = POWER_SUPPLY_STATUS_CHARGING;
  308. } else
  309. val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
  310. ret = 0;
  311. break;
  312. default:
  313. ret = -ENODEV;
  314. break;
  315. }
  316. return ret;
  317. }
  318. static enum power_supply_property max8925_battery_props[] = {
  319. POWER_SUPPLY_PROP_ONLINE,
  320. POWER_SUPPLY_PROP_VOLTAGE_NOW,
  321. POWER_SUPPLY_PROP_CURRENT_NOW,
  322. POWER_SUPPLY_PROP_CHARGE_TYPE,
  323. POWER_SUPPLY_PROP_STATUS,
  324. };
  325. static const struct power_supply_desc ac_desc = {
  326. .name = "max8925-ac",
  327. .type = POWER_SUPPLY_TYPE_MAINS,
  328. .properties = max8925_ac_props,
  329. .num_properties = ARRAY_SIZE(max8925_ac_props),
  330. .get_property = max8925_ac_get_prop,
  331. };
  332. static const struct power_supply_desc usb_desc = {
  333. .name = "max8925-usb",
  334. .type = POWER_SUPPLY_TYPE_USB,
  335. .properties = max8925_usb_props,
  336. .num_properties = ARRAY_SIZE(max8925_usb_props),
  337. .get_property = max8925_usb_get_prop,
  338. };
  339. static const struct power_supply_desc battery_desc = {
  340. .name = "max8925-battery",
  341. .type = POWER_SUPPLY_TYPE_BATTERY,
  342. .properties = max8925_battery_props,
  343. .num_properties = ARRAY_SIZE(max8925_battery_props),
  344. .get_property = max8925_bat_get_prop,
  345. };
  346. #define REQUEST_IRQ(_irq, _name) \
  347. do { \
  348. ret = request_threaded_irq(chip->irq_base + _irq, NULL, \
  349. max8925_charger_handler, \
  350. IRQF_ONESHOT, _name, info); \
  351. if (ret) \
  352. dev_err(chip->dev, "Failed to request IRQ #%d: %d\n", \
  353. _irq, ret); \
  354. } while (0)
  355. static int max8925_init_charger(struct max8925_chip *chip,
  356. struct max8925_power_info *info)
  357. {
  358. int ret;
  359. REQUEST_IRQ(MAX8925_IRQ_VCHG_DC_OVP, "ac-ovp");
  360. if (!info->no_insert_detect) {
  361. REQUEST_IRQ(MAX8925_IRQ_VCHG_DC_F, "ac-remove");
  362. REQUEST_IRQ(MAX8925_IRQ_VCHG_DC_R, "ac-insert");
  363. }
  364. if (!info->no_temp_support) {
  365. REQUEST_IRQ(MAX8925_IRQ_VCHG_THM_OK_R, "batt-temp-in-range");
  366. REQUEST_IRQ(MAX8925_IRQ_VCHG_THM_OK_F, "batt-temp-out-range");
  367. }
  368. REQUEST_IRQ(MAX8925_IRQ_VCHG_SYSLOW_F, "vsys-high");
  369. REQUEST_IRQ(MAX8925_IRQ_VCHG_SYSLOW_R, "vsys-low");
  370. REQUEST_IRQ(MAX8925_IRQ_VCHG_RST, "charger-reset");
  371. REQUEST_IRQ(MAX8925_IRQ_VCHG_DONE, "charger-done");
  372. REQUEST_IRQ(MAX8925_IRQ_VCHG_TOPOFF, "charger-topoff");
  373. REQUEST_IRQ(MAX8925_IRQ_VCHG_TMR_FAULT, "charger-timer-expire");
  374. info->usb_online = 0;
  375. info->bat_online = 0;
  376. /* check for power - can miss interrupt at boot time */
  377. if (start_measure(info, MEASURE_VCHG) * 2000 > 500000)
  378. info->ac_online = 1;
  379. else
  380. info->ac_online = 0;
  381. ret = max8925_reg_read(info->gpm, MAX8925_CHG_STATUS);
  382. if (ret >= 0) {
  383. /*
  384. * If battery detection is enabled, ID pin of battery is
  385. * connected to MBDET pin of MAX8925. It could be used to
  386. * detect battery presence.
  387. * Otherwise, we have to assume that battery is always on.
  388. */
  389. if (info->batt_detect)
  390. info->bat_online = (ret & MAX8925_CHG_MBDET) ? 0 : 1;
  391. else
  392. info->bat_online = 1;
  393. if (ret & MAX8925_CHG_AC_RANGE_MASK)
  394. info->ac_online = 1;
  395. else
  396. info->ac_online = 0;
  397. }
  398. /* disable charge */
  399. max8925_set_bits(info->gpm, MAX8925_CHG_CNTL1, 1 << 7, 1 << 7);
  400. /* set charging current in charge topoff mode */
  401. max8925_set_bits(info->gpm, MAX8925_CHG_CNTL1, 3 << 5,
  402. info->topoff_threshold << 5);
  403. /* set charing current in fast charge mode */
  404. max8925_set_bits(info->gpm, MAX8925_CHG_CNTL1, 7, info->fast_charge);
  405. return 0;
  406. }
  407. static int max8925_deinit_charger(struct max8925_power_info *info)
  408. {
  409. struct max8925_chip *chip = info->chip;
  410. int irq;
  411. irq = chip->irq_base + MAX8925_IRQ_VCHG_DC_OVP;
  412. for (; irq <= chip->irq_base + MAX8925_IRQ_VCHG_TMR_FAULT; irq++)
  413. free_irq(irq, info);
  414. return 0;
  415. }
  416. #ifdef CONFIG_OF
  417. static struct max8925_power_pdata *
  418. max8925_power_dt_init(struct platform_device *pdev)
  419. {
  420. struct device_node *nproot = pdev->dev.parent->of_node;
  421. struct device_node *np;
  422. int batt_detect;
  423. int topoff_threshold;
  424. int fast_charge;
  425. int no_temp_support;
  426. int no_insert_detect;
  427. struct max8925_power_pdata *pdata;
  428. if (!nproot)
  429. return pdev->dev.platform_data;
  430. np = of_get_child_by_name(nproot, "charger");
  431. if (!np) {
  432. dev_err(&pdev->dev, "failed to find charger node\n");
  433. return NULL;
  434. }
  435. pdata = devm_kzalloc(&pdev->dev,
  436. sizeof(struct max8925_power_pdata),
  437. GFP_KERNEL);
  438. if (!pdata)
  439. goto ret;
  440. of_property_read_u32(np, "topoff-threshold", &topoff_threshold);
  441. of_property_read_u32(np, "batt-detect", &batt_detect);
  442. of_property_read_u32(np, "fast-charge", &fast_charge);
  443. of_property_read_u32(np, "no-insert-detect", &no_insert_detect);
  444. of_property_read_u32(np, "no-temp-support", &no_temp_support);
  445. pdata->batt_detect = batt_detect;
  446. pdata->fast_charge = fast_charge;
  447. pdata->topoff_threshold = topoff_threshold;
  448. pdata->no_insert_detect = no_insert_detect;
  449. pdata->no_temp_support = no_temp_support;
  450. ret:
  451. of_node_put(np);
  452. return pdata;
  453. }
  454. #else
  455. static struct max8925_power_pdata *
  456. max8925_power_dt_init(struct platform_device *pdev)
  457. {
  458. return pdev->dev.platform_data;
  459. }
  460. #endif
  461. static int max8925_power_probe(struct platform_device *pdev)
  462. {
  463. struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent);
  464. struct power_supply_config psy_cfg = {}; /* Only for ac and usb */
  465. struct max8925_power_pdata *pdata = NULL;
  466. struct max8925_power_info *info;
  467. int ret;
  468. pdata = max8925_power_dt_init(pdev);
  469. if (!pdata) {
  470. dev_err(&pdev->dev, "platform data isn't assigned to "
  471. "power supply\n");
  472. return -EINVAL;
  473. }
  474. info = devm_kzalloc(&pdev->dev, sizeof(struct max8925_power_info),
  475. GFP_KERNEL);
  476. if (!info)
  477. return -ENOMEM;
  478. info->chip = chip;
  479. info->gpm = chip->i2c;
  480. info->adc = chip->adc;
  481. platform_set_drvdata(pdev, info);
  482. psy_cfg.supplied_to = pdata->supplied_to;
  483. psy_cfg.num_supplicants = pdata->num_supplicants;
  484. info->ac = power_supply_register(&pdev->dev, &ac_desc, &psy_cfg);
  485. if (IS_ERR(info->ac)) {
  486. ret = PTR_ERR(info->ac);
  487. goto out;
  488. }
  489. info->ac->dev.parent = &pdev->dev;
  490. info->usb = power_supply_register(&pdev->dev, &usb_desc, &psy_cfg);
  491. if (IS_ERR(info->usb)) {
  492. ret = PTR_ERR(info->usb);
  493. goto out_unregister_ac;
  494. }
  495. info->usb->dev.parent = &pdev->dev;
  496. info->battery = power_supply_register(&pdev->dev, &battery_desc, NULL);
  497. if (IS_ERR(info->battery)) {
  498. ret = PTR_ERR(info->battery);
  499. goto out_unregister_usb;
  500. }
  501. info->battery->dev.parent = &pdev->dev;
  502. info->batt_detect = pdata->batt_detect;
  503. info->topoff_threshold = pdata->topoff_threshold;
  504. info->fast_charge = pdata->fast_charge;
  505. info->set_charger = pdata->set_charger;
  506. info->no_temp_support = pdata->no_temp_support;
  507. info->no_insert_detect = pdata->no_insert_detect;
  508. max8925_init_charger(chip, info);
  509. return 0;
  510. out_unregister_usb:
  511. power_supply_unregister(info->usb);
  512. out_unregister_ac:
  513. power_supply_unregister(info->ac);
  514. out:
  515. return ret;
  516. }
  517. static int max8925_power_remove(struct platform_device *pdev)
  518. {
  519. struct max8925_power_info *info = platform_get_drvdata(pdev);
  520. if (info) {
  521. power_supply_unregister(info->ac);
  522. power_supply_unregister(info->usb);
  523. power_supply_unregister(info->battery);
  524. max8925_deinit_charger(info);
  525. }
  526. return 0;
  527. }
  528. static struct platform_driver max8925_power_driver = {
  529. .probe = max8925_power_probe,
  530. .remove = max8925_power_remove,
  531. .driver = {
  532. .name = "max8925-power",
  533. },
  534. };
  535. module_platform_driver(max8925_power_driver);
  536. MODULE_LICENSE("GPL");
  537. MODULE_DESCRIPTION("Power supply driver for MAX8925");
  538. MODULE_ALIAS("platform:max8925-power");