tuner.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. *
  3. * drivers/media/isdbtmm/tuner.h
  4. *
  5. * MM Tuner Driver
  6. *
  7. * Copyright (C) (2013, Samsung Electronics)
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation version 2.
  12. *
  13. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  14. * kind, whether express or implied; without even the implied warranty
  15. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. */
  19. /******************************************************************************/
  20. /*** ***/
  21. /******************************************************************************/
  22. #ifndef _TUNER_H_
  23. #define _TUNER_H_
  24. #include <linux/interrupt.h>
  25. #include <linux/gpio.h>
  26. #include <linux/delay.h>
  27. #include <linux/kthread.h>
  28. /******************************************************************************
  29. * Typedef
  30. ******************************************************************************/
  31. typedef struct smt113j_SPI_thread
  32. {
  33. struct task_struct *thread_task;
  34. wait_queue_head_t thread_wait;
  35. u8 status;
  36. spinlock_t tmm_lock;
  37. } smt113j_spi_thread_t;
  38. /******************************************************************************
  39. * extern
  40. ******************************************************************************/
  41. extern smt113j_spi_thread_t *spi_work_thread;
  42. /******************************************************************************
  43. * extern
  44. ******************************************************************************/
  45. /* DEBUG */
  46. /*#define DLOG*/
  47. #ifdef DLOG
  48. #define INFO_PRINT( fmt, arg... ) { printk(KERN_INFO "%s: " fmt "\n", "mmtuner driver", ##arg); }
  49. #define DEBUG_PRINT( fmt, arg... ) { printk(KERN_INFO "%s: " fmt "\n", "mmtuner driver", ##arg); }
  50. #define TRACE() DEBUG_PRINT( "%s( %d )", __FUNCTION__, __LINE__ )
  51. #else
  52. #define INFO_PRINT( fmt, arg... )
  53. #define DEBUG_PRINT( fmt, arg... )
  54. #define TRACE() DEBUG_PRINT()
  55. #endif /* DLOG */
  56. #define ERROR_PRINT( fmt, arg... ) { printk(KERN_ERR "%s: " fmt "\n", "mmtuner driver", ##arg); }
  57. /******************************************************************************
  58. * extern
  59. ******************************************************************************/
  60. extern int smt113J_tuner_SpiThreadStart ( void );
  61. #endif /* _TUNER_DRV_H */