Merge "pci: msm: using i2c client "of_node" to read pcieX_i2c_ctrl properties"
This commit is contained in:
commit
f984fc3cf1
@ -1063,7 +1063,6 @@ enum i2c_client_id {
|
||||
};
|
||||
|
||||
struct i2c_driver_data {
|
||||
int rc_index;
|
||||
enum i2c_client_id client_id;
|
||||
};
|
||||
#endif
|
||||
@ -8297,7 +8296,7 @@ static int msm_pcie_i2c_ctrl_init(struct msm_pcie_dev_t *pcie_dev)
|
||||
}
|
||||
}
|
||||
|
||||
i2c_client_node = of_get_child_by_name(of_node, "pcie_i2c_ctrl");
|
||||
i2c_client_node = i2c_ctrl->client->dev.of_node;
|
||||
if (!i2c_client_node) {
|
||||
PCIE_ERR(pcie_dev,
|
||||
"PCIe: RC%d: No i2c slave node phandle found\n",
|
||||
@ -9997,7 +9996,6 @@ static void msm_pcie_drv_connect_worker(struct work_struct *work)
|
||||
|
||||
#if IS_ENABLED(CONFIG_I2C)
|
||||
static const struct i2c_driver_data ntn3_data = {
|
||||
.rc_index = 0,
|
||||
.client_id = I2C_CLIENT_ID_NTN3,
|
||||
};
|
||||
|
||||
@ -10030,10 +10028,13 @@ static int pcie_i2c_ctrl_probe(struct i2c_client *client,
|
||||
}
|
||||
|
||||
data = (struct i2c_driver_data *)match->data;
|
||||
rc_index = data->rc_index;
|
||||
client_id = data->client_id;
|
||||
}
|
||||
|
||||
of_property_read_u32(client->dev.of_node, "rc-index", &rc_index);
|
||||
|
||||
dev_info(&client->dev, "%s: PCIe rc-index: 0x%X\n", __func__, rc_index);
|
||||
|
||||
if (rc_index >= MAX_RC_NUM) {
|
||||
dev_err(&client->dev, "invalid RC index %d\n", rc_index);
|
||||
return -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user