barcode_emul.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright (C) 2012 Samsung Electronics
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. */
  18. #ifndef _BARCODE_EMUL_H_
  19. #define _BARCODE_EMUL_H_
  20. #define FPGA_GPIO_BASE 300
  21. #define NR_FPGA_GPIO 16
  22. #define ICE_FPGA_GPIO_TO_SYS(fpga_gpio) (fpga_gpio + FPGA_GPIO_BASE)
  23. enum { ICE_12M = 0, ICE_19M, ICE_GPIOX, ICE_I2C, ICE_24M, ICE_I2C_2, ICE_I2C_R2, ICE_I2C_R3 };
  24. extern int ice_gpiox_set(int num, int val);
  25. extern int ice_gpiox_get(int num);
  26. struct barcode_emul_platform_data {
  27. int spi_clk;
  28. u32 spi_clk_flag;
  29. int spi_si;
  30. u32 spi_si_flag;
  31. int spi_en;
  32. int cresetb;
  33. u32 cresetb_flag;
  34. int rst_n;
  35. u32 rst_n_flag;
  36. int fw_type;
  37. int cdone;
  38. u32 cdone_flag;
  39. #if defined CONFIG_IR_REMOCON_FPGA
  40. int irda_wake;
  41. u32 irda_wake_flag;
  42. int irda_irq;
  43. u32 irda_irq_flag;
  44. int ir_led_en;
  45. u32 ir_led_en_flag;
  46. #endif
  47. };
  48. #define GPIO_LEVEL_LOW 0
  49. #define GPIO_LEVEL_HIGH 1
  50. #define BLANK_GPIOS 2
  51. #define BEAMING_OFF 0
  52. #define BEAMING_ON 1
  53. #define STOP_BEAMING 0x00
  54. #endif /* _BARCODE_EMUL_H_ */