target.bzl 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. load(":touch_modules.bzl", "touch_driver_modules")
  2. load(":touch_modules_build.bzl", "define_target_variant_modules")
  3. load("//msm-kernel:target_variants.bzl", "get_all_la_variants", "get_all_le_variants", "get_all_lxc_variants")
  4. def define_pineapple(t,v):
  5. define_target_variant_modules(
  6. target = t,
  7. variant = v,
  8. registry = touch_driver_modules,
  9. modules = [
  10. "nt36xxx-i2c",
  11. "atmel_mxt_ts",
  12. "dummy_ts",
  13. "goodix_ts"
  14. ],
  15. config_options = [
  16. "TOUCH_DLKM_ENABLE",
  17. "CONFIG_ARCH_PINEAPPLE",
  18. "CONFIG_MSM_TOUCH",
  19. "CONFIG_TOUCHSCREEN_GOODIX_BRL",
  20. "CONFIG_TOUCHSCREEN_NT36XXX_I2C",
  21. "CONFIG_TOUCHSCREEN_ATMEL_MXT",
  22. "CONFIG_TOUCHSCREEN_DUMMY"
  23. ],
  24. )
  25. def define_blair(t,v):
  26. define_target_variant_modules(
  27. target = t,
  28. variant = v,
  29. registry = touch_driver_modules,
  30. modules = [
  31. "nt36xxx-i2c",
  32. "goodix_ts",
  33. "focaltech_fts",
  34. "synaptics_tcm_ts"
  35. ],
  36. config_options = [
  37. "TOUCH_DLKM_ENABLE",
  38. "CONFIG_ARCH_BLAIR",
  39. "CONFIG_MSM_TOUCH",
  40. "CONFIG_TOUCHSCREEN_NT36XXX_I2C",
  41. "CONFIG_TOUCHSCREEN_GOODIX_BRL",
  42. "CONFIG_TOUCH_FOCALTECH",
  43. "CONFIG_TOUCHSCREEN_SYNAPTICS_TCM"
  44. ],
  45. )
  46. def define_pitti(t,v):
  47. define_target_variant_modules(
  48. target = t,
  49. variant = v,
  50. registry = touch_driver_modules,
  51. modules = [
  52. "focaltech_fts",
  53. "goodix_ts"
  54. ],
  55. config_options = [
  56. "TOUCH_DLKM_ENABLE",
  57. "CONFIG_ARCH_PITTI",
  58. "CONFIG_MSM_TOUCH",
  59. "CONFIG_TOUCH_FOCALTECH",
  60. "CONFIG_TOUCHSCREEN_GOODIX_BRL"
  61. ],
  62. )
  63. def define_monaco(t,v):
  64. define_target_variant_modules(
  65. target = t,
  66. variant = v,
  67. registry = touch_driver_modules,
  68. modules = [
  69. "pt_ts",
  70. "pt_i2c",
  71. "pt_device_access",
  72. "pt_debug",
  73. ],
  74. config_options = [
  75. "TOUCH_DLKM_ENABLE",
  76. "CONFIG_ARCH_MONACO",
  77. "CONFIG_MSM_TOUCH",
  78. "CONFIG_TOUCHSCREEN_PARADE",
  79. "CONFIG_TOUCHSCREEN_PARADE_DEVICETREE_SUPPORT",
  80. "CONFIG_TOUCHSCREEN_PARADE_I2C",
  81. "CONFIG_TOUCHSCREEN_PARADE_DEVICE_ACCESS",
  82. "CONFIG_TOUCHSCREEN_PARADE_BUTTON",
  83. "CONFIG_TOUCHSCREEN_PARADE_PROXIMITY",
  84. "CONFIG_TOUCHSCREEN_PARADE_DEBUG_MDL",
  85. ],
  86. )
  87. def define_touch_target():
  88. for (t, v) in get_all_la_variants() + get_all_le_variants() + get_all_lxc_variants():
  89. if t == "blair":
  90. define_blair(t, v)
  91. elif t == "pitti":
  92. define_pitti(t, v)
  93. elif t == "monaco":
  94. define_monaco(t, v)
  95. else:
  96. define_pineapple(t, v)