NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
i2c.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2017, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA CORPORATION and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
9  */
10 
18 #ifndef INCLUDED_I2C_H
19 #define INCLUDED_I2C_H
20 
29 #include <nvcommon.h>
30 
35 typedef enum QbI2cInstanceRec
36 {
44  QbI2cInstance_Force32 = 0x7fffffff
46 
48 {
49  // Register map
50  NvU32 RegPhyBase;
51  NvU32 RegLen;
52  NvU32 RegVirtBase;
54 };
55 
56 /* PlaceHolder for PlatformData */
57 struct QbI2cInfo
58 {
59 };
60 
65 {
67  NvU32 SlaveAddress;
68 
71 
73  NvU32 Offset;
74 
76  NvU8 *pDataBuffer;
77 
79  NvU32 NumBytes;
80 };
81 
82 #define QB_I2C_IOCTL_SEND 0
83 #define QB_I2C_IOCTL_RECV 1
84 #define BC_CLEAR_ENABLE 1
85 #define BC_SCLK_THRESHOLD_CYCLES 9
86 
90 NvError QbI2cInit(void);
91 
94 #endif // _QB_I2C_H_
NvError QbI2cInit(void)
Register I2C driver to driver framework.
Definition: i2c.h:57
NvBool Is10BitAddress
Holds the I2C 10-bit address.
Definition: i2c.h:70
Holds the I2C transfer.
Definition: i2c.h:64
NvU32 RegPhyBase
Definition: i2c.h:50
enum QbI2cInstanceRec QbI2cInstance
Defines the I2C controller instance.
NvU8 * pDataBuffer
Holds the data buffer pointer.
Definition: i2c.h:76
NvError
The NvError enumeration contains ALL return / error codes.
Definition: nverror.h:36
QbI2cInstanceRec
Defines the I2C controller instance.
Definition: i2c.h:35
NvU32 Offset
Holds the offset in the SlaveAddress.
Definition: i2c.h:73
NvU32 RegVirtBase
Definition: i2c.h:52
NvU32 RegLen
Definition: i2c.h:51
NvU16 DeviceAddress
Definition: i2c.h:53
NvU32 SlaveAddress
Holds the slave DeviceAddress.
Definition: i2c.h:67
NvU32 NumBytes
Holds the number of bytes.
Definition: i2c.h:79