hisi-acpu-cpufreq.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Hisilicon Platforms Using ACPU CPUFreq Support
  3. *
  4. * Copyright (c) 2015 Hisilicon Limited.
  5. * Copyright (c) 2015 Linaro Limited.
  6. *
  7. * Leo Yan <leo.yan@linaro.org>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. *
  13. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  14. * kind, whether express or implied; without even the implied warranty
  15. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. */
  18. #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  19. #include <linux/err.h>
  20. #include <linux/init.h>
  21. #include <linux/kernel.h>
  22. #include <linux/module.h>
  23. #include <linux/of.h>
  24. #include <linux/platform_device.h>
  25. static int __init hisi_acpu_cpufreq_driver_init(void)
  26. {
  27. struct platform_device *pdev;
  28. if (!of_machine_is_compatible("hisilicon,hi6220"))
  29. return -ENODEV;
  30. pdev = platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
  31. return PTR_ERR_OR_ZERO(pdev);
  32. }
  33. module_init(hisi_acpu_cpufreq_driver_init);
  34. MODULE_AUTHOR("Leo Yan <leo.yan@linaro.org>");
  35. MODULE_DESCRIPTION("Hisilicon acpu cpufreq driver");
  36. MODULE_LICENSE("GPL v2");