mediatek: add patches for 5.15 and kernel config for mt7622
[openwrt/openwrt.git] / target / linux / mediatek / files / drivers / net / phy / rtk / rtl8367c / include / rtl8367c_asicdrv_i2c.h
1 /*
2 * Copyright (C) 2013 Realtek Semiconductor Corp.
3 * All Rights Reserved.
4 *
5 * Unless you and Realtek execute a separate written software license
6 * agreement governing use of this software, this software is licensed
7 * to you under the terms of the GNU General Public License version 2,
8 * available at https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
9 *
10 * $Revision: 38651 $
11 * $Date: 2016-02-27 14:32:56 +0800 (©P¤T, 17 ¥|¤ë 2016) $
12 *
13 * Purpose : RTL8367C switch high-level API for RTL8367C
14 * Feature : I2C related functions
15 *
16 */
17
18
19 #ifndef _RTL8367C_ASICDRV_I2C_H_
20 #define _RTL8367C_ASICDRV_I2C_H_
21 #include <rtk_types.h>
22 #include <rtl8367c_asicdrv.h>
23
24
25 #define TIMEROUT_FOR_MICROSEMI (0x400)
26
27 #define GPIO_INPUT 1
28 #define GPIO_OUTPUT 2
29
30 extern ret_t rtl8367c_setAsicI2C_checkBusIdle(void);
31 extern ret_t rtl8367c_setAsicI2CStartCmd(void);
32 extern ret_t rtl8367c_setAsicI2CStopCmd(void);
33 extern ret_t rtl8367c_setAsicI2CTxOneCharCmd(rtk_uint8 oneChar);
34 extern ret_t rtl8367c_setAsicI2CcheckRxAck(void);
35 extern ret_t rtl8367c_setAsicI2CRxOneCharCmd(rtk_uint8 *pValue);
36 extern ret_t rtl8367c_setAsicI2CTxAckCmd(void);
37 extern ret_t rtl8367c_setAsicI2CTxNoAckCmd(void);
38 extern ret_t rtl8367c_setAsicI2CSoftRSTseqCmd(void);
39 extern ret_t rtl8367c_setAsicI2CGpioPinGroup(rtk_uint32 pinGroup_ID);
40 extern ret_t rtl8367c_getAsicI2CGpioPinGroup(rtk_uint32 * pPinGroup_ID);
41
42
43
44
45
46 #endif /*#ifndef _RTL8367C_ASICDRV_I2C_H_*/
47