blob: 280e7e7f47888b7f6c33cdad93bd8d6c306cffcf [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001ifeq ($(CONFIG_SI3217X),y)
2SI3217X_SUPPORT=y
3SILAB_SUPPORT_LCQC=y
4endif
5ifeq ($(CONFIG_SI3217X),m)
6SI3217X_SUPPORT=y
7SILAB_SUPPORT_LCQC=y
8endif
9
10ifeq ($(CONFIG_SI3218X),y)
11SI3218X_SUPPORT=y
12SILAB_SUPPORT_LCQC=y
13SI3218X_SPI_SELECT_STDSPI=y
14endif
15ifeq ($(CONFIG_SI3218X),m)
16SI3218X_SUPPORT=y
17SILAB_SUPPORT_LCQC=y
18SI3218X_SPI_SELECT_STDSPI=y
19endif
20
21obj-$(CONFIG_SI3217X) +=slic.o
22obj-$(CONFIG_SI3218X) +=slic.o
23
24EXTRA_CFLAGS += -Wno-format-extra-args -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function
25EXTRA_CFLAGS += -Wno-format -Wno-return-type -Wno-strict-prototypes -Wno-unused -Wno-implicit -D__KERNEL__ -DLINUX_KERNEL
26
27DRV_OBJS = $(MOD_NMAE).o
28
29ccflags-y+= -Idrivers/slic/si_lib/include
30ccflags-y+= -Idrivers/slic/
31ccflags-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
34ccflags-y += -I$(TOPDIR_AP)/../cp/ps/driver/inc/misc
35ccflags-y += -I$(TOPDIR_AP)/os/linux/linux-3.4.x/sound/soc/sanechips
36ccflags-y += -I$(TOPDIR_AP)/os/linux/linux-3.4.x/include/linux
37
38SRC = si_lib/source
39MLT_SRC = silicon_mlt/source
40
41slic-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
54ifeq ($(SI3217X_SUPPORT),y)
55EXTRA_CFLAGS += -DSI3217X_SUPPORT
56EXTRA_CFLAGS += -DSILAB_SUPPORT_LCQC
57
58slic-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
69endif
70
71ifeq ($(SI3218X_SUPPORT),y)
72EXTRA_CFLAGS += -DSI3218X_SUPPORT
73EXTRA_CFLAGS += -DSILAB_SUPPORT_LCQC
74
75slic-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
82endif
83ifeq ($(SI3218X_SPI_SELECT_STDSPI),y)
84EXTRA_CFLAGS += -DUSE_STD_SPI_SLIC
85else
86EXTRA_CFLAGS += -DUSE_GPIO_SPI_SLIC
87
88endif
89
90ifeq ($(CHIP_TYPE),zx297520v3)
91EXTRA_CFLAGS += -DUSE_SLIC_ON_7520V3
92else
93EXTRA_CFLAGS += -DUSE_SLIC_ON_7520V2
94endif
95