lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | ifeq ($(CONFIG_SI3217X),y) |
| 2 | SI3217X_SUPPORT=y |
| 3 | SILAB_SUPPORT_LCQC=y |
| 4 | endif |
| 5 | ifeq ($(CONFIG_SI3217X),m) |
| 6 | SI3217X_SUPPORT=y |
| 7 | SILAB_SUPPORT_LCQC=y |
| 8 | endif |
| 9 | |
| 10 | ifeq ($(CONFIG_SI3218X),y) |
| 11 | SI3218X_SUPPORT=y |
| 12 | SILAB_SUPPORT_LCQC=y |
| 13 | SI3218X_SPI_SELECT_STDSPI=y |
| 14 | endif |
| 15 | ifeq ($(CONFIG_SI3218X),m) |
| 16 | SI3218X_SUPPORT=y |
| 17 | SILAB_SUPPORT_LCQC=y |
| 18 | SI3218X_SPI_SELECT_STDSPI=y |
| 19 | endif |
| 20 | |
| 21 | obj-$(CONFIG_SI3217X) +=slic.o |
| 22 | obj-$(CONFIG_SI3218X) +=slic.o |
| 23 | |
| 24 | EXTRA_CFLAGS += -Wno-format-extra-args -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function |
| 25 | EXTRA_CFLAGS += -Wno-format -Wno-return-type -Wno-strict-prototypes -Wno-unused -Wno-implicit -D__KERNEL__ -DLINUX_KERNEL |
| 26 | |
| 27 | DRV_OBJS = $(MOD_NMAE).o |
| 28 | |
| 29 | ccflags-y+= -Idrivers/slic/si_lib/include |
| 30 | ccflags-y+= -Idrivers/slic/ |
| 31 | ccflags-y+= -Idrivers/slic/silicon_mlt/include |
| 32 | #ccflags-y += -I$(TOPDIR_AP)/../pub/project/zx297520v3/include/drv |
| 33 | #ccflags-y += -I$(TOPDIR_AP)/../pub/project/zx297520v3/include/nv |
| 34 | ccflags-y += -I$(TOPDIR_AP)/../cp/ps/driver/inc/misc |
| 35 | ccflags-y += -I$(TOPDIR_AP)/os/linux/linux-3.4.x/sound/soc/sanechips |
| 36 | ccflags-y += -I$(TOPDIR_AP)/os/linux/linux-3.4.x/include/linux |
| 37 | |
| 38 | SRC = si_lib/source |
| 39 | MLT_SRC = silicon_mlt/source |
| 40 | |
| 41 | slic-objs := $(SRC)/spi_adt.o \ |
| 42 | $(SRC)/proslic.o \ |
| 43 | $(SRC)/si_voice.o \ |
| 44 | $(SRC)/si_voice_version.o \ |
| 45 | $(SRC)/timer_adt.o \ |
| 46 | $(MLT_SRC)/proslic_mlt.o \ |
| 47 | $(MLT_SRC)/proslic_mlt_dcfeed.o \ |
| 48 | $(MLT_SRC)/proslic_mlt_diag_madc.o \ |
| 49 | $(MLT_SRC)/proslic_mlt_math.o \ |
| 50 | $(MLT_SRC)/proslic_mlt_version.o \ |
| 51 | usr_line.o \ |
| 52 | si_adt.o |
| 53 | |
| 54 | ifeq ($(SI3217X_SUPPORT),y) |
| 55 | EXTRA_CFLAGS += -DSI3217X_SUPPORT |
| 56 | EXTRA_CFLAGS += -DSILAB_SUPPORT_LCQC |
| 57 | |
| 58 | slic-objs += $(SRC)/si3217x_MULTI_BOM_constants.o \ |
| 59 | $(SRC)/si3217x_patch_B_BB_2012DEC10.o \ |
| 60 | $(SRC)/si3217x_patch_B_FB_2012DEC10.o \ |
| 61 | $(SRC)/si3217x_patch_C_FB_2014JUN18.o \ |
| 62 | $(SRC)/si3217x_revb_intf.o \ |
| 63 | $(SRC)/si3217x_revc_intf.o \ |
| 64 | $(SRC)/si3217x_intf.o \ |
| 65 | $(MLT_SRC)/si3217x_mlt.o \ |
| 66 | $(SRC)/vdaa.o \ |
| 67 | $(SRC)/vdaa_constants.o |
| 68 | |
| 69 | endif |
| 70 | |
| 71 | ifeq ($(SI3218X_SUPPORT),y) |
| 72 | EXTRA_CFLAGS += -DSI3218X_SUPPORT |
| 73 | EXTRA_CFLAGS += -DSILAB_SUPPORT_LCQC |
| 74 | |
| 75 | slic-objs += $(SRC)/si3218x_MULTI_BOM_constants.o \ |
| 76 | $(SRC)/si3218x_patch_A_2016DEC06.o \ |
| 77 | $(SRC)/si3218x_intf.o \ |
| 78 | $(MLT_SRC)/si3218x_mlt.o \ |
| 79 | $(SRC)/vdaa.o \ |
| 80 | $(SRC)/vdaa_constants.o |
| 81 | |
| 82 | endif |
| 83 | ifeq ($(SI3218X_SPI_SELECT_STDSPI),y) |
| 84 | EXTRA_CFLAGS += -DUSE_STD_SPI_SLIC |
| 85 | else |
| 86 | EXTRA_CFLAGS += -DUSE_GPIO_SPI_SLIC |
| 87 | |
| 88 | endif |
| 89 | |
| 90 | ifeq ($(CHIP_TYPE),zx297520v3) |
| 91 | EXTRA_CFLAGS += -DUSE_SLIC_ON_7520V3 |
| 92 | else |
| 93 | EXTRA_CFLAGS += -DUSE_SLIC_ON_7520V2 |
| 94 | endif |
| 95 | |