cpuidle.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * arch/arm/mach-tegra/cpuidle.c
  3. *
  4. * CPU idle driver for Tegra CPUs
  5. *
  6. * Copyright (c) 2010-2012, NVIDIA Corporation.
  7. * Copyright (c) 2011 Google, Inc.
  8. * Author: Colin Cross <ccross@android.com>
  9. * Gary King <gking@nvidia.com>
  10. *
  11. * Rework for 3.3 by Peter De Schrijver <pdeschrijver@nvidia.com>
  12. *
  13. * This program is free software; you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License as published by
  15. * the Free Software Foundation; either version 2 of the License, or
  16. * (at your option) any later version.
  17. *
  18. * This program is distributed in the hope that it will be useful, but WITHOUT
  19. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  20. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  21. * more details.
  22. */
  23. #include <linux/kernel.h>
  24. #include <linux/module.h>
  25. #include "fuse.h"
  26. #include "cpuidle.h"
  27. static int __init tegra_cpuidle_init(void)
  28. {
  29. int ret;
  30. switch (tegra_chip_id) {
  31. case TEGRA20:
  32. ret = tegra20_cpuidle_init();
  33. break;
  34. case TEGRA30:
  35. ret = tegra30_cpuidle_init();
  36. break;
  37. case TEGRA114:
  38. ret = tegra114_cpuidle_init();
  39. break;
  40. default:
  41. ret = -ENODEV;
  42. break;
  43. }
  44. return ret;
  45. }
  46. device_initcall(tegra_cpuidle_init);