summaryrefslogtreecommitdiff
path: root/chip/mchp/i2c_chip.h
blob: c8ceb98d045c714c2d97bbcda1af6653880da515 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* Copyright 2021 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

/* MCHP-specific I2C module for Chrome EC */

#ifndef _I2C_CHIP_H
#define _I2C_CHIP_H

#ifdef __cplusplus
extern "C" {
#endif

/* Place any C interfaces here */

/*
 * Function returns the controller for I2C.
 *
 * Default function assigns controller for I2C port with modulo operation. If
 * the I2C ports used are greater than MCHP_I2C_CTRL_MAX, then I2C ports will
 * share the controller. Typically Type-C chips need individual controller per
 * port because of heavy I2C transactions. Hence, define a board specific
 * controller assignment when the I2C ports used are greater than
 * MCHP_I2C_CTRL_MAX.
 */
__override_proto int board_i2c_p2c(int port);

#ifdef __cplusplus
}
#endif

#endif /* _I2C_CHIP_H */