environmentalTemperatureAnalysis.c 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * CompuLab CM-T35/CM-T3730 modules support
  3. *
  4. * Copyright (C) 2009-2011 CompuLab, Ltd.
  5. * Authors: Mike Rapoport <mike@compulab.co.il>
  6. * Igor Grinberg <grinberg@compulab.co.il>
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * version 2 as published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. */
  18. #include <linux/kernel.h>
  19. #include <linux/init.h>
  20. #include <linux/platform_device.h>
  21. #include <linux/input.h>
  22. #include <linux/input/matrix_keypad.h>
  23. #include <linux/delay.h>
  24. #include <linux/gpio.h>
  25. #include <linux/platform_data/gpio-omap.h>
  26. #include <linux/i2c/at24.h>
  27. #include <linux/i2c/twl.h>
  28. #include <linux/regulator/fixed.h>
  29. #include <linux/regulator/machine.h>
  30. #include <linux/mmc/host.h>
  31. #include <linux/spi/spi.h>
  32. #include <linux/spi/tdo24m.h>
  33. #include <asm/mach-types.h>
  34. #include <asm/mach/arch.h>
  35. #include <asm/mach/map.h>
  36. #include <linux/platform_data/mtd-nand-omap2.h>
  37. #include <video/omapdss.h>
  38. #include <video/omap-panel-generic-dpi.h>
  39. #include <video/omap-panel-tfp410.h>
  40. #include <linux/platform_data/spi-omap2-mcspi.h>
  41. #include "common.h"
  42. #include "mux.h"
  43. #include "sdram-micron-mt46h32m32lf-6.h"
  44. #include "hsmmc.h"
  45. #include "common-board-devices.h"
  46. #include "gpmc.h"
  47. #include "gpmc-nand.h"
  48. #define CM_T35_GPIO_PENDOWN 57
  49. #define SB_T35_USB_HUB_RESET_GPIO 167
  50. #define CM_T35_SMSC911X_CS 5
  51. #define CM_T35_SMSC911X_GPIO 163
  52. #define SB_T35_SMSC911X_CS 4
  53. #define SB_T35_SMSC911X_GPIO 65
  54. #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
  55. #include <linux/smsc911x.h>
  56. #include "gpmc-smsc911x.h"
  57. static struct omap_smsc911x_platform_data cm_t35_smsc911x_cfg = {
  58. .id = 0,
  59. .cs = CM_T35_SMSC911X_CS,
  60. .gpio_irq = CM_T35_SMSC911X_GPIO,
  61. .gpio_reset = -EINVAL,
  62. .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
  63. };
  64. static struct omap_smsc911x_platform_data sb_t35_smsc911x_cfg = {
  65. .id = 1,
  66. .cs = SB_T35_SMSC911X_CS,
  67. .gpio_irq = SB_T35_SMSC911X_GPIO,
  68. .gpio_reset = -EINVAL,
  69. .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
  70. };
  71. static struct regulator_consumer_supply cm_t35_smsc911x_supplies[] = {