mt6360-regulator.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. //
  3. // Copyright (C) 2020 MediaTek Inc.
  4. //
  5. // Author: Gene Chen <[email protected]>
  6. #include <linux/init.h>
  7. #include <linux/kernel.h>
  8. #include <linux/module.h>
  9. #include <linux/of.h>
  10. #include <linux/platform_device.h>
  11. #include <linux/regmap.h>
  12. #include <linux/regulator/driver.h>
  13. #include <linux/regulator/machine.h>
  14. #include <dt-bindings/regulator/mediatek,mt6360-regulator.h>
  15. enum {
  16. MT6360_REGULATOR_BUCK1 = 0,
  17. MT6360_REGULATOR_BUCK2,
  18. MT6360_REGULATOR_LDO6,
  19. MT6360_REGULATOR_LDO7,
  20. MT6360_REGULATOR_LDO1,
  21. MT6360_REGULATOR_LDO2,
  22. MT6360_REGULATOR_LDO3,
  23. MT6360_REGULATOR_LDO5,
  24. MT6360_REGULATOR_MAX,
  25. };
  26. struct mt6360_irq_mapping {
  27. const char *name;
  28. irq_handler_t handler;
  29. };
  30. struct mt6360_regulator_desc {
  31. const struct regulator_desc desc;
  32. unsigned int mode_reg;
  33. unsigned int mode_mask;
  34. unsigned int state_reg;
  35. unsigned int state_mask;
  36. const struct mt6360_irq_mapping *irq_tables;
  37. int irq_table_size;
  38. };
  39. struct mt6360_regulator_data {
  40. struct device *dev;
  41. struct regmap *regmap;
  42. };
  43. static irqreturn_t mt6360_pgb_event_handler(int irq, void *data)
  44. {
  45. struct regulator_dev *rdev = data;
  46. regulator_notifier_call_chain(rdev, REGULATOR_EVENT_FAIL, NULL);
  47. return IRQ_HANDLED;
  48. }
  49. static irqreturn_t mt6360_oc_event_handler(int irq, void *data)
  50. {
  51. struct regulator_dev *rdev = data;
  52. regulator_notifier_call_chain(rdev, REGULATOR_EVENT_OVER_CURRENT, NULL);
  53. return IRQ_HANDLED;
  54. }
  55. static irqreturn_t mt6360_ov_event_handler(int irq, void *data)
  56. {
  57. struct regulator_dev *rdev = data;
  58. regulator_notifier_call_chain(rdev, REGULATOR_EVENT_REGULATION_OUT, NULL);
  59. return IRQ_HANDLED;
  60. }
  61. static irqreturn_t mt6360_uv_event_handler(int irq, void *data)
  62. {
  63. struct regulator_dev *rdev = data;
  64. regulator_notifier_call_chain(rdev, REGULATOR_EVENT_UNDER_VOLTAGE, NULL);
  65. return IRQ_HANDLED;
  66. }
  67. static const struct mt6360_irq_mapping buck1_irq_tbls[] = {
  68. { "buck1_pgb_evt", mt6360_pgb_event_handler },
  69. { "buck1_oc_evt", mt6360_oc_event_handler },
  70. { "buck1_ov_evt", mt6360_ov_event_handler },
  71. { "buck1_uv_evt", mt6360_uv_event_handler },
  72. };
  73. static const struct mt6360_irq_mapping buck2_irq_tbls[] = {
  74. { "buck2_pgb_evt", mt6360_pgb_event_handler },
  75. { "buck2_oc_evt", mt6360_oc_event_handler },
  76. { "buck2_ov_evt", mt6360_ov_event_handler },
  77. { "buck2_uv_evt", mt6360_uv_event_handler },
  78. };
  79. static const struct mt6360_irq_mapping ldo6_irq_tbls[] = {
  80. { "ldo6_pgb_evt", mt6360_pgb_event_handler },
  81. { "ldo6_oc_evt", mt6360_oc_event_handler },
  82. };
  83. static const struct mt6360_irq_mapping ldo7_irq_tbls[] = {
  84. { "ldo7_pgb_evt", mt6360_pgb_event_handler },
  85. { "ldo7_oc_evt", mt6360_oc_event_handler },
  86. };
  87. static const struct mt6360_irq_mapping ldo1_irq_tbls[] = {
  88. { "ldo1_pgb_evt", mt6360_pgb_event_handler },
  89. { "ldo1_oc_evt", mt6360_oc_event_handler },
  90. };
  91. static const struct mt6360_irq_mapping ldo2_irq_tbls[] = {
  92. { "ldo2_pgb_evt", mt6360_pgb_event_handler },
  93. { "ldo2_oc_evt", mt6360_oc_event_handler },
  94. };
  95. static const struct mt6360_irq_mapping ldo3_irq_tbls[] = {
  96. { "ldo3_pgb_evt", mt6360_pgb_event_handler },
  97. { "ldo3_oc_evt", mt6360_oc_event_handler },
  98. };
  99. static const struct mt6360_irq_mapping ldo5_irq_tbls[] = {
  100. { "ldo5_pgb_evt", mt6360_pgb_event_handler },
  101. { "ldo5_oc_evt", mt6360_oc_event_handler },
  102. };
  103. static const struct linear_range buck_vout_ranges[] = {
  104. REGULATOR_LINEAR_RANGE(300000, 0x00, 0xc7, 5000),
  105. REGULATOR_LINEAR_RANGE(1300000, 0xc8, 0xff, 0),
  106. };
  107. static const struct linear_range ldo_vout_ranges1[] = {
  108. REGULATOR_LINEAR_RANGE(500000, 0x00, 0x09, 10000),
  109. REGULATOR_LINEAR_RANGE(600000, 0x0a, 0x10, 0),
  110. REGULATOR_LINEAR_RANGE(610000, 0x11, 0x19, 10000),
  111. REGULATOR_LINEAR_RANGE(700000, 0x1a, 0x20, 0),
  112. REGULATOR_LINEAR_RANGE(710000, 0x21, 0x29, 10000),
  113. REGULATOR_LINEAR_RANGE(800000, 0x2a, 0x30, 0),
  114. REGULATOR_LINEAR_RANGE(810000, 0x31, 0x39, 10000),
  115. REGULATOR_LINEAR_RANGE(900000, 0x3a, 0x40, 0),
  116. REGULATOR_LINEAR_RANGE(910000, 0x41, 0x49, 10000),
  117. REGULATOR_LINEAR_RANGE(1000000, 0x4a, 0x50, 0),
  118. REGULATOR_LINEAR_RANGE(1010000, 0x51, 0x59, 10000),
  119. REGULATOR_LINEAR_RANGE(1100000, 0x5a, 0x60, 0),
  120. REGULATOR_LINEAR_RANGE(1110000, 0x61, 0x69, 10000),
  121. REGULATOR_LINEAR_RANGE(1200000, 0x6a, 0x70, 0),
  122. REGULATOR_LINEAR_RANGE(1210000, 0x71, 0x79, 10000),
  123. REGULATOR_LINEAR_RANGE(1300000, 0x7a, 0x80, 0),
  124. REGULATOR_LINEAR_RANGE(1310000, 0x81, 0x89, 10000),
  125. REGULATOR_LINEAR_RANGE(1400000, 0x8a, 0x90, 0),
  126. REGULATOR_LINEAR_RANGE(1410000, 0x91, 0x99, 10000),
  127. REGULATOR_LINEAR_RANGE(1500000, 0x9a, 0xa0, 0),
  128. REGULATOR_LINEAR_RANGE(1510000, 0xa1, 0xa9, 10000),
  129. REGULATOR_LINEAR_RANGE(1600000, 0xaa, 0xb0, 0),
  130. REGULATOR_LINEAR_RANGE(1610000, 0xb1, 0xb9, 10000),
  131. REGULATOR_LINEAR_RANGE(1700000, 0xba, 0xc0, 0),
  132. REGULATOR_LINEAR_RANGE(1710000, 0xc1, 0xc9, 10000),
  133. REGULATOR_LINEAR_RANGE(1800000, 0xca, 0xd0, 0),
  134. REGULATOR_LINEAR_RANGE(1810000, 0xd1, 0xd9, 10000),
  135. REGULATOR_LINEAR_RANGE(1900000, 0xda, 0xe0, 0),
  136. REGULATOR_LINEAR_RANGE(1910000, 0xe1, 0xe9, 10000),
  137. REGULATOR_LINEAR_RANGE(2000000, 0xea, 0xf0, 0),
  138. REGULATOR_LINEAR_RANGE(2010000, 0xf1, 0xf9, 10000),
  139. REGULATOR_LINEAR_RANGE(2100000, 0xfa, 0xff, 0),
  140. };
  141. static const struct linear_range ldo_vout_ranges2[] = {
  142. REGULATOR_LINEAR_RANGE(1200000, 0x00, 0x09, 10000),
  143. REGULATOR_LINEAR_RANGE(1300000, 0x0a, 0x10, 0),
  144. REGULATOR_LINEAR_RANGE(1310000, 0x11, 0x19, 10000),
  145. REGULATOR_LINEAR_RANGE(1400000, 0x1a, 0x1f, 0),
  146. REGULATOR_LINEAR_RANGE(1500000, 0x20, 0x29, 10000),
  147. REGULATOR_LINEAR_RANGE(1600000, 0x2a, 0x2f, 0),
  148. REGULATOR_LINEAR_RANGE(1700000, 0x30, 0x39, 10000),
  149. REGULATOR_LINEAR_RANGE(1800000, 0x3a, 0x40, 0),
  150. REGULATOR_LINEAR_RANGE(1810000, 0x41, 0x49, 10000),
  151. REGULATOR_LINEAR_RANGE(1900000, 0x4a, 0x4f, 0),
  152. REGULATOR_LINEAR_RANGE(2000000, 0x50, 0x59, 10000),
  153. REGULATOR_LINEAR_RANGE(2100000, 0x5a, 0x60, 0),
  154. REGULATOR_LINEAR_RANGE(2110000, 0x61, 0x69, 10000),
  155. REGULATOR_LINEAR_RANGE(2200000, 0x6a, 0x6f, 0),
  156. REGULATOR_LINEAR_RANGE(2500000, 0x70, 0x79, 10000),
  157. REGULATOR_LINEAR_RANGE(2600000, 0x7a, 0x7f, 0),
  158. REGULATOR_LINEAR_RANGE(2700000, 0x80, 0x89, 10000),
  159. REGULATOR_LINEAR_RANGE(2800000, 0x8a, 0x90, 0),
  160. REGULATOR_LINEAR_RANGE(2810000, 0x91, 0x99, 10000),
  161. REGULATOR_LINEAR_RANGE(2900000, 0x9a, 0xa0, 0),
  162. REGULATOR_LINEAR_RANGE(2910000, 0xa1, 0xa9, 10000),
  163. REGULATOR_LINEAR_RANGE(3000000, 0xaa, 0xb0, 0),
  164. REGULATOR_LINEAR_RANGE(3010000, 0xb1, 0xb9, 10000),
  165. REGULATOR_LINEAR_RANGE(3100000, 0xba, 0xc0, 0),
  166. REGULATOR_LINEAR_RANGE(3110000, 0xc1, 0xc9, 10000),
  167. REGULATOR_LINEAR_RANGE(3200000, 0xca, 0xcf, 0),
  168. REGULATOR_LINEAR_RANGE(3300000, 0xd0, 0xd9, 10000),
  169. REGULATOR_LINEAR_RANGE(3400000, 0xda, 0xe0, 0),
  170. REGULATOR_LINEAR_RANGE(3410000, 0xe1, 0xe9, 10000),
  171. REGULATOR_LINEAR_RANGE(3500000, 0xea, 0xf0, 0),
  172. REGULATOR_LINEAR_RANGE(3510000, 0xf1, 0xf9, 10000),
  173. REGULATOR_LINEAR_RANGE(3600000, 0xfa, 0xff, 0),
  174. };
  175. static const struct linear_range ldo_vout_ranges3[] = {
  176. REGULATOR_LINEAR_RANGE(2700000, 0x00, 0x09, 10000),
  177. REGULATOR_LINEAR_RANGE(2800000, 0x0a, 0x10, 0),
  178. REGULATOR_LINEAR_RANGE(2810000, 0x11, 0x19, 10000),
  179. REGULATOR_LINEAR_RANGE(2900000, 0x1a, 0x20, 0),
  180. REGULATOR_LINEAR_RANGE(2910000, 0x21, 0x29, 10000),
  181. REGULATOR_LINEAR_RANGE(3000000, 0x2a, 0x30, 0),
  182. REGULATOR_LINEAR_RANGE(3010000, 0x31, 0x39, 10000),
  183. REGULATOR_LINEAR_RANGE(3100000, 0x3a, 0x40, 0),
  184. REGULATOR_LINEAR_RANGE(3110000, 0x41, 0x49, 10000),
  185. REGULATOR_LINEAR_RANGE(3200000, 0x4a, 0x4f, 0),
  186. REGULATOR_LINEAR_RANGE(3300000, 0x50, 0x59, 10000),
  187. REGULATOR_LINEAR_RANGE(3400000, 0x5a, 0x60, 0),
  188. REGULATOR_LINEAR_RANGE(3410000, 0x61, 0x69, 10000),
  189. REGULATOR_LINEAR_RANGE(3500000, 0x6a, 0x70, 0),
  190. REGULATOR_LINEAR_RANGE(3510000, 0x71, 0x79, 10000),
  191. REGULATOR_LINEAR_RANGE(3600000, 0x7a, 0x7f, 0),
  192. };
  193. static int mt6360_regulator_set_mode(struct regulator_dev *rdev,
  194. unsigned int mode)
  195. {
  196. const struct mt6360_regulator_desc *rdesc = (struct mt6360_regulator_desc *)rdev->desc;
  197. struct regmap *regmap = rdev_get_regmap(rdev);
  198. int shift = ffs(rdesc->mode_mask) - 1;
  199. unsigned int val;
  200. int ret;
  201. switch (mode) {
  202. case REGULATOR_MODE_NORMAL:
  203. val = MT6360_OPMODE_NORMAL;
  204. break;
  205. case REGULATOR_MODE_STANDBY:
  206. val = MT6360_OPMODE_ULP;
  207. break;
  208. case REGULATOR_MODE_IDLE:
  209. val = MT6360_OPMODE_LP;
  210. break;
  211. default:
  212. return -EINVAL;
  213. }
  214. ret = regmap_update_bits(regmap, rdesc->mode_reg, rdesc->mode_mask, val << shift);
  215. if (ret) {
  216. dev_err(&rdev->dev, "%s: fail (%d)\n", __func__, ret);
  217. return ret;
  218. }
  219. return 0;
  220. }
  221. static unsigned int mt6360_regulator_get_mode(struct regulator_dev *rdev)
  222. {
  223. const struct mt6360_regulator_desc *rdesc = (struct mt6360_regulator_desc *)rdev->desc;
  224. struct regmap *regmap = rdev_get_regmap(rdev);
  225. int shift = ffs(rdesc->mode_mask) - 1;
  226. unsigned int val;
  227. int ret;
  228. ret = regmap_read(regmap, rdesc->mode_reg, &val);
  229. if (ret)
  230. return ret;
  231. val &= rdesc->mode_mask;
  232. val >>= shift;
  233. switch (val) {
  234. case MT6360_OPMODE_LP:
  235. return REGULATOR_MODE_IDLE;
  236. case MT6360_OPMODE_ULP:
  237. return REGULATOR_MODE_STANDBY;
  238. case MT6360_OPMODE_NORMAL:
  239. return REGULATOR_MODE_NORMAL;
  240. default:
  241. return -EINVAL;
  242. }
  243. }
  244. static int mt6360_regulator_get_status(struct regulator_dev *rdev)
  245. {
  246. const struct mt6360_regulator_desc *rdesc = (struct mt6360_regulator_desc *)rdev->desc;
  247. struct regmap *regmap = rdev_get_regmap(rdev);
  248. unsigned int val;
  249. int ret;
  250. ret = regmap_read(regmap, rdesc->state_reg, &val);
  251. if (ret)
  252. return ret;
  253. if (val & rdesc->state_mask)
  254. return REGULATOR_STATUS_ON;
  255. return REGULATOR_STATUS_OFF;
  256. }
  257. static const struct regulator_ops mt6360_regulator_ops = {
  258. .list_voltage = regulator_list_voltage_linear_range,
  259. .enable = regulator_enable_regmap,
  260. .disable = regulator_disable_regmap,
  261. .is_enabled = regulator_is_enabled_regmap,
  262. .set_voltage_sel = regulator_set_voltage_sel_regmap,
  263. .get_voltage_sel = regulator_get_voltage_sel_regmap,
  264. .set_mode = mt6360_regulator_set_mode,
  265. .get_mode = mt6360_regulator_get_mode,
  266. .get_status = mt6360_regulator_get_status,
  267. };
  268. static unsigned int mt6360_regulator_of_map_mode(unsigned int hw_mode)
  269. {
  270. switch (hw_mode) {
  271. case MT6360_OPMODE_NORMAL:
  272. return REGULATOR_MODE_NORMAL;
  273. case MT6360_OPMODE_LP:
  274. return REGULATOR_MODE_IDLE;
  275. case MT6360_OPMODE_ULP:
  276. return REGULATOR_MODE_STANDBY;
  277. default:
  278. return REGULATOR_MODE_INVALID;
  279. }
  280. }
  281. #define MT6360_REGULATOR_DESC(_name, _sname, ereg, emask, vreg, vmask, \
  282. mreg, mmask, streg, stmask, vranges, \
  283. vcnts, offon_delay, irq_tbls) \
  284. { \
  285. .desc = { \
  286. .name = #_name, \
  287. .supply_name = #_sname, \
  288. .id = MT6360_REGULATOR_##_name, \
  289. .of_match = of_match_ptr(#_name), \
  290. .regulators_node = of_match_ptr("regulator"), \
  291. .of_map_mode = mt6360_regulator_of_map_mode, \
  292. .owner = THIS_MODULE, \
  293. .ops = &mt6360_regulator_ops, \
  294. .type = REGULATOR_VOLTAGE, \
  295. .vsel_reg = vreg, \
  296. .vsel_mask = vmask, \
  297. .enable_reg = ereg, \
  298. .enable_mask = emask, \
  299. .linear_ranges = vranges, \
  300. .n_linear_ranges = ARRAY_SIZE(vranges), \
  301. .n_voltages = vcnts, \
  302. .off_on_delay = offon_delay, \
  303. }, \
  304. .mode_reg = mreg, \
  305. .mode_mask = mmask, \
  306. .state_reg = streg, \
  307. .state_mask = stmask, \
  308. .irq_tables = irq_tbls, \
  309. .irq_table_size = ARRAY_SIZE(irq_tbls), \
  310. }
  311. static const struct mt6360_regulator_desc mt6360_regulator_descs[] = {
  312. MT6360_REGULATOR_DESC(BUCK1, BUCK1_VIN, 0x117, 0x40, 0x110, 0xff, 0x117, 0x30, 0x117, 0x04,
  313. buck_vout_ranges, 256, 0, buck1_irq_tbls),
  314. MT6360_REGULATOR_DESC(BUCK2, BUCK2_VIN, 0x127, 0x40, 0x120, 0xff, 0x127, 0x30, 0x127, 0x04,
  315. buck_vout_ranges, 256, 0, buck2_irq_tbls),
  316. MT6360_REGULATOR_DESC(LDO6, LDO_VIN3, 0x137, 0x40, 0x13B, 0xff, 0x137, 0x30, 0x137, 0x04,
  317. ldo_vout_ranges1, 256, 0, ldo6_irq_tbls),
  318. MT6360_REGULATOR_DESC(LDO7, LDO_VIN3, 0x131, 0x40, 0x135, 0xff, 0x131, 0x30, 0x131, 0x04,
  319. ldo_vout_ranges1, 256, 0, ldo7_irq_tbls),
  320. MT6360_REGULATOR_DESC(LDO1, LDO_VIN1, 0x217, 0x40, 0x21B, 0xff, 0x217, 0x30, 0x217, 0x04,
  321. ldo_vout_ranges2, 256, 0, ldo1_irq_tbls),
  322. MT6360_REGULATOR_DESC(LDO2, LDO_VIN1, 0x211, 0x40, 0x215, 0xff, 0x211, 0x30, 0x211, 0x04,
  323. ldo_vout_ranges2, 256, 0, ldo2_irq_tbls),
  324. MT6360_REGULATOR_DESC(LDO3, LDO_VIN1, 0x205, 0x40, 0x209, 0xff, 0x205, 0x30, 0x205, 0x04,
  325. ldo_vout_ranges2, 256, 100, ldo3_irq_tbls),
  326. MT6360_REGULATOR_DESC(LDO5, LDO_VIN2, 0x20B, 0x40, 0x20F, 0x7f, 0x20B, 0x30, 0x20B, 0x04,
  327. ldo_vout_ranges3, 128, 100, ldo5_irq_tbls),
  328. };
  329. static int mt6360_regulator_irq_register(struct platform_device *pdev,
  330. struct regulator_dev *rdev,
  331. const struct mt6360_irq_mapping *tbls,
  332. int tbl_size)
  333. {
  334. int i, irq, ret;
  335. for (i = 0; i < tbl_size; i++) {
  336. const struct mt6360_irq_mapping *irq_desc = tbls + i;
  337. irq = platform_get_irq_byname(pdev, irq_desc->name);
  338. if (irq < 0)
  339. return irq;
  340. ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, irq_desc->handler, 0,
  341. irq_desc->name, rdev);
  342. if (ret) {
  343. dev_err(&pdev->dev, "Fail to request %s irq\n", irq_desc->name);
  344. return ret;
  345. }
  346. }
  347. return 0;
  348. }
  349. static int mt6360_regulator_probe(struct platform_device *pdev)
  350. {
  351. struct mt6360_regulator_data *mrd;
  352. struct regulator_config config = {};
  353. int i, ret;
  354. mrd = devm_kzalloc(&pdev->dev, sizeof(*mrd), GFP_KERNEL);
  355. if (!mrd)
  356. return -ENOMEM;
  357. mrd->dev = &pdev->dev;
  358. mrd->regmap = dev_get_regmap(pdev->dev.parent, NULL);
  359. if (!mrd->regmap) {
  360. dev_err(&pdev->dev, "Failed to get parent regmap\n");
  361. return -ENODEV;
  362. }
  363. config.dev = pdev->dev.parent;
  364. config.driver_data = mrd;
  365. config.regmap = mrd->regmap;
  366. for (i = 0; i < ARRAY_SIZE(mt6360_regulator_descs); i++) {
  367. const struct mt6360_regulator_desc *rdesc = mt6360_regulator_descs + i;
  368. struct regulator_dev *rdev;
  369. rdev = devm_regulator_register(&pdev->dev, &rdesc->desc, &config);
  370. if (IS_ERR(rdev)) {
  371. dev_err(&pdev->dev, "Failed to register %d regulator\n", i);
  372. return PTR_ERR(rdev);
  373. }
  374. ret = mt6360_regulator_irq_register(pdev, rdev, rdesc->irq_tables,
  375. rdesc->irq_table_size);
  376. if (ret) {
  377. dev_err(&pdev->dev, "Failed to register %d regulator irqs\n", i);
  378. return ret;
  379. }
  380. }
  381. return 0;
  382. }
  383. static const struct platform_device_id mt6360_regulator_id_table[] = {
  384. { "mt6360-regulator", 0 },
  385. {},
  386. };
  387. MODULE_DEVICE_TABLE(platform, mt6360_regulator_id_table);
  388. static struct platform_driver mt6360_regulator_driver = {
  389. .driver = {
  390. .name = "mt6360-regulator",
  391. },
  392. .probe = mt6360_regulator_probe,
  393. .id_table = mt6360_regulator_id_table,
  394. };
  395. module_platform_driver(mt6360_regulator_driver);
  396. MODULE_AUTHOR("Gene Chen <[email protected]>");
  397. MODULE_DESCRIPTION("MT6360 Regulator Driver");
  398. MODULE_LICENSE("GPL v2");