Skip to contentSkip to conversation

i2c: buses: add i2c bus driver for NVIDIA GPU

PATCH Superseded Ajay Gupta 1 participant 1 message Aug 31, 2018 USB

v4 of 15 Superseded Latest is v15 →

lore
Share & tools
lore

Ajay Gupta

author
#0 lore raw

PATCH v4 1/2 i2c: buses: add i2c bus driver for NVIDIA GPU

Hi Andy

Quoted 8 lines
Quoted 6 lines

Review

Quoted 4 lines

Latest NVIDIA GPU card has USB Type-C interface. There is a Type-C controller which can be accessed over I2C.

(quoted diff) +2 -0
+       val &= ~(I2C_MST_CNTL_GEN_START | I2C_MST_CNTL_GEN_STOP
+               | I2C_MST_CNTL_GEN_RAB);

"|" should be on previous line to follow common style in this module.

The "|" here is to clear the bit together. [val &= ~(X | Y | Z)] Style in this module is still followed. Please see first line which does "|" to val.

Ok, I got your point of putting "|" on line above and will fix it.

Thanks
Ajay

--
nvpublic
--

Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
(quoted diff) +10 -0
+       writel(val, i2cd->regs + I2C_MST_CNTL);
+
+       return i2c_check_status(i2cd); }
+
+static int gpu_i2c_master_xfer(struct i2c_adapter *adap,
+                              struct i2c_msg *msgs, int num) {
+       struct gpu_i2c_dev *i2cd = i2c_get_adapdata(adap);
+       struct device *dev = i2cd->dev;
+       int status;
+       int i, j;