blob: 5fa4d42986491e341806a9621ec43e492cde6ba6 [file] [log] [blame]
developere0cea0f2021-12-16 16:08:26 +08001/* SPDX-License-Identifier: GPL-2.0 */
2
3#include <linux/spi/spi.h>
4#include "inc/proslic.h"
5#include "timer.h"
6#include "spi.h"
7
8#if 1
9#include "inc/si3218x.h"
10#include "inc/si3218x_intf.h"
11#include "config_inc/si3218x_LCCB_constants.h"
12#endif
13
14typedef struct chanStatus chanState; //forward declaration
15
16typedef void (*procState) (chanState *pState, ProslicInt eInput);
17
18/*
19** structure to hold state information for pbx demo
20*/
21struct chanStatus {
22 proslicChanType *ProObj;
23 SiVoiceChanType_ptr VoiceObj;
24 timeStamp onHookTime;
25 timeStamp offHookTime;
26 procState currentState;
27 uInt16 digitCount;
28 uInt8 digits[20];
29 uInt8 ringCount;
30 uInt16 connectionWith;
31 uInt16 powerAlarmCount;
32 pulseDialType pulseDialData;
33 BOOLEAN eventEnable;
34} __attribute__((aligned(32)));
35
36struct si3218x_chip {
37 struct spi_device *spi;
38 struct device *dev;
39 struct snd_soc_component *component;
40};
41
42/* Export function */
43int si3218x_spi_probe(struct spi_device *spi, struct spi_driver *spi_drv);
44int si3218x_spi_remove(struct spi_device *spi);