dev-adc.c 1006 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* linux/arch/arm/plat-samsung/dev-adc.c
  2. *
  3. * Copyright 2010 Maurus Cuelenaere
  4. *
  5. * S3C64xx series device definition for ADC device
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #include <linux/kernel.h>
  12. #include <linux/string.h>
  13. #include <linux/platform_device.h>
  14. #include <mach/irqs.h>
  15. #include <mach/map.h>
  16. #include <plat/adc.h>
  17. #include <plat/devs.h>
  18. #include <plat/cpu.h>
  19. static struct resource s3c_adc_resource[] = {
  20. [0] = {
  21. .start = SAMSUNG_PA_ADC,
  22. .end = SAMSUNG_PA_ADC + SZ_256 - 1,
  23. .flags = IORESOURCE_MEM,
  24. },
  25. [1] = {
  26. .start = IRQ_TC,
  27. .end = IRQ_TC,
  28. .flags = IORESOURCE_IRQ,
  29. },
  30. [2] = {
  31. .start = IRQ_ADC,
  32. .end = IRQ_ADC,
  33. .flags = IORESOURCE_IRQ,
  34. },
  35. };
  36. struct platform_device s3c_device_adc = {
  37. .name = "samsung-adc",
  38. .id = -1,
  39. .num_resources = ARRAY_SIZE(s3c_adc_resource),
  40. .resource = s3c_adc_resource,
  41. };