spi.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /* arch/arm/mach-s3c2410/include/mach/spi.h
  2. *
  3. * Copyright (c) 2006 Simtec Electronics
  4. * Ben Dooks <ben@simtec.co.uk>
  5. *
  6. * S3C2410 - SPI Controller platform_device info
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #ifndef __ASM_ARCH_SPI_H
  13. #define __ASM_ARCH_SPI_H __FILE__
  14. struct s3c2410_spi_info {
  15. int pin_cs; /* simple gpio cs */
  16. unsigned int num_cs; /* total chipselects */
  17. int bus_num; /* bus number to use. */
  18. void (*gpio_setup)(struct s3c2410_spi_info *spi, int enable);
  19. void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol);
  20. };
  21. /* Standard setup / suspend routines for SPI GPIO pins. */
  22. extern void s3c24xx_spi_gpiocfg_bus0_gpe11_12_13(struct s3c2410_spi_info *spi,
  23. int enable);
  24. extern void s3c24xx_spi_gpiocfg_bus1_gpg5_6_7(struct s3c2410_spi_info *spi,
  25. int enable);
  26. extern void s3c24xx_spi_gpiocfg_bus1_gpd8_9_10(struct s3c2410_spi_info *spi,
  27. int enable);
  28. #endif /* __ASM_ARCH_SPI_H */