developer | e0cea0f | 2021-12-16 16:08:26 +0800 | [diff] [blame] | 1 | /* 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 | |
| 14 | typedef struct chanStatus chanState; //forward declaration |
| 15 | |
| 16 | typedef void (*procState) (chanState *pState, ProslicInt eInput); |
| 17 | |
| 18 | /* |
| 19 | ** structure to hold state information for pbx demo |
| 20 | */ |
| 21 | struct 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 | |
| 36 | struct si3218x_chip { |
| 37 | struct spi_device *spi; |
| 38 | struct device *dev; |
| 39 | struct snd_soc_component *component; |
| 40 | }; |
| 41 | |
| 42 | /* Export function */ |
| 43 | int si3218x_spi_probe(struct spi_device *spi, struct spi_driver *spi_drv); |
| 44 | int si3218x_spi_remove(struct spi_device *spi); |