/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
/*
 * Copyright (c) 2020 MediaTek Inc.
 */

#ifndef MTK_MSB9121_CORE_H
#define MTK_MSB9121_CORE_H
#include <media/dvb_ca_en50221.h>
//#include "mtk_pcmcia_resource.h"
//#include "mtk_pcmcia_interrupt.h"
//#include "mtk_pcmcia_clock.h"




struct mtk_dvb_ci_msb9121 {
struct spi_device *pdev;
//struct mdrv_ci_res resource;
//struct mdrv_ci_int interrupt;
//struct mdrv_ci_clk clock;
//struct dvb_ca_en50221 ca;
//struct dvb_adapter *adapter;
struct gpio_desc *ci_power_en;
struct gpio_desc *ci_reset;
int reg_ts0_tx_drv;
int reg_clk_fromcard_c1_sample;
int ci_irq;
};

ssize_t mtk_msb9121_to_spi_read(const char *txbuf, size_t txlen, char *buf, size_t len, char *buf1, size_t len1);
ssize_t mtk_msb9121_to_spi_write(const char *buf1, size_t n1, const char *buf2, size_t n2, char burst_mode);
void mtk_msb9121_set_spi(u32	max_speed_hz);
void mtk_msb9121_set_spi_dual_mode(void);
void mtk_msb9121_set_spi_single_mode(void);
int mtk_msb9121_reset(struct gpio_desc *ci_reset);
int mtk_pcmcia_reset_companion_chip(void);
int mtk_msb9121_ci_power_en(int ci_power_en);



#endif /* MTK_MSB9121_H */
