
/**

 * @file   mstdrv.h

 * @brief  Contains common definitions for GPIO control 

 *

 * Copyright (c) 2020 Samsung Electronics Co., Ltd.

 **/

#ifndef __MSTDRV_H__
#define __MSTDRV_H__

/* MST gpio group number */
#define GPIO_VECIDX_MST_EN	0
#define GPIO_VECIDX_MST_DATA	1

/* MST gpio pin number */
#ifdef S5E8825
#define GPIO_MST_EN_PIN		1
#define GPIO_MST_DATA_PIN	0
#elif S5E9925
#define GPIO_MST_EN_PIN		1
#define GPIO_MST_DATA_PIN	0
#elif EXYNOS2100
#define GPIO_MST_EN_PIN		1
#define GPIO_MST_DATA_PIN	0
#elif EXYNOS9830
#define GPIO_MST_EN_PIN		7
#define GPIO_MST_DATA_PIN	6
#elif EXYNOS9820
#define GPIO_MST_EN_PIN		5
#define GPIO_MST_DATA_PIN	4
#elif EXYNOS7904
#ifdef A30
#define GPIO_MST_EN_PIN		6
#define GPIO_MST_DATA_PIN	0
#else /* A40 */
#define GPIO_MST_EN_PIN		0
#define GPIO_MST_DATA_PIN	2
#endif
#elif EXYNOS9630
#define GPIO_MST_EN_PIN		1
#define GPIO_MST_DATA_PIN	0
#elif EXYNOS9610
#define GPIO_MST_EN_PIN		0
#define GPIO_MST_DATA_PIN	0
#elif MT6769T
#define GPIO_MST_EN_PIN		21
#define GPIO_MST_DATA_PIN	23
#elif MT6853
#define GPIO_MST_EN_PIN		40
#define GPIO_MST_DATA_PIN	39
#elif MT6833
#define GPIO_MST_EN_PIN		58
#define GPIO_MST_DATA_PIN	56
#elif MT6877
#define GPIO_MST_EN_PIN		139
#define GPIO_MST_DATA_PIN	138
#endif

/* MST transmit */
int transmitMST(unsigned char * input);
bool check_valid_mem_for_trackdata(unsigned char *track_data, unsigned int size);

#endif /* __MSTDRV_H__ */
