target.bzl 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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_touch_target():
  64. for (t, v) in get_all_la_variants() + get_all_le_variants() + get_all_lxc_variants():
  65. if t == "blair":
  66. define_blair(t, v)
  67. elif t == "pitti":
  68. define_pitti(t, v)
  69. else:
  70. define_pineapple(t, v)