gpio-fan.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * gpio-fan.c - Hwmon driver for fans connected to GPIO lines.
  4. *
  5. * Copyright (C) 2010 LaCie
  6. *
  7. * Author: Simon Guinot <sguinot@lacie.com>
  8. */
  9. #include <linux/module.h>
  10. #include <linux/init.h>
  11. #include <linux/slab.h>
  12. #include <linux/interrupt.h>
  13. #include <linux/irq.h>
  14. #include <linux/platform_device.h>
  15. #include <linux/err.h>
  16. #include <linux/kstrtox.h>
  17. #include <linux/mutex.h>
  18. #include <linux/hwmon.h>
  19. #include <linux/gpio/consumer.h>
  20. #include <linux/of.h>
  21. #include <linux/of_platform.h>
  22. #include <linux/pm.h>
  23. #include <linux/pm_runtime.h>
  24. #include <linux/regulator/consumer.h>
  25. #include <linux/thermal.h>
  26. struct gpio_fan_speed {
  27. int rpm;
  28. int ctrl_val;
  29. };
  30. struct gpio_fan_data {
  31. struct device *dev;
  32. struct device *hwmon_dev;
  33. /* Cooling device if any */
  34. struct thermal_cooling_device *cdev;
  35. struct mutex lock; /* lock GPIOs operations. */
  36. int num_gpios;
  37. struct gpio_desc **gpios;
  38. int num_speed;
  39. struct gpio_fan_speed *speed;
  40. int speed_index;
  41. int resume_speed;
  42. bool pwm_enable;
  43. struct gpio_desc *alarm_gpio;
  44. struct work_struct alarm_work;
  45. struct regulator *supply;
  46. };
  47. /*
  48. * Alarm GPIO.
  49. */
  50. static void fan_alarm_notify(struct work_struct *ws)
  51. {
  52. struct gpio_fan_data *fan_data =
  53. container_of(ws, struct gpio_fan_data, alarm_work);
  54. sysfs_notify(&fan_data->hwmon_dev->kobj, NULL, "fan1_alarm");
  55. kobject_uevent(&fan_data->hwmon_dev->kobj, KOBJ_CHANGE);
  56. }
  57. static irqreturn_t fan_alarm_irq_handler(int irq, void *dev_id)
  58. {
  59. struct gpio_fan_data *fan_data = dev_id;
  60. schedule_work(&fan_data->alarm_work);
  61. return IRQ_NONE;
  62. }
  63. static ssize_t fan1_alarm_show(struct device *dev,
  64. struct device_attribute *attr, char *buf)
  65. {
  66. struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
  67. return sprintf(buf, "%d\n",
  68. gpiod_get_value_cansleep(fan_data->alarm_gpio));
  69. }
  70. static DEVICE_ATTR_RO(fan1_alarm);
  71. static int fan_alarm_init(struct gpio_fan_data *fan_data)
  72. {
  73. int alarm_irq;
  74. struct device *dev = fan_data->dev;
  75. /*
  76. * If the alarm GPIO don't support interrupts, just leave
  77. * without initializing the fail notification support.
  78. */
  79. alarm_irq = gpiod_to_irq(fan_data->alarm_gpio);
  80. if (alarm_irq <= 0)
  81. return 0;
  82. INIT_WORK(&fan_data->alarm_work, fan_alarm_notify);
  83. irq_set_irq_type(alarm_irq, IRQ_TYPE_EDGE_BOTH);
  84. return devm_request_irq(dev, alarm_irq, fan_alarm_irq_handler,
  85. IRQF_SHARED, "GPIO fan alarm", fan_data);
  86. }
  87. /*
  88. * Control GPIOs.
  89. */
  90. /* Must be called with fan_data->lock held, except during initialization. */
  91. static void __set_fan_ctrl(struct gpio_fan_data *fan_data, int ctrl_val)
  92. {
  93. int i;
  94. for (i = 0; i < fan_data->num_gpios; i++)
  95. gpiod_set_value_cansleep(fan_data->gpios[i],
  96. (ctrl_val >> i) & 1);
  97. }
  98. static int __get_fan_ctrl(struct gpio_fan_data *fan_data)
  99. {
  100. int i;
  101. int ctrl_val = 0;
  102. for (i = 0; i < fan_data->num_gpios; i++) {
  103. int value;
  104. value = gpiod_get_value_cansleep(fan_data->gpios[i]);
  105. ctrl_val |= (value << i);
  106. }
  107. return ctrl_val;
  108. }
  109. /* Must be called with fan_data->lock held, except during initialization. */
  110. static int set_fan_speed(struct gpio_fan_data *fan_data, int speed_index)
  111. {
  112. if (fan_data->speed_index == speed_index)
  113. return 0;
  114. if (fan_data->speed_index == 0 && speed_index > 0) {
  115. int ret;
  116. ret = pm_runtime_resume_and_get(fan_data->dev);
  117. if (ret < 0)
  118. return ret;
  119. }
  120. __set_fan_ctrl(fan_data, fan_data->speed[speed_index].ctrl_val);
  121. if (fan_data->speed_index > 0 && speed_index == 0) {
  122. int ret;
  123. ret = pm_runtime_put_sync(fan_data->dev);
  124. if (ret < 0 && ret != -ENOSYS)
  125. return ret;
  126. }
  127. fan_data->speed_index = speed_index;
  128. return 0;
  129. }
  130. static int get_fan_speed_index(struct gpio_fan_data *fan_data)
  131. {
  132. int ctrl_val = __get_fan_ctrl(fan_data);
  133. int i;
  134. for (i = 0; i < fan_data->num_speed; i++)
  135. if (fan_data->speed[i].ctrl_val == ctrl_val)
  136. return i;
  137. dev_warn(fan_data->dev,
  138. "missing speed array entry for GPIO value 0x%x\n", ctrl_val);
  139. return -ENODEV;
  140. }
  141. static int rpm_to_speed_index(struct gpio_fan_data *fan_data, unsigned long rpm)
  142. {
  143. struct gpio_fan_speed *speed = fan_data->speed;
  144. int i;
  145. for (i = 0; i < fan_data->num_speed; i++)
  146. if (speed[i].rpm >= rpm)
  147. return i;
  148. return fan_data->num_speed - 1;
  149. }
  150. static ssize_t pwm1_show(struct device *dev, struct device_attribute *attr,
  151. char *buf)
  152. {
  153. struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
  154. u8 pwm = fan_data->speed_index * 255 / (fan_data->num_speed - 1);
  155. return sprintf(buf, "%d\n", pwm);
  156. }
  157. static ssize_t pwm1_store(struct device *dev, struct device_attribute *attr,
  158. const char *buf, size_t count)
  159. {
  160. struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
  161. unsigned long pwm;
  162. int speed_index;
  163. int ret;
  164. if (kstrtoul(buf, 10, &pwm) || pwm > 255)
  165. return -EINVAL;
  166. mutex_lock(&fan_data->lock);
  167. if (!fan_data->pwm_enable) {
  168. ret = -EPERM;
  169. goto exit_unlock;
  170. }
  171. speed_index = DIV_ROUND_UP(pwm * (fan_data->num_speed - 1), 255);
  172. ret = set_fan_speed(fan_data, speed_index);
  173. exit_unlock:
  174. mutex_unlock(&fan_data->lock);
  175. return ret ? ret : count;
  176. }
  177. static ssize_t pwm1_enable_show(struct device *dev,
  178. struct device_attribute *attr, char *buf)
  179. {
  180. struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
  181. return sprintf(buf, "%d\n", fan_data->pwm_enable);
  182. }
  183. static ssize_t pwm1_enable_store(struct device *dev,
  184. struct device_attribute *attr,
  185. const char *buf, size_t count)
  186. {
  187. struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
  188. unsigned long val;
  189. int ret = 0;
  190. if (kstrtoul(buf, 10, &val) || val > 1)
  191. return -EINVAL;
  192. if (fan_data->pwm_enable == val)
  193. return count;
  194. mutex_lock(&fan_data->lock);
  195. fan_data->pwm_enable = val;
  196. /* Disable manual control mode: set fan at full speed. */
  197. if (val == 0)
  198. ret = set_fan_speed(fan_data, fan_data->num_speed - 1);
  199. mutex_unlock(&fan_data->lock);
  200. return ret ? ret : count;
  201. }
  202. static ssize_t pwm1_mode_show(struct device *dev,
  203. struct device_attribute *attr, char *buf)
  204. {
  205. return sprintf(buf, "0\n");
  206. }
  207. static ssize_t fan1_min_show(struct device *dev,
  208. struct device_attribute *attr, char *buf)
  209. {
  210. struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
  211. return sprintf(buf, "%d\n", fan_data->speed[0].rpm);
  212. }
  213. static ssize_t fan1_max_show(struct device *dev,
  214. struct device_attribute *attr, char *buf)
  215. {
  216. struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
  217. return sprintf(buf, "%d\n",
  218. fan_data->speed[fan_data->num_speed - 1].rpm);
  219. }
  220. static ssize_t fan1_input_show(struct device *dev,
  221. struct device_attribute *attr, char *buf)
  222. {
  223. struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
  224. return sprintf(buf, "%d\n", fan_data->speed[fan_data->speed_index].rpm);
  225. }
  226. static ssize_t set_rpm(struct device *dev, struct device_attribute *attr,
  227. const char *buf, size_t count)
  228. {
  229. struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
  230. unsigned long rpm;
  231. int ret;
  232. if (kstrtoul(buf, 10, &rpm))
  233. return -EINVAL;
  234. mutex_lock(&fan_data->lock);
  235. if (!fan_data->pwm_enable) {
  236. ret = -EPERM;
  237. goto exit_unlock;
  238. }
  239. ret = set_fan_speed(fan_data, rpm_to_speed_index(fan_data, rpm));
  240. exit_unlock:
  241. mutex_unlock(&fan_data->lock);
  242. return ret ? ret : count;
  243. }
  244. static DEVICE_ATTR_RW(pwm1);
  245. static DEVICE_ATTR_RW(pwm1_enable);
  246. static DEVICE_ATTR_RO(pwm1_mode);
  247. static DEVICE_ATTR_RO(fan1_min);
  248. static DEVICE_ATTR_RO(fan1_max);
  249. static DEVICE_ATTR_RO(fan1_input);
  250. static DEVICE_ATTR(fan1_target, 0644, fan1_input_show, set_rpm);
  251. static umode_t gpio_fan_is_visible(struct kobject *kobj,
  252. struct attribute *attr, int index)
  253. {
  254. struct device *dev = kobj_to_dev(kobj);
  255. struct gpio_fan_data *data = dev_get_drvdata(dev);
  256. if (index == 0 && !data->alarm_gpio)
  257. return 0;
  258. if (index > 0 && !data->gpios)
  259. return 0;
  260. return attr->mode;
  261. }
  262. static struct attribute *gpio_fan_attributes[] = {
  263. &dev_attr_fan1_alarm.attr, /* 0 */
  264. &dev_attr_pwm1.attr, /* 1 */
  265. &dev_attr_pwm1_enable.attr,
  266. &dev_attr_pwm1_mode.attr,
  267. &dev_attr_fan1_input.attr,
  268. &dev_attr_fan1_target.attr,
  269. &dev_attr_fan1_min.attr,
  270. &dev_attr_fan1_max.attr,
  271. NULL
  272. };
  273. static const struct attribute_group gpio_fan_group = {
  274. .attrs = gpio_fan_attributes,
  275. .is_visible = gpio_fan_is_visible,
  276. };
  277. static const struct attribute_group *gpio_fan_groups[] = {
  278. &gpio_fan_group,
  279. NULL
  280. };
  281. static int fan_ctrl_init(struct gpio_fan_data *fan_data)
  282. {
  283. int num_gpios = fan_data->num_gpios;
  284. struct gpio_desc **gpios = fan_data->gpios;
  285. int i, err;
  286. for (i = 0; i < num_gpios; i++) {
  287. /*
  288. * The GPIO descriptors were retrieved with GPIOD_ASIS so here
  289. * we set the GPIO into output mode, carefully preserving the
  290. * current value by setting it to whatever it is already set
  291. * (no surprise changes in default fan speed).
  292. */
  293. err = gpiod_direction_output(gpios[i],
  294. gpiod_get_value_cansleep(gpios[i]));
  295. if (err)
  296. return err;
  297. }
  298. fan_data->pwm_enable = true; /* Enable manual fan speed control. */
  299. fan_data->speed_index = get_fan_speed_index(fan_data);
  300. if (fan_data->speed_index < 0)
  301. return fan_data->speed_index;
  302. return 0;
  303. }
  304. static int gpio_fan_get_max_state(struct thermal_cooling_device *cdev,
  305. unsigned long *state)
  306. {
  307. struct gpio_fan_data *fan_data = cdev->devdata;
  308. if (!fan_data)
  309. return -EINVAL;
  310. *state = fan_data->num_speed - 1;
  311. return 0;
  312. }
  313. static int gpio_fan_get_cur_state(struct thermal_cooling_device *cdev,
  314. unsigned long *state)
  315. {
  316. struct gpio_fan_data *fan_data = cdev->devdata;
  317. if (!fan_data)
  318. return -EINVAL;
  319. *state = fan_data->speed_index;
  320. return 0;
  321. }
  322. static int gpio_fan_set_cur_state(struct thermal_cooling_device *cdev,
  323. unsigned long state)
  324. {
  325. struct gpio_fan_data *fan_data = cdev->devdata;
  326. int ret;
  327. if (!fan_data)
  328. return -EINVAL;
  329. if (state >= fan_data->num_speed)
  330. return -EINVAL;
  331. mutex_lock(&fan_data->lock);
  332. ret = set_fan_speed(fan_data, state);
  333. mutex_unlock(&fan_data->lock);
  334. return ret;
  335. }
  336. static const struct thermal_cooling_device_ops gpio_fan_cool_ops = {
  337. .get_max_state = gpio_fan_get_max_state,
  338. .get_cur_state = gpio_fan_get_cur_state,
  339. .set_cur_state = gpio_fan_set_cur_state,
  340. };
  341. /*
  342. * Translate OpenFirmware node properties into platform_data
  343. */
  344. static int gpio_fan_get_of_data(struct gpio_fan_data *fan_data)
  345. {
  346. struct gpio_fan_speed *speed;
  347. struct device *dev = fan_data->dev;
  348. struct device_node *np = dev->of_node;
  349. struct gpio_desc **gpios;
  350. unsigned i;
  351. u32 u;
  352. struct property *prop;
  353. const __be32 *p;
  354. /* Alarm GPIO if one exists */
  355. fan_data->alarm_gpio = devm_gpiod_get_optional(dev, "alarm", GPIOD_IN);
  356. if (IS_ERR(fan_data->alarm_gpio))
  357. return PTR_ERR(fan_data->alarm_gpio);
  358. /* Fill GPIO pin array */
  359. fan_data->num_gpios = gpiod_count(dev, NULL);
  360. if (fan_data->num_gpios <= 0) {
  361. if (fan_data->alarm_gpio)
  362. return 0;
  363. dev_err(dev, "DT properties empty / missing");
  364. return -ENODEV;
  365. }
  366. gpios = devm_kcalloc(dev,
  367. fan_data->num_gpios, sizeof(struct gpio_desc *),
  368. GFP_KERNEL);
  369. if (!gpios)
  370. return -ENOMEM;
  371. for (i = 0; i < fan_data->num_gpios; i++) {
  372. gpios[i] = devm_gpiod_get_index(dev, NULL, i, GPIOD_ASIS);
  373. if (IS_ERR(gpios[i]))
  374. return PTR_ERR(gpios[i]);
  375. }
  376. fan_data->gpios = gpios;
  377. /* Get number of RPM/ctrl_val pairs in speed map */
  378. prop = of_find_property(np, "gpio-fan,speed-map", &i);
  379. if (!prop) {
  380. dev_err(dev, "gpio-fan,speed-map DT property missing");
  381. return -ENODEV;
  382. }
  383. i = i / sizeof(u32);
  384. if (i == 0 || i & 1) {
  385. dev_err(dev, "gpio-fan,speed-map contains zero/odd number of entries");
  386. return -ENODEV;
  387. }
  388. fan_data->num_speed = i / 2;
  389. /*
  390. * Populate speed map
  391. * Speed map is in the form <RPM ctrl_val RPM ctrl_val ...>
  392. * this needs splitting into pairs to create gpio_fan_speed structs
  393. */
  394. speed = devm_kcalloc(dev,
  395. fan_data->num_speed, sizeof(struct gpio_fan_speed),
  396. GFP_KERNEL);
  397. if (!speed)
  398. return -ENOMEM;
  399. p = NULL;
  400. for (i = 0; i < fan_data->num_speed; i++) {
  401. p = of_prop_next_u32(prop, p, &u);
  402. if (!p)
  403. return -ENODEV;
  404. speed[i].rpm = u;
  405. p = of_prop_next_u32(prop, p, &u);
  406. if (!p)
  407. return -ENODEV;
  408. speed[i].ctrl_val = u;
  409. }
  410. fan_data->speed = speed;
  411. return 0;
  412. }
  413. static const struct of_device_id of_gpio_fan_match[] = {
  414. { .compatible = "gpio-fan", },
  415. {},
  416. };
  417. MODULE_DEVICE_TABLE(of, of_gpio_fan_match);
  418. static void gpio_fan_stop(void *data)
  419. {
  420. struct gpio_fan_data *fan_data = data;
  421. mutex_lock(&fan_data->lock);
  422. set_fan_speed(data, 0);
  423. mutex_unlock(&fan_data->lock);
  424. pm_runtime_disable(fan_data->dev);
  425. }
  426. static int gpio_fan_probe(struct platform_device *pdev)
  427. {
  428. int err;
  429. struct gpio_fan_data *fan_data;
  430. struct device *dev = &pdev->dev;
  431. struct device_node *np = dev->of_node;
  432. fan_data = devm_kzalloc(dev, sizeof(struct gpio_fan_data),
  433. GFP_KERNEL);
  434. if (!fan_data)
  435. return -ENOMEM;
  436. fan_data->dev = dev;
  437. err = gpio_fan_get_of_data(fan_data);
  438. if (err)
  439. return err;
  440. platform_set_drvdata(pdev, fan_data);
  441. mutex_init(&fan_data->lock);
  442. fan_data->supply = devm_regulator_get(dev, "fan");
  443. if (IS_ERR(fan_data->supply))
  444. return dev_err_probe(dev, PTR_ERR(fan_data->supply),
  445. "Failed to get fan-supply");
  446. /* Configure control GPIOs if available. */
  447. if (fan_data->gpios && fan_data->num_gpios > 0) {
  448. if (!fan_data->speed || fan_data->num_speed <= 1)
  449. return -EINVAL;
  450. err = fan_ctrl_init(fan_data);
  451. if (err)
  452. return err;
  453. err = devm_add_action_or_reset(dev, gpio_fan_stop, fan_data);
  454. if (err)
  455. return err;
  456. }
  457. /* Make this driver part of hwmon class. */
  458. fan_data->hwmon_dev =
  459. devm_hwmon_device_register_with_groups(dev,
  460. "gpio_fan", fan_data,
  461. gpio_fan_groups);
  462. if (IS_ERR(fan_data->hwmon_dev))
  463. return PTR_ERR(fan_data->hwmon_dev);
  464. /* Configure alarm GPIO if available. */
  465. if (fan_data->alarm_gpio) {
  466. err = fan_alarm_init(fan_data);
  467. if (err)
  468. return err;
  469. }
  470. pm_runtime_set_suspended(&pdev->dev);
  471. pm_runtime_enable(&pdev->dev);
  472. /* If current GPIO state is active, mark RPM as active as well */
  473. if (fan_data->speed_index > 0) {
  474. int ret;
  475. ret = pm_runtime_resume_and_get(&pdev->dev);
  476. if (ret)
  477. return ret;
  478. }
  479. /* Optional cooling device register for Device tree platforms */
  480. fan_data->cdev = devm_thermal_of_cooling_device_register(dev, np,
  481. "gpio-fan", fan_data, &gpio_fan_cool_ops);
  482. dev_info(dev, "GPIO fan initialized\n");
  483. return 0;
  484. }
  485. static void gpio_fan_shutdown(struct platform_device *pdev)
  486. {
  487. struct gpio_fan_data *fan_data = platform_get_drvdata(pdev);
  488. if (fan_data->gpios)
  489. set_fan_speed(fan_data, 0);
  490. }
  491. static int gpio_fan_runtime_suspend(struct device *dev)
  492. {
  493. struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
  494. int ret = 0;
  495. if (fan_data->supply)
  496. ret = regulator_disable(fan_data->supply);
  497. return ret;
  498. }
  499. static int gpio_fan_runtime_resume(struct device *dev)
  500. {
  501. struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
  502. int ret = 0;
  503. if (fan_data->supply)
  504. ret = regulator_enable(fan_data->supply);
  505. return ret;
  506. }
  507. static int gpio_fan_suspend(struct device *dev)
  508. {
  509. struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
  510. int ret = 0;
  511. if (fan_data->gpios) {
  512. fan_data->resume_speed = fan_data->speed_index;
  513. mutex_lock(&fan_data->lock);
  514. ret = set_fan_speed(fan_data, 0);
  515. mutex_unlock(&fan_data->lock);
  516. }
  517. return ret;
  518. }
  519. static int gpio_fan_resume(struct device *dev)
  520. {
  521. struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
  522. int ret = 0;
  523. if (fan_data->gpios) {
  524. mutex_lock(&fan_data->lock);
  525. ret = set_fan_speed(fan_data, fan_data->resume_speed);
  526. mutex_unlock(&fan_data->lock);
  527. }
  528. return ret;
  529. }
  530. static const struct dev_pm_ops gpio_fan_pm = {
  531. RUNTIME_PM_OPS(gpio_fan_runtime_suspend,
  532. gpio_fan_runtime_resume, NULL)
  533. SYSTEM_SLEEP_PM_OPS(gpio_fan_suspend, gpio_fan_resume)
  534. };
  535. static struct platform_driver gpio_fan_driver = {
  536. .probe = gpio_fan_probe,
  537. .shutdown = gpio_fan_shutdown,
  538. .driver = {
  539. .name = "gpio-fan",
  540. .pm = pm_ptr(&gpio_fan_pm),
  541. .of_match_table = of_gpio_fan_match,
  542. },
  543. };
  544. module_platform_driver(gpio_fan_driver);
  545. MODULE_AUTHOR("Simon Guinot <sguinot@lacie.com>");
  546. MODULE_DESCRIPTION("GPIO FAN driver");
  547. MODULE_LICENSE("GPL");
  548. MODULE_ALIAS("platform:gpio-fan");