2024-03-29 17:01:53

by Easwar Hariharan

[permalink] [raw]
Subject: [PATCH v0 00/14] Make I2C terminology more inclusive for I2C Algobit and consumers

I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
with more appropriate terms. Inspired by and following on to Wolfram's
series to fix drivers/i2c/[1], fix the terminology for users of the
I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
in the specification.

Compile tested, no functionality changes intended

The last patch updating the .master_xfer method to .xfer depends on
patch 1 of Wolfram's series below, but the series is otherwise
independent. It may make sense for the last patch to go in with
Wolfram's patch series via the I2C tree. Please chime in with your
opinions and suggestions.

This series is based on v6.9-rc1.

[1]: https://lore.kernel.org/all/[email protected]/

Easwar Hariharan (14):
IB/hfi1, IB/qib: Make I2C terminology more inclusive
drm/amdgpu,drm/radeon: Make I2C terminology more inclusive
drm/gma500,drm/i915: Make I2C terminology more inclusive
media: au0828: Make I2C terminology more inclusive
media: cobalt: Make I2C terminology more inclusive
media: cx18: Make I2C terminology more inclusive
media: cx25821: Make I2C terminology more inclusive
media: ivtv: Make I2C terminology more inclusive
media: cx23885: Make I2C terminology more inclusive
sfc: falcon: Make I2C terminology more inclusive
fbdev/smscufx: Make I2C terminology more inclusive
fbdev/viafb: Make I2C terminology more inclusive
drm/nouveau: Make I2C terminology more inclusive
i2c and treewide: Make I2C terminology more inclusive

.../gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 8 ++---
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 12 +++----
drivers/gpu/drm/amd/amdgpu/atombios_i2c.c | 8 ++---
drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c | 18 +++++-----
.../gpu/drm/amd/display/dc/bios/bios_parser.c | 2 +-
.../drm/amd/display/dc/bios/bios_parser2.c | 2 +-
.../drm/amd/display/dc/core/dc_link_exports.c | 4 +--
drivers/gpu/drm/amd/display/dc/dc.h | 2 +-
drivers/gpu/drm/amd/display/dc/dce/dce_i2c.c | 4 +--
.../display/include/grph_object_ctrl_defs.h | 2 +-
drivers/gpu/drm/amd/include/atombios.h | 2 +-
drivers/gpu/drm/amd/include/atomfirmware.h | 26 +++++++-------
.../powerplay/hwmgr/vega20_processpptables.c | 4 +--
.../amd/pm/powerplay/inc/smu11_driver_if.h | 2 +-
.../inc/pmfw_if/smu11_driver_if_arcturus.h | 2 +-
.../inc/pmfw_if/smu11_driver_if_navi10.h | 2 +-
.../pmfw_if/smu11_driver_if_sienna_cichlid.h | 2 +-
.../inc/pmfw_if/smu13_driver_if_aldebaran.h | 2 +-
.../inc/pmfw_if/smu13_driver_if_v13_0_0.h | 2 +-
.../inc/pmfw_if/smu13_driver_if_v13_0_7.h | 2 +-
.../gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 4 +--
.../amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 8 ++---
drivers/gpu/drm/gma500/cdv_intel_dp.c | 2 +-
drivers/gpu/drm/gma500/cdv_intel_lvds.c | 2 +-
drivers/gpu/drm/gma500/intel_bios.c | 22 ++++++------
drivers/gpu/drm/gma500/intel_bios.h | 4 +--
drivers/gpu/drm/gma500/intel_gmbus.c | 6 ++--
drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c | 2 +-
drivers/gpu/drm/gma500/psb_drv.h | 2 +-
drivers/gpu/drm/gma500/psb_intel_drv.h | 2 +-
drivers/gpu/drm/gma500/psb_intel_lvds.c | 4 +--
drivers/gpu/drm/gma500/psb_intel_sdvo.c | 28 +++++++--------
drivers/gpu/drm/i915/display/dvo_ch7017.c | 14 ++++----
drivers/gpu/drm/i915/display/dvo_ch7xxx.c | 18 +++++-----
drivers/gpu/drm/i915/display/dvo_ivch.c | 16 ++++-----
drivers/gpu/drm/i915/display/dvo_ns2501.c | 18 +++++-----
drivers/gpu/drm/i915/display/dvo_sil164.c | 18 +++++-----
drivers/gpu/drm/i915/display/dvo_tfp410.c | 18 +++++-----
drivers/gpu/drm/i915/display/intel_bios.c | 22 ++++++------
drivers/gpu/drm/i915/display/intel_ddi.c | 2 +-
.../gpu/drm/i915/display/intel_display_core.h | 2 +-
drivers/gpu/drm/i915/display/intel_dsi.h | 2 +-
drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 18 +++++-----
drivers/gpu/drm/i915/display/intel_dvo.c | 14 ++++----
drivers/gpu/drm/i915/display/intel_dvo_dev.h | 2 +-
drivers/gpu/drm/i915/display/intel_gmbus.c | 8 ++---
drivers/gpu/drm/i915/display/intel_sdvo.c | 34 +++++++++---------
drivers/gpu/drm/i915/display/intel_vbt_defs.h | 4 +--
drivers/gpu/drm/i915/gvt/edid.c | 28 +++++++--------
drivers/gpu/drm/i915/gvt/edid.h | 4 +--
drivers/gpu/drm/i915/gvt/opregion.c | 2 +-
drivers/gpu/drm/nouveau/dispnv04/dfp.c | 14 ++++----
.../nouveau/include/nvkm/subdev/bios/dcb.h | 2 +-
drivers/gpu/drm/nouveau/nouveau_bios.c | 4 +--
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c | 2 +-
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c | 2 +-
drivers/gpu/drm/radeon/atombios.h | 2 +-
drivers/gpu/drm/radeon/atombios_i2c.c | 4 +--
drivers/gpu/drm/radeon/radeon_combios.c | 28 +++++++--------
drivers/gpu/drm/radeon/radeon_i2c.c | 14 ++++----
drivers/gpu/drm/radeon/radeon_mode.h | 6 ++--
drivers/i2c/algos/i2c-algo-bit.c | 12 +++----
drivers/infiniband/hw/hfi1/chip.c | 6 ++--
drivers/infiniband/hw/hfi1/chip.h | 2 +-
drivers/infiniband/hw/hfi1/chip_registers.h | 2 +-
drivers/infiniband/hw/hfi1/file_ops.c | 2 +-
drivers/infiniband/hw/hfi1/firmware.c | 22 ++++++------
drivers/infiniband/hw/hfi1/pcie.c | 2 +-
drivers/infiniband/hw/hfi1/qsfp.c | 36 +++++++++----------
drivers/infiniband/hw/hfi1/user_exp_rcv.c | 2 +-
drivers/infiniband/hw/qib/qib_twsi.c | 6 ++--
drivers/media/pci/bt8xx/bttv-i2c.c | 2 +-
drivers/media/pci/cobalt/cobalt-i2c.c | 8 ++---
drivers/media/pci/cx18/cx18-av-firmware.c | 8 ++---
drivers/media/pci/cx18/cx18-cards.c | 6 ++--
drivers/media/pci/cx18/cx18-cards.h | 4 +--
drivers/media/pci/cx18/cx18-gpio.c | 6 ++--
drivers/media/pci/cx23885/cx23885-f300.c | 8 ++---
drivers/media/pci/cx23885/cx23885-i2c.c | 8 ++---
drivers/media/pci/cx25821/cx25821-i2c.c | 8 ++---
drivers/media/pci/dm1105/dm1105.c | 2 +-
drivers/media/pci/ivtv/ivtv-i2c.c | 18 +++++-----
drivers/media/pci/saa7164/saa7164-i2c.c | 2 +-
drivers/media/usb/au0828/au0828-i2c.c | 6 ++--
drivers/media/usb/au0828/au0828-input.c | 2 +-
drivers/net/ethernet/sfc/falcon/falcon.c | 2 +-
drivers/video/fbdev/mb862xx/mb862xx-i2c.c | 2 +-
drivers/video/fbdev/smscufx.c | 4 +--
drivers/video/fbdev/via/chip.h | 8 ++---
drivers/video/fbdev/via/dvi.c | 24 ++++++-------
drivers/video/fbdev/via/lcd.c | 6 ++--
drivers/video/fbdev/via/via_aux.h | 2 +-
drivers/video/fbdev/via/via_i2c.c | 12 +++----
drivers/video/fbdev/via/vt1636.c | 6 ++--
94 files changed, 381 insertions(+), 381 deletions(-)

--
2.34.1



2024-03-29 17:02:19

by Easwar Hariharan

[permalink] [raw]
Subject: [PATCH v0 01/14] IB/hfi1, IB/qib: Make I2C terminology more inclusive

I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
with more appropriate terms. Inspired by and following on to Wolfram's series
to fix drivers/i2c[1], fix the terminology where I had a role to play, now that
the approved verbiage exists in the specification.

Compile tested, no functionality changes intended

[1]: https://lore.kernel.org/all/[email protected]/

Signed-off-by: Easwar Hariharan <[email protected]>
---
drivers/infiniband/hw/hfi1/chip.c | 6 ++--
drivers/infiniband/hw/hfi1/chip.h | 2 +-
drivers/infiniband/hw/hfi1/chip_registers.h | 2 +-
drivers/infiniband/hw/hfi1/file_ops.c | 2 +-
drivers/infiniband/hw/hfi1/firmware.c | 22 ++++++-------
drivers/infiniband/hw/hfi1/pcie.c | 2 +-
drivers/infiniband/hw/hfi1/qsfp.c | 36 ++++++++++-----------
drivers/infiniband/hw/hfi1/user_exp_rcv.c | 2 +-
drivers/infiniband/hw/qib/qib_twsi.c | 6 ++--
9 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/drivers/infiniband/hw/hfi1/chip.c b/drivers/infiniband/hw/hfi1/chip.c
index 78f27f7b4203..5fb8d583d152 100644
--- a/drivers/infiniband/hw/hfi1/chip.c
+++ b/drivers/infiniband/hw/hfi1/chip.c
@@ -9761,7 +9761,7 @@ static void init_lcb(struct hfi1_devdata *dd)
/* set LCB for cclk loopback on the port */
write_csr(dd, DC_LCB_CFG_TX_FIFOS_RESET, 0x01);
write_csr(dd, DC_LCB_CFG_LANE_WIDTH, 0x00);
- write_csr(dd, DC_LCB_CFG_REINIT_AS_SLAVE, 0x00);
+ write_csr(dd, DC_LCB_CFG_REINIT_AS_TARGET, 0x00);
write_csr(dd, DC_LCB_CFG_CNT_FOR_SKIP_STALL, 0x110);
write_csr(dd, DC_LCB_CFG_CLK_CNTR, 0x08);
write_csr(dd, DC_LCB_CFG_LOOPBACK, 0x02);
@@ -10371,7 +10371,7 @@ static void force_logical_link_state_down(struct hfi1_pportdata *ppd)
DC_LCB_CFG_IGNORE_LOST_RCLK_EN_SMASK);

write_csr(dd, DC_LCB_CFG_LANE_WIDTH, 0);
- write_csr(dd, DC_LCB_CFG_REINIT_AS_SLAVE, 0);
+ write_csr(dd, DC_LCB_CFG_REINIT_AS_TARGET, 0);
write_csr(dd, DC_LCB_CFG_CNT_FOR_SKIP_STALL, 0x110);
write_csr(dd, DC_LCB_CFG_LOOPBACK, 0x2);

@@ -15390,7 +15390,7 @@ u64 create_pbc(struct hfi1_pportdata *ppd, u64 flags, int srate_mbs, u32 vl,
* Initialize the thermal sensor.
*
* After initialization, enable polling of thermal sensor through
- * SBus interface. In order for this to work, the SBus Master
+ * SBus interface. In order for this to work, the SBus Controller
* firmware has to be loaded due to the fact that the HW polling
* logic uses SBus interrupts, which are not supported with
* default firmware. Otherwise, no data will be returned through
diff --git a/drivers/infiniband/hw/hfi1/chip.h b/drivers/infiniband/hw/hfi1/chip.h
index d861aa8fc640..631090383bd6 100644
--- a/drivers/infiniband/hw/hfi1/chip.h
+++ b/drivers/infiniband/hw/hfi1/chip.h
@@ -667,7 +667,7 @@ u64 create_pbc(struct hfi1_pportdata *ppd, u64 flags, int srate_mbs, u32 vl,
u32 dw_len);

/* firmware.c */
-#define SBUS_MASTER_BROADCAST 0xfd
+#define SBUS_CONTROLLER_BROADCAST 0xfd
#define NUM_PCIE_SERDES 16 /* number of PCIe serdes on the SBus */
extern const u8 pcie_serdes_broadcast[];
extern const u8 pcie_pcs_addrs[2][NUM_PCIE_SERDES];
diff --git a/drivers/infiniband/hw/hfi1/chip_registers.h b/drivers/infiniband/hw/hfi1/chip_registers.h
index d79e25d20fb8..d4111e136468 100644
--- a/drivers/infiniband/hw/hfi1/chip_registers.h
+++ b/drivers/infiniband/hw/hfi1/chip_registers.h
@@ -276,7 +276,7 @@
#define DC_LCB_CFG_TX_FIFOS_RADR_RST_VAL_SHIFT 0
#define DC_LCB_CFG_TX_FIFOS_RESET (DC_LCB_CSRS + 0x000000000008)
#define DC_LCB_CFG_TX_FIFOS_RESET_VAL_SHIFT 0
-#define DC_LCB_CFG_REINIT_AS_SLAVE (DC_LCB_CSRS + 0x000000000030)
+#define DC_LCB_CFG_REINIT_AS_TARGET (DC_LCB_CSRS + 0x000000000030)
#define DC_LCB_CFG_CNT_FOR_SKIP_STALL (DC_LCB_CSRS + 0x000000000040)
#define DC_LCB_CFG_CLK_CNTR (DC_LCB_CSRS + 0x000000000110)
#define DC_LCB_ERR_CLR (DC_LCB_CSRS + 0x000000000308)
diff --git a/drivers/infiniband/hw/hfi1/file_ops.c b/drivers/infiniband/hw/hfi1/file_ops.c
index 503abec709c9..dd22c36cec78 100644
--- a/drivers/infiniband/hw/hfi1/file_ops.c
+++ b/drivers/infiniband/hw/hfi1/file_ops.c
@@ -1044,7 +1044,7 @@ static int setup_subctxt(struct hfi1_ctxtdata *uctxt)
if (!uctxt->subctxt_uregbase)
return -ENOMEM;

- /* We can take the size of the RcvHdr Queue from the master */
+ /* We can take the size of the RcvHdr Queue from the parent */
uctxt->subctxt_rcvhdr_base = vmalloc_user(rcvhdrq_size(uctxt) *
num_subctxts);
if (!uctxt->subctxt_rcvhdr_base) {
diff --git a/drivers/infiniband/hw/hfi1/firmware.c b/drivers/infiniband/hw/hfi1/firmware.c
index 3c228aeaaf81..8e4a89f348f3 100644
--- a/drivers/infiniband/hw/hfi1/firmware.c
+++ b/drivers/infiniband/hw/hfi1/firmware.c
@@ -1100,7 +1100,7 @@ static void turn_off_spicos(struct hfi1_devdata *dd, int flags)
write_csr(dd, MISC_CFG_FW_CTRL, ENABLE_SPICO_SMASK);
/* disable SBus spico */
if (flags & SPICO_SBUS)
- sbus_request(dd, SBUS_MASTER_BROADCAST, 0x01,
+ sbus_request(dd, SBUS_CONTROLLER_BROADCAST, 0x01,
WRITE_SBUS_RECEIVER, 0x00000040);

/* disable the fabric serdes spicos */
@@ -1257,7 +1257,7 @@ static int load_sbus_firmware(struct hfi1_devdata *dd,
struct firmware_details *fdet)
{
int i, err;
- const u8 ra = SBUS_MASTER_BROADCAST; /* receiver address */
+ const u8 ra = SBUS_CONTROLLER_BROADCAST; /* receiver address */

dd_dev_info(dd, "Downloading SBus firmware\n");

@@ -1269,7 +1269,7 @@ static int load_sbus_firmware(struct hfi1_devdata *dd,
sbus_request(dd, ra, 0x01, WRITE_SBUS_RECEIVER, 0x00000240);
/* step 4: set starting IMEM address for burst download */
sbus_request(dd, ra, 0x03, WRITE_SBUS_RECEIVER, 0x80000000);
- /* step 5: download the SBus Master machine code */
+ /* step 5: download the SBus Controller machine code */
for (i = 0; i < fdet->firmware_len; i += 4) {
sbus_request(dd, ra, 0x14, WRITE_SBUS_RECEIVER,
*(u32 *)&fdet->firmware_ptr[i]);
@@ -1294,17 +1294,17 @@ static int load_pcie_serdes_firmware(struct hfi1_devdata *dd,
struct firmware_details *fdet)
{
int i;
- const u8 ra = SBUS_MASTER_BROADCAST; /* receiver address */
+ const u8 ra = SBUS_CONTROLLER_BROADCAST; /* receiver address */

dd_dev_info(dd, "Downloading PCIe firmware\n");

/* step 1: load security variables */
load_security_variables(dd, fdet);
- /* step 2: assert single step (halts the SBus Master spico) */
+ /* step 2: assert single step (halts the SBus Controller spico) */
sbus_request(dd, ra, 0x05, WRITE_SBUS_RECEIVER, 0x00000001);
/* step 3: enable XDMEM access */
sbus_request(dd, ra, 0x01, WRITE_SBUS_RECEIVER, 0x00000d40);
- /* step 4: load firmware into SBus Master XDMEM */
+ /* step 4: load firmware into SBus Controller XDMEM */
/*
* NOTE: the dmem address, write_en, and wdata are all pre-packed,
* we only need to pick up the bytes and write them
@@ -2190,13 +2190,13 @@ static void dump_fw_version(struct hfi1_devdata *dd)
/* set fast mode */
set_sbus_fast_mode(dd);

- /* read version for SBus Master */
- sbus_request(dd, SBUS_MASTER_BROADCAST, 0x02, WRITE_SBUS_RECEIVER, 0);
- sbus_request(dd, SBUS_MASTER_BROADCAST, 0x07, WRITE_SBUS_RECEIVER, 0x1);
+ /* read version for SBus Controller */
+ sbus_request(dd, SBUS_CONTROLLER_BROADCAST, 0x02, WRITE_SBUS_RECEIVER, 0);
+ sbus_request(dd, SBUS_CONTROLLER_BROADCAST, 0x07, WRITE_SBUS_RECEIVER, 0x1);
/* wait for interrupt to be processed */
usleep_range(10000, 11000);
- sbus_vers = sbus_read(dd, SBUS_MASTER_BROADCAST, 0x08, 0x1);
- dd_dev_info(dd, "SBus Master firmware version 0x%08x\n", sbus_vers);
+ sbus_vers = sbus_read(dd, SBUS_CONTROLLER_BROADCAST, 0x08, 0x1);
+ dd_dev_info(dd, "SBus Controller firmware version 0x%08x\n", sbus_vers);

/* read version for PCIe SerDes */
all_same = 1;
diff --git a/drivers/infiniband/hw/hfi1/pcie.c b/drivers/infiniband/hw/hfi1/pcie.c
index 119ec2f1382b..d9c545cfc000 100644
--- a/drivers/infiniband/hw/hfi1/pcie.c
+++ b/drivers/infiniband/hw/hfi1/pcie.c
@@ -1028,7 +1028,7 @@ int do_pcie_gen3_transition(struct hfi1_devdata *dd)
retry:
/* the SBus download will reset the spico for thermal */

- /* step 3: download SBus Master firmware */
+ /* step 3: download SBus Controller firmware */
/* step 4: download PCIe Gen3 SerDes firmware */
dd_dev_info(dd, "%s: downloading firmware\n", __func__);
ret = load_pcie_firmware(dd);
diff --git a/drivers/infiniband/hw/hfi1/qsfp.c b/drivers/infiniband/hw/hfi1/qsfp.c
index 52cce1c8b76a..7a5a014da0e9 100644
--- a/drivers/infiniband/hw/hfi1/qsfp.c
+++ b/drivers/infiniband/hw/hfi1/qsfp.c
@@ -171,7 +171,7 @@ void clean_up_i2c(struct hfi1_devdata *dd, struct hfi1_asic_data *ad)
}

static int i2c_bus_write(struct hfi1_devdata *dd, struct hfi1_i2c_bus *i2c,
- u8 slave_addr, int offset, int offset_size,
+ u8 client_addr, int offset, int offset_size,
u8 *data, u16 len)
{
int ret;
@@ -182,7 +182,7 @@ static int i2c_bus_write(struct hfi1_devdata *dd, struct hfi1_i2c_bus *i2c,
switch (offset_size) {
case 0:
num_msgs = 1;
- msgs[0].addr = slave_addr;
+ msgs[0].addr = client_addr;
msgs[0].flags = 0;
msgs[0].len = len;
msgs[0].buf = data;
@@ -194,12 +194,12 @@ static int i2c_bus_write(struct hfi1_devdata *dd, struct hfi1_i2c_bus *i2c,
num_msgs = 2;
offset_bytes[0] = offset & 0xff;

- msgs[0].addr = slave_addr;
+ msgs[0].addr = client_addr;
msgs[0].flags = 0;
msgs[0].len = offset_size;
msgs[0].buf = offset_bytes;

- msgs[1].addr = slave_addr;
+ msgs[1].addr = client_addr;
msgs[1].flags = I2C_M_NOSTART;
msgs[1].len = len;
msgs[1].buf = data;
@@ -211,15 +211,15 @@ static int i2c_bus_write(struct hfi1_devdata *dd, struct hfi1_i2c_bus *i2c,
i2c->controlling_dd = dd;
ret = i2c_transfer(&i2c->adapter, msgs, num_msgs);
if (ret != num_msgs) {
- dd_dev_err(dd, "%s: bus %d, i2c slave 0x%x, offset 0x%x, len 0x%x; write failed, ret %d\n",
- __func__, i2c->num, slave_addr, offset, len, ret);
+ dd_dev_err(dd, "%s: bus %d, i2c client 0x%x, offset 0x%x, len 0x%x; write failed, ret %d\n",
+ __func__, i2c->num, client_addr, offset, len, ret);
return ret < 0 ? ret : -EIO;
}
return 0;
}

static int i2c_bus_read(struct hfi1_devdata *dd, struct hfi1_i2c_bus *bus,
- u8 slave_addr, int offset, int offset_size,
+ u8 client_addr, int offset, int offset_size,
u8 *data, u16 len)
{
int ret;
@@ -230,7 +230,7 @@ static int i2c_bus_read(struct hfi1_devdata *dd, struct hfi1_i2c_bus *bus,
switch (offset_size) {
case 0:
num_msgs = 1;
- msgs[0].addr = slave_addr;
+ msgs[0].addr = client_addr;
msgs[0].flags = I2C_M_RD;
msgs[0].len = len;
msgs[0].buf = data;
@@ -242,12 +242,12 @@ static int i2c_bus_read(struct hfi1_devdata *dd, struct hfi1_i2c_bus *bus,
num_msgs = 2;
offset_bytes[0] = offset & 0xff;

- msgs[0].addr = slave_addr;
+ msgs[0].addr = client_addr;
msgs[0].flags = 0;
msgs[0].len = offset_size;
msgs[0].buf = offset_bytes;

- msgs[1].addr = slave_addr;
+ msgs[1].addr = client_addr;
msgs[1].flags = I2C_M_RD;
msgs[1].len = len;
msgs[1].buf = data;
@@ -259,8 +259,8 @@ static int i2c_bus_read(struct hfi1_devdata *dd, struct hfi1_i2c_bus *bus,
bus->controlling_dd = dd;
ret = i2c_transfer(&bus->adapter, msgs, num_msgs);
if (ret != num_msgs) {
- dd_dev_err(dd, "%s: bus %d, i2c slave 0x%x, offset 0x%x, len 0x%x; read failed, ret %d\n",
- __func__, bus->num, slave_addr, offset, len, ret);
+ dd_dev_err(dd, "%s: bus %d, i2c client 0x%x, offset 0x%x, len 0x%x; read failed, ret %d\n",
+ __func__, bus->num, client_addr, offset, len, ret);
return ret < 0 ? ret : -EIO;
}
return 0;
@@ -276,13 +276,13 @@ static int __i2c_write(struct hfi1_pportdata *ppd, u32 target, int i2c_addr,
{
struct hfi1_devdata *dd = ppd->dd;
struct hfi1_i2c_bus *bus;
- u8 slave_addr;
+ u8 client_addr;
int offset_size;

bus = target ? dd->asic_data->i2c_bus1 : dd->asic_data->i2c_bus0;
- slave_addr = (i2c_addr & 0xff) >> 1; /* convert to 7-bit addr */
+ client_addr = (i2c_addr & 0xff) >> 1; /* convert to 7-bit addr */
offset_size = (i2c_addr >> 8) & 0x3;
- return i2c_bus_write(dd, bus, slave_addr, offset, offset_size, bp, len);
+ return i2c_bus_write(dd, bus, client_addr, offset, offset_size, bp, len);
}

/*
@@ -315,13 +315,13 @@ static int __i2c_read(struct hfi1_pportdata *ppd, u32 target, int i2c_addr,
{
struct hfi1_devdata *dd = ppd->dd;
struct hfi1_i2c_bus *bus;
- u8 slave_addr;
+ u8 client_addr;
int offset_size;

bus = target ? dd->asic_data->i2c_bus1 : dd->asic_data->i2c_bus0;
- slave_addr = (i2c_addr & 0xff) >> 1; /* convert to 7-bit addr */
+ client_addr = (i2c_addr & 0xff) >> 1; /* convert to 7-bit addr */
offset_size = (i2c_addr >> 8) & 0x3;
- return i2c_bus_read(dd, bus, slave_addr, offset, offset_size, bp, len);
+ return i2c_bus_read(dd, bus, client_addr, offset, offset_size, bp, len);
}

/*
diff --git a/drivers/infiniband/hw/hfi1/user_exp_rcv.c b/drivers/infiniband/hw/hfi1/user_exp_rcv.c
index cf2d29098406..145e2396fd56 100644
--- a/drivers/infiniband/hw/hfi1/user_exp_rcv.c
+++ b/drivers/infiniband/hw/hfi1/user_exp_rcv.c
@@ -318,7 +318,7 @@ int hfi1_user_exp_rcv_setup(struct hfi1_filedata *fd,
tididx = 0;

/*
- * From this point on, we are going to be using shared (between master
+ * From this point on, we are going to be using shared (between parent
* and subcontexts) context resources. We need to take the lock.
*/
mutex_lock(&uctxt->exp_mutex);
diff --git a/drivers/infiniband/hw/qib/qib_twsi.c b/drivers/infiniband/hw/qib/qib_twsi.c
index 97b8a2bf5c69..c0bf2211599f 100644
--- a/drivers/infiniband/hw/qib/qib_twsi.c
+++ b/drivers/infiniband/hw/qib/qib_twsi.c
@@ -98,7 +98,7 @@ static void scl_out(struct qib_devdata *dd, u8 bit)
dd->f_gpio_mod(dd, 0, bit ? 0 : mask, mask);

/*
- * Allow for slow slaves by simple
+ * Allow for slow clients by simple
* delay for falling edge, sampling on rise.
*/
if (!bit)
@@ -292,13 +292,13 @@ int qib_twsi_reset(struct qib_devdata *dd)
while (clock_cycles_left--) {
scl_out(dd, 0);
scl_out(dd, 1);
- /* Note if SDA is high, but keep clocking to sync slave */
+ /* Note if SDA is high, but keep clocking to sync client */
was_high |= sda_in(dd, 0);
}

if (was_high) {
/*
- * We saw a high, which we hope means the slave is sync'd.
+ * We saw a high, which we hope means the client is sync'd.
* Issue START, STOP, pause for T_BUF.
*/

--
2.34.1


2024-03-29 17:02:45

by Easwar Hariharan

[permalink] [raw]
Subject: [PATCH v0 02/14] drm/amdgpu,drm/radeon: Make I2C terminology more inclusive

I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
with more appropriate terms. Inspired by and following on to Wolfram's
series to fix drivers/i2c/[1], fix the terminology for users of
I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
in the specification.

Compile tested, no functionality changes intended

[1]: https://lore.kernel.org/all/[email protected]/

Signed-off-by: Easwar Hariharan <[email protected]>
---
.../gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 8 +++---
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 10 +++----
drivers/gpu/drm/amd/amdgpu/atombios_i2c.c | 8 +++---
drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c | 16 +++++------
.../gpu/drm/amd/display/dc/bios/bios_parser.c | 2 +-
.../drm/amd/display/dc/bios/bios_parser2.c | 2 +-
.../drm/amd/display/dc/core/dc_link_exports.c | 4 +--
drivers/gpu/drm/amd/display/dc/dc.h | 2 +-
drivers/gpu/drm/amd/display/dc/dce/dce_i2c.c | 4 +--
.../display/include/grph_object_ctrl_defs.h | 2 +-
drivers/gpu/drm/amd/include/atombios.h | 2 +-
drivers/gpu/drm/amd/include/atomfirmware.h | 26 ++++++++---------
.../powerplay/hwmgr/vega20_processpptables.c | 4 +--
.../amd/pm/powerplay/inc/smu11_driver_if.h | 2 +-
.../inc/pmfw_if/smu11_driver_if_arcturus.h | 2 +-
.../inc/pmfw_if/smu11_driver_if_navi10.h | 2 +-
.../pmfw_if/smu11_driver_if_sienna_cichlid.h | 2 +-
.../inc/pmfw_if/smu13_driver_if_aldebaran.h | 2 +-
.../inc/pmfw_if/smu13_driver_if_v13_0_0.h | 2 +-
.../inc/pmfw_if/smu13_driver_if_v13_0_7.h | 2 +-
.../gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 4 +--
.../amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 8 +++---
drivers/gpu/drm/radeon/atombios.h | 2 +-
drivers/gpu/drm/radeon/atombios_i2c.c | 4 +--
drivers/gpu/drm/radeon/radeon_combios.c | 28 +++++++++----------
drivers/gpu/drm/radeon/radeon_i2c.c | 10 +++----
drivers/gpu/drm/radeon/radeon_mode.h | 6 ++--
27 files changed, 83 insertions(+), 83 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
index 6857c586ded7..8c2c3f2280cd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
@@ -614,7 +614,7 @@ bool amdgpu_atomfirmware_ras_rom_addr(struct amdgpu_device *adev,
if ((frev == 3 && crev >= 4) || (frev > 3)) {
firmware_info = (union firmware_info *)
(mode_info->atom_context->bios + data_offset);
- /* The ras_rom_i2c_slave_addr should ideally
+ /* The ras_rom_i2c_client_addr should ideally
* be a 19-bit EEPROM address, which would be
* used as is by the driver; see top of
* amdgpu_eeprom.c.
@@ -625,13 +625,13 @@ bool amdgpu_atomfirmware_ras_rom_addr(struct amdgpu_device *adev,
* leave the check for the pointer.
*
* The reason this works right now is because
- * ras_rom_i2c_slave_addr contains the EEPROM
+ * ras_rom_i2c_client_addr contains the EEPROM
* device type qualifier 1010b in the top 4
* bits.
*/
- if (firmware_info->v34.ras_rom_i2c_slave_addr) {
+ if (firmware_info->v34.ras_rom_i2c_client_addr) {
if (i2c_address)
- *i2c_address = firmware_info->v34.ras_rom_i2c_slave_addr;
+ *i2c_address = firmware_info->v34.ras_rom_i2c_client_addr;
return true;
}
}
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
index d79cb13e1aa8..a34626882b67 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
@@ -280,7 +280,7 @@ amdgpu_i2c_lookup(struct amdgpu_device *adev,
}

static void amdgpu_i2c_get_byte(struct amdgpu_i2c_chan *i2c_bus,
- u8 slave_addr,
+ u8 client_addr,
u8 addr,
u8 *val)
{
@@ -288,13 +288,13 @@ static void amdgpu_i2c_get_byte(struct amdgpu_i2c_chan *i2c_bus,
u8 in_buf[2];
struct i2c_msg msgs[] = {
{
- .addr = slave_addr,
+ .addr = client_addr,
.flags = 0,
.len = 1,
.buf = out_buf,
},
{
- .addr = slave_addr,
+ .addr = client_addr,
.flags = I2C_M_RD,
.len = 1,
.buf = in_buf,
@@ -314,13 +314,13 @@ static void amdgpu_i2c_get_byte(struct amdgpu_i2c_chan *i2c_bus,
}

static void amdgpu_i2c_put_byte(struct amdgpu_i2c_chan *i2c_bus,
- u8 slave_addr,
+ u8 client_addr,
u8 addr,
u8 val)
{
uint8_t out_buf[2];
struct i2c_msg msg = {
- .addr = slave_addr,
+ .addr = client_addr,
.flags = 0,
.len = 2,
.buf = out_buf,
diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_i2c.c b/drivers/gpu/drm/amd/amdgpu/atombios_i2c.c
index a6501114322f..6a396ca6d1d6 100644
--- a/drivers/gpu/drm/amd/amdgpu/atombios_i2c.c
+++ b/drivers/gpu/drm/amd/amdgpu/atombios_i2c.c
@@ -36,7 +36,7 @@
#define ATOM_MAX_HW_I2C_READ 255

static int amdgpu_atombios_i2c_process_i2c_ch(struct amdgpu_i2c_chan *chan,
- u8 slave_addr, u8 flags,
+ u8 client_addr, u8 flags,
u8 *buf, u8 num)
{
struct drm_device *dev = chan->dev;
@@ -83,7 +83,7 @@ static int amdgpu_atombios_i2c_process_i2c_ch(struct amdgpu_i2c_chan *chan,
args.ucFlag = flags;
args.ucI2CSpeed = TARGET_HW_I2C_CLOCK;
args.ucTransBytes = num;
- args.ucSlaveAddr = slave_addr << 1;
+ args.ucClientAddr = client_addr << 1;
args.ucLineNumber = chan->rec.i2c_id;

amdgpu_atom_execute_table(adev->mode_info.atom_context, index, (uint32_t *)&args, sizeof(args));
@@ -159,7 +159,7 @@ u32 amdgpu_atombios_i2c_func(struct i2c_adapter *adap)
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
}

-void amdgpu_atombios_i2c_channel_trans(struct amdgpu_device *adev, u8 slave_addr, u8 line_number, u8 offset, u8 data)
+void amdgpu_atombios_i2c_channel_trans(struct amdgpu_device *adev, u8 client_addr, u8 line_number, u8 offset, u8 data)
{
PROCESS_I2C_CHANNEL_TRANSACTION_PS_ALLOCATION args;
int index = GetIndexIntoMasterTable(COMMAND, ProcessI2cChannelTransaction);
@@ -169,7 +169,7 @@ void amdgpu_atombios_i2c_channel_trans(struct amdgpu_device *adev, u8 slave_addr
args.ucFlag = 1;
args.ucI2CSpeed = TARGET_HW_I2C_CLOCK;
args.ucTransBytes = 1;
- args.ucSlaveAddr = slave_addr;
+ args.ucClientAddr = client_addr;
args.ucLineNumber = line_number;

amdgpu_atom_execute_table(adev->mode_info.atom_context, index, (uint32_t *)&args, sizeof(args));
diff --git a/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c b/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
index dd2d66090d23..f2fc96d1cd7b 100644
--- a/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
+++ b/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
@@ -229,7 +229,7 @@ static uint32_t smu_v11_0_i2c_poll_rx_status(struct i2c_adapter *control)

reg_c_tx_abrt_source = RREG32_SOC15(SMUIO, 0, mmCKSVII2C_IC_TX_ABRT_SOURCE);

- /* If slave is not present */
+ /* If client is not present */
if (REG_GET_FIELD(reg_c_tx_abrt_source,
CKSVII2C_IC_TX_ABRT_SOURCE,
ABRT_7B_ADDR_NOACK) == 1) {
@@ -255,10 +255,10 @@ static uint32_t smu_v11_0_i2c_poll_rx_status(struct i2c_adapter *control)
}

/**
- * smu_v11_0_i2c_transmit - Send a block of data over the I2C bus to a slave device.
+ * smu_v11_0_i2c_transmit - Send a block of data over the I2C bus to a client device.
*
* @control: I2C adapter reference
- * @address: The I2C address of the slave device.
+ * @address: The I2C address of the client device.
* @data: The data to transmit over the bus.
* @numbytes: The amount of data to transmit.
* @i2c_flag: Flags for transmission
@@ -284,7 +284,7 @@ static uint32_t smu_v11_0_i2c_transmit(struct i2c_adapter *control,
16, 1, data, numbytes, false);
}

- /* Set the I2C slave address */
+ /* Set the I2C client address */
smu_v11_0_i2c_set_address(control, address);
/* Enable I2C */
smu_v11_0_i2c_enable(control, true);
@@ -354,10 +354,10 @@ static uint32_t smu_v11_0_i2c_transmit(struct i2c_adapter *control,


/**
- * smu_v11_0_i2c_receive - Receive a block of data over the I2C bus from a slave device.
+ * smu_v11_0_i2c_receive - Receive a block of data over the I2C bus from a client device.
*
* @control: I2C adapter reference
- * @address: The I2C address of the slave device.
+ * @address: The I2C address of the client device.
* @data: Placeholder to store received data.
* @numbytes: The amount of data to transmit.
* @i2c_flag: Flags for transmission
@@ -374,7 +374,7 @@ static uint32_t smu_v11_0_i2c_receive(struct i2c_adapter *control,

bytes_received = 0;

- /* Set the I2C slave address */
+ /* Set the I2C client address */
smu_v11_0_i2c_set_address(control, address);

/* Enable I2C */
@@ -509,7 +509,7 @@ static void smu_v11_0_i2c_init(struct i2c_adapter *control)
if (res != I2C_OK)
smu_v11_0_i2c_abort(control);

- /* Configure I2C to operate as master and in standard mode */
+ /* Configure I2C to operate as host and in standard mode */
smu_v11_0_i2c_configure(control);

/* Initialize the clock to 50 kHz default */
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
index 6450853fea94..16c6a3997c8e 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
@@ -1871,7 +1871,7 @@ static enum bp_result get_gpio_i2c_info(struct bios_parser *bp,
info->i2c_hw_assist = record->sucI2cId.bfHW_Capable;
info->i2c_line = record->sucI2cId.bfI2C_LineMux;
info->i2c_engine_id = record->sucI2cId.bfHW_EngineID;
- info->i2c_slave_address = record->ucI2CAddr;
+ info->i2c_client_address = record->ucI2CAddr;

info->gpio_info.clk_mask_register_index =
le16_to_cpu(header->asGPIO_Info[info->i2c_line].usClkMaskRegisterIndex);
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
index 05f392501c0a..33725f5ef72f 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
@@ -511,7 +511,7 @@ static enum bp_result get_gpio_i2c_info(
info->i2c_hw_assist = (record->i2c_id & I2C_HW_CAP) ? true : false;
info->i2c_line = record->i2c_id & I2C_HW_LANE_MUX;
info->i2c_engine_id = (record->i2c_id & I2C_HW_ENGINE_ID_MASK) >> 4;
- info->i2c_slave_address = record->i2c_slave_addr;
+ info->i2c_client_address = record->i2c_client_addr;

/* TODO: check how to get register offset for en, Y, etc. */
info->gpio_info.clk_a_register_index = le16_to_cpu(pin->data_a_reg_index);
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_exports.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_exports.c
index c6c35037bdb8..6f922fea3fbe 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_exports.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_exports.c
@@ -141,13 +141,13 @@ bool dc_link_update_dsc_config(struct pipe_ctx *pipe_ctx)

bool dc_is_oem_i2c_device_present(
struct dc *dc,
- size_t slave_address)
+ size_t client_address)
{
if (dc->res_pool->oem_device)
return dce_i2c_oem_device_present(
dc->res_pool,
dc->res_pool->oem_device,
- slave_address);
+ client_address);

return false;
}
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index ee8453bf958f..f13db28ee5ac 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -1803,7 +1803,7 @@ int dc_link_aux_transfer_raw(struct ddc_service *ddc,

bool dc_is_oem_i2c_device_present(
struct dc *dc,
- size_t slave_address
+ size_t client_address
);

/* return true if the connected receiver supports the hdcp version */
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_i2c.c b/drivers/gpu/drm/amd/display/dc/dce/dce_i2c.c
index f5cd2392fc5f..e4036d9c2d9e 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_i2c.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_i2c.c
@@ -28,7 +28,7 @@
bool dce_i2c_oem_device_present(
struct resource_pool *pool,
struct ddc_service *ddc,
- size_t slave_address
+ size_t client_address
)
{
struct dc *dc = ddc->ctx->dc;
@@ -45,7 +45,7 @@ bool dce_i2c_oem_device_present(
if (dcb->funcs->get_i2c_info(dcb, id, &i2c_info) != BP_RESULT_OK)
return false;

- if (i2c_info.i2c_slave_address != slave_address)
+ if (i2c_info.i2c_client_address != client_address)
return false;

return true;
diff --git a/drivers/gpu/drm/amd/display/include/grph_object_ctrl_defs.h b/drivers/gpu/drm/amd/display/include/grph_object_ctrl_defs.h
index 813463ffe15c..27aae2e03ef7 100644
--- a/drivers/gpu/drm/amd/display/include/grph_object_ctrl_defs.h
+++ b/drivers/gpu/drm/amd/display/include/grph_object_ctrl_defs.h
@@ -92,7 +92,7 @@ struct graphics_object_i2c_info {
bool i2c_hw_assist;
uint32_t i2c_line;
uint32_t i2c_engine_id;
- uint32_t i2c_slave_address;
+ uint32_t i2c_client_address;
};

struct graphics_object_hpd_info {
diff --git a/drivers/gpu/drm/amd/include/atombios.h b/drivers/gpu/drm/amd/include/atombios.h
index b78360a71bc9..94edf684db97 100644
--- a/drivers/gpu/drm/amd/include/atombios.h
+++ b/drivers/gpu/drm/amd/include/atombios.h
@@ -8503,7 +8503,7 @@ typedef struct _PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS
USHORT lpI2CDataOut;
UCHAR ucFlag;
UCHAR ucTransBytes;
- UCHAR ucSlaveAddr;
+ UCHAR ucClientAddr;
UCHAR ucLineNumber;
}PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS;

diff --git a/drivers/gpu/drm/amd/include/atomfirmware.h b/drivers/gpu/drm/amd/include/atomfirmware.h
index af3eebb4c9bc..1760a36c19a5 100644
--- a/drivers/gpu/drm/amd/include/atomfirmware.h
+++ b/drivers/gpu/drm/amd/include/atomfirmware.h
@@ -534,7 +534,7 @@ struct atom_firmware_info_v3_2 {
uint32_t mc_baseaddr_low;
uint8_t board_i2c_feature_id; // enum of atom_board_i2c_feature_id_def
uint8_t board_i2c_feature_gpio_id; // i2c id find in gpio_lut data table gpio_id
- uint8_t board_i2c_feature_slave_addr;
+ uint8_t board_i2c_feature_client_addr;
uint8_t reserved3;
uint16_t bootup_mvddq_mv;
uint16_t bootup_mvpp_mv;
@@ -562,7 +562,7 @@ struct atom_firmware_info_v3_3
uint32_t mc_baseaddr_low;
uint8_t board_i2c_feature_id; // enum of atom_board_i2c_feature_id_def
uint8_t board_i2c_feature_gpio_id; // i2c id find in gpio_lut data table gpio_id
- uint8_t board_i2c_feature_slave_addr;
+ uint8_t board_i2c_feature_client_addr;
uint8_t reserved3;
uint16_t bootup_mvddq_mv;
uint16_t bootup_mvpp_mv;
@@ -590,8 +590,8 @@ struct atom_firmware_info_v3_4 {
uint32_t mc_baseaddr_low;
uint8_t board_i2c_feature_id; // enum of atom_board_i2c_feature_id_def
uint8_t board_i2c_feature_gpio_id; // i2c id find in gpio_lut data table gpio_id
- uint8_t board_i2c_feature_slave_addr;
- uint8_t ras_rom_i2c_slave_addr;
+ uint8_t board_i2c_feature_client_addr;
+ uint8_t ras_rom_i2c_client_addr;
uint16_t bootup_mvddq_mv;
uint16_t bootup_mvpp_mv;
uint32_t zfbstartaddrin16mb;
@@ -626,8 +626,8 @@ struct atom_firmware_info_v3_5 {
uint32_t mc_baseaddr_low;
uint8_t board_i2c_feature_id; // enum of atom_board_i2c_feature_id_def
uint8_t board_i2c_feature_gpio_id; // i2c id find in gpio_lut data table gpio_id
- uint8_t board_i2c_feature_slave_addr;
- uint8_t ras_rom_i2c_slave_addr;
+ uint8_t board_i2c_feature_client_addr;
+ uint8_t ras_rom_i2c_client_addr;
uint32_t bootup_voltage_reserved1;
uint32_t zfb_reserved;
// if pplib_pptable_id!=0, pplib get powerplay table inside driver instead of from VBIOS
@@ -830,7 +830,7 @@ struct atom_i2c_record
{
struct atom_common_record_header record_header; //record_type = ATOM_I2C_RECORD_TYPE
uint8_t i2c_id;
- uint8_t i2c_slave_addr; //The slave address, it's 0 when the record is attached to connector for DDC
+ uint8_t i2c_client_addr; //The client address, it's 0 when the record is attached to connector for DDC
};

struct atom_hpd_int_record
@@ -2026,7 +2026,7 @@ struct atom_smu_info_v3_5
uint16_t smuinitoffset;
uint32_t bootup_dprefclk_10khz;
uint32_t bootup_usbclk_10khz;
- uint32_t smb_slave_address;
+ uint32_t smb_client_address;
uint32_t cg_fdo_ctrl0_val;
uint32_t cg_fdo_ctrl1_val;
uint32_t cg_fdo_ctrl2_val;
@@ -2083,7 +2083,7 @@ struct atom_smu_info_v3_6
uint16_t smuinitoffset;
uint32_t bootup_gfxavsclk_10khz;
uint32_t bootup_mpioclk_10khz;
- uint32_t smb_slave_address;
+ uint32_t smb_client_address;
uint32_t cg_fdo_ctrl0_val;
uint32_t cg_fdo_ctrl1_val;
uint32_t cg_fdo_ctrl2_val;
@@ -2138,7 +2138,7 @@ struct atom_smu_info_v4_0 {
uint16_t smuinitoffset;
uint32_t bootup_dprefclk_10khz;
uint32_t bootup_usbclk_10khz;
- uint32_t smb_slave_address;
+ uint32_t smb_client_address;
uint32_t cg_fdo_ctrl0_val;
uint32_t cg_fdo_ctrl1_val;
uint32_t cg_fdo_ctrl2_val;
@@ -2349,7 +2349,7 @@ struct atom_smc_dpm_info_v4_3

struct smudpm_i2ccontrollerconfig_t {
uint32_t enabled;
- uint32_t slaveaddress;
+ uint32_t clientaddress;
uint32_t controllerport;
uint32_t controllername;
uint32_t thermalthrottler;
@@ -3510,7 +3510,7 @@ struct atom_i2c_voltage_object_v4
struct atom_voltage_object_header_v4 header; // voltage mode = VOLTAGE_OBJ_VR_I2C_INIT_SEQ
uint8_t regulator_id; //Indicate Voltage Regulator Id
uint8_t i2c_id;
- uint8_t i2c_slave_addr;
+ uint8_t i2c_client_addr;
uint8_t i2c_control_offset;
uint8_t i2c_flag; // Bit0: 0 - One byte data; 1 - Two byte data
uint8_t i2c_speed; // =0, use default i2c speed, otherwise use it in unit of kHz.
@@ -4152,7 +4152,7 @@ struct process_i2c_channel_transaction_parameters
uint16_t i2c_data_out;
uint8_t flag; /* enum atom_process_i2c_status */
uint8_t trans_bytes;
- uint8_t slave_addr;
+ uint8_t client_addr;
uint8_t i2c_id;
};

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c
index 79c817752a33..c0b421b85c14 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_processpptables.c
@@ -784,8 +784,8 @@ static int append_vbios_pptable(struct pp_hwmgr *hwmgr, PPTable_t *ppsmc_pptable
for (i = 0; i < I2C_CONTROLLER_NAME_COUNT; i++) {
ppsmc_pptable->I2cControllers[i].Enabled =
smc_dpm_table->i2ccontrollers[i].enabled;
- ppsmc_pptable->I2cControllers[i].SlaveAddress =
- smc_dpm_table->i2ccontrollers[i].slaveaddress;
+ ppsmc_pptable->I2cControllers[i].ClientAddress =
+ smc_dpm_table->i2ccontrollers[i].clientaddress;
ppsmc_pptable->I2cControllers[i].ControllerPort =
smc_dpm_table->i2ccontrollers[i].controllerport;
ppsmc_pptable->I2cControllers[i].ThermalThrottler =
diff --git a/drivers/gpu/drm/amd/pm/powerplay/inc/smu11_driver_if.h b/drivers/gpu/drm/amd/pm/powerplay/inc/smu11_driver_if.h
index c2efc70ef288..82d2ee1ee9bb 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/inc/smu11_driver_if.h
+++ b/drivers/gpu/drm/amd/pm/powerplay/inc/smu11_driver_if.h
@@ -287,7 +287,7 @@ typedef enum {

typedef struct {
uint32_t Enabled;
- uint32_t SlaveAddress;
+ uint32_t ClientAddress;
uint32_t ControllerPort;
uint32_t ControllerName;

diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_arcturus.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_arcturus.h
index d518dee18e1b..b4d29f14ae31 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_arcturus.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_arcturus.h
@@ -263,7 +263,7 @@ typedef struct {
uint8_t Enabled;
uint8_t Speed;
uint8_t Padding[2];
- uint32_t SlaveAddress;
+ uint32_t ClientAddress;
uint8_t ControllerPort;
uint8_t ControllerName;
uint8_t ThermalThrotter;
diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_navi10.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_navi10.h
index c5c1943fb6a1..9952eff1856d 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_navi10.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_navi10.h
@@ -267,7 +267,7 @@ typedef struct {
uint8_t Enabled;
uint8_t Speed;
uint8_t Padding[2];
- uint32_t SlaveAddress;
+ uint32_t ClientAddress;
uint8_t ControllerPort;
uint8_t ControllerName;
uint8_t ThermalThrotter;
diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_sienna_cichlid.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_sienna_cichlid.h
index aa6d29de4002..09fe241a449b 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_sienna_cichlid.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_sienna_cichlid.h
@@ -342,7 +342,7 @@ typedef enum {
typedef struct {
uint8_t Enabled;
uint8_t Speed;
- uint8_t SlaveAddress;
+ uint8_t ClientAddress;
uint8_t ControllerPort;
uint8_t ControllerName;
uint8_t ThermalThrotter;
diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_aldebaran.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_aldebaran.h
index cddf45eebee8..e16617173538 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_aldebaran.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_aldebaran.h
@@ -167,7 +167,7 @@ typedef enum {
typedef struct {
uint8_t Enabled;
uint8_t Speed;
- uint8_t SlaveAddress;
+ uint8_t ClientAddress;
uint8_t ControllerPort;
uint8_t ThermalThrotter;
uint8_t I2cProtocol;
diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h
index b114d14fc053..37a8f8f116bb 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h
@@ -319,7 +319,7 @@ typedef enum {
typedef struct {
uint8_t Enabled;
uint8_t Speed;
- uint8_t SlaveAddress;
+ uint8_t ClientAddress;
uint8_t ControllerPort;
uint8_t ControllerName;
uint8_t ThermalThrotter;
diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h
index 8b1496f8ce58..e1c2eeaa08d0 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h
@@ -320,7 +320,7 @@ typedef enum {
typedef struct {
uint8_t Enabled;
uint8_t Speed;
- uint8_t SlaveAddress;
+ uint8_t ClientAddress;
uint8_t ControllerPort;
uint8_t ControllerName;
uint8_t ThermalThrotter;
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
index 0c2d04f978ac..87bfb2580ff7 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
@@ -1909,8 +1909,8 @@ static void arcturus_dump_pptable(struct smu_context *smu)
dev_info(smu->adev->dev, "I2cControllers[%d]:\n", i);
dev_info(smu->adev->dev, " .Enabled = %d\n",
pptable->I2cControllers[i].Enabled);
- dev_info(smu->adev->dev, " .SlaveAddress = 0x%x\n",
- pptable->I2cControllers[i].SlaveAddress);
+ dev_info(smu->adev->dev, " .ClientAddress = 0x%x\n",
+ pptable->I2cControllers[i].ClientAddress);
dev_info(smu->adev->dev, " .ControllerPort = %d\n",
pptable->I2cControllers[i].ControllerPort);
dev_info(smu->adev->dev, " .ControllerName = %d\n",
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
index 1f18b61884f3..65a9e10ffd8a 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
@@ -2988,8 +2988,8 @@ static void beige_goby_dump_pptable(struct smu_context *smu)
pptable->I2cControllers[i].Enabled);
dev_info(smu->adev->dev, " .Speed = 0x%x\n",
pptable->I2cControllers[i].Speed);
- dev_info(smu->adev->dev, " .SlaveAddress = 0x%x\n",
- pptable->I2cControllers[i].SlaveAddress);
+ dev_info(smu->adev->dev, " .ClientAddress = 0x%x\n",
+ pptable->I2cControllers[i].ClientAddress);
dev_info(smu->adev->dev, " .ControllerPort = 0x%x\n",
pptable->I2cControllers[i].ControllerPort);
dev_info(smu->adev->dev, " .ControllerName = 0x%x\n",
@@ -3627,8 +3627,8 @@ static void sienna_cichlid_dump_pptable(struct smu_context *smu)
pptable->I2cControllers[i].Enabled);
dev_info(smu->adev->dev, " .Speed = 0x%x\n",
pptable->I2cControllers[i].Speed);
- dev_info(smu->adev->dev, " .SlaveAddress = 0x%x\n",
- pptable->I2cControllers[i].SlaveAddress);
+ dev_info(smu->adev->dev, " .ClientAddress = 0x%x\n",
+ pptable->I2cControllers[i].ClientAddress);
dev_info(smu->adev->dev, " .ControllerPort = 0x%x\n",
pptable->I2cControllers[i].ControllerPort);
dev_info(smu->adev->dev, " .ControllerName = 0x%x\n",
diff --git a/drivers/gpu/drm/radeon/atombios.h b/drivers/gpu/drm/radeon/atombios.h
index 2db40789235c..5ec4609114c1 100644
--- a/drivers/gpu/drm/radeon/atombios.h
+++ b/drivers/gpu/drm/radeon/atombios.h
@@ -7229,7 +7229,7 @@ typedef struct _PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS
USHORT lpI2CDataOut;
UCHAR ucFlag;
UCHAR ucTransBytes;
- UCHAR ucSlaveAddr;
+ UCHAR ucClientAddr;
UCHAR ucLineNumber;
}PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS;

diff --git a/drivers/gpu/drm/radeon/atombios_i2c.c b/drivers/gpu/drm/radeon/atombios_i2c.c
index 730f0b25312b..2000d35b9a1f 100644
--- a/drivers/gpu/drm/radeon/atombios_i2c.c
+++ b/drivers/gpu/drm/radeon/atombios_i2c.c
@@ -34,7 +34,7 @@
#define ATOM_MAX_HW_I2C_READ 255

static int radeon_process_i2c_ch(struct radeon_i2c_chan *chan,
- u8 slave_addr, u8 flags,
+ u8 client_addr, u8 flags,
u8 *buf, int num)
{
struct drm_device *dev = chan->dev;
@@ -75,7 +75,7 @@ static int radeon_process_i2c_ch(struct radeon_i2c_chan *chan,
args.ucFlag = flags;
args.ucI2CSpeed = TARGET_HW_I2C_CLOCK;
args.ucTransBytes = num;
- args.ucSlaveAddr = slave_addr << 1;
+ args.ucClientAddr = client_addr << 1;
args.ucLineNumber = chan->rec.i2c_id;

atom_execute_table_scratch_unlocked(rdev->mode_info.atom_context, index, (uint32_t *)&args, sizeof(args));
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 6952b1273b0f..cf5c6f1e4a61 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -1398,7 +1398,7 @@ bool radeon_legacy_get_ext_tmds_info_from_table(struct radeon_encoder *encoder,
case CT_MINI_EXTERNAL:
default:
tmds->dvo_chip = DVO_SIL164;
- tmds->slave_addr = 0x70 >> 1; /* 7 bit addressing */
+ tmds->client_addr = 0x70 >> 1; /* 7 bit addressing */
break;
}

@@ -1420,14 +1420,14 @@ bool radeon_legacy_get_ext_tmds_info_from_combios(struct radeon_encoder *encoder
i2c_bus = combios_setup_i2c_bus(rdev, DDC_MONID, 0, 0);
tmds->i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus);
tmds->dvo_chip = DVO_SIL164;
- tmds->slave_addr = 0x70 >> 1; /* 7 bit addressing */
+ tmds->client_addr = 0x70 >> 1; /* 7 bit addressing */
} else {
offset = combios_get_table_offset(dev, COMBIOS_EXT_TMDS_INFO_TABLE);
if (offset) {
ver = RBIOS8(offset);
DRM_DEBUG_KMS("External TMDS Table revision: %d\n", ver);
- tmds->slave_addr = RBIOS8(offset + 4 + 2);
- tmds->slave_addr >>= 1; /* 7 bit addressing */
+ tmds->client_addr = RBIOS8(offset + 4 + 2);
+ tmds->client_addr >>= 1; /* 7 bit addressing */
gpio = RBIOS8(offset + 4 + 3);
if (gpio == DDC_LCD) {
/* MM i2c */
@@ -2846,19 +2846,19 @@ void radeon_external_tmds_setup(struct drm_encoder *encoder)
case DVO_SIL164:
/* sil 164 */
radeon_i2c_put_byte(tmds->i2c_bus,
- tmds->slave_addr,
+ tmds->client_addr,
0x08, 0x30);
radeon_i2c_put_byte(tmds->i2c_bus,
- tmds->slave_addr,
+ tmds->client_addr,
0x09, 0x00);
radeon_i2c_put_byte(tmds->i2c_bus,
- tmds->slave_addr,
+ tmds->client_addr,
0x0a, 0x90);
radeon_i2c_put_byte(tmds->i2c_bus,
- tmds->slave_addr,
+ tmds->client_addr,
0x0c, 0x89);
radeon_i2c_put_byte(tmds->i2c_bus,
- tmds->slave_addr,
+ tmds->client_addr,
0x08, 0x3b);
break;
case DVO_SIL1178:
@@ -2887,7 +2887,7 @@ bool radeon_combios_external_tmds_setup(struct drm_encoder *encoder)
struct radeon_device *rdev = dev->dev_private;
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
uint16_t offset;
- uint8_t blocks, slave_addr, rev;
+ uint8_t blocks, client_addr, rev;
uint32_t index, id;
uint32_t reg, val, and_mask, or_mask;
struct radeon_encoder_ext_tmds *tmds = radeon_encoder->enc_priv;
@@ -2934,15 +2934,15 @@ bool radeon_combios_external_tmds_setup(struct drm_encoder *encoder)
mdelay(val);
break;
case 6:
- slave_addr = id & 0xff;
- slave_addr >>= 1; /* 7 bit addressing */
+ client_addr = id & 0xff;
+ client_addr >>= 1; /* 7 bit addressing */
index++;
reg = RBIOS8(index);
index++;
val = RBIOS8(index);
index++;
radeon_i2c_put_byte(tmds->i2c_bus,
- slave_addr,
+ client_addr,
reg, val);
break;
default:
@@ -2997,7 +2997,7 @@ bool radeon_combios_external_tmds_setup(struct drm_encoder *encoder)
val = RBIOS8(index);
index += 1;
radeon_i2c_put_byte(tmds->i2c_bus,
- tmds->slave_addr,
+ tmds->client_addr,
reg, val);
break;
default:
diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c
index 3d174390a8af..565d59536e9a 100644
--- a/drivers/gpu/drm/radeon/radeon_i2c.c
+++ b/drivers/gpu/drm/radeon/radeon_i2c.c
@@ -1038,7 +1038,7 @@ struct radeon_i2c_chan *radeon_i2c_lookup(struct radeon_device *rdev,
}

void radeon_i2c_get_byte(struct radeon_i2c_chan *i2c_bus,
- u8 slave_addr,
+ u8 client_addr,
u8 addr,
u8 *val)
{
@@ -1046,13 +1046,13 @@ void radeon_i2c_get_byte(struct radeon_i2c_chan *i2c_bus,
u8 in_buf[2];
struct i2c_msg msgs[] = {
{
- .addr = slave_addr,
+ .addr = client_addr,
.flags = 0,
.len = 1,
.buf = out_buf,
},
{
- .addr = slave_addr,
+ .addr = client_addr,
.flags = I2C_M_RD,
.len = 1,
.buf = in_buf,
@@ -1072,13 +1072,13 @@ void radeon_i2c_get_byte(struct radeon_i2c_chan *i2c_bus,
}

void radeon_i2c_put_byte(struct radeon_i2c_chan *i2c_bus,
- u8 slave_addr,
+ u8 client_addr,
u8 addr,
u8 val)
{
uint8_t out_buf[2];
struct i2c_msg msg = {
- .addr = slave_addr,
+ .addr = client_addr,
.flags = 0,
.len = 2,
.buf = out_buf,
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
index 546381a5c918..9ae5ed661c75 100644
--- a/drivers/gpu/drm/radeon/radeon_mode.h
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
@@ -409,7 +409,7 @@ struct radeon_encoder_int_tmds {
struct radeon_encoder_ext_tmds {
/* tmds over dvo */
struct radeon_i2c_chan *i2c_bus;
- uint8_t slave_addr;
+ uint8_t client_addr;
enum radeon_dvo_chip dvo_chip;
};

@@ -749,11 +749,11 @@ extern struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev,
const char *name);
extern void radeon_i2c_destroy(struct radeon_i2c_chan *i2c);
extern void radeon_i2c_get_byte(struct radeon_i2c_chan *i2c_bus,
- u8 slave_addr,
+ u8 client_addr,
u8 addr,
u8 *val);
extern void radeon_i2c_put_byte(struct radeon_i2c_chan *i2c,
- u8 slave_addr,
+ u8 client_addr,
u8 addr,
u8 val);
extern void radeon_router_select_ddc_port(struct radeon_connector *radeon_connector);
--
2.34.1


2024-03-29 17:03:19

by Easwar Hariharan

[permalink] [raw]
Subject: [PATCH v0 03/14] drm/gma500,drm/i915: Make I2C terminology more inclusive

I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
with more appropriate terms. Inspired by and following on to Wolfram's
series to fix drivers/i2c/[1], fix the terminology for users of
I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
in the specification.

Compile tested, no functionality changes intended

[1]:
https://lore.kernel.org/all/[email protected]/

Signed-off-by: Easwar Hariharan <[email protected]>
---
drivers/gpu/drm/gma500/cdv_intel_lvds.c | 2 +-
drivers/gpu/drm/gma500/intel_bios.c | 22 +++++++-------
drivers/gpu/drm/gma500/intel_bios.h | 4 +--
drivers/gpu/drm/gma500/intel_gmbus.c | 2 +-
drivers/gpu/drm/gma500/psb_drv.h | 2 +-
drivers/gpu/drm/gma500/psb_intel_drv.h | 2 +-
drivers/gpu/drm/gma500/psb_intel_lvds.c | 4 +--
drivers/gpu/drm/gma500/psb_intel_sdvo.c | 26 ++++++++--------
drivers/gpu/drm/i915/display/dvo_ch7017.c | 14 ++++-----
drivers/gpu/drm/i915/display/dvo_ch7xxx.c | 18 +++++------
drivers/gpu/drm/i915/display/dvo_ivch.c | 16 +++++-----
drivers/gpu/drm/i915/display/dvo_ns2501.c | 18 +++++------
drivers/gpu/drm/i915/display/dvo_sil164.c | 18 +++++------
drivers/gpu/drm/i915/display/dvo_tfp410.c | 18 +++++------
drivers/gpu/drm/i915/display/intel_bios.c | 22 +++++++-------
drivers/gpu/drm/i915/display/intel_ddi.c | 2 +-
.../gpu/drm/i915/display/intel_display_core.h | 2 +-
drivers/gpu/drm/i915/display/intel_dsi.h | 2 +-
drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 18 +++++------
drivers/gpu/drm/i915/display/intel_dvo.c | 14 ++++-----
drivers/gpu/drm/i915/display/intel_dvo_dev.h | 2 +-
drivers/gpu/drm/i915/display/intel_gmbus.c | 4 +--
drivers/gpu/drm/i915/display/intel_sdvo.c | 30 +++++++++----------
drivers/gpu/drm/i915/display/intel_vbt_defs.h | 4 +--
drivers/gpu/drm/i915/gvt/edid.c | 28 ++++++++---------
drivers/gpu/drm/i915/gvt/edid.h | 4 +--
drivers/gpu/drm/i915/gvt/opregion.c | 2 +-
27 files changed, 150 insertions(+), 150 deletions(-)

diff --git a/drivers/gpu/drm/gma500/cdv_intel_lvds.c b/drivers/gpu/drm/gma500/cdv_intel_lvds.c
index f08a6803dc18..84c9122062c4 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c
@@ -565,7 +565,7 @@ void cdv_intel_lvds_init(struct drm_device *dev,
dev->dev, "I2C bus registration failed.\n");
goto err_encoder_cleanup;
}
- gma_encoder->i2c_bus->slave_addr = 0x2C;
+ gma_encoder->i2c_bus->client_addr = 0x2C;
dev_priv->lvds_i2c_bus = gma_encoder->i2c_bus;

/*
diff --git a/drivers/gpu/drm/gma500/intel_bios.c b/drivers/gpu/drm/gma500/intel_bios.c
index 8245b5603d2c..333bece1a64f 100644
--- a/drivers/gpu/drm/gma500/intel_bios.c
+++ b/drivers/gpu/drm/gma500/intel_bios.c
@@ -14,8 +14,8 @@
#include "psb_intel_drv.h"
#include "psb_intel_reg.h"

-#define SLAVE_ADDR1 0x70
-#define SLAVE_ADDR2 0x72
+#define CLIENT_ADDR1 0x70
+#define CLIENT_ADDR2 0x72

static void *find_section(struct bdb_header *bdb, int section_id)
{
@@ -357,10 +357,10 @@ parse_sdvo_device_mapping(struct drm_psb_private *dev_priv,
/* skip the device block if device type is invalid */
continue;
}
- if (p_child->slave_addr != SLAVE_ADDR1 &&
- p_child->slave_addr != SLAVE_ADDR2) {
+ if (p_child->client_addr != CLIENT_ADDR1 &&
+ p_child->client_addr != CLIENT_ADDR2) {
/*
- * If the slave address is neither 0x70 nor 0x72,
+ * If the client address is neither 0x70 nor 0x72,
* it is not a SDVO device. Skip it.
*/
continue;
@@ -371,22 +371,22 @@ parse_sdvo_device_mapping(struct drm_psb_private *dev_priv,
DRM_DEBUG_KMS("Incorrect SDVO port. Skip it\n");
continue;
}
- DRM_DEBUG_KMS("the SDVO device with slave addr %2x is found on"
+ DRM_DEBUG_KMS("the SDVO device with client addr %2x is found on"
" %s port\n",
- p_child->slave_addr,
+ p_child->client_addr,
(p_child->dvo_port == DEVICE_PORT_DVOB) ?
"SDVOB" : "SDVOC");
p_mapping = &(dev_priv->sdvo_mappings[p_child->dvo_port - 1]);
if (!p_mapping->initialized) {
p_mapping->dvo_port = p_child->dvo_port;
- p_mapping->slave_addr = p_child->slave_addr;
+ p_mapping->client_addr = p_child->client_addr;
p_mapping->dvo_wiring = p_child->dvo_wiring;
p_mapping->ddc_pin = p_child->ddc_pin;
p_mapping->i2c_pin = p_child->i2c_pin;
p_mapping->initialized = 1;
DRM_DEBUG_KMS("SDVO device: dvo=%x, addr=%x, wiring=%d, ddc_pin=%d, i2c_pin=%d\n",
p_mapping->dvo_port,
- p_mapping->slave_addr,
+ p_mapping->client_addr,
p_mapping->dvo_wiring,
p_mapping->ddc_pin,
p_mapping->i2c_pin);
@@ -394,10 +394,10 @@ parse_sdvo_device_mapping(struct drm_psb_private *dev_priv,
DRM_DEBUG_KMS("Maybe one SDVO port is shared by "
"two SDVO device.\n");
}
- if (p_child->slave2_addr) {
+ if (p_child->client2_addr) {
/* Maybe this is a SDVO device with multiple inputs */
/* And the mapping info is not added */
- DRM_DEBUG_KMS("there exists the slave2_addr. Maybe this"
+ DRM_DEBUG_KMS("there exists the client2_addr. Maybe this"
" is a SDVO device with multiple inputs.\n");
}
count++;
diff --git a/drivers/gpu/drm/gma500/intel_bios.h b/drivers/gpu/drm/gma500/intel_bios.h
index 0e6facf21e33..cfca33427f94 100644
--- a/drivers/gpu/drm/gma500/intel_bios.h
+++ b/drivers/gpu/drm/gma500/intel_bios.h
@@ -186,13 +186,13 @@ struct child_device_config {
u16 addin_offset;
u8 dvo_port; /* See Device_PORT_* above */
u8 i2c_pin;
- u8 slave_addr;
+ u8 client_addr;
u8 ddc_pin;
u16 edid_ptr;
u8 dvo_cfg; /* See DEVICE_CFG_* above */
u8 dvo2_port;
u8 i2c2_pin;
- u8 slave2_addr;
+ u8 client2_addr;
u8 ddc2_pin;
u8 capabilities;
u8 dvo_wiring;/* See DEVICE_WIRE_* above */
diff --git a/drivers/gpu/drm/gma500/intel_gmbus.c b/drivers/gpu/drm/gma500/intel_gmbus.c
index aa45509859f2..94cf854b1d3d 100644
--- a/drivers/gpu/drm/gma500/intel_gmbus.c
+++ b/drivers/gpu/drm/gma500/intel_gmbus.c
@@ -333,7 +333,7 @@ gmbus_xfer(struct i2c_adapter *adapter,
clear_err:
/* Toggle the Software Clear Interrupt bit. This has the effect
* of resetting the GMBUS controller and so clearing the
- * BUS_ERROR raised by the slave's NAK.
+ * BUS_ERROR raised by the client's NAK.
*/
GMBUS_REG_WRITE(GMBUS1 + reg_offset, GMBUS_SW_CLR_INT);
GMBUS_REG_WRITE(GMBUS1 + reg_offset, 0);
diff --git a/drivers/gpu/drm/gma500/psb_drv.h b/drivers/gpu/drm/gma500/psb_drv.h
index c5edfa4aa4cc..bbf3af1b01cd 100644
--- a/drivers/gpu/drm/gma500/psb_drv.h
+++ b/drivers/gpu/drm/gma500/psb_drv.h
@@ -203,7 +203,7 @@ struct psb_intel_opregion {
struct sdvo_device_mapping {
u8 initialized;
u8 dvo_port;
- u8 slave_addr;
+ u8 client_addr;
u8 dvo_wiring;
u8 i2c_pin;
u8 i2c_speed;
diff --git a/drivers/gpu/drm/gma500/psb_intel_drv.h b/drivers/gpu/drm/gma500/psb_intel_drv.h
index c111e933e1ed..3536414c1988 100644
--- a/drivers/gpu/drm/gma500/psb_intel_drv.h
+++ b/drivers/gpu/drm/gma500/psb_intel_drv.h
@@ -80,7 +80,7 @@ struct psb_intel_mode_device {
struct gma_i2c_chan {
struct i2c_adapter base;
struct i2c_algo_bit_data algo;
- u8 slave_addr;
+ u8 client_addr;

/* for getting at dev. private (mmio etc.) */
struct drm_device *drm_dev;
diff --git a/drivers/gpu/drm/gma500/psb_intel_lvds.c b/drivers/gpu/drm/gma500/psb_intel_lvds.c
index 8486de230ec9..3ce54aaf92ce 100644
--- a/drivers/gpu/drm/gma500/psb_intel_lvds.c
+++ b/drivers/gpu/drm/gma500/psb_intel_lvds.c
@@ -97,7 +97,7 @@ static int psb_lvds_i2c_set_brightness(struct drm_device *dev,

struct i2c_msg msgs[] = {
{
- .addr = lvds_i2c_bus->slave_addr,
+ .addr = lvds_i2c_bus->client_addr,
.flags = 0,
.len = 2,
.buf = out_buf,
@@ -707,7 +707,7 @@ void psb_intel_lvds_init(struct drm_device *dev,
dev->dev, "I2C bus registration failed.\n");
goto err_encoder_cleanup;
}
- lvds_priv->i2c_bus->slave_addr = 0x2C;
+ lvds_priv->i2c_bus->client_addr = 0x2C;
dev_priv->lvds_i2c_bus = lvds_priv->i2c_bus;

/*
diff --git a/drivers/gpu/drm/gma500/psb_intel_sdvo.c b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
index e4f914deceba..39a3b696efc5 100644
--- a/drivers/gpu/drm/gma500/psb_intel_sdvo.c
+++ b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
@@ -70,7 +70,7 @@ struct psb_intel_sdvo {
struct gma_encoder base;

struct i2c_adapter *i2c;
- u8 slave_addr;
+ u8 client_addr;

struct i2c_adapter ddc;

@@ -259,13 +259,13 @@ static bool psb_intel_sdvo_read_byte(struct psb_intel_sdvo *psb_intel_sdvo, u8 a
{
struct i2c_msg msgs[] = {
{
- .addr = psb_intel_sdvo->slave_addr,
+ .addr = psb_intel_sdvo->client_addr,
.flags = 0,
.len = 1,
.buf = &addr,
},
{
- .addr = psb_intel_sdvo->slave_addr,
+ .addr = psb_intel_sdvo->client_addr,
.flags = I2C_M_RD,
.len = 1,
.buf = ch,
@@ -463,14 +463,14 @@ static bool psb_intel_sdvo_write_cmd(struct psb_intel_sdvo *psb_intel_sdvo, u8 c
psb_intel_sdvo_debug_write(psb_intel_sdvo, cmd, args, args_len);

for (i = 0; i < args_len; i++) {
- msgs[i].addr = psb_intel_sdvo->slave_addr;
+ msgs[i].addr = psb_intel_sdvo->client_addr;
msgs[i].flags = 0;
msgs[i].len = 2;
msgs[i].buf = buf + 2 *i;
buf[2*i + 0] = SDVO_I2C_ARG_0 - i;
buf[2*i + 1] = ((u8*)args)[i];
}
- msgs[i].addr = psb_intel_sdvo->slave_addr;
+ msgs[i].addr = psb_intel_sdvo->client_addr;
msgs[i].flags = 0;
msgs[i].len = 2;
msgs[i].buf = buf + 2*i;
@@ -479,12 +479,12 @@ static bool psb_intel_sdvo_write_cmd(struct psb_intel_sdvo *psb_intel_sdvo, u8 c

/* the following two are to read the response */
status = SDVO_I2C_CMD_STATUS;
- msgs[i+1].addr = psb_intel_sdvo->slave_addr;
+ msgs[i+1].addr = psb_intel_sdvo->client_addr;
msgs[i+1].flags = 0;
msgs[i+1].len = 1;
msgs[i+1].buf = &status;

- msgs[i+2].addr = psb_intel_sdvo->slave_addr;
+ msgs[i+2].addr = psb_intel_sdvo->client_addr;
msgs[i+2].flags = I2C_M_RD;
msgs[i+2].len = 1;
msgs[i+2].buf = &status;
@@ -1899,7 +1899,7 @@ psb_intel_sdvo_is_hdmi_connector(struct psb_intel_sdvo *psb_intel_sdvo, int devi
}

static u8
-psb_intel_sdvo_get_slave_addr(struct drm_device *dev, int sdvo_reg)
+psb_intel_sdvo_get_client_addr(struct drm_device *dev, int sdvo_reg)
{
struct drm_psb_private *dev_priv = to_drm_psb_private(dev);
struct sdvo_device_mapping *my_mapping, *other_mapping;
@@ -1913,14 +1913,14 @@ psb_intel_sdvo_get_slave_addr(struct drm_device *dev, int sdvo_reg)
}

/* If the BIOS described our SDVO device, take advantage of it. */
- if (my_mapping->slave_addr)
- return my_mapping->slave_addr;
+ if (my_mapping->client_addr)
+ return my_mapping->client_addr;

/* If the BIOS only described a different SDVO device, use the
* address that it isn't using.
*/
- if (other_mapping->slave_addr) {
- if (other_mapping->slave_addr == 0x70)
+ if (other_mapping->client_addr) {
+ if (other_mapping->client_addr == 0x70)
return 0x72;
else
return 0x70;
@@ -2446,7 +2446,7 @@ bool psb_intel_sdvo_init(struct drm_device *dev, int sdvo_reg)
return false;

psb_intel_sdvo->sdvo_reg = sdvo_reg;
- psb_intel_sdvo->slave_addr = psb_intel_sdvo_get_slave_addr(dev, sdvo_reg) >> 1;
+ psb_intel_sdvo->client_addr = psb_intel_sdvo_get_client_addr(dev, sdvo_reg) >> 1;
psb_intel_sdvo_select_i2c_bus(dev_priv, psb_intel_sdvo, sdvo_reg);
if (!psb_intel_sdvo_init_ddc_proxy(psb_intel_sdvo, dev)) {
kfree(psb_intel_sdvo);
diff --git a/drivers/gpu/drm/i915/display/dvo_ch7017.c b/drivers/gpu/drm/i915/display/dvo_ch7017.c
index d0c3880d7f80..b9d04581b820 100644
--- a/drivers/gpu/drm/i915/display/dvo_ch7017.c
+++ b/drivers/gpu/drm/i915/display/dvo_ch7017.c
@@ -170,13 +170,13 @@ static bool ch7017_read(struct intel_dvo_device *dvo, u8 addr, u8 *val)
{
struct i2c_msg msgs[] = {
{
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = 0,
.len = 1,
.buf = &addr,
},
{
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = I2C_M_RD,
.len = 1,
.buf = val,
@@ -189,7 +189,7 @@ static bool ch7017_write(struct intel_dvo_device *dvo, u8 addr, u8 val)
{
u8 buf[2] = { addr, val };
struct i2c_msg msg = {
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = 0,
.len = 2,
.buf = buf,
@@ -197,7 +197,7 @@ static bool ch7017_write(struct intel_dvo_device *dvo, u8 addr, u8 val)
return i2c_transfer(dvo->i2c_bus, &msg, 1) == 1;
}

-/** Probes for a CH7017 on the given bus and slave address. */
+/** Probes for a CH7017 on the given bus and client address. */
static bool ch7017_init(struct intel_dvo_device *dvo,
struct i2c_adapter *adapter)
{
@@ -227,13 +227,13 @@ static bool ch7017_init(struct intel_dvo_device *dvo,
break;
default:
DRM_DEBUG_KMS("ch701x not detected, got %d: from %s "
- "slave %d.\n",
- val, adapter->name, dvo->slave_addr);
+ "client %d.\n",
+ val, adapter->name, dvo->client_addr);
goto fail;
}

DRM_DEBUG_KMS("%s detected on %s, addr %d\n",
- str, adapter->name, dvo->slave_addr);
+ str, adapter->name, dvo->client_addr);
return true;

fail:
diff --git a/drivers/gpu/drm/i915/display/dvo_ch7xxx.c b/drivers/gpu/drm/i915/display/dvo_ch7xxx.c
index 2e8e85da5a40..8e36d6e2dde0 100644
--- a/drivers/gpu/drm/i915/display/dvo_ch7xxx.c
+++ b/drivers/gpu/drm/i915/display/dvo_ch7xxx.c
@@ -153,13 +153,13 @@ static bool ch7xxx_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)

struct i2c_msg msgs[] = {
{
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = 0,
.len = 1,
.buf = out_buf,
},
{
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = I2C_M_RD,
.len = 1,
.buf = in_buf,
@@ -176,7 +176,7 @@ static bool ch7xxx_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)

if (!ch7xxx->quiet) {
DRM_DEBUG_KMS("Unable to read register 0x%02x from %s:%02x.\n",
- addr, adapter->name, dvo->slave_addr);
+ addr, adapter->name, dvo->client_addr);
}
return false;
}
@@ -188,7 +188,7 @@ static bool ch7xxx_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)
struct i2c_adapter *adapter = dvo->i2c_bus;
u8 out_buf[2];
struct i2c_msg msg = {
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = 0,
.len = 2,
.buf = out_buf,
@@ -202,7 +202,7 @@ static bool ch7xxx_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)

if (!ch7xxx->quiet) {
DRM_DEBUG_KMS("Unable to write register 0x%02x to %s:%d.\n",
- addr, adapter->name, dvo->slave_addr);
+ addr, adapter->name, dvo->client_addr);
}

return false;
@@ -229,8 +229,8 @@ static bool ch7xxx_init(struct intel_dvo_device *dvo,

name = ch7xxx_get_id(vendor);
if (!name) {
- DRM_DEBUG_KMS("ch7xxx not detected; got VID 0x%02x from %s slave %d.\n",
- vendor, adapter->name, dvo->slave_addr);
+ DRM_DEBUG_KMS("ch7xxx not detected; got VID 0x%02x from %s client %d.\n",
+ vendor, adapter->name, dvo->client_addr);
goto out;
}

@@ -240,8 +240,8 @@ static bool ch7xxx_init(struct intel_dvo_device *dvo,

devid = ch7xxx_get_did(device);
if (!devid) {
- DRM_DEBUG_KMS("ch7xxx not detected; got DID 0x%02x from %s slave %d.\n",
- device, adapter->name, dvo->slave_addr);
+ DRM_DEBUG_KMS("ch7xxx not detected; got DID 0x%02x from %s client %d.\n",
+ device, adapter->name, dvo->client_addr);
goto out;
}

diff --git a/drivers/gpu/drm/i915/display/dvo_ivch.c b/drivers/gpu/drm/i915/display/dvo_ivch.c
index eef72bb3b767..718bb17da2e3 100644
--- a/drivers/gpu/drm/i915/display/dvo_ivch.c
+++ b/drivers/gpu/drm/i915/display/dvo_ivch.c
@@ -198,7 +198,7 @@ static bool ivch_read(struct intel_dvo_device *dvo, int addr, u16 *data)

struct i2c_msg msgs[] = {
{
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = I2C_M_RD,
.len = 0,
},
@@ -209,7 +209,7 @@ static bool ivch_read(struct intel_dvo_device *dvo, int addr, u16 *data)
.buf = out_buf,
},
{
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = I2C_M_RD | I2C_M_NOSTART,
.len = 2,
.buf = in_buf,
@@ -226,7 +226,7 @@ static bool ivch_read(struct intel_dvo_device *dvo, int addr, u16 *data)
if (!priv->quiet) {
DRM_DEBUG_KMS("Unable to read register 0x%02x from "
"%s:%02x.\n",
- addr, adapter->name, dvo->slave_addr);
+ addr, adapter->name, dvo->client_addr);
}
return false;
}
@@ -238,7 +238,7 @@ static bool ivch_write(struct intel_dvo_device *dvo, int addr, u16 data)
struct i2c_adapter *adapter = dvo->i2c_bus;
u8 out_buf[3];
struct i2c_msg msg = {
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = 0,
.len = 3,
.buf = out_buf,
@@ -253,13 +253,13 @@ static bool ivch_write(struct intel_dvo_device *dvo, int addr, u16 data)

if (!priv->quiet) {
DRM_DEBUG_KMS("Unable to write register 0x%02x to %s:%d.\n",
- addr, adapter->name, dvo->slave_addr);
+ addr, adapter->name, dvo->client_addr);
}

return false;
}

-/* Probes the given bus and slave address for an ivch */
+/* Probes the given bus and client address for an ivch */
static bool ivch_init(struct intel_dvo_device *dvo,
struct i2c_adapter *adapter)
{
@@ -283,10 +283,10 @@ static bool ivch_init(struct intel_dvo_device *dvo,
* very unique, check that the value in the base address field matches
* the address it's responding on.
*/
- if ((temp & VR00_BASE_ADDRESS_MASK) != dvo->slave_addr) {
+ if ((temp & VR00_BASE_ADDRESS_MASK) != dvo->client_addr) {
DRM_DEBUG_KMS("ivch detect failed due to address mismatch "
"(%d vs %d)\n",
- (temp & VR00_BASE_ADDRESS_MASK), dvo->slave_addr);
+ (temp & VR00_BASE_ADDRESS_MASK), dvo->client_addr);
goto out;
}

diff --git a/drivers/gpu/drm/i915/display/dvo_ns2501.c b/drivers/gpu/drm/i915/display/dvo_ns2501.c
index 1df212fb000e..b15875a832f5 100644
--- a/drivers/gpu/drm/i915/display/dvo_ns2501.c
+++ b/drivers/gpu/drm/i915/display/dvo_ns2501.c
@@ -399,13 +399,13 @@ static bool ns2501_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)

struct i2c_msg msgs[] = {
{
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = 0,
.len = 1,
.buf = out_buf,
},
{
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = I2C_M_RD,
.len = 1,
.buf = in_buf,
@@ -423,7 +423,7 @@ static bool ns2501_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)
if (!ns->quiet) {
DRM_DEBUG_KMS
("Unable to read register 0x%02x from %s:0x%02x.\n", addr,
- adapter->name, dvo->slave_addr);
+ adapter->name, dvo->client_addr);
}

return false;
@@ -442,7 +442,7 @@ static bool ns2501_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)
u8 out_buf[2];

struct i2c_msg msg = {
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = 0,
.len = 2,
.buf = out_buf,
@@ -457,7 +457,7 @@ static bool ns2501_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)

if (!ns->quiet) {
DRM_DEBUG_KMS("Unable to write register 0x%02x to %s:%d\n",
- addr, adapter->name, dvo->slave_addr);
+ addr, adapter->name, dvo->client_addr);
}

return false;
@@ -488,8 +488,8 @@ static bool ns2501_init(struct intel_dvo_device *dvo,
goto out;

if (ch != (NS2501_VID & 0xff)) {
- DRM_DEBUG_KMS("ns2501 not detected got %d: from %s Slave %d.\n",
- ch, adapter->name, dvo->slave_addr);
+ DRM_DEBUG_KMS("ns2501 not detected got %d: from %s Client %d.\n",
+ ch, adapter->name, dvo->client_addr);
goto out;
}

@@ -497,8 +497,8 @@ static bool ns2501_init(struct intel_dvo_device *dvo,
goto out;

if (ch != (NS2501_DID & 0xff)) {
- DRM_DEBUG_KMS("ns2501 not detected got %d: from %s Slave %d.\n",
- ch, adapter->name, dvo->slave_addr);
+ DRM_DEBUG_KMS("ns2501 not detected got %d: from %s Client %d.\n",
+ ch, adapter->name, dvo->client_addr);
goto out;
}
ns->quiet = false;
diff --git a/drivers/gpu/drm/i915/display/dvo_sil164.c b/drivers/gpu/drm/i915/display/dvo_sil164.c
index 6c461024c8e3..e9e4433ffa14 100644
--- a/drivers/gpu/drm/i915/display/dvo_sil164.c
+++ b/drivers/gpu/drm/i915/display/dvo_sil164.c
@@ -79,13 +79,13 @@ static bool sil164_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)

struct i2c_msg msgs[] = {
{
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = 0,
.len = 1,
.buf = out_buf,
},
{
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = I2C_M_RD,
.len = 1,
.buf = in_buf,
@@ -102,7 +102,7 @@ static bool sil164_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)

if (!sil->quiet) {
DRM_DEBUG_KMS("Unable to read register 0x%02x from %s:%02x.\n",
- addr, adapter->name, dvo->slave_addr);
+ addr, adapter->name, dvo->client_addr);
}
return false;
}
@@ -113,7 +113,7 @@ static bool sil164_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)
struct i2c_adapter *adapter = dvo->i2c_bus;
u8 out_buf[2];
struct i2c_msg msg = {
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = 0,
.len = 2,
.buf = out_buf,
@@ -127,7 +127,7 @@ static bool sil164_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)

if (!sil->quiet) {
DRM_DEBUG_KMS("Unable to write register 0x%02x to %s:%d.\n",
- addr, adapter->name, dvo->slave_addr);
+ addr, adapter->name, dvo->client_addr);
}

return false;
@@ -153,8 +153,8 @@ static bool sil164_init(struct intel_dvo_device *dvo,
goto out;

if (ch != (SIL164_VID & 0xff)) {
- DRM_DEBUG_KMS("sil164 not detected got %d: from %s Slave %d.\n",
- ch, adapter->name, dvo->slave_addr);
+ DRM_DEBUG_KMS("sil164 not detected got %d: from %s Client %d.\n",
+ ch, adapter->name, dvo->client_addr);
goto out;
}

@@ -162,8 +162,8 @@ static bool sil164_init(struct intel_dvo_device *dvo,
goto out;

if (ch != (SIL164_DID & 0xff)) {
- DRM_DEBUG_KMS("sil164 not detected got %d: from %s Slave %d.\n",
- ch, adapter->name, dvo->slave_addr);
+ DRM_DEBUG_KMS("sil164 not detected got %d: from %s Client %d.\n",
+ ch, adapter->name, dvo->client_addr);
goto out;
}
sil->quiet = false;
diff --git a/drivers/gpu/drm/i915/display/dvo_tfp410.c b/drivers/gpu/drm/i915/display/dvo_tfp410.c
index 0939e097f4f9..ef1385fc16e7 100644
--- a/drivers/gpu/drm/i915/display/dvo_tfp410.c
+++ b/drivers/gpu/drm/i915/display/dvo_tfp410.c
@@ -100,13 +100,13 @@ static bool tfp410_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)

struct i2c_msg msgs[] = {
{
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = 0,
.len = 1,
.buf = out_buf,
},
{
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = I2C_M_RD,
.len = 1,
.buf = in_buf,
@@ -123,7 +123,7 @@ static bool tfp410_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)

if (!tfp->quiet) {
DRM_DEBUG_KMS("Unable to read register 0x%02x from %s:%02x.\n",
- addr, adapter->name, dvo->slave_addr);
+ addr, adapter->name, dvo->client_addr);
}
return false;
}
@@ -134,7 +134,7 @@ static bool tfp410_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)
struct i2c_adapter *adapter = dvo->i2c_bus;
u8 out_buf[2];
struct i2c_msg msg = {
- .addr = dvo->slave_addr,
+ .addr = dvo->client_addr,
.flags = 0,
.len = 2,
.buf = out_buf,
@@ -148,7 +148,7 @@ static bool tfp410_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)

if (!tfp->quiet) {
DRM_DEBUG_KMS("Unable to write register 0x%02x to %s:%d.\n",
- addr, adapter->name, dvo->slave_addr);
+ addr, adapter->name, dvo->client_addr);
}

return false;
@@ -183,15 +183,15 @@ static bool tfp410_init(struct intel_dvo_device *dvo,

if ((id = tfp410_getid(dvo, TFP410_VID_LO)) != TFP410_VID) {
DRM_DEBUG_KMS("tfp410 not detected got VID %X: from %s "
- "Slave %d.\n",
- id, adapter->name, dvo->slave_addr);
+ "Client %d.\n",
+ id, adapter->name, dvo->client_addr);
goto out;
}

if ((id = tfp410_getid(dvo, TFP410_DID_LO)) != TFP410_DID) {
DRM_DEBUG_KMS("tfp410 not detected got DID %X: from %s "
- "Slave %d.\n",
- id, adapter->name, dvo->slave_addr);
+ "Client %d.\n",
+ id, adapter->name, dvo->client_addr);
goto out;
}
tfp->quiet = false;
diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index fe52c06271ef..dbeb3a89d004 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -69,8 +69,8 @@ struct intel_bios_encoder_data {
struct list_head node;
};

-#define SLAVE_ADDR1 0x70
-#define SLAVE_ADDR2 0x72
+#define CLIENT_ADDR1 0x70
+#define CLIENT_ADDR2 0x72

/* Get BDB block size given a pointer to Block ID. */
static u32 _get_blocksize(const u8 *block_base)
@@ -1231,10 +1231,10 @@ parse_sdvo_device_mapping(struct drm_i915_private *i915)
const struct child_device_config *child = &devdata->child;
struct sdvo_device_mapping *mapping;

- if (child->slave_addr != SLAVE_ADDR1 &&
- child->slave_addr != SLAVE_ADDR2) {
+ if (child->client_addr != CLIENT_ADDR1 &&
+ child->client_addr != CLIENT_ADDR2) {
/*
- * If the slave address is neither 0x70 nor 0x72,
+ * If the client address is neither 0x70 nor 0x72,
* it is not a SDVO device. Skip it.
*/
continue;
@@ -1247,22 +1247,22 @@ parse_sdvo_device_mapping(struct drm_i915_private *i915)
continue;
}
drm_dbg_kms(&i915->drm,
- "the SDVO device with slave addr %2x is found on"
+ "the SDVO device with client addr %2x is found on"
" %s port\n",
- child->slave_addr,
+ child->client_addr,
(child->dvo_port == DEVICE_PORT_DVOB) ?
"SDVOB" : "SDVOC");
mapping = &i915->display.vbt.sdvo_mappings[child->dvo_port - 1];
if (!mapping->initialized) {
mapping->dvo_port = child->dvo_port;
- mapping->slave_addr = child->slave_addr;
+ mapping->client_addr = child->client_addr;
mapping->dvo_wiring = child->dvo_wiring;
mapping->ddc_pin = child->ddc_pin;
mapping->i2c_pin = child->i2c_pin;
mapping->initialized = 1;
drm_dbg_kms(&i915->drm,
"SDVO device: dvo=%x, addr=%x, wiring=%d, ddc_pin=%d, i2c_pin=%d\n",
- mapping->dvo_port, mapping->slave_addr,
+ mapping->dvo_port, mapping->client_addr,
mapping->dvo_wiring, mapping->ddc_pin,
mapping->i2c_pin);
} else {
@@ -1270,11 +1270,11 @@ parse_sdvo_device_mapping(struct drm_i915_private *i915)
"Maybe one SDVO port is shared by "
"two SDVO device.\n");
}
- if (child->slave2_addr) {
+ if (child->client2_addr) {
/* Maybe this is a SDVO device with multiple inputs */
/* And the mapping info is not added */
drm_dbg_kms(&i915->drm,
- "there exists the slave2_addr. Maybe this"
+ "there exists the client2_addr. Maybe this"
" is a SDVO device with multiple inputs.\n");
}
count++;
diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index c587a8efeafc..c408daee412a 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -4327,7 +4327,7 @@ static int intel_ddi_compute_config_late(struct intel_encoder *encoder,
connector->tile_group->id);

/*
- * EDP Transcoders cannot be ensalved
+ * EDP Transcoders cannot be slaves
* make them a master always when present
*/
if (port_sync_transcoders & BIT(TRANSCODER_EDP))
diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h
index 2167dbee5eea..663be73536e7 100644
--- a/drivers/gpu/drm/i915/display/intel_display_core.h
+++ b/drivers/gpu/drm/i915/display/intel_display_core.h
@@ -236,7 +236,7 @@ struct intel_vbt_data {
struct sdvo_device_mapping {
u8 initialized;
u8 dvo_port;
- u8 slave_addr;
+ u8 client_addr;
u8 dvo_wiring;
u8 i2c_pin;
u8 ddc_pin;
diff --git a/drivers/gpu/drm/i915/display/intel_dsi.h b/drivers/gpu/drm/i915/display/intel_dsi.h
index e99c94edfaae..d1031fe69e76 100644
--- a/drivers/gpu/drm/i915/display/intel_dsi.h
+++ b/drivers/gpu/drm/i915/display/intel_dsi.h
@@ -66,7 +66,7 @@ struct intel_dsi {
/* number of DSI lanes */
unsigned int lane_count;

- /* i2c bus associated with the slave device */
+ /* i2c bus associated with the client device */
int i2c_bus_num;

/*
diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
index a5d7fc8418c9..3335d4e31964 100644
--- a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
+++ b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
@@ -56,7 +56,7 @@
#define MIPI_PORT_SHIFT 3

struct i2c_adapter_lookup {
- u16 slave_addr;
+ u16 client_addr;
struct intel_dsi *intel_dsi;
acpi_handle dev_handle;
};
@@ -443,7 +443,7 @@ static int i2c_adapter_lookup(struct acpi_resource *ares, void *data)
if (!i2c_acpi_get_i2c_resource(ares, &sb))
return 1;

- if (lookup->slave_addr != sb->slave_address)
+ if (lookup->client_addr != sb->slave_address)
return 1;

status = acpi_get_handle(lookup->dev_handle,
@@ -460,12 +460,12 @@ static int i2c_adapter_lookup(struct acpi_resource *ares, void *data)
}

static void i2c_acpi_find_adapter(struct intel_dsi *intel_dsi,
- const u16 slave_addr)
+ const u16 client_addr)
{
struct drm_device *drm_dev = intel_dsi->base.base.dev;
struct acpi_device *adev = ACPI_COMPANION(drm_dev->dev);
struct i2c_adapter_lookup lookup = {
- .slave_addr = slave_addr,
+ .client_addr = client_addr,
.intel_dsi = intel_dsi,
.dev_handle = acpi_device_handle(adev),
};
@@ -476,7 +476,7 @@ static void i2c_acpi_find_adapter(struct intel_dsi *intel_dsi,
}
#else
static inline void i2c_acpi_find_adapter(struct intel_dsi *intel_dsi,
- const u16 slave_addr)
+ const u16 client_addr)
{
}
#endif
@@ -488,17 +488,17 @@ static const u8 *mipi_exec_i2c(struct intel_dsi *intel_dsi, const u8 *data)
struct i2c_msg msg;
int ret;
u8 vbt_i2c_bus_num = *(data + 2);
- u16 slave_addr = *(u16 *)(data + 3);
+ u16 client_addr = *(u16 *)(data + 3);
u8 reg_offset = *(data + 5);
u8 payload_size = *(data + 6);
u8 *payload_data;

drm_dbg_kms(&i915->drm, "bus %d client-addr 0x%02x reg 0x%02x data %*ph\n",
- vbt_i2c_bus_num, slave_addr, reg_offset, payload_size, data + 7);
+ vbt_i2c_bus_num, client_addr, reg_offset, payload_size, data + 7);

if (intel_dsi->i2c_bus_num < 0) {
intel_dsi->i2c_bus_num = vbt_i2c_bus_num;
- i2c_acpi_find_adapter(intel_dsi, slave_addr);
+ i2c_acpi_find_adapter(intel_dsi, client_addr);
}

adapter = i2c_get_adapter(intel_dsi->i2c_bus_num);
@@ -514,7 +514,7 @@ static const u8 *mipi_exec_i2c(struct intel_dsi *intel_dsi, const u8 *data)
payload_data[0] = reg_offset;
memcpy(&payload_data[1], (data + 7), payload_size);

- msg.addr = slave_addr;
+ msg.addr = client_addr;
msg.flags = 0;
msg.len = payload_size + 1;
msg.buf = payload_data;
diff --git a/drivers/gpu/drm/i915/display/intel_dvo.c b/drivers/gpu/drm/i915/display/intel_dvo.c
index c076da75b066..7da2725149e4 100644
--- a/drivers/gpu/drm/i915/display/intel_dvo.c
+++ b/drivers/gpu/drm/i915/display/intel_dvo.c
@@ -60,42 +60,42 @@ static const struct intel_dvo_device intel_dvo_devices[] = {
.type = INTEL_DVO_CHIP_TMDS,
.name = "sil164",
.port = PORT_C,
- .slave_addr = SIL164_ADDR,
+ .client_addr = SIL164_ADDR,
.dev_ops = &sil164_ops,
},
{
.type = INTEL_DVO_CHIP_TMDS,
.name = "ch7xxx",
.port = PORT_C,
- .slave_addr = CH7xxx_ADDR,
+ .client_addr = CH7xxx_ADDR,
.dev_ops = &ch7xxx_ops,
},
{
.type = INTEL_DVO_CHIP_TMDS,
.name = "ch7xxx",
.port = PORT_C,
- .slave_addr = 0x75, /* For some ch7010 */
+ .client_addr = 0x75, /* For some ch7010 */
.dev_ops = &ch7xxx_ops,
},
{
.type = INTEL_DVO_CHIP_LVDS,
.name = "ivch",
.port = PORT_A,
- .slave_addr = 0x02, /* Might also be 0x44, 0x84, 0xc4 */
+ .client_addr = 0x02, /* Might also be 0x44, 0x84, 0xc4 */
.dev_ops = &ivch_ops,
},
{
.type = INTEL_DVO_CHIP_TMDS,
.name = "tfp410",
.port = PORT_C,
- .slave_addr = TFP410_ADDR,
+ .client_addr = TFP410_ADDR,
.dev_ops = &tfp410_ops,
},
{
.type = INTEL_DVO_CHIP_LVDS,
.name = "ch7017",
.port = PORT_C,
- .slave_addr = 0x75,
+ .client_addr = 0x75,
.gpio = GMBUS_PIN_DPB,
.dev_ops = &ch7017_ops,
},
@@ -103,7 +103,7 @@ static const struct intel_dvo_device intel_dvo_devices[] = {
.type = INTEL_DVO_CHIP_LVDS_NO_FIXED,
.name = "ns2501",
.port = PORT_B,
- .slave_addr = NS2501_ADDR,
+ .client_addr = NS2501_ADDR,
.dev_ops = &ns2501_ops,
},
};
diff --git a/drivers/gpu/drm/i915/display/intel_dvo_dev.h b/drivers/gpu/drm/i915/display/intel_dvo_dev.h
index af7b04539b93..042949ac8a16 100644
--- a/drivers/gpu/drm/i915/display/intel_dvo_dev.h
+++ b/drivers/gpu/drm/i915/display/intel_dvo_dev.h
@@ -38,7 +38,7 @@ struct intel_dvo_device {
enum port port;
/* GPIO register used for i2c bus to control this device */
u32 gpio;
- int slave_addr;
+ int client_addr;

const struct intel_dvo_dev_ops *dev_ops;
void *dev_priv;
diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.c b/drivers/gpu/drm/i915/display/intel_gmbus.c
index d3e03ed5b79c..cbbdd84b4641 100644
--- a/drivers/gpu/drm/i915/display/intel_gmbus.c
+++ b/drivers/gpu/drm/i915/display/intel_gmbus.c
@@ -478,7 +478,7 @@ gmbus_xfer_read_chunk(struct drm_i915_private *i915,
/*
* HW spec says that 512Bytes in Burst read need special treatment.
* But it doesn't talk about other multiple of 256Bytes. And couldn't locate
- * an I2C slave, which supports such a lengthy burst read too for experiments.
+ * an I2C client, which supports such a lengthy burst read too for experiments.
*
* So until things get clarified on HW support, to avoid the burst read length
* in fold of 256Bytes except 512, max burst read length is fixed at 767Bytes.
@@ -701,7 +701,7 @@ do_gmbus_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num,

/* Toggle the Software Clear Interrupt bit. This has the effect
* of resetting the GMBUS controller and so clearing the
- * BUS_ERROR raised by the slave's NAK.
+ * BUS_ERROR raised by the client's NAK.
*/
intel_de_write_fw(i915, GMBUS1(i915), GMBUS_SW_CLR_INT);
intel_de_write_fw(i915, GMBUS1(i915), 0);
diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c
index 5f9e748adc89..126493c662c5 100644
--- a/drivers/gpu/drm/i915/display/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
@@ -95,7 +95,7 @@ struct intel_sdvo {
struct intel_encoder base;

struct i2c_adapter *i2c;
- u8 slave_addr;
+ u8 client_addr;

struct intel_sdvo_ddc ddc[3];

@@ -255,13 +255,13 @@ static bool intel_sdvo_read_byte(struct intel_sdvo *intel_sdvo, u8 addr, u8 *ch)
struct drm_i915_private *i915 = to_i915(intel_sdvo->base.base.dev);
struct i2c_msg msgs[] = {
{
- .addr = intel_sdvo->slave_addr,
+ .addr = intel_sdvo->client_addr,
.flags = 0,
.len = 1,
.buf = &addr,
},
{
- .addr = intel_sdvo->slave_addr,
+ .addr = intel_sdvo->client_addr,
.flags = I2C_M_RD,
.len = 1,
.buf = ch,
@@ -483,14 +483,14 @@ static bool __intel_sdvo_write_cmd(struct intel_sdvo *intel_sdvo, u8 cmd,
intel_sdvo_debug_write(intel_sdvo, cmd, args, args_len);

for (i = 0; i < args_len; i++) {
- msgs[i].addr = intel_sdvo->slave_addr;
+ msgs[i].addr = intel_sdvo->client_addr;
msgs[i].flags = 0;
msgs[i].len = 2;
msgs[i].buf = buf + 2 *i;
buf[2*i + 0] = SDVO_I2C_ARG_0 - i;
buf[2*i + 1] = ((u8*)args)[i];
}
- msgs[i].addr = intel_sdvo->slave_addr;
+ msgs[i].addr = intel_sdvo->client_addr;
msgs[i].flags = 0;
msgs[i].len = 2;
msgs[i].buf = buf + 2*i;
@@ -499,12 +499,12 @@ static bool __intel_sdvo_write_cmd(struct intel_sdvo *intel_sdvo, u8 cmd,

/* the following two are to read the response */
status = SDVO_I2C_CMD_STATUS;
- msgs[i+1].addr = intel_sdvo->slave_addr;
+ msgs[i+1].addr = intel_sdvo->client_addr;
msgs[i+1].flags = 0;
msgs[i+1].len = 1;
msgs[i+1].buf = &status;

- msgs[i+2].addr = intel_sdvo->slave_addr;
+ msgs[i+2].addr = intel_sdvo->client_addr;
msgs[i+2].flags = I2C_M_RD;
msgs[i+2].len = 1;
msgs[i+2].buf = &status;
@@ -2659,9 +2659,9 @@ intel_sdvo_select_i2c_bus(struct intel_sdvo *sdvo)
else
pin = GMBUS_PIN_DPB;

- drm_dbg_kms(&dev_priv->drm, "[ENCODER:%d:%s] I2C pin %d, slave addr 0x%x\n",
+ drm_dbg_kms(&dev_priv->drm, "[ENCODER:%d:%s] I2C pin %d, client addr 0x%x\n",
sdvo->base.base.base.id, sdvo->base.base.name,
- pin, sdvo->slave_addr);
+ pin, sdvo->client_addr);

sdvo->i2c = intel_gmbus_get_adapter(dev_priv, pin);

@@ -2687,7 +2687,7 @@ intel_sdvo_is_hdmi_connector(struct intel_sdvo *intel_sdvo)
}

static u8
-intel_sdvo_get_slave_addr(struct intel_sdvo *sdvo)
+intel_sdvo_get_client_addr(struct intel_sdvo *sdvo)
{
struct drm_i915_private *dev_priv = to_i915(sdvo->base.base.dev);
const struct sdvo_device_mapping *my_mapping, *other_mapping;
@@ -2701,15 +2701,15 @@ intel_sdvo_get_slave_addr(struct intel_sdvo *sdvo)
}

/* If the BIOS described our SDVO device, take advantage of it. */
- if (my_mapping->slave_addr)
- return my_mapping->slave_addr;
+ if (my_mapping->client_addr)
+ return my_mapping->client_addr;

/*
* If the BIOS only described a different SDVO device, use the
* address that it isn't using.
*/
- if (other_mapping->slave_addr) {
- if (other_mapping->slave_addr == 0x70)
+ if (other_mapping->client_addr) {
+ if (other_mapping->client_addr == 0x70)
return 0x72;
else
return 0x70;
@@ -3412,7 +3412,7 @@ bool intel_sdvo_init(struct drm_i915_private *dev_priv,
"SDVO %c", port_name(port));

intel_sdvo->sdvo_reg = sdvo_reg;
- intel_sdvo->slave_addr = intel_sdvo_get_slave_addr(intel_sdvo) >> 1;
+ intel_sdvo->client_addr = intel_sdvo_get_client_addr(intel_sdvo) >> 1;

intel_sdvo_select_i2c_bus(intel_sdvo);

diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index a9f44abfc9fc..e268224355eb 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -432,7 +432,7 @@ struct child_device_config {
u16 addin_offset;
u8 dvo_port; /* See DEVICE_PORT_* and DVO_PORT_* above */
u8 i2c_pin;
- u8 slave_addr;
+ u8 client_addr;
u8 ddc_pin;
u16 edid_ptr;
u8 dvo_cfg; /* See DEVICE_CFG_* above */
@@ -441,7 +441,7 @@ struct child_device_config {
struct {
u8 dvo2_port;
u8 i2c2_pin;
- u8 slave2_addr;
+ u8 client2_addr;
u8 ddc2_pin;
} __packed;
struct {
diff --git a/drivers/gpu/drm/i915/gvt/edid.c b/drivers/gpu/drm/i915/gvt/edid.c
index af9afdb53c7f..29380c774133 100644
--- a/drivers/gpu/drm/i915/gvt/edid.c
+++ b/drivers/gpu/drm/i915/gvt/edid.c
@@ -42,8 +42,8 @@
#define GMBUS1_TOTAL_BYTES_MASK 0x1ff
#define gmbus1_total_byte_count(v) (((v) >> \
GMBUS1_TOTAL_BYTES_SHIFT) & GMBUS1_TOTAL_BYTES_MASK)
-#define gmbus1_slave_addr(v) (((v) & 0xff) >> 1)
-#define gmbus1_slave_index(v) (((v) >> 8) & 0xff)
+#define gmbus1_client_addr(v) (((v) & 0xff) >> 1)
+#define gmbus1_client_index(v) (((v) >> 8) & 0xff)
#define gmbus1_bus_cycle(v) (((v) >> 25) & 0x7)

/* GMBUS0 bits definitions */
@@ -54,7 +54,7 @@ static unsigned char edid_get_byte(struct intel_vgpu *vgpu)
struct intel_vgpu_i2c_edid *edid = &vgpu->display.i2c_edid;
unsigned char chr = 0;

- if (edid->state == I2C_NOT_SPECIFIED || !edid->slave_selected) {
+ if (edid->state == I2C_NOT_SPECIFIED || !edid->client_selected) {
gvt_vgpu_err("Driver tries to read EDID without proper sequence!\n");
return 0;
}
@@ -179,7 +179,7 @@ static int gmbus1_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
void *p_data, unsigned int bytes)
{
struct intel_vgpu_i2c_edid *i2c_edid = &vgpu->display.i2c_edid;
- u32 slave_addr;
+ u32 client_addr;
u32 wvalue = *(u32 *)p_data;

if (vgpu_vreg(vgpu, offset) & GMBUS_SW_CLR_INT) {
@@ -210,21 +210,21 @@ static int gmbus1_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,

i2c_edid->gmbus.total_byte_count =
gmbus1_total_byte_count(wvalue);
- slave_addr = gmbus1_slave_addr(wvalue);
+ client_addr = gmbus1_client_addr(wvalue);

/* vgpu gmbus only support EDID */
- if (slave_addr == EDID_ADDR) {
- i2c_edid->slave_selected = true;
- } else if (slave_addr != 0) {
+ if (client_addr == EDID_ADDR) {
+ i2c_edid->client_selected = true;
+ } else if (client_addr != 0) {
gvt_dbg_dpy(
- "vgpu%d: unsupported gmbus slave addr(0x%x)\n"
+ "vgpu%d: unsupported gmbus client addr(0x%x)\n"
" gmbus operations will be ignored.\n",
- vgpu->id, slave_addr);
+ vgpu->id, client_addr);
}

if (wvalue & GMBUS_CYCLE_INDEX)
i2c_edid->current_edid_read =
- gmbus1_slave_index(wvalue);
+ gmbus1_client_index(wvalue);

i2c_edid->gmbus.cycle_type = gmbus1_bus_cycle(wvalue);
switch (gmbus1_bus_cycle(wvalue)) {
@@ -523,7 +523,7 @@ void intel_gvt_i2c_handle_aux_ch_write(struct intel_vgpu *vgpu,
} else if (addr == EDID_ADDR) {
i2c_edid->state = I2C_AUX_CH;
i2c_edid->port = port_idx;
- i2c_edid->slave_selected = true;
+ i2c_edid->client_selected = true;
if (intel_vgpu_has_monitor_on_port(vgpu,
port_idx) &&
intel_vgpu_port_is_dp(vgpu, port_idx))
@@ -542,7 +542,7 @@ void intel_gvt_i2c_handle_aux_ch_write(struct intel_vgpu *vgpu,
return;
if (drm_WARN_ON(&i915->drm, msg_length != 4))
return;
- if (i2c_edid->edid_available && i2c_edid->slave_selected) {
+ if (i2c_edid->edid_available && i2c_edid->client_selected) {
unsigned char val = edid_get_byte(vgpu);

aux_data_for_write = (val << 16);
@@ -571,7 +571,7 @@ void intel_vgpu_init_i2c_edid(struct intel_vgpu *vgpu)
edid->state = I2C_NOT_SPECIFIED;

edid->port = -1;
- edid->slave_selected = false;
+ edid->client_selected = false;
edid->edid_available = false;
edid->current_edid_read = 0;

diff --git a/drivers/gpu/drm/i915/gvt/edid.h b/drivers/gpu/drm/i915/gvt/edid.h
index dfe0cbc6aad8..c36f26c5f5cc 100644
--- a/drivers/gpu/drm/i915/gvt/edid.h
+++ b/drivers/gpu/drm/i915/gvt/edid.h
@@ -80,7 +80,7 @@ enum gmbus_cycle_type {
* R/W Protect
* Command and Status.
* bit0 is the direction bit: 1 is read; 0 is write.
- * bit1 - bit7 is slave 7-bit address.
+ * bit1 - bit7 is client 7-bit address.
* bit16 - bit24 total byte count (ignore?)
*
* GMBUS2:
@@ -130,7 +130,7 @@ struct intel_vgpu_i2c_edid {
enum i2c_state state;

unsigned int port;
- bool slave_selected;
+ bool client_selected;
bool edid_available;
unsigned int current_edid_read;

diff --git a/drivers/gpu/drm/i915/gvt/opregion.c b/drivers/gpu/drm/i915/gvt/opregion.c
index d2bed466540a..88fa6877ec90 100644
--- a/drivers/gpu/drm/i915/gvt/opregion.c
+++ b/drivers/gpu/drm/i915/gvt/opregion.c
@@ -86,7 +86,7 @@ struct efp_child_device_config {
u8 skip2;
u8 dvo_port;
u8 i2c_pin; /* for add-in card */
- u8 slave_addr; /* for add-in card */
+ u8 client_addr; /* for add-in card */
u8 ddc_pin;
u16 edid_ptr;
u8 dvo_config;
--
2.34.1


2024-03-29 17:04:09

by Easwar Hariharan

[permalink] [raw]
Subject: [PATCH v0 08/14] media: ivtv: Make I2C terminology more inclusive

I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
with more appropriate terms. Inspired by and following on to Wolfram's
series to fix drivers/i2c/[1], fix the terminology for users of
I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
in the specification.

Compile tested, no functionality changes intended

[1]: https://lore.kernel.org/all/[email protected]/

Signed-off-by: Easwar Hariharan <[email protected]>
---
drivers/media/pci/ivtv/ivtv-i2c.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/media/pci/ivtv/ivtv-i2c.c b/drivers/media/pci/ivtv/ivtv-i2c.c
index c052c57c6dce..967e6a025020 100644
--- a/drivers/media/pci/ivtv/ivtv-i2c.c
+++ b/drivers/media/pci/ivtv/ivtv-i2c.c
@@ -33,14 +33,14 @@
Some more general comments about what we are doing:

The i2c bus is a 2 wire serial bus, with clock (SCL) and data (SDA)
- lines. To communicate on the bus (as a master, we don't act as a slave),
+ lines. To communicate on the bus (as a host, we don't act as a client),
we first initiate a start condition (ivtv_start). We then write the
address of the device that we want to communicate with, along with a flag
- that indicates whether this is a read or a write. The slave then issues
+ that indicates whether this is a read or a write. The client then issues
an ACK signal (ivtv_ack), which tells us that it is ready for reading /
writing. We then proceed with reading or writing (ivtv_read/ivtv_write),
and finally issue a stop condition (ivtv_stop) to make the bus available
- to other masters.
+ to other hosts.

There is an additional form of transaction where a write may be
immediately followed by a read. In this case, there is no intervening
@@ -379,7 +379,7 @@ static int ivtv_waitsda(struct ivtv *itv, int val)
return 0;
}

-/* Wait for the slave to issue an ACK */
+/* Wait for the client to issue an ACK */
static int ivtv_ack(struct ivtv *itv)
{
int ret = 0;
@@ -407,7 +407,7 @@ static int ivtv_ack(struct ivtv *itv)
return ret;
}

-/* Write a single byte to the i2c bus and wait for the slave to ACK */
+/* Write a single byte to the i2c bus and wait for the client to ACK */
static int ivtv_sendbyte(struct ivtv *itv, unsigned char byte)
{
int i, bit;
@@ -471,7 +471,7 @@ static int ivtv_readbyte(struct ivtv *itv, unsigned char *byte, int nack)
return 0;
}

-/* Issue a start condition on the i2c bus to alert slaves to prepare for
+/* Issue a start condition on the i2c bus to alert clients to prepare for
an address write */
static int ivtv_start(struct ivtv *itv)
{
@@ -534,7 +534,7 @@ static int ivtv_stop(struct ivtv *itv)
return 0;
}

-/* Write a message to the given i2c slave. do_stop may be 0 to prevent
+/* Write a message to the given i2c client. do_stop may be 0 to prevent
issuing the i2c stop condition (when following with a read) */
static int ivtv_write(struct ivtv *itv, unsigned char addr, unsigned char *data, u32 len, int do_stop)
{
@@ -558,7 +558,7 @@ static int ivtv_write(struct ivtv *itv, unsigned char addr, unsigned char *data,
return ret;
}

-/* Read data from the given i2c slave. A stop condition is always issued. */
+/* Read data from the given i2c client. A stop condition is always issued. */
static int ivtv_read(struct ivtv *itv, unsigned char addr, unsigned char *data, u32 len)
{
int retry, ret = -EREMOTEIO;
--
2.34.1


2024-03-29 17:04:21

by Easwar Hariharan

[permalink] [raw]
Subject: [PATCH v0 06/14] media: cx18: Make I2C terminology more inclusive

I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
with more appropriate terms. Inspired by and following on to Wolfram's
series to fix drivers/i2c/[1], fix the terminology for users of
I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
in the specification.

I2S specification has also updated the terms in v.3 to use "controller"
and "target" respectively. Make those changes in the relevant spaces as
well.

Compile tested, no functionality changes intended

[1]: https://lore.kernel.org/all/[email protected]/

Signed-off-by: Easwar Hariharan <[email protected]>
---
drivers/media/pci/cx18/cx18-av-firmware.c | 8 ++++----
drivers/media/pci/cx18/cx18-cards.c | 6 +++---
drivers/media/pci/cx18/cx18-cards.h | 4 ++--
drivers/media/pci/cx18/cx18-gpio.c | 6 +++---
4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/media/pci/cx18/cx18-av-firmware.c b/drivers/media/pci/cx18/cx18-av-firmware.c
index 61aeb8c9af7f..906e0b33cffc 100644
--- a/drivers/media/pci/cx18/cx18-av-firmware.c
+++ b/drivers/media/pci/cx18/cx18-av-firmware.c
@@ -140,22 +140,22 @@ int cx18_av_loadfw(struct cx18 *cx)
cx18_av_and_or4(cx, CXADEC_PIN_CTRL1, ~0, 0x78000);

/* Audio input control 1 set to Sony mode */
- /* Audio output input 2 is 0 for slave operation input */
+ /* Audio output input 2 is 0 for target operation input */
/* 0xC4000914[5]: 0 = left sample on WS=0, 1 = left sample on WS=1 */
/* 0xC4000914[7]: 0 = Philips mode, 1 = Sony mode (1st SCK rising edge
after WS transition for first bit of audio word. */
cx18_av_write4(cx, CXADEC_I2S_IN_CTL, 0x000000A0);

/* Audio output control 1 is set to Sony mode */
- /* Audio output control 2 is set to 1 for master mode */
+ /* Audio output control 2 is set to 1 for controller mode */
/* 0xC4000918[5]: 0 = left sample on WS=0, 1 = left sample on WS=1 */
/* 0xC4000918[7]: 0 = Philips mode, 1 = Sony mode (1st SCK rising edge
after WS transition for first bit of audio word. */
- /* 0xC4000918[8]: 0 = slave operation, 1 = master (SCK_OUT and WS_OUT
+ /* 0xC4000918[8]: 0 = target operation, 1 = controller (SCK_OUT and WS_OUT
are generated) */
cx18_av_write4(cx, CXADEC_I2S_OUT_CTL, 0x000001A0);

- /* set alt I2s master clock to /0x16 and enable alt divider i2s
+ /* set alt I2s controller clock to /0x16 and enable alt divider i2s
passthrough */
cx18_av_write4(cx, CXADEC_PIN_CFG3, 0x5600B687);

diff --git a/drivers/media/pci/cx18/cx18-cards.c b/drivers/media/pci/cx18/cx18-cards.c
index f5a30959a367..d9b859ee4b1b 100644
--- a/drivers/media/pci/cx18/cx18-cards.c
+++ b/drivers/media/pci/cx18/cx18-cards.c
@@ -82,7 +82,7 @@ static const struct cx18_card cx18_card_hvr1600_esmt = {
},
.gpio_init.initial_value = 0x3001,
.gpio_init.direction = 0x3001,
- .gpio_i2c_slave_reset = {
+ .gpio_i2c_client_reset = {
.active_lo_mask = 0x3001,
.msecs_asserted = 10,
.msecs_recovery = 40,
@@ -129,7 +129,7 @@ static const struct cx18_card cx18_card_hvr1600_s5h1411 = {
},
.gpio_init.initial_value = 0x3801,
.gpio_init.direction = 0x3801,
- .gpio_i2c_slave_reset = {
+ .gpio_i2c_client_reset = {
.active_lo_mask = 0x3801,
.msecs_asserted = 10,
.msecs_recovery = 40,
@@ -176,7 +176,7 @@ static const struct cx18_card cx18_card_hvr1600_samsung = {
},
.gpio_init.initial_value = 0x3001,
.gpio_init.direction = 0x3001,
- .gpio_i2c_slave_reset = {
+ .gpio_i2c_client_reset = {
.active_lo_mask = 0x3001,
.msecs_asserted = 10,
.msecs_recovery = 40,
diff --git a/drivers/media/pci/cx18/cx18-cards.h b/drivers/media/pci/cx18/cx18-cards.h
index ae9cf5bfdd59..86f41ec6ca2f 100644
--- a/drivers/media/pci/cx18/cx18-cards.h
+++ b/drivers/media/pci/cx18/cx18-cards.h
@@ -69,7 +69,7 @@ struct cx18_gpio_init { /* set initial GPIO DIR and OUT values */
u32 initial_value;
};

-struct cx18_gpio_i2c_slave_reset {
+struct cx18_gpio_i2c_client_reset {
u32 active_lo_mask; /* GPIO outputs that reset i2c chips when low */
u32 active_hi_mask; /* GPIO outputs that reset i2c chips when high */
int msecs_asserted; /* time period reset must remain asserted */
@@ -121,7 +121,7 @@ struct cx18_card {
/* GPIO card-specific settings */
u8 xceive_pin; /* XCeive tuner GPIO reset pin */
struct cx18_gpio_init gpio_init;
- struct cx18_gpio_i2c_slave_reset gpio_i2c_slave_reset;
+ struct cx18_gpio_i2c_client_reset gpio_i2c_client_reset;
struct cx18_gpio_audio_input gpio_audio_input;

struct cx18_card_tuner tuners[CX18_CARD_MAX_TUNERS];
diff --git a/drivers/media/pci/cx18/cx18-gpio.c b/drivers/media/pci/cx18/cx18-gpio.c
index c85eb8d25837..82c9104b9e85 100644
--- a/drivers/media/pci/cx18/cx18-gpio.c
+++ b/drivers/media/pci/cx18/cx18-gpio.c
@@ -204,9 +204,9 @@ static int resetctrl_log_status(struct v4l2_subdev *sd)
static int resetctrl_reset(struct v4l2_subdev *sd, u32 val)
{
struct cx18 *cx = v4l2_get_subdevdata(sd);
- const struct cx18_gpio_i2c_slave_reset *p;
+ const struct cx18_gpio_i2c_client_reset *p;

- p = &cx->card->gpio_i2c_slave_reset;
+ p = &cx->card->gpio_i2c_client_reset;
switch (val) {
case CX18_GPIO_RESET_I2C:
gpio_reset_seq(cx, p->active_lo_mask, p->active_hi_mask,
@@ -309,7 +309,7 @@ void cx18_reset_ir_gpio(void *data)
{
struct cx18 *cx = to_cx18(data);

- if (cx->card->gpio_i2c_slave_reset.ir_reset_mask == 0)
+ if (cx->card->gpio_i2c_client_reset.ir_reset_mask == 0)
return;

CX18_DEBUG_INFO("Resetting IR microcontroller\n");
--
2.34.1


2024-03-29 17:04:50

by Easwar Hariharan

[permalink] [raw]
Subject: [PATCH v0 10/14] sfc: falcon: Make I2C terminology more inclusive

I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
with more appropriate terms. Inspired by and following on to Wolfram's
series to fix drivers/i2c/[1], fix the terminology for users of
I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
in the specification.

Compile tested, no functionality changes intended

[1]: https://lore.kernel.org/all/[email protected]/

Signed-off-by: Easwar Hariharan <[email protected]>
---
drivers/net/ethernet/sfc/falcon/falcon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/sfc/falcon/falcon.c b/drivers/net/ethernet/sfc/falcon/falcon.c
index 7a1c9337081b..147e7c8e3c02 100644
--- a/drivers/net/ethernet/sfc/falcon/falcon.c
+++ b/drivers/net/ethernet/sfc/falcon/falcon.c
@@ -367,7 +367,7 @@ static const struct i2c_algo_bit_data falcon_i2c_bit_operations = {
.getsda = falcon_getsda,
.getscl = falcon_getscl,
.udelay = 5,
- /* Wait up to 50 ms for slave to let us pull SCL high */
+ /* Wait up to 50 ms for client to let us pull SCL high */
.timeout = DIV_ROUND_UP(HZ, 20),
};

--
2.34.1


2024-03-29 17:05:08

by Easwar Hariharan

[permalink] [raw]
Subject: [PATCH v0 04/14] media: au0828: Make I2C terminology more inclusive

I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
with more appropriate terms. Inspired by and following on to Wolfram's
series to fix drivers/i2c/[1], fix the terminology for users of
I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
in the specification.

Compile tested, no functionality changes intended

[1]: https://lore.kernel.org/all/[email protected]/

Signed-off-by: Easwar Hariharan <[email protected]>
---
drivers/media/usb/au0828/au0828-i2c.c | 4 ++--
drivers/media/usb/au0828/au0828-input.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/usb/au0828/au0828-i2c.c b/drivers/media/usb/au0828/au0828-i2c.c
index 749f90d73b5b..3e66d42bf134 100644
--- a/drivers/media/usb/au0828/au0828-i2c.c
+++ b/drivers/media/usb/au0828/au0828-i2c.c
@@ -23,7 +23,7 @@ MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time");
#define I2C_WAIT_DELAY 25
#define I2C_WAIT_RETRY 1000

-static inline int i2c_slave_did_read_ack(struct i2c_adapter *i2c_adap)
+static inline int i2c_client_did_read_ack(struct i2c_adapter *i2c_adap)
{
struct au0828_dev *dev = i2c_adap->algo_data;
return au0828_read(dev, AU0828_I2C_STATUS_201) &
@@ -35,7 +35,7 @@ static int i2c_wait_read_ack(struct i2c_adapter *i2c_adap)
int count;

for (count = 0; count < I2C_WAIT_RETRY; count++) {
- if (!i2c_slave_did_read_ack(i2c_adap))
+ if (!i2c_client_did_read_ack(i2c_adap))
break;
udelay(I2C_WAIT_DELAY);
}
diff --git a/drivers/media/usb/au0828/au0828-input.c b/drivers/media/usb/au0828/au0828-input.c
index 3d3368202cd0..98a57b6e02e2 100644
--- a/drivers/media/usb/au0828/au0828-input.c
+++ b/drivers/media/usb/au0828/au0828-input.c
@@ -30,7 +30,7 @@ struct au0828_rc {
int polling;
struct delayed_work work;

- /* i2c slave address of external device (if used) */
+ /* i2c client address of external device (if used) */
u16 i2c_dev_addr;

int (*get_key_i2c)(struct au0828_rc *ir);
--
2.34.1


2024-03-29 17:05:19

by Easwar Hariharan

[permalink] [raw]
Subject: [PATCH v0 05/14] media: cobalt: Make I2C terminology more inclusive

I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
with more appropriate terms. Inspired by and following on to Wolfram's
series to fix drivers/i2c/[1], fix the terminology for users of
I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
in the specification.

Compile tested, no functionality changes intended

[1]: https://lore.kernel.org/all/[email protected]/

Signed-off-by: Easwar Hariharan <[email protected]>
---
drivers/media/pci/cobalt/cobalt-i2c.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/pci/cobalt/cobalt-i2c.c b/drivers/media/pci/cobalt/cobalt-i2c.c
index 10c9ee33f73e..d2963370f949 100644
--- a/drivers/media/pci/cobalt/cobalt-i2c.c
+++ b/drivers/media/pci/cobalt/cobalt-i2c.c
@@ -45,10 +45,10 @@ struct cobalt_i2c_regs {
/* I2C stop condition */
#define M00018_CR_BITMAP_STO_MSK (1 << 6)

-/* I2C read from slave */
+/* I2C read from client */
#define M00018_CR_BITMAP_RD_MSK (1 << 5)

-/* I2C write to slave */
+/* I2C write to client */
#define M00018_CR_BITMAP_WR_MSK (1 << 4)

/* I2C ack */
@@ -59,7 +59,7 @@ struct cobalt_i2c_regs {

/* SR[7:0] - Status register */

-/* Receive acknowledge from slave */
+/* Receive acknowledge from client */
#define M00018_SR_BITMAP_RXACK_MSK (1 << 7)

/* Busy, I2C bus busy (as defined by start / stop bits) */
--
2.34.1


2024-03-29 17:06:12

by Easwar Hariharan

[permalink] [raw]
Subject: [PATCH v0 07/14] media: cx25821: Make I2C terminology more inclusive

I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
with more appropriate terms. Inspired by and following on to Wolfram's
series to fix drivers/i2c/[1], fix the terminology for users of
I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
in the specification.

Compile tested, no functionality changes intended

[1]: https://lore.kernel.org/all/[email protected]/

Signed-off-by: Easwar Hariharan <[email protected]>
---
drivers/media/pci/cx25821/cx25821-i2c.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/pci/cx25821/cx25821-i2c.c b/drivers/media/pci/cx25821/cx25821-i2c.c
index 0ef4cd6528a0..bad8fb9f5319 100644
--- a/drivers/media/pci/cx25821/cx25821-i2c.c
+++ b/drivers/media/pci/cx25821/cx25821-i2c.c
@@ -33,7 +33,7 @@ do { \
#define I2C_EXTEND (1 << 3)
#define I2C_NOSTOP (1 << 4)

-static inline int i2c_slave_did_ack(struct i2c_adapter *i2c_adap)
+static inline int i2c_client_did_ack(struct i2c_adapter *i2c_adap)
{
struct cx25821_i2c *bus = i2c_adap->algo_data;
struct cx25821_dev *dev = bus->dev;
@@ -85,7 +85,7 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap,
if (!i2c_wait_done(i2c_adap))
return -EIO;

- if (!i2c_slave_did_ack(i2c_adap))
+ if (!i2c_client_did_ack(i2c_adap))
return -EIO;

dprintk(1, "%s(): returns 0\n", __func__);
@@ -174,7 +174,7 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap,
cx_write(bus->reg_ctrl, bus->i2c_period | (1 << 2) | 1);
if (!i2c_wait_done(i2c_adap))
return -EIO;
- if (!i2c_slave_did_ack(i2c_adap))
+ if (!i2c_client_did_ack(i2c_adap))
return -EIO;

dprintk(1, "%s(): returns 0\n", __func__);
--
2.34.1


2024-03-29 17:07:09

by Easwar Hariharan

[permalink] [raw]
Subject: [PATCH v0 09/14] media: cx23885: Make I2C terminology more inclusive

I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
with more appropriate terms. Inspired by and following on to Wolfram's
series to fix drivers/i2c/[1], fix the terminology for users of
I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
in the specification.

Compile tested, no functionality changes intended

[1]: https://lore.kernel.org/all/[email protected]/

Signed-off-by: Easwar Hariharan <[email protected]>
---
drivers/media/pci/cx23885/cx23885-f300.c | 8 ++++----
drivers/media/pci/cx23885/cx23885-i2c.c | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/media/pci/cx23885/cx23885-f300.c b/drivers/media/pci/cx23885/cx23885-f300.c
index ac1c434e8e24..5f937c281793 100644
--- a/drivers/media/pci/cx23885/cx23885-f300.c
+++ b/drivers/media/pci/cx23885/cx23885-f300.c
@@ -92,7 +92,7 @@ static u8 f300_xfer(struct dvb_frontend *fe, u8 *buf)
f300_set_line(dev, F300_RESET, 0);/* begin to send data */
msleep(1);

- f300_send_byte(dev, 0xe0);/* the slave address is 0xe0, write */
+ f300_send_byte(dev, 0xe0);/* the client address is 0xe0, write */
msleep(1);

temp = buf[0];
@@ -112,10 +112,10 @@ static u8 f300_xfer(struct dvb_frontend *fe, u8 *buf)
}

if (i > 7) {
- pr_err("%s: timeout, the slave no response\n",
+ pr_err("%s: timeout, the client no response\n",
__func__);
- ret = 1; /* timeout, the slave no response */
- } else { /* the slave not busy, prepare for getting data */
+ ret = 1; /* timeout, the client no response */
+ } else { /* the client not busy, prepare for getting data */
f300_set_line(dev, F300_RESET, 0);/*ready...*/
msleep(1);
f300_send_byte(dev, 0xe1);/* 0xe1 is Read */
diff --git a/drivers/media/pci/cx23885/cx23885-i2c.c b/drivers/media/pci/cx23885/cx23885-i2c.c
index f51fad33dc04..385af2a893b4 100644
--- a/drivers/media/pci/cx23885/cx23885-i2c.c
+++ b/drivers/media/pci/cx23885/cx23885-i2c.c
@@ -34,7 +34,7 @@ MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time");
#define I2C_EXTEND (1 << 3)
#define I2C_NOSTOP (1 << 4)

-static inline int i2c_slave_did_ack(struct i2c_adapter *i2c_adap)
+static inline int i2c_client_did_ack(struct i2c_adapter *i2c_adap)
{
struct cx23885_i2c *bus = i2c_adap->algo_data;
struct cx23885_dev *dev = bus->dev;
@@ -84,7 +84,7 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap,
cx_write(bus->reg_ctrl, bus->i2c_period | (1 << 2));
if (!i2c_wait_done(i2c_adap))
return -EIO;
- if (!i2c_slave_did_ack(i2c_adap))
+ if (!i2c_client_did_ack(i2c_adap))
return -ENXIO;

dprintk(1, "%s() returns 0\n", __func__);
@@ -163,7 +163,7 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap,
cx_write(bus->reg_ctrl, bus->i2c_period | (1 << 2) | 1);
if (!i2c_wait_done(i2c_adap))
return -EIO;
- if (!i2c_slave_did_ack(i2c_adap))
+ if (!i2c_client_did_ack(i2c_adap))
return -ENXIO;


--
2.34.1


2024-03-29 17:08:18

by Easwar Hariharan

[permalink] [raw]
Subject: [PATCH v0 12/14] fbdev/viafb: Make I2C terminology more inclusive

I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
with more appropriate terms. Inspired by and following on to Wolfram's
series to fix drivers/i2c/[1], fix the terminology for users of
I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
in the specification.

Compile tested, no functionality changes intended

[1]: https://lore.kernel.org/all/[email protected]/

Signed-off-by: Easwar Hariharan <[email protected]>
---
drivers/video/fbdev/via/chip.h | 8 ++++----
drivers/video/fbdev/via/dvi.c | 24 ++++++++++++------------
drivers/video/fbdev/via/lcd.c | 6 +++---
drivers/video/fbdev/via/via_aux.h | 2 +-
drivers/video/fbdev/via/via_i2c.c | 12 ++++++------
drivers/video/fbdev/via/vt1636.c | 6 +++---
6 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/drivers/video/fbdev/via/chip.h b/drivers/video/fbdev/via/chip.h
index f0a19cbcb9e5..1ea6d4ce79e7 100644
--- a/drivers/video/fbdev/via/chip.h
+++ b/drivers/video/fbdev/via/chip.h
@@ -69,7 +69,7 @@
#define VT1632_TMDS 0x01
#define INTEGRATED_TMDS 0x42

-/* Definition TMDS Trasmitter I2C Slave Address */
+/* Definition TMDS Trasmitter I2C Client Address */
#define VT1632_TMDS_I2C_ADDR 0x10

/**************************************************/
@@ -88,21 +88,21 @@
#define TX_DATA_DDR_MODE 0x04
#define TX_DATA_SDR_MODE 0x08

-/* Definition LVDS Trasmitter I2C Slave Address */
+/* Definition LVDS Trasmitter I2C Client Address */
#define VT1631_LVDS_I2C_ADDR 0x70
#define VT3271_LVDS_I2C_ADDR 0x80
#define VT1636_LVDS_I2C_ADDR 0x80

struct tmds_chip_information {
int tmds_chip_name;
- int tmds_chip_slave_addr;
+ int tmds_chip_client_addr;
int output_interface;
int i2c_port;
};

struct lvds_chip_information {
int lvds_chip_name;
- int lvds_chip_slave_addr;
+ int lvds_chip_client_addr;
int output_interface;
int i2c_port;
};
diff --git a/drivers/video/fbdev/via/dvi.c b/drivers/video/fbdev/via/dvi.c
index 13147e3066eb..db7db26416c3 100644
--- a/drivers/video/fbdev/via/dvi.c
+++ b/drivers/video/fbdev/via/dvi.c
@@ -70,7 +70,7 @@ bool viafb_tmds_trasmitter_identify(void)
/* Check for VT1632: */
viaparinfo->chip_info->tmds_chip_info.tmds_chip_name = VT1632_TMDS;
viaparinfo->chip_info->
- tmds_chip_info.tmds_chip_slave_addr = VT1632_TMDS_I2C_ADDR;
+ tmds_chip_info.tmds_chip_client_addr = VT1632_TMDS_I2C_ADDR;
viaparinfo->chip_info->tmds_chip_info.i2c_port = VIA_PORT_31;
if (check_tmds_chip(VT1632_DEVICE_ID_REG, VT1632_DEVICE_ID)) {
/*
@@ -128,14 +128,14 @@ bool viafb_tmds_trasmitter_identify(void)
viaparinfo->chip_info->
tmds_chip_info.tmds_chip_name = NON_TMDS_TRANSMITTER;
viaparinfo->chip_info->tmds_chip_info.
- tmds_chip_slave_addr = VT1632_TMDS_I2C_ADDR;
+ tmds_chip_client_addr = VT1632_TMDS_I2C_ADDR;
return false;
}

static void tmds_register_write(int index, u8 data)
{
viafb_i2c_writebyte(viaparinfo->chip_info->tmds_chip_info.i2c_port,
- viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr,
+ viaparinfo->chip_info->tmds_chip_info.tmds_chip_client_addr,
index, data);
}

@@ -144,7 +144,7 @@ static int tmds_register_read(int index)
u8 data;

viafb_i2c_readbyte(viaparinfo->chip_info->tmds_chip_info.i2c_port,
- (u8) viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr,
+ (u8) viaparinfo->chip_info->tmds_chip_info.tmds_chip_client_addr,
(u8) index, &data);
return data;
}
@@ -152,7 +152,7 @@ static int tmds_register_read(int index)
static int tmds_register_read_bytes(int index, u8 *buff, int buff_len)
{
viafb_i2c_readbytes(viaparinfo->chip_info->tmds_chip_info.i2c_port,
- (u8) viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr,
+ (u8) viaparinfo->chip_info->tmds_chip_info.tmds_chip_client_addr,
(u8) index, buff, buff_len);
return 0;
}
@@ -256,14 +256,14 @@ static int viafb_dvi_query_EDID(void)

DEBUG_MSG(KERN_INFO "viafb_dvi_query_EDID!!\n");

- restore = viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr;
- viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr = 0xA0;
+ restore = viaparinfo->chip_info->tmds_chip_info.tmds_chip_client_addr;
+ viaparinfo->chip_info->tmds_chip_info.tmds_chip_client_addr = 0xA0;

data0 = (u8) tmds_register_read(0x00);
data1 = (u8) tmds_register_read(0x01);
if ((data0 == 0) && (data1 == 0xFF)) {
viaparinfo->chip_info->
- tmds_chip_info.tmds_chip_slave_addr = restore;
+ tmds_chip_info.tmds_chip_client_addr = restore;
return EDID_VERSION_1; /* Found EDID1 Table */
}

@@ -280,8 +280,8 @@ static void dvi_get_panel_size_from_DDCv1(

DEBUG_MSG(KERN_INFO "\n dvi_get_panel_size_from_DDCv1 \n");

- restore = tmds_chip->tmds_chip_slave_addr;
- tmds_chip->tmds_chip_slave_addr = 0xA0;
+ restore = tmds_chip->tmds_chip_client_addr;
+ tmds_chip->tmds_chip_client_addr = 0xA0;
for (i = 0x25; i < 0x6D; i++) {
switch (i) {
case 0x36:
@@ -306,7 +306,7 @@ static void dvi_get_panel_size_from_DDCv1(

DEBUG_MSG(KERN_INFO "DVI max pixelclock = %d\n",
tmds_setting->max_pixel_clock);
- tmds_chip->tmds_chip_slave_addr = restore;
+ tmds_chip->tmds_chip_client_addr = restore;
}

/* If Disable DVI, turn off pad */
@@ -427,7 +427,7 @@ void viafb_dvi_enable(void)
viafb_i2c_writebyte(viaparinfo->chip_info->
tmds_chip_info.i2c_port,
viaparinfo->chip_info->
- tmds_chip_info.tmds_chip_slave_addr,
+ tmds_chip_info.tmds_chip_client_addr,
0x08, data);
}
}
diff --git a/drivers/video/fbdev/via/lcd.c b/drivers/video/fbdev/via/lcd.c
index beec5c8d4d08..9a6e4ac9e551 100644
--- a/drivers/video/fbdev/via/lcd.c
+++ b/drivers/video/fbdev/via/lcd.c
@@ -147,7 +147,7 @@ bool viafb_lvds_trasmitter_identify(void)
return true;
/* Check for VT1631: */
viaparinfo->chip_info->lvds_chip_info.lvds_chip_name = VT1631_LVDS;
- viaparinfo->chip_info->lvds_chip_info.lvds_chip_slave_addr =
+ viaparinfo->chip_info->lvds_chip_info.lvds_chip_client_addr =
VT1631_LVDS_I2C_ADDR;

if (check_lvds_chip(VT1631_DEVICE_ID_REG, VT1631_DEVICE_ID)) {
@@ -161,7 +161,7 @@ bool viafb_lvds_trasmitter_identify(void)

viaparinfo->chip_info->lvds_chip_info.lvds_chip_name =
NON_LVDS_TRANSMITTER;
- viaparinfo->chip_info->lvds_chip_info.lvds_chip_slave_addr =
+ viaparinfo->chip_info->lvds_chip_info.lvds_chip_client_addr =
VT1631_LVDS_I2C_ADDR;
return false;
}
@@ -327,7 +327,7 @@ static int lvds_register_read(int index)
u8 data;

viafb_i2c_readbyte(VIA_PORT_2C,
- (u8) viaparinfo->chip_info->lvds_chip_info.lvds_chip_slave_addr,
+ (u8) viaparinfo->chip_info->lvds_chip_info.lvds_chip_client_addr,
(u8) index, &data);
return data;
}
diff --git a/drivers/video/fbdev/via/via_aux.h b/drivers/video/fbdev/via/via_aux.h
index 0933bbf20e58..e2b617b1e6fd 100644
--- a/drivers/video/fbdev/via/via_aux.h
+++ b/drivers/video/fbdev/via/via_aux.h
@@ -24,7 +24,7 @@ struct via_aux_drv {
struct list_head chain; /* chain to support multiple drivers */

struct via_aux_bus *bus; /* the I2C bus used */
- u8 addr; /* the I2C slave address */
+ u8 addr; /* the I2C client address */

const char *name; /* human readable name of the driver */
void *data; /* private data of this driver */
diff --git a/drivers/video/fbdev/via/via_i2c.c b/drivers/video/fbdev/via/via_i2c.c
index 582502810575..907c739475d0 100644
--- a/drivers/video/fbdev/via/via_i2c.c
+++ b/drivers/video/fbdev/via/via_i2c.c
@@ -104,7 +104,7 @@ static void via_i2c_setsda(void *data, int state)
spin_unlock_irqrestore(&i2c_vdev->reg_lock, flags);
}

-int viafb_i2c_readbyte(u8 adap, u8 slave_addr, u8 index, u8 *pdata)
+int viafb_i2c_readbyte(u8 adap, u8 client_addr, u8 index, u8 *pdata)
{
int ret;
u8 mm1[] = {0x00};
@@ -115,7 +115,7 @@ int viafb_i2c_readbyte(u8 adap, u8 slave_addr, u8 index, u8 *pdata)
*pdata = 0;
msgs[0].flags = 0;
msgs[1].flags = I2C_M_RD;
- msgs[0].addr = msgs[1].addr = slave_addr / 2;
+ msgs[0].addr = msgs[1].addr = client_addr / 2;
mm1[0] = index;
msgs[0].len = 1; msgs[1].len = 1;
msgs[0].buf = mm1; msgs[1].buf = pdata;
@@ -128,7 +128,7 @@ int viafb_i2c_readbyte(u8 adap, u8 slave_addr, u8 index, u8 *pdata)
return ret;
}

-int viafb_i2c_writebyte(u8 adap, u8 slave_addr, u8 index, u8 data)
+int viafb_i2c_writebyte(u8 adap, u8 client_addr, u8 index, u8 data)
{
int ret;
u8 msg[2] = { index, data };
@@ -137,7 +137,7 @@ int viafb_i2c_writebyte(u8 adap, u8 slave_addr, u8 index, u8 data)
if (!via_i2c_par[adap].is_active)
return -ENODEV;
msgs.flags = 0;
- msgs.addr = slave_addr / 2;
+ msgs.addr = client_addr / 2;
msgs.len = 2;
msgs.buf = msg;
ret = i2c_transfer(&via_i2c_par[adap].adapter, &msgs, 1);
@@ -149,7 +149,7 @@ int viafb_i2c_writebyte(u8 adap, u8 slave_addr, u8 index, u8 data)
return ret;
}

-int viafb_i2c_readbytes(u8 adap, u8 slave_addr, u8 index, u8 *buff, int buff_len)
+int viafb_i2c_readbytes(u8 adap, u8 client_addr, u8 index, u8 *buff, int buff_len)
{
int ret;
u8 mm1[] = {0x00};
@@ -159,7 +159,7 @@ int viafb_i2c_readbytes(u8 adap, u8 slave_addr, u8 index, u8 *buff, int buff_len
return -ENODEV;
msgs[0].flags = 0;
msgs[1].flags = I2C_M_RD;
- msgs[0].addr = msgs[1].addr = slave_addr / 2;
+ msgs[0].addr = msgs[1].addr = client_addr / 2;
mm1[0] = index;
msgs[0].len = 1; msgs[1].len = buff_len;
msgs[0].buf = mm1; msgs[1].buf = buff;
diff --git a/drivers/video/fbdev/via/vt1636.c b/drivers/video/fbdev/via/vt1636.c
index 8d8cfdb05618..614e5c29a449 100644
--- a/drivers/video/fbdev/via/vt1636.c
+++ b/drivers/video/fbdev/via/vt1636.c
@@ -44,7 +44,7 @@ u8 viafb_gpio_i2c_read_lvds(struct lvds_setting_information
u8 data;

viafb_i2c_readbyte(plvds_chip_info->i2c_port,
- plvds_chip_info->lvds_chip_slave_addr, index, &data);
+ plvds_chip_info->lvds_chip_client_addr, index, &data);
return data;
}

@@ -60,7 +60,7 @@ void viafb_gpio_i2c_write_mask_lvds(struct lvds_setting_information
data = (data & (~io_data.Mask)) | io_data.Data;

viafb_i2c_writebyte(plvds_chip_info->i2c_port,
- plvds_chip_info->lvds_chip_slave_addr, index, data);
+ plvds_chip_info->lvds_chip_client_addr, index, data);
}

void viafb_init_lvds_vt1636(struct lvds_setting_information
@@ -113,7 +113,7 @@ bool viafb_lvds_identify_vt1636(u8 i2c_adapter)
DEBUG_MSG(KERN_INFO "viafb_lvds_identify_vt1636.\n");

/* Sense VT1636 LVDS Transmiter */
- viaparinfo->chip_info->lvds_chip_info.lvds_chip_slave_addr =
+ viaparinfo->chip_info->lvds_chip_info.lvds_chip_client_addr =
VT1636_LVDS_I2C_ADDR;

/* Check vendor ID first: */
--
2.34.1


2024-03-29 17:09:12

by Easwar Hariharan

[permalink] [raw]
Subject: [PATCH v0 14/14] i2c and treewide: Make I2C terminology more inclusive

I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
with more appropriate terms. Inspired by and following on to Wolfram's
series to fix drivers/i2c[1], fix the terminology for users of
I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
in the specification.

Compile tested, no functionality changes intended

[1]: https://lore.kernel.org/all/[email protected]/

Signed-off-by: Easwar Hariharan <[email protected]>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 2 +-
drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c | 2 +-
drivers/gpu/drm/gma500/cdv_intel_dp.c | 2 +-
drivers/gpu/drm/gma500/intel_gmbus.c | 4 ++--
drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c | 2 +-
drivers/gpu/drm/gma500/psb_intel_sdvo.c | 2 +-
drivers/gpu/drm/i915/display/intel_gmbus.c | 4 ++--
drivers/gpu/drm/i915/display/intel_sdvo.c | 4 ++--
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c | 2 +-
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c | 2 +-
drivers/gpu/drm/radeon/radeon_i2c.c | 4 ++--
drivers/i2c/algos/i2c-algo-bit.c | 12 ++++++------
drivers/media/pci/bt8xx/bttv-i2c.c | 2 +-
drivers/media/pci/cobalt/cobalt-i2c.c | 2 +-
drivers/media/pci/cx23885/cx23885-i2c.c | 2 +-
drivers/media/pci/cx25821/cx25821-i2c.c | 2 +-
drivers/media/pci/dm1105/dm1105.c | 2 +-
drivers/media/pci/ivtv/ivtv-i2c.c | 2 +-
drivers/media/pci/saa7164/saa7164-i2c.c | 2 +-
drivers/media/usb/au0828/au0828-i2c.c | 2 +-
drivers/video/fbdev/mb862xx/mb862xx-i2c.c | 2 +-
21 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
index a34626882b67..75793e493df6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
@@ -154,7 +154,7 @@ static void amdgpu_i2c_set_data(void *i2c_priv, int data)
}

static const struct i2c_algorithm amdgpu_atombios_i2c_algo = {
- .master_xfer = amdgpu_atombios_i2c_xfer,
+ .xfer = amdgpu_atombios_i2c_xfer,
.functionality = amdgpu_atombios_i2c_func,
};

diff --git a/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c b/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
index f2fc96d1cd7b..1d909d33cd15 100644
--- a/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
+++ b/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
@@ -714,7 +714,7 @@ static u32 smu_v11_0_i2c_func(struct i2c_adapter *adap)
}

static const struct i2c_algorithm smu_v11_0_i2c_algo = {
- .master_xfer = smu_v11_0_i2c_xfer,
+ .xfer = smu_v11_0_i2c_xfer,
.functionality = smu_v11_0_i2c_func,
};

diff --git a/drivers/gpu/drm/gma500/cdv_intel_dp.c b/drivers/gpu/drm/gma500/cdv_intel_dp.c
index dd1eb7e9877d..d6f3c3bc169f 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_dp.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_dp.c
@@ -194,7 +194,7 @@ i2c_algo_dp_aux_functionality(struct i2c_adapter *adapter)
}

static const struct i2c_algorithm i2c_dp_aux_algo = {
- .master_xfer = i2c_algo_dp_aux_xfer,
+ .xfer = i2c_algo_dp_aux_xfer,
.functionality = i2c_algo_dp_aux_functionality,
};

diff --git a/drivers/gpu/drm/gma500/intel_gmbus.c b/drivers/gpu/drm/gma500/intel_gmbus.c
index 94cf854b1d3d..90c83cae04d9 100644
--- a/drivers/gpu/drm/gma500/intel_gmbus.c
+++ b/drivers/gpu/drm/gma500/intel_gmbus.c
@@ -233,7 +233,7 @@ intel_i2c_quirk_xfer(struct drm_psb_private *dev_priv,
set_clock(gpio, 1);
udelay(I2C_RISEFALL_TIME);

- ret = adapter->algo->master_xfer(adapter, msgs, num);
+ ret = adapter->algo->xfer(adapter, msgs, num);

set_data(gpio, 1);
set_clock(gpio, 1);
@@ -374,7 +374,7 @@ static u32 gmbus_func(struct i2c_adapter *adapter)
}

static const struct i2c_algorithm gmbus_algorithm = {
- .master_xfer = gmbus_xfer,
+ .xfer = gmbus_xfer,
.functionality = gmbus_func
};

diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c b/drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c
index 6daa6669ed23..a93e61208a84 100644
--- a/drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c
+++ b/drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c
@@ -160,7 +160,7 @@ static u32 oaktrail_hdmi_i2c_func(struct i2c_adapter *adapter)
}

static const struct i2c_algorithm oaktrail_hdmi_i2c_algorithm = {
- .master_xfer = oaktrail_hdmi_i2c_access,
+ .xfer = oaktrail_hdmi_i2c_access,
.functionality = oaktrail_hdmi_i2c_func,
};

diff --git a/drivers/gpu/drm/gma500/psb_intel_sdvo.c b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
index 39a3b696efc5..ad274c8410ca 100644
--- a/drivers/gpu/drm/gma500/psb_intel_sdvo.c
+++ b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
@@ -2417,7 +2417,7 @@ static u32 psb_intel_sdvo_ddc_proxy_func(struct i2c_adapter *adapter)
}

static const struct i2c_algorithm psb_intel_sdvo_ddc_proxy = {
- .master_xfer = psb_intel_sdvo_ddc_proxy_xfer,
+ .xfer = psb_intel_sdvo_ddc_proxy_xfer,
.functionality = psb_intel_sdvo_ddc_proxy_func
};

diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.c b/drivers/gpu/drm/i915/display/intel_gmbus.c
index cbbdd84b4641..d97fe8f03a5d 100644
--- a/drivers/gpu/drm/i915/display/intel_gmbus.c
+++ b/drivers/gpu/drm/i915/display/intel_gmbus.c
@@ -759,7 +759,7 @@ gmbus_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num)
wakeref = intel_display_power_get(i915, POWER_DOMAIN_GMBUS);

if (bus->force_bit) {
- ret = i2c_bit_algo.master_xfer(adapter, msgs, num);
+ ret = i2c_bit_algo.xfer(adapter, msgs, num);
if (ret < 0)
bus->force_bit &= ~GMBUS_FORCE_BIT_RETRY;
} else {
@@ -822,7 +822,7 @@ static u32 gmbus_func(struct i2c_adapter *adapter)
}

static const struct i2c_algorithm gmbus_algorithm = {
- .master_xfer = gmbus_xfer,
+ .xfer = gmbus_xfer,
.functionality = gmbus_func
};

diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c
index 126493c662c5..0764aaf8fbec 100644
--- a/drivers/gpu/drm/i915/display/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
@@ -3299,7 +3299,7 @@ static int intel_sdvo_ddc_proxy_xfer(struct i2c_adapter *adapter,
if (!__intel_sdvo_set_control_bus_switch(sdvo, 1 << ddc->ddc_bus))
return -EIO;

- return sdvo->i2c->algo->master_xfer(sdvo->i2c, msgs, num);
+ return sdvo->i2c->algo->xfer(sdvo->i2c, msgs, num);
}

static u32 intel_sdvo_ddc_proxy_func(struct i2c_adapter *adapter)
@@ -3311,7 +3311,7 @@ static u32 intel_sdvo_ddc_proxy_func(struct i2c_adapter *adapter)
}

static const struct i2c_algorithm intel_sdvo_ddc_proxy = {
- .master_xfer = intel_sdvo_ddc_proxy_xfer,
+ .xfer = intel_sdvo_ddc_proxy_xfer,
.functionality = intel_sdvo_ddc_proxy_func
};

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c
index d063d0dc13c5..55d45aba8467 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c
@@ -89,7 +89,7 @@ nvkm_i2c_aux_i2c_func(struct i2c_adapter *adap)

static const struct i2c_algorithm
nvkm_i2c_aux_i2c_algo = {
- .master_xfer = nvkm_i2c_aux_i2c_xfer,
+ .xfer = nvkm_i2c_aux_i2c_xfer,
.functionality = nvkm_i2c_aux_i2c_func
};

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c
index ed50cc3736b9..10c7bc68a278 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c
@@ -97,7 +97,7 @@ nvkm_i2c_bus_func(struct i2c_adapter *adap)

static const struct i2c_algorithm
nvkm_i2c_bus_algo = {
- .master_xfer = nvkm_i2c_bus_xfer,
+ .xfer = nvkm_i2c_bus_xfer,
.functionality = nvkm_i2c_bus_func,
};

diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c
index 565d59536e9a..95912cce6aef 100644
--- a/drivers/gpu/drm/radeon/radeon_i2c.c
+++ b/drivers/gpu/drm/radeon/radeon_i2c.c
@@ -891,12 +891,12 @@ static u32 radeon_hw_i2c_func(struct i2c_adapter *adap)
}

static const struct i2c_algorithm radeon_i2c_algo = {
- .master_xfer = radeon_hw_i2c_xfer,
+ .xfer = radeon_hw_i2c_xfer,
.functionality = radeon_hw_i2c_func,
};

static const struct i2c_algorithm radeon_atom_i2c_algo = {
- .master_xfer = radeon_atom_hw_i2c_xfer,
+ .xfer = radeon_atom_hw_i2c_xfer,
.functionality = radeon_atom_hw_i2c_func,
};

diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c
index eddf25b90ca8..de3b41f7d02d 100644
--- a/drivers/i2c/algos/i2c-algo-bit.c
+++ b/drivers/i2c/algos/i2c-algo-bit.c
@@ -143,7 +143,7 @@ static void i2c_stop(struct i2c_algo_bit_data *adap)


/* send a byte without start cond., look for arbitration,
- check ackn. from slave */
+ check ackn. from client */
/* returns:
* 1 if the device acknowledged
* 0 if the device did not ack
@@ -182,7 +182,7 @@ static int i2c_outb(struct i2c_adapter *i2c_adap, unsigned char c)
return -ETIMEDOUT;
}

- /* read ack: SDA should be pulled down by slave, or it may
+ /* read ack: SDA should be pulled down by client, or it may
* NAK (usually to report problems with the data we wrote).
* Always report ACK if SDA is write-only.
*/
@@ -358,7 +358,7 @@ static int sendbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
temp++;
wrcount++;

- /* A slave NAKing the master means the slave didn't like
+ /* A client NAKing the host means the client didn't like
* something about the data it saw. For example, maybe
* the SMBus PEC was wrong.
*/
@@ -369,7 +369,7 @@ static int sendbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
/* Timeout; or (someday) lost arbitration
*
* FIXME Lost ARB implies retrying the transaction from
- * the first message, after the "winning" master issues
+ * the first message, after the "winning" host issues
* its STOP. As a rule, upper layer code has no reason
* to know or care about this ... it is *NOT* an error.
*/
@@ -619,8 +619,8 @@ static u32 bit_func(struct i2c_adapter *adap)
/* -----exported algorithm data: ------------------------------------- */

const struct i2c_algorithm i2c_bit_algo = {
- .master_xfer = bit_xfer,
- .master_xfer_atomic = bit_xfer_atomic,
+ .xfer = bit_xfer,
+ .xfer_atomic = bit_xfer_atomic,
.functionality = bit_func,
};
EXPORT_SYMBOL(i2c_bit_algo);
diff --git a/drivers/media/pci/bt8xx/bttv-i2c.c b/drivers/media/pci/bt8xx/bttv-i2c.c
index 4a8a3f80c6db..285b2bd21278 100644
--- a/drivers/media/pci/bt8xx/bttv-i2c.c
+++ b/drivers/media/pci/bt8xx/bttv-i2c.c
@@ -248,7 +248,7 @@ static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int
}

static const struct i2c_algorithm bttv_algo = {
- .master_xfer = bttv_i2c_xfer,
+ .xfer = bttv_i2c_xfer,
.functionality = functionality,
};

diff --git a/drivers/media/pci/cobalt/cobalt-i2c.c b/drivers/media/pci/cobalt/cobalt-i2c.c
index d2963370f949..b70e89669bc7 100644
--- a/drivers/media/pci/cobalt/cobalt-i2c.c
+++ b/drivers/media/pci/cobalt/cobalt-i2c.c
@@ -297,7 +297,7 @@ static const struct i2c_adapter cobalt_i2c_adap_template = {
};

static const struct i2c_algorithm cobalt_algo = {
- .master_xfer = cobalt_xfer,
+ .xfer = cobalt_xfer,
.functionality = cobalt_func,
};

diff --git a/drivers/media/pci/cx23885/cx23885-i2c.c b/drivers/media/pci/cx23885/cx23885-i2c.c
index 385af2a893b4..1e5d0ecde5a3 100644
--- a/drivers/media/pci/cx23885/cx23885-i2c.c
+++ b/drivers/media/pci/cx23885/cx23885-i2c.c
@@ -247,7 +247,7 @@ static u32 cx23885_functionality(struct i2c_adapter *adap)
}

static const struct i2c_algorithm cx23885_i2c_algo_template = {
- .master_xfer = i2c_xfer,
+ .xfer = i2c_xfer,
.functionality = cx23885_functionality,
};

diff --git a/drivers/media/pci/cx25821/cx25821-i2c.c b/drivers/media/pci/cx25821/cx25821-i2c.c
index bad8fb9f5319..ffcdce4971c4 100644
--- a/drivers/media/pci/cx25821/cx25821-i2c.c
+++ b/drivers/media/pci/cx25821/cx25821-i2c.c
@@ -268,7 +268,7 @@ static u32 cx25821_functionality(struct i2c_adapter *adap)
}

static const struct i2c_algorithm cx25821_i2c_algo_template = {
- .master_xfer = i2c_xfer,
+ .xfer = i2c_xfer,
.functionality = cx25821_functionality,
#ifdef NEED_ALGO_CONTROL
.algo_control = dummy_algo_control,
diff --git a/drivers/media/pci/dm1105/dm1105.c b/drivers/media/pci/dm1105/dm1105.c
index 9e9c7c071acc..d9b8614e8f0b 100644
--- a/drivers/media/pci/dm1105/dm1105.c
+++ b/drivers/media/pci/dm1105/dm1105.c
@@ -561,7 +561,7 @@ static u32 functionality(struct i2c_adapter *adap)
}

static const struct i2c_algorithm dm1105_algo = {
- .master_xfer = dm1105_i2c_xfer,
+ .xfer = dm1105_i2c_xfer,
.functionality = functionality,
};

diff --git a/drivers/media/pci/ivtv/ivtv-i2c.c b/drivers/media/pci/ivtv/ivtv-i2c.c
index 967e6a025020..86735f42c23c 100644
--- a/drivers/media/pci/ivtv/ivtv-i2c.c
+++ b/drivers/media/pci/ivtv/ivtv-i2c.c
@@ -610,7 +610,7 @@ static u32 ivtv_functionality(struct i2c_adapter *adap)
}

static const struct i2c_algorithm ivtv_algo = {
- .master_xfer = ivtv_xfer,
+ .xfer = ivtv_xfer,
.functionality = ivtv_functionality,
};

diff --git a/drivers/media/pci/saa7164/saa7164-i2c.c b/drivers/media/pci/saa7164/saa7164-i2c.c
index 3b11bf8899a0..aa7d989c1cb4 100644
--- a/drivers/media/pci/saa7164/saa7164-i2c.c
+++ b/drivers/media/pci/saa7164/saa7164-i2c.c
@@ -62,7 +62,7 @@ static u32 saa7164_functionality(struct i2c_adapter *adap)
}

static const struct i2c_algorithm saa7164_i2c_algo_template = {
- .master_xfer = i2c_xfer,
+ .xfer = i2c_xfer,
.functionality = saa7164_functionality,
};

diff --git a/drivers/media/usb/au0828/au0828-i2c.c b/drivers/media/usb/au0828/au0828-i2c.c
index 3e66d42bf134..585fe86f8ed7 100644
--- a/drivers/media/usb/au0828/au0828-i2c.c
+++ b/drivers/media/usb/au0828/au0828-i2c.c
@@ -313,7 +313,7 @@ static u32 au0828_functionality(struct i2c_adapter *adap)
}

static const struct i2c_algorithm au0828_i2c_algo_template = {
- .master_xfer = i2c_xfer,
+ .xfer = i2c_xfer,
.functionality = au0828_functionality,
};

diff --git a/drivers/video/fbdev/mb862xx/mb862xx-i2c.c b/drivers/video/fbdev/mb862xx/mb862xx-i2c.c
index ffdb1597d303..55fe554a0818 100644
--- a/drivers/video/fbdev/mb862xx/mb862xx-i2c.c
+++ b/drivers/video/fbdev/mb862xx/mb862xx-i2c.c
@@ -141,7 +141,7 @@ static u32 mb862xx_func(struct i2c_adapter *adap)
}

static const struct i2c_algorithm mb862xx_algo = {
- .master_xfer = mb862xx_xfer,
+ .xfer = mb862xx_xfer,
.functionality = mb862xx_func,
};

--
2.34.1


2024-03-29 17:14:20

by Easwar Hariharan

[permalink] [raw]
Subject: [PATCH v0 13/14] drm/nouveau: Make I2C terminology more inclusive

I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
with more appropriate terms. Inspired by and following on to Wolfram's
series to fix drivers/i2c/[1], fix the terminology for users of
I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
in the specification.

Compile tested, no functionality changes intended

[1]: https://lore.kernel.org/all/[email protected]/

Signed-off-by: Easwar Hariharan <[email protected]>
---
drivers/gpu/drm/nouveau/dispnv04/dfp.c | 14 +++++++-------
.../gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h | 2 +-
drivers/gpu/drm/nouveau/nouveau_bios.c | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv04/dfp.c b/drivers/gpu/drm/nouveau/dispnv04/dfp.c
index d5b129dc623b..65b791006b19 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/dfp.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/dfp.c
@@ -149,7 +149,7 @@ void nv04_dfp_update_fp_control(struct drm_encoder *encoder, int mode)
}
}

-static struct drm_encoder *get_tmds_slave(struct drm_encoder *encoder)
+static struct drm_encoder *get_tmds_client(struct drm_encoder *encoder)
{
struct drm_device *dev = encoder->dev;
struct dcb_output *dcb = nouveau_encoder(encoder)->dcb;
@@ -172,7 +172,7 @@ static struct drm_encoder *get_tmds_slave(struct drm_encoder *encoder)
struct dcb_output *slave_dcb = nouveau_encoder(slave)->dcb;

if (slave_dcb->type == DCB_OUTPUT_TMDS && get_slave_funcs(slave) &&
- slave_dcb->tmdsconf.slave_addr == dcb->tmdsconf.slave_addr)
+ slave_dcb->tmdsconf.client_addr == dcb->tmdsconf.client_addr)
return slave;
}

@@ -471,7 +471,7 @@ static void nv04_dfp_commit(struct drm_encoder *encoder)
NVWriteRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL + nv04_dac_output_offset(encoder), 0x00100000);

/* Init external transmitters */
- slave_encoder = get_tmds_slave(encoder);
+ slave_encoder = get_tmds_client(encoder);
if (slave_encoder)
get_slave_funcs(slave_encoder)->mode_set(
slave_encoder, &nv_encoder->mode, &nv_encoder->mode);
@@ -621,7 +621,7 @@ static void nv04_dfp_destroy(struct drm_encoder *encoder)
kfree(nv_encoder);
}

-static void nv04_tmds_slave_init(struct drm_encoder *encoder)
+static void nv04_tmds_client_init(struct drm_encoder *encoder)
{
struct drm_device *dev = encoder->dev;
struct dcb_output *dcb = nouveau_encoder(encoder)->dcb;
@@ -632,7 +632,7 @@ static void nv04_tmds_slave_init(struct drm_encoder *encoder)
{
{
.type = "sil164",
- .addr = (dcb->tmdsconf.slave_addr == 0x7 ? 0x3a : 0x38),
+ .addr = (dcb->tmdsconf.client_addr == 0x7 ? 0x3a : 0x38),
.platform_data = &(struct sil164_encoder_params) {
SIL164_INPUT_EDGE_RISING
}
@@ -642,7 +642,7 @@ static void nv04_tmds_slave_init(struct drm_encoder *encoder)
};
int type;

- if (!nv_gf4_disp_arch(dev) || !bus || get_tmds_slave(encoder))
+ if (!nv_gf4_disp_arch(dev) || !bus || get_tmds_client(encoder))
return;

type = nvkm_i2c_bus_probe(bus, "TMDS transmitter", info, NULL, NULL);
@@ -716,7 +716,7 @@ nv04_dfp_create(struct drm_connector *connector, struct dcb_output *entry)

if (entry->type == DCB_OUTPUT_TMDS &&
entry->location != DCB_LOC_ON_CHIP)
- nv04_tmds_slave_init(encoder);
+ nv04_tmds_client_init(encoder);

drm_connector_attach_encoder(connector, encoder);
return 0;
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h
index 73f9d9947e7e..5da40cf74b1a 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h
@@ -50,7 +50,7 @@ struct dcb_output {
} dpconf;
struct {
struct sor_conf sor;
- int slave_addr;
+ int client_addr;
} tmdsconf;
};
bool i2c_upper_default;
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
index 479effcf607e..a91a5d3df3ca 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bios.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -1511,9 +1511,9 @@ parse_dcb20_entry(struct drm_device *dev, struct dcb_table *dcb,
link = entry->tmdsconf.sor.link;
}
else if (dcb->version >= 0x30)
- entry->tmdsconf.slave_addr = (conf & 0x00000700) >> 8;
+ entry->tmdsconf.client_addr = (conf & 0x00000700) >> 8;
else if (dcb->version >= 0x22)
- entry->tmdsconf.slave_addr = (conf & 0x00000070) >> 4;
+ entry->tmdsconf.client_addr = (conf & 0x00000070) >> 4;
break;
case DCB_OUTPUT_EOL:
/* weird g80 mobile type that "nv" treats as a terminator */
--
2.34.1


2024-03-29 17:16:44

by Easwar Hariharan

[permalink] [raw]
Subject: [PATCH v0 11/14] fbdev/smscufx: Make I2C terminology more inclusive

I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
with more appropriate terms. Inspired by and following on to Wolfram's
series to fix drivers/i2c/[1], fix the terminology for users of
I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
in the specification.

Compile tested, no functionality changes intended

[1]: https://lore.kernel.org/all/[email protected]/

Signed-off-by: Easwar Hariharan <[email protected]>
---
drivers/video/fbdev/smscufx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/smscufx.c b/drivers/video/fbdev/smscufx.c
index 35d682b110c4..1c80c1a3d516 100644
--- a/drivers/video/fbdev/smscufx.c
+++ b/drivers/video/fbdev/smscufx.c
@@ -1292,7 +1292,7 @@ static int ufx_realloc_framebuffer(struct ufx_data *dev, struct fb_info *info)
return 0;
}

-/* sets up I2C Controller for 100 Kbps, std. speed, 7-bit addr, master,
+/* sets up I2C Controller for 100 Kbps, std. speed, 7-bit addr, host,
* restart enabled, but no start byte, enable controller */
static int ufx_i2c_init(struct ufx_data *dev)
{
@@ -1321,7 +1321,7 @@ static int ufx_i2c_init(struct ufx_data *dev)
/* 7-bit (not 10-bit) addressing */
tmp &= ~(0x10);

- /* enable restart conditions and master mode */
+ /* enable restart conditions and host mode */
tmp |= 0x21;

status = ufx_reg_write(dev, 0x1000, tmp);
--
2.34.1


2024-03-29 17:28:37

by Easwar Hariharan

[permalink] [raw]
Subject: Re: [PATCH v0 02/14] drm/amdgpu,drm/radeon: Make I2C terminology more inclusive

On 3/29/2024 10:16 AM, Andi Shyti wrote:
> Hi Easwar,
>
> On Fri, Mar 29, 2024 at 05:00:26PM +0000, Easwar Hariharan wrote:
>> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>
> I don't understand why we forget that i3c is 1.1.1 :-)

That's because it's a copy-paste error from Wolfram's cover letter. :) I'll update
next go-around.

>
>> with more appropriate terms. Inspired by and following on to Wolfram's
>> series to fix drivers/i2c/[1], fix the terminology for users of
>> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
>> in the specification.
>
> The specification talks about:
>
> - master -> controller
> - slave -> target (and not client)
>
> But both you and Wolfram have used client. I'd like to reach
> some more consistency here.

I had the impression that remote targets (i.e external to the device) were to be called clients,
e.g. the QSFP FRUs in drivers/infiniband, and internal ones targets.
I chose the terminology according to that understanding, but now I can't find where I got that
information.

Thanks,
Easwar

2024-03-29 17:39:03

by Easwar Hariharan

[permalink] [raw]
Subject: Re: [PATCH v0 02/14] drm/amdgpu,drm/radeon: Make I2C terminology more inclusive

On 3/29/2024 10:28 AM, Easwar Hariharan wrote:
> On 3/29/2024 10:16 AM, Andi Shyti wrote:
>> Hi Easwar,
>>

<snip>

>>
>> The specification talks about:
>>
>> - master -> controller
>> - slave -> target (and not client)
>>
>> But both you and Wolfram have used client. I'd like to reach
>> some more consistency here.
>
> I had the impression that remote targets (i.e external to the device) were to be called clients,
> e.g. the QSFP FRUs in drivers/infiniband, and internal ones targets.
> I chose the terminology according to that understanding, but now I can't find where I got that
> information.
>
> Thanks,
> Easwar

Ah, it was in Wolfram's individual commit messages "They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target")."

Thanks,
Easwar

2024-03-29 18:51:37

by Easwar Hariharan

[permalink] [raw]
Subject: Re: [PATCH v0 02/14] drm/amdgpu,drm/radeon: Make I2C terminology more inclusive

On 3/29/2024 10:38 AM, Andi Shyti wrote:
> Hi,
>

<snip>

>
>>>> with more appropriate terms. Inspired by and following on to Wolfram's
>>>> series to fix drivers/i2c/[1], fix the terminology for users of
>>>> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
>>>> in the specification.
>>>
>>> The specification talks about:
>>>
>>> - master -> controller
>>> - slave -> target (and not client)
>>>
>>> But both you and Wolfram have used client. I'd like to reach
>>> some more consistency here.
>>
>> I had the impression that remote targets (i.e external to the device) were to be called clients,
>> e.g. the QSFP FRUs in drivers/infiniband, and internal ones targets.
>> I chose the terminology according to that understanding, but now I can't find where I got that
>> information.
>
> The word "client" does not even appear in the documentation (only
> one instance in the i3c document), so that the change is not
> related to the document as stated in the commit log. Unless, of
> course, I am missing something.
>
> I'm OK with choosing a "customized" naming, but we need to reach
> an agreement.
>
> I raised the same question to Wolfram.
>
> Thanks,
> Andi

I don't have a preference between using target and client. As I mentioned in the thread fork, my
information came entirely from Wolfram's cover letter and patch messages. I'll follow along with
whatever you and Wolfram settle on.

Thanks,
Easwar


2024-03-29 22:26:43

by Andi Shyti

[permalink] [raw]
Subject: Re: [PATCH v0 02/14] drm/amdgpu,drm/radeon: Make I2C terminology more inclusive

Hi Easwar,

On Fri, Mar 29, 2024 at 05:00:26PM +0000, Easwar Hariharan wrote:
> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"

I don't understand why we forget that i3c is 1.1.1 :-)

> with more appropriate terms. Inspired by and following on to Wolfram's
> series to fix drivers/i2c/[1], fix the terminology for users of
> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
> in the specification.

The specification talks about:

- master -> controller
- slave -> target (and not client)

But both you and Wolfram have used client. I'd like to reach
some more consistency here.

Thanks,
Andi

2024-03-29 22:48:32

by Andi Shyti

[permalink] [raw]
Subject: Re: [PATCH v0 02/14] drm/amdgpu,drm/radeon: Make I2C terminology more inclusive

Hi,

On Fri, Mar 29, 2024 at 10:28:14AM -0700, Easwar Hariharan wrote:
> On 3/29/2024 10:16 AM, Andi Shyti wrote:
> > Hi Easwar,
> >
> > On Fri, Mar 29, 2024 at 05:00:26PM +0000, Easwar Hariharan wrote:
> >> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
> >
> > I don't understand why we forget that i3c is 1.1.1 :-)
>
> That's because it's a copy-paste error from Wolfram's cover letter. :) I'll update
> next go-around.

not a binding comment, though. Just for completeness, because we
are giving the version to the i2c and smbus, but not i3c.

> >> with more appropriate terms. Inspired by and following on to Wolfram's
> >> series to fix drivers/i2c/[1], fix the terminology for users of
> >> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
> >> in the specification.
> >
> > The specification talks about:
> >
> > - master -> controller
> > - slave -> target (and not client)
> >
> > But both you and Wolfram have used client. I'd like to reach
> > some more consistency here.
>
> I had the impression that remote targets (i.e external to the device) were to be called clients,
> e.g. the QSFP FRUs in drivers/infiniband, and internal ones targets.
> I chose the terminology according to that understanding, but now I can't find where I got that
> information.

The word "client" does not even appear in the documentation (only
one instance in the i3c document), so that the change is not
related to the document as stated in the commit log. Unless, of
course, I am missing something.

I'm OK with choosing a "customized" naming, but we need to reach
an agreement.

I raised the same question to Wolfram.

Thanks,
Andi

2024-04-02 07:49:23

by Jani Nikula

[permalink] [raw]
Subject: Re: [PATCH v0 03/14] drm/gma500,drm/i915: Make I2C terminology more inclusive

On Fri, 29 Mar 2024, Easwar Hariharan <[email protected]> wrote:
> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
> with more appropriate terms. Inspired by and following on to Wolfram's
> series to fix drivers/i2c/[1], fix the terminology for users of
> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
> in the specification.

gma500 and i915 changes should be split. See MAINTAINERS.

Might also split the i915 changes to smaller pieces, it's kind of
random. And the changes here are not strictly related to I2C AFAICT, so
the commit message should be updated.

BR,
Jani.


>
> Compile tested, no functionality changes intended
>
> [1]:
> https://lore.kernel.org/all/[email protected]/
>
> Signed-off-by: Easwar Hariharan <[email protected]>
> ---
> drivers/gpu/drm/gma500/cdv_intel_lvds.c | 2 +-
> drivers/gpu/drm/gma500/intel_bios.c | 22 +++++++-------
> drivers/gpu/drm/gma500/intel_bios.h | 4 +--
> drivers/gpu/drm/gma500/intel_gmbus.c | 2 +-
> drivers/gpu/drm/gma500/psb_drv.h | 2 +-
> drivers/gpu/drm/gma500/psb_intel_drv.h | 2 +-
> drivers/gpu/drm/gma500/psb_intel_lvds.c | 4 +--
> drivers/gpu/drm/gma500/psb_intel_sdvo.c | 26 ++++++++--------
> drivers/gpu/drm/i915/display/dvo_ch7017.c | 14 ++++-----
> drivers/gpu/drm/i915/display/dvo_ch7xxx.c | 18 +++++------
> drivers/gpu/drm/i915/display/dvo_ivch.c | 16 +++++-----
> drivers/gpu/drm/i915/display/dvo_ns2501.c | 18 +++++------
> drivers/gpu/drm/i915/display/dvo_sil164.c | 18 +++++------
> drivers/gpu/drm/i915/display/dvo_tfp410.c | 18 +++++------
> drivers/gpu/drm/i915/display/intel_bios.c | 22 +++++++-------
> drivers/gpu/drm/i915/display/intel_ddi.c | 2 +-
> .../gpu/drm/i915/display/intel_display_core.h | 2 +-
> drivers/gpu/drm/i915/display/intel_dsi.h | 2 +-
> drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 18 +++++------
> drivers/gpu/drm/i915/display/intel_dvo.c | 14 ++++-----
> drivers/gpu/drm/i915/display/intel_dvo_dev.h | 2 +-
> drivers/gpu/drm/i915/display/intel_gmbus.c | 4 +--
> drivers/gpu/drm/i915/display/intel_sdvo.c | 30 +++++++++----------
> drivers/gpu/drm/i915/display/intel_vbt_defs.h | 4 +--
> drivers/gpu/drm/i915/gvt/edid.c | 28 ++++++++---------
> drivers/gpu/drm/i915/gvt/edid.h | 4 +--
> drivers/gpu/drm/i915/gvt/opregion.c | 2 +-
> 27 files changed, 150 insertions(+), 150 deletions(-)
>
> diff --git a/drivers/gpu/drm/gma500/cdv_intel_lvds.c b/drivers/gpu/drm/gma500/cdv_intel_lvds.c
> index f08a6803dc18..84c9122062c4 100644
> --- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c
> +++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c
> @@ -565,7 +565,7 @@ void cdv_intel_lvds_init(struct drm_device *dev,
> dev->dev, "I2C bus registration failed.\n");
> goto err_encoder_cleanup;
> }
> - gma_encoder->i2c_bus->slave_addr = 0x2C;
> + gma_encoder->i2c_bus->client_addr = 0x2C;
> dev_priv->lvds_i2c_bus = gma_encoder->i2c_bus;
>
> /*
> diff --git a/drivers/gpu/drm/gma500/intel_bios.c b/drivers/gpu/drm/gma500/intel_bios.c
> index 8245b5603d2c..333bece1a64f 100644
> --- a/drivers/gpu/drm/gma500/intel_bios.c
> +++ b/drivers/gpu/drm/gma500/intel_bios.c
> @@ -14,8 +14,8 @@
> #include "psb_intel_drv.h"
> #include "psb_intel_reg.h"
>
> -#define SLAVE_ADDR1 0x70
> -#define SLAVE_ADDR2 0x72
> +#define CLIENT_ADDR1 0x70
> +#define CLIENT_ADDR2 0x72
>
> static void *find_section(struct bdb_header *bdb, int section_id)
> {
> @@ -357,10 +357,10 @@ parse_sdvo_device_mapping(struct drm_psb_private *dev_priv,
> /* skip the device block if device type is invalid */
> continue;
> }
> - if (p_child->slave_addr != SLAVE_ADDR1 &&
> - p_child->slave_addr != SLAVE_ADDR2) {
> + if (p_child->client_addr != CLIENT_ADDR1 &&
> + p_child->client_addr != CLIENT_ADDR2) {
> /*
> - * If the slave address is neither 0x70 nor 0x72,
> + * If the client address is neither 0x70 nor 0x72,
> * it is not a SDVO device. Skip it.
> */
> continue;
> @@ -371,22 +371,22 @@ parse_sdvo_device_mapping(struct drm_psb_private *dev_priv,
> DRM_DEBUG_KMS("Incorrect SDVO port. Skip it\n");
> continue;
> }
> - DRM_DEBUG_KMS("the SDVO device with slave addr %2x is found on"
> + DRM_DEBUG_KMS("the SDVO device with client addr %2x is found on"
> " %s port\n",
> - p_child->slave_addr,
> + p_child->client_addr,
> (p_child->dvo_port == DEVICE_PORT_DVOB) ?
> "SDVOB" : "SDVOC");
> p_mapping = &(dev_priv->sdvo_mappings[p_child->dvo_port - 1]);
> if (!p_mapping->initialized) {
> p_mapping->dvo_port = p_child->dvo_port;
> - p_mapping->slave_addr = p_child->slave_addr;
> + p_mapping->client_addr = p_child->client_addr;
> p_mapping->dvo_wiring = p_child->dvo_wiring;
> p_mapping->ddc_pin = p_child->ddc_pin;
> p_mapping->i2c_pin = p_child->i2c_pin;
> p_mapping->initialized = 1;
> DRM_DEBUG_KMS("SDVO device: dvo=%x, addr=%x, wiring=%d, ddc_pin=%d, i2c_pin=%d\n",
> p_mapping->dvo_port,
> - p_mapping->slave_addr,
> + p_mapping->client_addr,
> p_mapping->dvo_wiring,
> p_mapping->ddc_pin,
> p_mapping->i2c_pin);
> @@ -394,10 +394,10 @@ parse_sdvo_device_mapping(struct drm_psb_private *dev_priv,
> DRM_DEBUG_KMS("Maybe one SDVO port is shared by "
> "two SDVO device.\n");
> }
> - if (p_child->slave2_addr) {
> + if (p_child->client2_addr) {
> /* Maybe this is a SDVO device with multiple inputs */
> /* And the mapping info is not added */
> - DRM_DEBUG_KMS("there exists the slave2_addr. Maybe this"
> + DRM_DEBUG_KMS("there exists the client2_addr. Maybe this"
> " is a SDVO device with multiple inputs.\n");
> }
> count++;
> diff --git a/drivers/gpu/drm/gma500/intel_bios.h b/drivers/gpu/drm/gma500/intel_bios.h
> index 0e6facf21e33..cfca33427f94 100644
> --- a/drivers/gpu/drm/gma500/intel_bios.h
> +++ b/drivers/gpu/drm/gma500/intel_bios.h
> @@ -186,13 +186,13 @@ struct child_device_config {
> u16 addin_offset;
> u8 dvo_port; /* See Device_PORT_* above */
> u8 i2c_pin;
> - u8 slave_addr;
> + u8 client_addr;
> u8 ddc_pin;
> u16 edid_ptr;
> u8 dvo_cfg; /* See DEVICE_CFG_* above */
> u8 dvo2_port;
> u8 i2c2_pin;
> - u8 slave2_addr;
> + u8 client2_addr;
> u8 ddc2_pin;
> u8 capabilities;
> u8 dvo_wiring;/* See DEVICE_WIRE_* above */
> diff --git a/drivers/gpu/drm/gma500/intel_gmbus.c b/drivers/gpu/drm/gma500/intel_gmbus.c
> index aa45509859f2..94cf854b1d3d 100644
> --- a/drivers/gpu/drm/gma500/intel_gmbus.c
> +++ b/drivers/gpu/drm/gma500/intel_gmbus.c
> @@ -333,7 +333,7 @@ gmbus_xfer(struct i2c_adapter *adapter,
> clear_err:
> /* Toggle the Software Clear Interrupt bit. This has the effect
> * of resetting the GMBUS controller and so clearing the
> - * BUS_ERROR raised by the slave's NAK.
> + * BUS_ERROR raised by the client's NAK.
> */
> GMBUS_REG_WRITE(GMBUS1 + reg_offset, GMBUS_SW_CLR_INT);
> GMBUS_REG_WRITE(GMBUS1 + reg_offset, 0);
> diff --git a/drivers/gpu/drm/gma500/psb_drv.h b/drivers/gpu/drm/gma500/psb_drv.h
> index c5edfa4aa4cc..bbf3af1b01cd 100644
> --- a/drivers/gpu/drm/gma500/psb_drv.h
> +++ b/drivers/gpu/drm/gma500/psb_drv.h
> @@ -203,7 +203,7 @@ struct psb_intel_opregion {
> struct sdvo_device_mapping {
> u8 initialized;
> u8 dvo_port;
> - u8 slave_addr;
> + u8 client_addr;
> u8 dvo_wiring;
> u8 i2c_pin;
> u8 i2c_speed;
> diff --git a/drivers/gpu/drm/gma500/psb_intel_drv.h b/drivers/gpu/drm/gma500/psb_intel_drv.h
> index c111e933e1ed..3536414c1988 100644
> --- a/drivers/gpu/drm/gma500/psb_intel_drv.h
> +++ b/drivers/gpu/drm/gma500/psb_intel_drv.h
> @@ -80,7 +80,7 @@ struct psb_intel_mode_device {
> struct gma_i2c_chan {
> struct i2c_adapter base;
> struct i2c_algo_bit_data algo;
> - u8 slave_addr;
> + u8 client_addr;
>
> /* for getting at dev. private (mmio etc.) */
> struct drm_device *drm_dev;
> diff --git a/drivers/gpu/drm/gma500/psb_intel_lvds.c b/drivers/gpu/drm/gma500/psb_intel_lvds.c
> index 8486de230ec9..3ce54aaf92ce 100644
> --- a/drivers/gpu/drm/gma500/psb_intel_lvds.c
> +++ b/drivers/gpu/drm/gma500/psb_intel_lvds.c
> @@ -97,7 +97,7 @@ static int psb_lvds_i2c_set_brightness(struct drm_device *dev,
>
> struct i2c_msg msgs[] = {
> {
> - .addr = lvds_i2c_bus->slave_addr,
> + .addr = lvds_i2c_bus->client_addr,
> .flags = 0,
> .len = 2,
> .buf = out_buf,
> @@ -707,7 +707,7 @@ void psb_intel_lvds_init(struct drm_device *dev,
> dev->dev, "I2C bus registration failed.\n");
> goto err_encoder_cleanup;
> }
> - lvds_priv->i2c_bus->slave_addr = 0x2C;
> + lvds_priv->i2c_bus->client_addr = 0x2C;
> dev_priv->lvds_i2c_bus = lvds_priv->i2c_bus;
>
> /*
> diff --git a/drivers/gpu/drm/gma500/psb_intel_sdvo.c b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
> index e4f914deceba..39a3b696efc5 100644
> --- a/drivers/gpu/drm/gma500/psb_intel_sdvo.c
> +++ b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
> @@ -70,7 +70,7 @@ struct psb_intel_sdvo {
> struct gma_encoder base;
>
> struct i2c_adapter *i2c;
> - u8 slave_addr;
> + u8 client_addr;
>
> struct i2c_adapter ddc;
>
> @@ -259,13 +259,13 @@ static bool psb_intel_sdvo_read_byte(struct psb_intel_sdvo *psb_intel_sdvo, u8 a
> {
> struct i2c_msg msgs[] = {
> {
> - .addr = psb_intel_sdvo->slave_addr,
> + .addr = psb_intel_sdvo->client_addr,
> .flags = 0,
> .len = 1,
> .buf = &addr,
> },
> {
> - .addr = psb_intel_sdvo->slave_addr,
> + .addr = psb_intel_sdvo->client_addr,
> .flags = I2C_M_RD,
> .len = 1,
> .buf = ch,
> @@ -463,14 +463,14 @@ static bool psb_intel_sdvo_write_cmd(struct psb_intel_sdvo *psb_intel_sdvo, u8 c
> psb_intel_sdvo_debug_write(psb_intel_sdvo, cmd, args, args_len);
>
> for (i = 0; i < args_len; i++) {
> - msgs[i].addr = psb_intel_sdvo->slave_addr;
> + msgs[i].addr = psb_intel_sdvo->client_addr;
> msgs[i].flags = 0;
> msgs[i].len = 2;
> msgs[i].buf = buf + 2 *i;
> buf[2*i + 0] = SDVO_I2C_ARG_0 - i;
> buf[2*i + 1] = ((u8*)args)[i];
> }
> - msgs[i].addr = psb_intel_sdvo->slave_addr;
> + msgs[i].addr = psb_intel_sdvo->client_addr;
> msgs[i].flags = 0;
> msgs[i].len = 2;
> msgs[i].buf = buf + 2*i;
> @@ -479,12 +479,12 @@ static bool psb_intel_sdvo_write_cmd(struct psb_intel_sdvo *psb_intel_sdvo, u8 c
>
> /* the following two are to read the response */
> status = SDVO_I2C_CMD_STATUS;
> - msgs[i+1].addr = psb_intel_sdvo->slave_addr;
> + msgs[i+1].addr = psb_intel_sdvo->client_addr;
> msgs[i+1].flags = 0;
> msgs[i+1].len = 1;
> msgs[i+1].buf = &status;
>
> - msgs[i+2].addr = psb_intel_sdvo->slave_addr;
> + msgs[i+2].addr = psb_intel_sdvo->client_addr;
> msgs[i+2].flags = I2C_M_RD;
> msgs[i+2].len = 1;
> msgs[i+2].buf = &status;
> @@ -1899,7 +1899,7 @@ psb_intel_sdvo_is_hdmi_connector(struct psb_intel_sdvo *psb_intel_sdvo, int devi
> }
>
> static u8
> -psb_intel_sdvo_get_slave_addr(struct drm_device *dev, int sdvo_reg)
> +psb_intel_sdvo_get_client_addr(struct drm_device *dev, int sdvo_reg)
> {
> struct drm_psb_private *dev_priv = to_drm_psb_private(dev);
> struct sdvo_device_mapping *my_mapping, *other_mapping;
> @@ -1913,14 +1913,14 @@ psb_intel_sdvo_get_slave_addr(struct drm_device *dev, int sdvo_reg)
> }
>
> /* If the BIOS described our SDVO device, take advantage of it. */
> - if (my_mapping->slave_addr)
> - return my_mapping->slave_addr;
> + if (my_mapping->client_addr)
> + return my_mapping->client_addr;
>
> /* If the BIOS only described a different SDVO device, use the
> * address that it isn't using.
> */
> - if (other_mapping->slave_addr) {
> - if (other_mapping->slave_addr == 0x70)
> + if (other_mapping->client_addr) {
> + if (other_mapping->client_addr == 0x70)
> return 0x72;
> else
> return 0x70;
> @@ -2446,7 +2446,7 @@ bool psb_intel_sdvo_init(struct drm_device *dev, int sdvo_reg)
> return false;
>
> psb_intel_sdvo->sdvo_reg = sdvo_reg;
> - psb_intel_sdvo->slave_addr = psb_intel_sdvo_get_slave_addr(dev, sdvo_reg) >> 1;
> + psb_intel_sdvo->client_addr = psb_intel_sdvo_get_client_addr(dev, sdvo_reg) >> 1;
> psb_intel_sdvo_select_i2c_bus(dev_priv, psb_intel_sdvo, sdvo_reg);
> if (!psb_intel_sdvo_init_ddc_proxy(psb_intel_sdvo, dev)) {
> kfree(psb_intel_sdvo);
> diff --git a/drivers/gpu/drm/i915/display/dvo_ch7017.c b/drivers/gpu/drm/i915/display/dvo_ch7017.c
> index d0c3880d7f80..b9d04581b820 100644
> --- a/drivers/gpu/drm/i915/display/dvo_ch7017.c
> +++ b/drivers/gpu/drm/i915/display/dvo_ch7017.c
> @@ -170,13 +170,13 @@ static bool ch7017_read(struct intel_dvo_device *dvo, u8 addr, u8 *val)
> {
> struct i2c_msg msgs[] = {
> {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = 0,
> .len = 1,
> .buf = &addr,
> },
> {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = I2C_M_RD,
> .len = 1,
> .buf = val,
> @@ -189,7 +189,7 @@ static bool ch7017_write(struct intel_dvo_device *dvo, u8 addr, u8 val)
> {
> u8 buf[2] = { addr, val };
> struct i2c_msg msg = {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = 0,
> .len = 2,
> .buf = buf,
> @@ -197,7 +197,7 @@ static bool ch7017_write(struct intel_dvo_device *dvo, u8 addr, u8 val)
> return i2c_transfer(dvo->i2c_bus, &msg, 1) == 1;
> }
>
> -/** Probes for a CH7017 on the given bus and slave address. */
> +/** Probes for a CH7017 on the given bus and client address. */
> static bool ch7017_init(struct intel_dvo_device *dvo,
> struct i2c_adapter *adapter)
> {
> @@ -227,13 +227,13 @@ static bool ch7017_init(struct intel_dvo_device *dvo,
> break;
> default:
> DRM_DEBUG_KMS("ch701x not detected, got %d: from %s "
> - "slave %d.\n",
> - val, adapter->name, dvo->slave_addr);
> + "client %d.\n",
> + val, adapter->name, dvo->client_addr);
> goto fail;
> }
>
> DRM_DEBUG_KMS("%s detected on %s, addr %d\n",
> - str, adapter->name, dvo->slave_addr);
> + str, adapter->name, dvo->client_addr);
> return true;
>
> fail:
> diff --git a/drivers/gpu/drm/i915/display/dvo_ch7xxx.c b/drivers/gpu/drm/i915/display/dvo_ch7xxx.c
> index 2e8e85da5a40..8e36d6e2dde0 100644
> --- a/drivers/gpu/drm/i915/display/dvo_ch7xxx.c
> +++ b/drivers/gpu/drm/i915/display/dvo_ch7xxx.c
> @@ -153,13 +153,13 @@ static bool ch7xxx_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)
>
> struct i2c_msg msgs[] = {
> {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = 0,
> .len = 1,
> .buf = out_buf,
> },
> {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = I2C_M_RD,
> .len = 1,
> .buf = in_buf,
> @@ -176,7 +176,7 @@ static bool ch7xxx_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)
>
> if (!ch7xxx->quiet) {
> DRM_DEBUG_KMS("Unable to read register 0x%02x from %s:%02x.\n",
> - addr, adapter->name, dvo->slave_addr);
> + addr, adapter->name, dvo->client_addr);
> }
> return false;
> }
> @@ -188,7 +188,7 @@ static bool ch7xxx_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)
> struct i2c_adapter *adapter = dvo->i2c_bus;
> u8 out_buf[2];
> struct i2c_msg msg = {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = 0,
> .len = 2,
> .buf = out_buf,
> @@ -202,7 +202,7 @@ static bool ch7xxx_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)
>
> if (!ch7xxx->quiet) {
> DRM_DEBUG_KMS("Unable to write register 0x%02x to %s:%d.\n",
> - addr, adapter->name, dvo->slave_addr);
> + addr, adapter->name, dvo->client_addr);
> }
>
> return false;
> @@ -229,8 +229,8 @@ static bool ch7xxx_init(struct intel_dvo_device *dvo,
>
> name = ch7xxx_get_id(vendor);
> if (!name) {
> - DRM_DEBUG_KMS("ch7xxx not detected; got VID 0x%02x from %s slave %d.\n",
> - vendor, adapter->name, dvo->slave_addr);
> + DRM_DEBUG_KMS("ch7xxx not detected; got VID 0x%02x from %s client %d.\n",
> + vendor, adapter->name, dvo->client_addr);
> goto out;
> }
>
> @@ -240,8 +240,8 @@ static bool ch7xxx_init(struct intel_dvo_device *dvo,
>
> devid = ch7xxx_get_did(device);
> if (!devid) {
> - DRM_DEBUG_KMS("ch7xxx not detected; got DID 0x%02x from %s slave %d.\n",
> - device, adapter->name, dvo->slave_addr);
> + DRM_DEBUG_KMS("ch7xxx not detected; got DID 0x%02x from %s client %d.\n",
> + device, adapter->name, dvo->client_addr);
> goto out;
> }
>
> diff --git a/drivers/gpu/drm/i915/display/dvo_ivch.c b/drivers/gpu/drm/i915/display/dvo_ivch.c
> index eef72bb3b767..718bb17da2e3 100644
> --- a/drivers/gpu/drm/i915/display/dvo_ivch.c
> +++ b/drivers/gpu/drm/i915/display/dvo_ivch.c
> @@ -198,7 +198,7 @@ static bool ivch_read(struct intel_dvo_device *dvo, int addr, u16 *data)
>
> struct i2c_msg msgs[] = {
> {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = I2C_M_RD,
> .len = 0,
> },
> @@ -209,7 +209,7 @@ static bool ivch_read(struct intel_dvo_device *dvo, int addr, u16 *data)
> .buf = out_buf,
> },
> {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = I2C_M_RD | I2C_M_NOSTART,
> .len = 2,
> .buf = in_buf,
> @@ -226,7 +226,7 @@ static bool ivch_read(struct intel_dvo_device *dvo, int addr, u16 *data)
> if (!priv->quiet) {
> DRM_DEBUG_KMS("Unable to read register 0x%02x from "
> "%s:%02x.\n",
> - addr, adapter->name, dvo->slave_addr);
> + addr, adapter->name, dvo->client_addr);
> }
> return false;
> }
> @@ -238,7 +238,7 @@ static bool ivch_write(struct intel_dvo_device *dvo, int addr, u16 data)
> struct i2c_adapter *adapter = dvo->i2c_bus;
> u8 out_buf[3];
> struct i2c_msg msg = {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = 0,
> .len = 3,
> .buf = out_buf,
> @@ -253,13 +253,13 @@ static bool ivch_write(struct intel_dvo_device *dvo, int addr, u16 data)
>
> if (!priv->quiet) {
> DRM_DEBUG_KMS("Unable to write register 0x%02x to %s:%d.\n",
> - addr, adapter->name, dvo->slave_addr);
> + addr, adapter->name, dvo->client_addr);
> }
>
> return false;
> }
>
> -/* Probes the given bus and slave address for an ivch */
> +/* Probes the given bus and client address for an ivch */
> static bool ivch_init(struct intel_dvo_device *dvo,
> struct i2c_adapter *adapter)
> {
> @@ -283,10 +283,10 @@ static bool ivch_init(struct intel_dvo_device *dvo,
> * very unique, check that the value in the base address field matches
> * the address it's responding on.
> */
> - if ((temp & VR00_BASE_ADDRESS_MASK) != dvo->slave_addr) {
> + if ((temp & VR00_BASE_ADDRESS_MASK) != dvo->client_addr) {
> DRM_DEBUG_KMS("ivch detect failed due to address mismatch "
> "(%d vs %d)\n",
> - (temp & VR00_BASE_ADDRESS_MASK), dvo->slave_addr);
> + (temp & VR00_BASE_ADDRESS_MASK), dvo->client_addr);
> goto out;
> }
>
> diff --git a/drivers/gpu/drm/i915/display/dvo_ns2501.c b/drivers/gpu/drm/i915/display/dvo_ns2501.c
> index 1df212fb000e..b15875a832f5 100644
> --- a/drivers/gpu/drm/i915/display/dvo_ns2501.c
> +++ b/drivers/gpu/drm/i915/display/dvo_ns2501.c
> @@ -399,13 +399,13 @@ static bool ns2501_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)
>
> struct i2c_msg msgs[] = {
> {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = 0,
> .len = 1,
> .buf = out_buf,
> },
> {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = I2C_M_RD,
> .len = 1,
> .buf = in_buf,
> @@ -423,7 +423,7 @@ static bool ns2501_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)
> if (!ns->quiet) {
> DRM_DEBUG_KMS
> ("Unable to read register 0x%02x from %s:0x%02x.\n", addr,
> - adapter->name, dvo->slave_addr);
> + adapter->name, dvo->client_addr);
> }
>
> return false;
> @@ -442,7 +442,7 @@ static bool ns2501_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)
> u8 out_buf[2];
>
> struct i2c_msg msg = {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = 0,
> .len = 2,
> .buf = out_buf,
> @@ -457,7 +457,7 @@ static bool ns2501_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)
>
> if (!ns->quiet) {
> DRM_DEBUG_KMS("Unable to write register 0x%02x to %s:%d\n",
> - addr, adapter->name, dvo->slave_addr);
> + addr, adapter->name, dvo->client_addr);
> }
>
> return false;
> @@ -488,8 +488,8 @@ static bool ns2501_init(struct intel_dvo_device *dvo,
> goto out;
>
> if (ch != (NS2501_VID & 0xff)) {
> - DRM_DEBUG_KMS("ns2501 not detected got %d: from %s Slave %d.\n",
> - ch, adapter->name, dvo->slave_addr);
> + DRM_DEBUG_KMS("ns2501 not detected got %d: from %s Client %d.\n",
> + ch, adapter->name, dvo->client_addr);
> goto out;
> }
>
> @@ -497,8 +497,8 @@ static bool ns2501_init(struct intel_dvo_device *dvo,
> goto out;
>
> if (ch != (NS2501_DID & 0xff)) {
> - DRM_DEBUG_KMS("ns2501 not detected got %d: from %s Slave %d.\n",
> - ch, adapter->name, dvo->slave_addr);
> + DRM_DEBUG_KMS("ns2501 not detected got %d: from %s Client %d.\n",
> + ch, adapter->name, dvo->client_addr);
> goto out;
> }
> ns->quiet = false;
> diff --git a/drivers/gpu/drm/i915/display/dvo_sil164.c b/drivers/gpu/drm/i915/display/dvo_sil164.c
> index 6c461024c8e3..e9e4433ffa14 100644
> --- a/drivers/gpu/drm/i915/display/dvo_sil164.c
> +++ b/drivers/gpu/drm/i915/display/dvo_sil164.c
> @@ -79,13 +79,13 @@ static bool sil164_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)
>
> struct i2c_msg msgs[] = {
> {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = 0,
> .len = 1,
> .buf = out_buf,
> },
> {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = I2C_M_RD,
> .len = 1,
> .buf = in_buf,
> @@ -102,7 +102,7 @@ static bool sil164_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)
>
> if (!sil->quiet) {
> DRM_DEBUG_KMS("Unable to read register 0x%02x from %s:%02x.\n",
> - addr, adapter->name, dvo->slave_addr);
> + addr, adapter->name, dvo->client_addr);
> }
> return false;
> }
> @@ -113,7 +113,7 @@ static bool sil164_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)
> struct i2c_adapter *adapter = dvo->i2c_bus;
> u8 out_buf[2];
> struct i2c_msg msg = {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = 0,
> .len = 2,
> .buf = out_buf,
> @@ -127,7 +127,7 @@ static bool sil164_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)
>
> if (!sil->quiet) {
> DRM_DEBUG_KMS("Unable to write register 0x%02x to %s:%d.\n",
> - addr, adapter->name, dvo->slave_addr);
> + addr, adapter->name, dvo->client_addr);
> }
>
> return false;
> @@ -153,8 +153,8 @@ static bool sil164_init(struct intel_dvo_device *dvo,
> goto out;
>
> if (ch != (SIL164_VID & 0xff)) {
> - DRM_DEBUG_KMS("sil164 not detected got %d: from %s Slave %d.\n",
> - ch, adapter->name, dvo->slave_addr);
> + DRM_DEBUG_KMS("sil164 not detected got %d: from %s Client %d.\n",
> + ch, adapter->name, dvo->client_addr);
> goto out;
> }
>
> @@ -162,8 +162,8 @@ static bool sil164_init(struct intel_dvo_device *dvo,
> goto out;
>
> if (ch != (SIL164_DID & 0xff)) {
> - DRM_DEBUG_KMS("sil164 not detected got %d: from %s Slave %d.\n",
> - ch, adapter->name, dvo->slave_addr);
> + DRM_DEBUG_KMS("sil164 not detected got %d: from %s Client %d.\n",
> + ch, adapter->name, dvo->client_addr);
> goto out;
> }
> sil->quiet = false;
> diff --git a/drivers/gpu/drm/i915/display/dvo_tfp410.c b/drivers/gpu/drm/i915/display/dvo_tfp410.c
> index 0939e097f4f9..ef1385fc16e7 100644
> --- a/drivers/gpu/drm/i915/display/dvo_tfp410.c
> +++ b/drivers/gpu/drm/i915/display/dvo_tfp410.c
> @@ -100,13 +100,13 @@ static bool tfp410_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)
>
> struct i2c_msg msgs[] = {
> {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = 0,
> .len = 1,
> .buf = out_buf,
> },
> {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = I2C_M_RD,
> .len = 1,
> .buf = in_buf,
> @@ -123,7 +123,7 @@ static bool tfp410_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)
>
> if (!tfp->quiet) {
> DRM_DEBUG_KMS("Unable to read register 0x%02x from %s:%02x.\n",
> - addr, adapter->name, dvo->slave_addr);
> + addr, adapter->name, dvo->client_addr);
> }
> return false;
> }
> @@ -134,7 +134,7 @@ static bool tfp410_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)
> struct i2c_adapter *adapter = dvo->i2c_bus;
> u8 out_buf[2];
> struct i2c_msg msg = {
> - .addr = dvo->slave_addr,
> + .addr = dvo->client_addr,
> .flags = 0,
> .len = 2,
> .buf = out_buf,
> @@ -148,7 +148,7 @@ static bool tfp410_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)
>
> if (!tfp->quiet) {
> DRM_DEBUG_KMS("Unable to write register 0x%02x to %s:%d.\n",
> - addr, adapter->name, dvo->slave_addr);
> + addr, adapter->name, dvo->client_addr);
> }
>
> return false;
> @@ -183,15 +183,15 @@ static bool tfp410_init(struct intel_dvo_device *dvo,
>
> if ((id = tfp410_getid(dvo, TFP410_VID_LO)) != TFP410_VID) {
> DRM_DEBUG_KMS("tfp410 not detected got VID %X: from %s "
> - "Slave %d.\n",
> - id, adapter->name, dvo->slave_addr);
> + "Client %d.\n",
> + id, adapter->name, dvo->client_addr);
> goto out;
> }
>
> if ((id = tfp410_getid(dvo, TFP410_DID_LO)) != TFP410_DID) {
> DRM_DEBUG_KMS("tfp410 not detected got DID %X: from %s "
> - "Slave %d.\n",
> - id, adapter->name, dvo->slave_addr);
> + "Client %d.\n",
> + id, adapter->name, dvo->client_addr);
> goto out;
> }
> tfp->quiet = false;
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index fe52c06271ef..dbeb3a89d004 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -69,8 +69,8 @@ struct intel_bios_encoder_data {
> struct list_head node;
> };
>
> -#define SLAVE_ADDR1 0x70
> -#define SLAVE_ADDR2 0x72
> +#define CLIENT_ADDR1 0x70
> +#define CLIENT_ADDR2 0x72
>
> /* Get BDB block size given a pointer to Block ID. */
> static u32 _get_blocksize(const u8 *block_base)
> @@ -1231,10 +1231,10 @@ parse_sdvo_device_mapping(struct drm_i915_private *i915)
> const struct child_device_config *child = &devdata->child;
> struct sdvo_device_mapping *mapping;
>
> - if (child->slave_addr != SLAVE_ADDR1 &&
> - child->slave_addr != SLAVE_ADDR2) {
> + if (child->client_addr != CLIENT_ADDR1 &&
> + child->client_addr != CLIENT_ADDR2) {
> /*
> - * If the slave address is neither 0x70 nor 0x72,
> + * If the client address is neither 0x70 nor 0x72,
> * it is not a SDVO device. Skip it.
> */
> continue;
> @@ -1247,22 +1247,22 @@ parse_sdvo_device_mapping(struct drm_i915_private *i915)
> continue;
> }
> drm_dbg_kms(&i915->drm,
> - "the SDVO device with slave addr %2x is found on"
> + "the SDVO device with client addr %2x is found on"
> " %s port\n",
> - child->slave_addr,
> + child->client_addr,
> (child->dvo_port == DEVICE_PORT_DVOB) ?
> "SDVOB" : "SDVOC");
> mapping = &i915->display.vbt.sdvo_mappings[child->dvo_port - 1];
> if (!mapping->initialized) {
> mapping->dvo_port = child->dvo_port;
> - mapping->slave_addr = child->slave_addr;
> + mapping->client_addr = child->client_addr;
> mapping->dvo_wiring = child->dvo_wiring;
> mapping->ddc_pin = child->ddc_pin;
> mapping->i2c_pin = child->i2c_pin;
> mapping->initialized = 1;
> drm_dbg_kms(&i915->drm,
> "SDVO device: dvo=%x, addr=%x, wiring=%d, ddc_pin=%d, i2c_pin=%d\n",
> - mapping->dvo_port, mapping->slave_addr,
> + mapping->dvo_port, mapping->client_addr,
> mapping->dvo_wiring, mapping->ddc_pin,
> mapping->i2c_pin);
> } else {
> @@ -1270,11 +1270,11 @@ parse_sdvo_device_mapping(struct drm_i915_private *i915)
> "Maybe one SDVO port is shared by "
> "two SDVO device.\n");
> }
> - if (child->slave2_addr) {
> + if (child->client2_addr) {
> /* Maybe this is a SDVO device with multiple inputs */
> /* And the mapping info is not added */
> drm_dbg_kms(&i915->drm,
> - "there exists the slave2_addr. Maybe this"
> + "there exists the client2_addr. Maybe this"
> " is a SDVO device with multiple inputs.\n");
> }
> count++;
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index c587a8efeafc..c408daee412a 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -4327,7 +4327,7 @@ static int intel_ddi_compute_config_late(struct intel_encoder *encoder,
> connector->tile_group->id);
>
> /*
> - * EDP Transcoders cannot be ensalved
> + * EDP Transcoders cannot be slaves
> * make them a master always when present
> */
> if (port_sync_transcoders & BIT(TRANSCODER_EDP))
> diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h
> index 2167dbee5eea..663be73536e7 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_core.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_core.h
> @@ -236,7 +236,7 @@ struct intel_vbt_data {
> struct sdvo_device_mapping {
> u8 initialized;
> u8 dvo_port;
> - u8 slave_addr;
> + u8 client_addr;
> u8 dvo_wiring;
> u8 i2c_pin;
> u8 ddc_pin;
> diff --git a/drivers/gpu/drm/i915/display/intel_dsi.h b/drivers/gpu/drm/i915/display/intel_dsi.h
> index e99c94edfaae..d1031fe69e76 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsi.h
> +++ b/drivers/gpu/drm/i915/display/intel_dsi.h
> @@ -66,7 +66,7 @@ struct intel_dsi {
> /* number of DSI lanes */
> unsigned int lane_count;
>
> - /* i2c bus associated with the slave device */
> + /* i2c bus associated with the client device */
> int i2c_bus_num;
>
> /*
> diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
> index a5d7fc8418c9..3335d4e31964 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
> @@ -56,7 +56,7 @@
> #define MIPI_PORT_SHIFT 3
>
> struct i2c_adapter_lookup {
> - u16 slave_addr;
> + u16 client_addr;
> struct intel_dsi *intel_dsi;
> acpi_handle dev_handle;
> };
> @@ -443,7 +443,7 @@ static int i2c_adapter_lookup(struct acpi_resource *ares, void *data)
> if (!i2c_acpi_get_i2c_resource(ares, &sb))
> return 1;
>
> - if (lookup->slave_addr != sb->slave_address)
> + if (lookup->client_addr != sb->slave_address)
> return 1;
>
> status = acpi_get_handle(lookup->dev_handle,
> @@ -460,12 +460,12 @@ static int i2c_adapter_lookup(struct acpi_resource *ares, void *data)
> }
>
> static void i2c_acpi_find_adapter(struct intel_dsi *intel_dsi,
> - const u16 slave_addr)
> + const u16 client_addr)
> {
> struct drm_device *drm_dev = intel_dsi->base.base.dev;
> struct acpi_device *adev = ACPI_COMPANION(drm_dev->dev);
> struct i2c_adapter_lookup lookup = {
> - .slave_addr = slave_addr,
> + .client_addr = client_addr,
> .intel_dsi = intel_dsi,
> .dev_handle = acpi_device_handle(adev),
> };
> @@ -476,7 +476,7 @@ static void i2c_acpi_find_adapter(struct intel_dsi *intel_dsi,
> }
> #else
> static inline void i2c_acpi_find_adapter(struct intel_dsi *intel_dsi,
> - const u16 slave_addr)
> + const u16 client_addr)
> {
> }
> #endif
> @@ -488,17 +488,17 @@ static const u8 *mipi_exec_i2c(struct intel_dsi *intel_dsi, const u8 *data)
> struct i2c_msg msg;
> int ret;
> u8 vbt_i2c_bus_num = *(data + 2);
> - u16 slave_addr = *(u16 *)(data + 3);
> + u16 client_addr = *(u16 *)(data + 3);
> u8 reg_offset = *(data + 5);
> u8 payload_size = *(data + 6);
> u8 *payload_data;
>
> drm_dbg_kms(&i915->drm, "bus %d client-addr 0x%02x reg 0x%02x data %*ph\n",
> - vbt_i2c_bus_num, slave_addr, reg_offset, payload_size, data + 7);
> + vbt_i2c_bus_num, client_addr, reg_offset, payload_size, data + 7);
>
> if (intel_dsi->i2c_bus_num < 0) {
> intel_dsi->i2c_bus_num = vbt_i2c_bus_num;
> - i2c_acpi_find_adapter(intel_dsi, slave_addr);
> + i2c_acpi_find_adapter(intel_dsi, client_addr);
> }
>
> adapter = i2c_get_adapter(intel_dsi->i2c_bus_num);
> @@ -514,7 +514,7 @@ static const u8 *mipi_exec_i2c(struct intel_dsi *intel_dsi, const u8 *data)
> payload_data[0] = reg_offset;
> memcpy(&payload_data[1], (data + 7), payload_size);
>
> - msg.addr = slave_addr;
> + msg.addr = client_addr;
> msg.flags = 0;
> msg.len = payload_size + 1;
> msg.buf = payload_data;
> diff --git a/drivers/gpu/drm/i915/display/intel_dvo.c b/drivers/gpu/drm/i915/display/intel_dvo.c
> index c076da75b066..7da2725149e4 100644
> --- a/drivers/gpu/drm/i915/display/intel_dvo.c
> +++ b/drivers/gpu/drm/i915/display/intel_dvo.c
> @@ -60,42 +60,42 @@ static const struct intel_dvo_device intel_dvo_devices[] = {
> .type = INTEL_DVO_CHIP_TMDS,
> .name = "sil164",
> .port = PORT_C,
> - .slave_addr = SIL164_ADDR,
> + .client_addr = SIL164_ADDR,
> .dev_ops = &sil164_ops,
> },
> {
> .type = INTEL_DVO_CHIP_TMDS,
> .name = "ch7xxx",
> .port = PORT_C,
> - .slave_addr = CH7xxx_ADDR,
> + .client_addr = CH7xxx_ADDR,
> .dev_ops = &ch7xxx_ops,
> },
> {
> .type = INTEL_DVO_CHIP_TMDS,
> .name = "ch7xxx",
> .port = PORT_C,
> - .slave_addr = 0x75, /* For some ch7010 */
> + .client_addr = 0x75, /* For some ch7010 */
> .dev_ops = &ch7xxx_ops,
> },
> {
> .type = INTEL_DVO_CHIP_LVDS,
> .name = "ivch",
> .port = PORT_A,
> - .slave_addr = 0x02, /* Might also be 0x44, 0x84, 0xc4 */
> + .client_addr = 0x02, /* Might also be 0x44, 0x84, 0xc4 */
> .dev_ops = &ivch_ops,
> },
> {
> .type = INTEL_DVO_CHIP_TMDS,
> .name = "tfp410",
> .port = PORT_C,
> - .slave_addr = TFP410_ADDR,
> + .client_addr = TFP410_ADDR,
> .dev_ops = &tfp410_ops,
> },
> {
> .type = INTEL_DVO_CHIP_LVDS,
> .name = "ch7017",
> .port = PORT_C,
> - .slave_addr = 0x75,
> + .client_addr = 0x75,
> .gpio = GMBUS_PIN_DPB,
> .dev_ops = &ch7017_ops,
> },
> @@ -103,7 +103,7 @@ static const struct intel_dvo_device intel_dvo_devices[] = {
> .type = INTEL_DVO_CHIP_LVDS_NO_FIXED,
> .name = "ns2501",
> .port = PORT_B,
> - .slave_addr = NS2501_ADDR,
> + .client_addr = NS2501_ADDR,
> .dev_ops = &ns2501_ops,
> },
> };
> diff --git a/drivers/gpu/drm/i915/display/intel_dvo_dev.h b/drivers/gpu/drm/i915/display/intel_dvo_dev.h
> index af7b04539b93..042949ac8a16 100644
> --- a/drivers/gpu/drm/i915/display/intel_dvo_dev.h
> +++ b/drivers/gpu/drm/i915/display/intel_dvo_dev.h
> @@ -38,7 +38,7 @@ struct intel_dvo_device {
> enum port port;
> /* GPIO register used for i2c bus to control this device */
> u32 gpio;
> - int slave_addr;
> + int client_addr;
>
> const struct intel_dvo_dev_ops *dev_ops;
> void *dev_priv;
> diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.c b/drivers/gpu/drm/i915/display/intel_gmbus.c
> index d3e03ed5b79c..cbbdd84b4641 100644
> --- a/drivers/gpu/drm/i915/display/intel_gmbus.c
> +++ b/drivers/gpu/drm/i915/display/intel_gmbus.c
> @@ -478,7 +478,7 @@ gmbus_xfer_read_chunk(struct drm_i915_private *i915,
> /*
> * HW spec says that 512Bytes in Burst read need special treatment.
> * But it doesn't talk about other multiple of 256Bytes. And couldn't locate
> - * an I2C slave, which supports such a lengthy burst read too for experiments.
> + * an I2C client, which supports such a lengthy burst read too for experiments.
> *
> * So until things get clarified on HW support, to avoid the burst read length
> * in fold of 256Bytes except 512, max burst read length is fixed at 767Bytes.
> @@ -701,7 +701,7 @@ do_gmbus_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num,
>
> /* Toggle the Software Clear Interrupt bit. This has the effect
> * of resetting the GMBUS controller and so clearing the
> - * BUS_ERROR raised by the slave's NAK.
> + * BUS_ERROR raised by the client's NAK.
> */
> intel_de_write_fw(i915, GMBUS1(i915), GMBUS_SW_CLR_INT);
> intel_de_write_fw(i915, GMBUS1(i915), 0);
> diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c
> index 5f9e748adc89..126493c662c5 100644
> --- a/drivers/gpu/drm/i915/display/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
> @@ -95,7 +95,7 @@ struct intel_sdvo {
> struct intel_encoder base;
>
> struct i2c_adapter *i2c;
> - u8 slave_addr;
> + u8 client_addr;
>
> struct intel_sdvo_ddc ddc[3];
>
> @@ -255,13 +255,13 @@ static bool intel_sdvo_read_byte(struct intel_sdvo *intel_sdvo, u8 addr, u8 *ch)
> struct drm_i915_private *i915 = to_i915(intel_sdvo->base.base.dev);
> struct i2c_msg msgs[] = {
> {
> - .addr = intel_sdvo->slave_addr,
> + .addr = intel_sdvo->client_addr,
> .flags = 0,
> .len = 1,
> .buf = &addr,
> },
> {
> - .addr = intel_sdvo->slave_addr,
> + .addr = intel_sdvo->client_addr,
> .flags = I2C_M_RD,
> .len = 1,
> .buf = ch,
> @@ -483,14 +483,14 @@ static bool __intel_sdvo_write_cmd(struct intel_sdvo *intel_sdvo, u8 cmd,
> intel_sdvo_debug_write(intel_sdvo, cmd, args, args_len);
>
> for (i = 0; i < args_len; i++) {
> - msgs[i].addr = intel_sdvo->slave_addr;
> + msgs[i].addr = intel_sdvo->client_addr;
> msgs[i].flags = 0;
> msgs[i].len = 2;
> msgs[i].buf = buf + 2 *i;
> buf[2*i + 0] = SDVO_I2C_ARG_0 - i;
> buf[2*i + 1] = ((u8*)args)[i];
> }
> - msgs[i].addr = intel_sdvo->slave_addr;
> + msgs[i].addr = intel_sdvo->client_addr;
> msgs[i].flags = 0;
> msgs[i].len = 2;
> msgs[i].buf = buf + 2*i;
> @@ -499,12 +499,12 @@ static bool __intel_sdvo_write_cmd(struct intel_sdvo *intel_sdvo, u8 cmd,
>
> /* the following two are to read the response */
> status = SDVO_I2C_CMD_STATUS;
> - msgs[i+1].addr = intel_sdvo->slave_addr;
> + msgs[i+1].addr = intel_sdvo->client_addr;
> msgs[i+1].flags = 0;
> msgs[i+1].len = 1;
> msgs[i+1].buf = &status;
>
> - msgs[i+2].addr = intel_sdvo->slave_addr;
> + msgs[i+2].addr = intel_sdvo->client_addr;
> msgs[i+2].flags = I2C_M_RD;
> msgs[i+2].len = 1;
> msgs[i+2].buf = &status;
> @@ -2659,9 +2659,9 @@ intel_sdvo_select_i2c_bus(struct intel_sdvo *sdvo)
> else
> pin = GMBUS_PIN_DPB;
>
> - drm_dbg_kms(&dev_priv->drm, "[ENCODER:%d:%s] I2C pin %d, slave addr 0x%x\n",
> + drm_dbg_kms(&dev_priv->drm, "[ENCODER:%d:%s] I2C pin %d, client addr 0x%x\n",
> sdvo->base.base.base.id, sdvo->base.base.name,
> - pin, sdvo->slave_addr);
> + pin, sdvo->client_addr);
>
> sdvo->i2c = intel_gmbus_get_adapter(dev_priv, pin);
>
> @@ -2687,7 +2687,7 @@ intel_sdvo_is_hdmi_connector(struct intel_sdvo *intel_sdvo)
> }
>
> static u8
> -intel_sdvo_get_slave_addr(struct intel_sdvo *sdvo)
> +intel_sdvo_get_client_addr(struct intel_sdvo *sdvo)
> {
> struct drm_i915_private *dev_priv = to_i915(sdvo->base.base.dev);
> const struct sdvo_device_mapping *my_mapping, *other_mapping;
> @@ -2701,15 +2701,15 @@ intel_sdvo_get_slave_addr(struct intel_sdvo *sdvo)
> }
>
> /* If the BIOS described our SDVO device, take advantage of it. */
> - if (my_mapping->slave_addr)
> - return my_mapping->slave_addr;
> + if (my_mapping->client_addr)
> + return my_mapping->client_addr;
>
> /*
> * If the BIOS only described a different SDVO device, use the
> * address that it isn't using.
> */
> - if (other_mapping->slave_addr) {
> - if (other_mapping->slave_addr == 0x70)
> + if (other_mapping->client_addr) {
> + if (other_mapping->client_addr == 0x70)
> return 0x72;
> else
> return 0x70;
> @@ -3412,7 +3412,7 @@ bool intel_sdvo_init(struct drm_i915_private *dev_priv,
> "SDVO %c", port_name(port));
>
> intel_sdvo->sdvo_reg = sdvo_reg;
> - intel_sdvo->slave_addr = intel_sdvo_get_slave_addr(intel_sdvo) >> 1;
> + intel_sdvo->client_addr = intel_sdvo_get_client_addr(intel_sdvo) >> 1;
>
> intel_sdvo_select_i2c_bus(intel_sdvo);
>
> diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> index a9f44abfc9fc..e268224355eb 100644
> --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> @@ -432,7 +432,7 @@ struct child_device_config {
> u16 addin_offset;
> u8 dvo_port; /* See DEVICE_PORT_* and DVO_PORT_* above */
> u8 i2c_pin;
> - u8 slave_addr;
> + u8 client_addr;
> u8 ddc_pin;
> u16 edid_ptr;
> u8 dvo_cfg; /* See DEVICE_CFG_* above */
> @@ -441,7 +441,7 @@ struct child_device_config {
> struct {
> u8 dvo2_port;
> u8 i2c2_pin;
> - u8 slave2_addr;
> + u8 client2_addr;
> u8 ddc2_pin;
> } __packed;
> struct {
> diff --git a/drivers/gpu/drm/i915/gvt/edid.c b/drivers/gpu/drm/i915/gvt/edid.c
> index af9afdb53c7f..29380c774133 100644
> --- a/drivers/gpu/drm/i915/gvt/edid.c
> +++ b/drivers/gpu/drm/i915/gvt/edid.c
> @@ -42,8 +42,8 @@
> #define GMBUS1_TOTAL_BYTES_MASK 0x1ff
> #define gmbus1_total_byte_count(v) (((v) >> \
> GMBUS1_TOTAL_BYTES_SHIFT) & GMBUS1_TOTAL_BYTES_MASK)
> -#define gmbus1_slave_addr(v) (((v) & 0xff) >> 1)
> -#define gmbus1_slave_index(v) (((v) >> 8) & 0xff)
> +#define gmbus1_client_addr(v) (((v) & 0xff) >> 1)
> +#define gmbus1_client_index(v) (((v) >> 8) & 0xff)
> #define gmbus1_bus_cycle(v) (((v) >> 25) & 0x7)
>
> /* GMBUS0 bits definitions */
> @@ -54,7 +54,7 @@ static unsigned char edid_get_byte(struct intel_vgpu *vgpu)
> struct intel_vgpu_i2c_edid *edid = &vgpu->display.i2c_edid;
> unsigned char chr = 0;
>
> - if (edid->state == I2C_NOT_SPECIFIED || !edid->slave_selected) {
> + if (edid->state == I2C_NOT_SPECIFIED || !edid->client_selected) {
> gvt_vgpu_err("Driver tries to read EDID without proper sequence!\n");
> return 0;
> }
> @@ -179,7 +179,7 @@ static int gmbus1_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
> void *p_data, unsigned int bytes)
> {
> struct intel_vgpu_i2c_edid *i2c_edid = &vgpu->display.i2c_edid;
> - u32 slave_addr;
> + u32 client_addr;
> u32 wvalue = *(u32 *)p_data;
>
> if (vgpu_vreg(vgpu, offset) & GMBUS_SW_CLR_INT) {
> @@ -210,21 +210,21 @@ static int gmbus1_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
>
> i2c_edid->gmbus.total_byte_count =
> gmbus1_total_byte_count(wvalue);
> - slave_addr = gmbus1_slave_addr(wvalue);
> + client_addr = gmbus1_client_addr(wvalue);
>
> /* vgpu gmbus only support EDID */
> - if (slave_addr == EDID_ADDR) {
> - i2c_edid->slave_selected = true;
> - } else if (slave_addr != 0) {
> + if (client_addr == EDID_ADDR) {
> + i2c_edid->client_selected = true;
> + } else if (client_addr != 0) {
> gvt_dbg_dpy(
> - "vgpu%d: unsupported gmbus slave addr(0x%x)\n"
> + "vgpu%d: unsupported gmbus client addr(0x%x)\n"
> " gmbus operations will be ignored.\n",
> - vgpu->id, slave_addr);
> + vgpu->id, client_addr);
> }
>
> if (wvalue & GMBUS_CYCLE_INDEX)
> i2c_edid->current_edid_read =
> - gmbus1_slave_index(wvalue);
> + gmbus1_client_index(wvalue);
>
> i2c_edid->gmbus.cycle_type = gmbus1_bus_cycle(wvalue);
> switch (gmbus1_bus_cycle(wvalue)) {
> @@ -523,7 +523,7 @@ void intel_gvt_i2c_handle_aux_ch_write(struct intel_vgpu *vgpu,
> } else if (addr == EDID_ADDR) {
> i2c_edid->state = I2C_AUX_CH;
> i2c_edid->port = port_idx;
> - i2c_edid->slave_selected = true;
> + i2c_edid->client_selected = true;
> if (intel_vgpu_has_monitor_on_port(vgpu,
> port_idx) &&
> intel_vgpu_port_is_dp(vgpu, port_idx))
> @@ -542,7 +542,7 @@ void intel_gvt_i2c_handle_aux_ch_write(struct intel_vgpu *vgpu,
> return;
> if (drm_WARN_ON(&i915->drm, msg_length != 4))
> return;
> - if (i2c_edid->edid_available && i2c_edid->slave_selected) {
> + if (i2c_edid->edid_available && i2c_edid->client_selected) {
> unsigned char val = edid_get_byte(vgpu);
>
> aux_data_for_write = (val << 16);
> @@ -571,7 +571,7 @@ void intel_vgpu_init_i2c_edid(struct intel_vgpu *vgpu)
> edid->state = I2C_NOT_SPECIFIED;
>
> edid->port = -1;
> - edid->slave_selected = false;
> + edid->client_selected = false;
> edid->edid_available = false;
> edid->current_edid_read = 0;
>
> diff --git a/drivers/gpu/drm/i915/gvt/edid.h b/drivers/gpu/drm/i915/gvt/edid.h
> index dfe0cbc6aad8..c36f26c5f5cc 100644
> --- a/drivers/gpu/drm/i915/gvt/edid.h
> +++ b/drivers/gpu/drm/i915/gvt/edid.h
> @@ -80,7 +80,7 @@ enum gmbus_cycle_type {
> * R/W Protect
> * Command and Status.
> * bit0 is the direction bit: 1 is read; 0 is write.
> - * bit1 - bit7 is slave 7-bit address.
> + * bit1 - bit7 is client 7-bit address.
> * bit16 - bit24 total byte count (ignore?)
> *
> * GMBUS2:
> @@ -130,7 +130,7 @@ struct intel_vgpu_i2c_edid {
> enum i2c_state state;
>
> unsigned int port;
> - bool slave_selected;
> + bool client_selected;
> bool edid_available;
> unsigned int current_edid_read;
>
> diff --git a/drivers/gpu/drm/i915/gvt/opregion.c b/drivers/gpu/drm/i915/gvt/opregion.c
> index d2bed466540a..88fa6877ec90 100644
> --- a/drivers/gpu/drm/i915/gvt/opregion.c
> +++ b/drivers/gpu/drm/i915/gvt/opregion.c
> @@ -86,7 +86,7 @@ struct efp_child_device_config {
> u8 skip2;
> u8 dvo_port;
> u8 i2c_pin; /* for add-in card */
> - u8 slave_addr; /* for add-in card */
> + u8 client_addr; /* for add-in card */
> u8 ddc_pin;
> u16 edid_ptr;
> u8 dvo_config;

--
Jani Nikula, Intel

2024-04-02 08:31:13

by Simon Horman

[permalink] [raw]
Subject: Re: [PATCH v0 10/14] sfc: falcon: Make I2C terminology more inclusive

On Fri, Mar 29, 2024 at 05:00:34PM +0000, Easwar Hariharan wrote:
> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
> with more appropriate terms. Inspired by and following on to Wolfram's
> series to fix drivers/i2c/[1], fix the terminology for users of
> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
> in the specification.
>
> Compile tested, no functionality changes intended
>
> [1]: https://lore.kernel.org/all/[email protected]/
>
> Signed-off-by: Easwar Hariharan <[email protected]>

Reviewed-by: Simon Horman <[email protected]>


2024-04-02 09:00:53

by Martin Habets

[permalink] [raw]
Subject: Re: [PATCH v0 10/14] sfc: falcon: Make I2C terminology more inclusive

On Fri, Mar 29, 2024 at 05:00:34PM +0000, Easwar Hariharan wrote:
> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
> with more appropriate terms. Inspired by and following on to Wolfram's
> series to fix drivers/i2c/[1], fix the terminology for users of
> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
> in the specification.
>
> Compile tested, no functionality changes intended
>
> [1]: https://lore.kernel.org/all/[email protected]/
>
> Signed-off-by: Easwar Hariharan <[email protected]>

Reviewed-by: Martin Habets <[email protected]>

> ---
> drivers/net/ethernet/sfc/falcon/falcon.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/sfc/falcon/falcon.c b/drivers/net/ethernet/sfc/falcon/falcon.c
> index 7a1c9337081b..147e7c8e3c02 100644
> --- a/drivers/net/ethernet/sfc/falcon/falcon.c
> +++ b/drivers/net/ethernet/sfc/falcon/falcon.c
> @@ -367,7 +367,7 @@ static const struct i2c_algo_bit_data falcon_i2c_bit_operations = {
> .getsda = falcon_getsda,
> .getscl = falcon_getscl,
> .udelay = 5,
> - /* Wait up to 50 ms for slave to let us pull SCL high */
> + /* Wait up to 50 ms for client to let us pull SCL high */
> .timeout = DIV_ROUND_UP(HZ, 20),
> };
>
> --
> 2.34.1
>

2024-04-02 12:18:27

by Easwar Hariharan

[permalink] [raw]
Subject: Re: [PATCH v0 03/14] drm/gma500,drm/i915: Make I2C terminology more inclusive

On 4/2/2024 12:48 AM, Jani Nikula wrote:
> On Fri, 29 Mar 2024, Easwar Hariharan <[email protected]> wrote:
>> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>> with more appropriate terms. Inspired by and following on to Wolfram's
>> series to fix drivers/i2c/[1], fix the terminology for users of
>> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
>> in the specification.
>
> gma500 and i915 changes should be split. See MAINTAINERS.
>
> Might also split the i915 changes to smaller pieces, it's kind of
> random. And the changes here are not strictly related to I2C AFAICT, so
> the commit message should be updated.
>
> BR,
> Jani.
>
>

<snip>

I will split gma500 and i915 into their respective patches if possible in v2.

Can you say more about the changes being "not strictly related to I2C"? My
heuristic was to grep for master/slave, and look in the surrounding context for
i2c-related terminology (i2c_pin, 7-bit address, struct i2c_adapter, i2c_bus, etc)
to confirm that they are i2c-related, then following the references around to
make the compiler happy. For e.g., I did not change the many references to bigjoiner
master and slave because I understood from context they were not i2c references.

A couple examples would help me restrict the changes to I2C, since as mentioned in the
discussion on Wolfram's thread, there are places where migrating away from master/slave
terms in the code would conflict with the original technical manuals and reduce correlation
and understanding of the code.

Thanks,
Easwar


2024-04-02 14:39:47

by Jani Nikula

[permalink] [raw]
Subject: Re: [PATCH v0 03/14] drm/gma500,drm/i915: Make I2C terminology more inclusive

On Tue, 02 Apr 2024, Easwar Hariharan <[email protected]> wrote:
> On 4/2/2024 12:48 AM, Jani Nikula wrote:
>> On Fri, 29 Mar 2024, Easwar Hariharan <[email protected]> wrote:
>>> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>>> with more appropriate terms. Inspired by and following on to Wolfram's
>>> series to fix drivers/i2c/[1], fix the terminology for users of
>>> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
>>> in the specification.
>>
>> gma500 and i915 changes should be split. See MAINTAINERS.
>>
>> Might also split the i915 changes to smaller pieces, it's kind of
>> random. And the changes here are not strictly related to I2C AFAICT, so
>> the commit message should be updated.
>>
>> BR,
>> Jani.
>>
>>
>
> <snip>
>
> I will split gma500 and i915 into their respective patches if possible in v2.
>
> Can you say more about the changes being "not strictly related to I2C"? My
> heuristic was to grep for master/slave, and look in the surrounding context for
> i2c-related terminology (i2c_pin, 7-bit address, struct i2c_adapter, i2c_bus, etc)
> to confirm that they are i2c-related, then following the references around to
> make the compiler happy. For e.g., I did not change the many references to bigjoiner
> master and slave because I understood from context they were not i2c references.
>
> A couple examples would help me restrict the changes to I2C, since as mentioned in the
> discussion on Wolfram's thread, there are places where migrating away from master/slave
> terms in the code would conflict with the original technical manuals and reduce correlation
> and understanding of the code.

I guess I was looking at the VBT changes in intel_bios.c. Granted, they
do end up being used as i2c addresses. No big deal.

I think I'd expect the treewide i2c adapter changes to land first, via
i2c, and subsequent cleanups to happen next, via individual driver
trees. There's quite a bit of conflict potential merging this outside of
drm-intel-next, and there's really no need for that.

BR,
Jani.




>
> Thanks,
> Easwar
>

--
Jani Nikula, Intel

2024-04-02 16:53:25

by Easwar Hariharan

[permalink] [raw]
Subject: Re: [PATCH v0 03/14] drm/gma500,drm/i915: Make I2C terminology more inclusive

On 4/2/2024 7:32 AM, Jani Nikula wrote:
> On Tue, 02 Apr 2024, Easwar Hariharan <[email protected]> wrote:
>> On 4/2/2024 12:48 AM, Jani Nikula wrote:
>>> On Fri, 29 Mar 2024, Easwar Hariharan <[email protected]> wrote:
>>>> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>>>> with more appropriate terms. Inspired by and following on to Wolfram's
>>>> series to fix drivers/i2c/[1], fix the terminology for users of
>>>> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
>>>> in the specification.
>>>
>>> gma500 and i915 changes should be split. See MAINTAINERS.
>>>
>>> Might also split the i915 changes to smaller pieces, it's kind of
>>> random. And the changes here are not strictly related to I2C AFAICT, so
>>> the commit message should be updated.
>>>
>>> BR,
>>> Jani.
>>>
>>>
>>
>> <snip>
>>
>> I will split gma500 and i915 into their respective patches if possible in v2.
>>
>> Can you say more about the changes being "not strictly related to I2C"? My
>> heuristic was to grep for master/slave, and look in the surrounding context for
>> i2c-related terminology (i2c_pin, 7-bit address, struct i2c_adapter, i2c_bus, etc)
>> to confirm that they are i2c-related, then following the references around to
>> make the compiler happy. For e.g., I did not change the many references to bigjoiner
>> master and slave because I understood from context they were not i2c references.
>>
>> A couple examples would help me restrict the changes to I2C, since as mentioned in the
>> discussion on Wolfram's thread, there are places where migrating away from master/slave
>> terms in the code would conflict with the original technical manuals and reduce correlation
>> and understanding of the code.
>
> I guess I was looking at the VBT changes in intel_bios.c. Granted, they
> do end up being used as i2c addresses. No big deal.
>
> I think I'd expect the treewide i2c adapter changes to land first, via
> i2c, and subsequent cleanups to happen next, via individual driver
> trees. There's quite a bit of conflict potential merging this outside of
> drm-intel-next, and there's really no need for that.
>
> BR,
> Jani.
>

Great! Just so I'm clear, do you still want the i915 changes split up more, along with them being
split off from gma500?

Thanks,
Easwar

2024-04-02 16:54:37

by Jani Nikula

[permalink] [raw]
Subject: Re: [PATCH v0 03/14] drm/gma500,drm/i915: Make I2C terminology more inclusive

On Tue, 02 Apr 2024, Easwar Hariharan <[email protected]> wrote:
> On 4/2/2024 7:32 AM, Jani Nikula wrote:
>> On Tue, 02 Apr 2024, Easwar Hariharan <[email protected]> wrote:
>>> On 4/2/2024 12:48 AM, Jani Nikula wrote:
>>>> On Fri, 29 Mar 2024, Easwar Hariharan <[email protected]> wrote:
>>>>> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>>>>> with more appropriate terms. Inspired by and following on to Wolfram's
>>>>> series to fix drivers/i2c/[1], fix the terminology for users of
>>>>> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
>>>>> in the specification.
>>>>
>>>> gma500 and i915 changes should be split. See MAINTAINERS.
>>>>
>>>> Might also split the i915 changes to smaller pieces, it's kind of
>>>> random. And the changes here are not strictly related to I2C AFAICT, so
>>>> the commit message should be updated.
>>>>
>>>> BR,
>>>> Jani.
>>>>
>>>>
>>>
>>> <snip>
>>>
>>> I will split gma500 and i915 into their respective patches if possible in v2.
>>>
>>> Can you say more about the changes being "not strictly related to I2C"? My
>>> heuristic was to grep for master/slave, and look in the surrounding context for
>>> i2c-related terminology (i2c_pin, 7-bit address, struct i2c_adapter, i2c_bus, etc)
>>> to confirm that they are i2c-related, then following the references around to
>>> make the compiler happy. For e.g., I did not change the many references to bigjoiner
>>> master and slave because I understood from context they were not i2c references.
>>>
>>> A couple examples would help me restrict the changes to I2C, since as mentioned in the
>>> discussion on Wolfram's thread, there are places where migrating away from master/slave
>>> terms in the code would conflict with the original technical manuals and reduce correlation
>>> and understanding of the code.
>>
>> I guess I was looking at the VBT changes in intel_bios.c. Granted, they
>> do end up being used as i2c addresses. No big deal.
>>
>> I think I'd expect the treewide i2c adapter changes to land first, via
>> i2c, and subsequent cleanups to happen next, via individual driver
>> trees. There's quite a bit of conflict potential merging this outside of
>> drm-intel-next, and there's really no need for that.
>>
>> BR,
>> Jani.
>>
>
> Great! Just so I'm clear, do you still want the i915 changes split up more, along with them being
> split off from gma500?

If we can merge the i915 changes via drm-intel-next, it's probably fine
as a big i915 patch. Just the gma500 separated. (The struct
i2c_algorithm change etc. necessarily has to go via I2C tree of course.)

BR,
Jani.



>
> Thanks,
> Easwar

--
Jani Nikula, Intel

2024-04-02 18:19:23

by Easwar Hariharan

[permalink] [raw]
Subject: Re: [PATCH v0 03/14] drm/gma500,drm/i915: Make I2C terminology more inclusive

On 4/2/2024 9:52 AM, Jani Nikula wrote:
> On Tue, 02 Apr 2024, Easwar Hariharan <[email protected]> wrote:
>> On 4/2/2024 7:32 AM, Jani Nikula wrote:
>>> On Tue, 02 Apr 2024, Easwar Hariharan <[email protected]> wrote:
>>>> On 4/2/2024 12:48 AM, Jani Nikula wrote:
>>>>> On Fri, 29 Mar 2024, Easwar Hariharan <[email protected]> wrote:
>>>>>> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>>>>>> with more appropriate terms. Inspired by and following on to Wolfram's
>>>>>> series to fix drivers/i2c/[1], fix the terminology for users of
>>>>>> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
>>>>>> in the specification.
>>>>>
>>>>> gma500 and i915 changes should be split. See MAINTAINERS.
>>>>>
>>>>> Might also split the i915 changes to smaller pieces, it's kind of
>>>>> random. And the changes here are not strictly related to I2C AFAICT, so
>>>>> the commit message should be updated.
>>>>>
>>>>> BR,
>>>>> Jani.
>>>>>
>>>>>
>>>>
>>>> <snip>
>>>>
>>>> I will split gma500 and i915 into their respective patches if possible in v2.
>>>>
>>>> Can you say more about the changes being "not strictly related to I2C"? My
>>>> heuristic was to grep for master/slave, and look in the surrounding context for
>>>> i2c-related terminology (i2c_pin, 7-bit address, struct i2c_adapter, i2c_bus, etc)
>>>> to confirm that they are i2c-related, then following the references around to
>>>> make the compiler happy. For e.g., I did not change the many references to bigjoiner
>>>> master and slave because I understood from context they were not i2c references.
>>>>
>>>> A couple examples would help me restrict the changes to I2C, since as mentioned in the
>>>> discussion on Wolfram's thread, there are places where migrating away from master/slave
>>>> terms in the code would conflict with the original technical manuals and reduce correlation
>>>> and understanding of the code.
>>>
>>> I guess I was looking at the VBT changes in intel_bios.c. Granted, they
>>> do end up being used as i2c addresses. No big deal.
>>>
>>> I think I'd expect the treewide i2c adapter changes to land first, via
>>> i2c, and subsequent cleanups to happen next, via individual driver
>>> trees. There's quite a bit of conflict potential merging this outside of
>>> drm-intel-next, and there's really no need for that.
>>>
>>> BR,
>>> Jani.
>>>
>>
>> Great! Just so I'm clear, do you still want the i915 changes split up more, along with them being
>> split off from gma500?
>
> If we can merge the i915 changes via drm-intel-next, it's probably fine
> as a big i915 patch. Just the gma500 separated. (The struct
> i2c_algorithm change etc. necessarily has to go via I2C tree of course.)
>
> BR,
> Jani.
>

Got it. I'll send the split out in v1 (not v2 as mentioned earlier) since this is v0.

Thanks,
Easwar


2024-04-03 08:38:40

by Leon Romanovsky

[permalink] [raw]
Subject: Re: [PATCH v0 01/14] IB/hfi1, IB/qib: Make I2C terminology more inclusive

On Fri, Mar 29, 2024 at 05:00:25PM +0000, Easwar Hariharan wrote:
> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
> with more appropriate terms. Inspired by and following on to Wolfram's series
> to fix drivers/i2c[1], fix the terminology where I had a role to play, now that
> the approved verbiage exists in the specification.
>
> Compile tested, no functionality changes intended
>
> [1]: https://lore.kernel.org/all/[email protected]/
>
> Signed-off-by: Easwar Hariharan <[email protected]>
> ---
> drivers/infiniband/hw/hfi1/chip.c | 6 ++--
> drivers/infiniband/hw/hfi1/chip.h | 2 +-
> drivers/infiniband/hw/hfi1/chip_registers.h | 2 +-
> drivers/infiniband/hw/hfi1/file_ops.c | 2 +-
> drivers/infiniband/hw/hfi1/firmware.c | 22 ++++++-------
> drivers/infiniband/hw/hfi1/pcie.c | 2 +-
> drivers/infiniband/hw/hfi1/qsfp.c | 36 ++++++++++-----------
> drivers/infiniband/hw/hfi1/user_exp_rcv.c | 2 +-
> drivers/infiniband/hw/qib/qib_twsi.c | 6 ++--
> 9 files changed, 40 insertions(+), 40 deletions(-)

hfi1 and qib work perfectly fine with the current terminology. There is
no need to change old code just for the sake of change.

Let's drop this patch.

Thanks

2024-04-03 12:37:14

by Ville Syrjälä

[permalink] [raw]
Subject: Re: [PATCH v0 02/14] drm/amdgpu,drm/radeon: Make I2C terminology more inclusive

On Fri, Mar 29, 2024 at 06:38:10PM +0100, Andi Shyti wrote:
> Hi,
>
> On Fri, Mar 29, 2024 at 10:28:14AM -0700, Easwar Hariharan wrote:
> > On 3/29/2024 10:16 AM, Andi Shyti wrote:
> > > Hi Easwar,
> > >
> > > On Fri, Mar 29, 2024 at 05:00:26PM +0000, Easwar Hariharan wrote:
> > >> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
> > >
> > > I don't understand why we forget that i3c is 1.1.1 :-)
> >
> > That's because it's a copy-paste error from Wolfram's cover letter. :) I'll update
> > next go-around.
>
> not a binding comment, though. Just for completeness, because we
> are giving the version to the i2c and smbus, but not i3c.
>
> > >> with more appropriate terms. Inspired by and following on to Wolfram's
> > >> series to fix drivers/i2c/[1], fix the terminology for users of
> > >> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
> > >> in the specification.
> > >
> > > The specification talks about:
> > >
> > > - master -> controller
> > > - slave -> target (and not client)
> > >
> > > But both you and Wolfram have used client. I'd like to reach
> > > some more consistency here.
> >
> > I had the impression that remote targets (i.e external to the device) were to be called clients,
> > e.g. the QSFP FRUs in drivers/infiniband, and internal ones targets.
> > I chose the terminology according to that understanding, but now I can't find where I got that
> > information.
>
> The word "client" does not even appear in the documentation (only
> one instance in the i3c document), so that the change is not
> related to the document as stated in the commit log. Unless, of
> course, I am missing something.
>
> I'm OK with choosing a "customized" naming, but we need to reach
> an agreement.
>
> I raised the same question to Wolfram.

I don't know where that discussion happened, but my opinion
is NAK to "client". Life is already confusing enough with
these renames, so let's not make it even more confusing by
inventing new names nowhere to be found in the spec.

And let's especially not invent names that don't even fit
the purpose. "Client" makes me think of "client/server" or
some real world analogy. Neither of which seem to have any
resemblence to how the term would be used for i2c.

--
Ville Syrj?l?
Intel

2024-04-03 13:12:46

by Jani Nikula

[permalink] [raw]
Subject: Re: [PATCH v0 02/14] drm/amdgpu,drm/radeon: Make I2C terminology more inclusive

On Wed, 03 Apr 2024, Ville Syrjälä <[email protected]> wrote:
> On Fri, Mar 29, 2024 at 06:38:10PM +0100, Andi Shyti wrote:
>> Hi,
>>
>> On Fri, Mar 29, 2024 at 10:28:14AM -0700, Easwar Hariharan wrote:
>> > On 3/29/2024 10:16 AM, Andi Shyti wrote:
>> > > Hi Easwar,
>> > >
>> > > On Fri, Mar 29, 2024 at 05:00:26PM +0000, Easwar Hariharan wrote:
>> > >> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>> > >
>> > > I don't understand why we forget that i3c is 1.1.1 :-)
>> >
>> > That's because it's a copy-paste error from Wolfram's cover letter. :) I'll update
>> > next go-around.
>>
>> not a binding comment, though. Just for completeness, because we
>> are giving the version to the i2c and smbus, but not i3c.
>>
>> > >> with more appropriate terms. Inspired by and following on to Wolfram's
>> > >> series to fix drivers/i2c/[1], fix the terminology for users of
>> > >> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
>> > >> in the specification.
>> > >
>> > > The specification talks about:
>> > >
>> > > - master -> controller
>> > > - slave -> target (and not client)
>> > >
>> > > But both you and Wolfram have used client. I'd like to reach
>> > > some more consistency here.
>> >
>> > I had the impression that remote targets (i.e external to the device) were to be called clients,
>> > e.g. the QSFP FRUs in drivers/infiniband, and internal ones targets.
>> > I chose the terminology according to that understanding, but now I can't find where I got that
>> > information.
>>
>> The word "client" does not even appear in the documentation (only
>> one instance in the i3c document), so that the change is not
>> related to the document as stated in the commit log. Unless, of
>> course, I am missing something.
>>
>> I'm OK with choosing a "customized" naming, but we need to reach
>> an agreement.
>>
>> I raised the same question to Wolfram.
>
> I don't know where that discussion happened, but my opinion
> is NAK to "client". Life is already confusing enough with
> these renames, so let's not make it even more confusing by
> inventing new names nowhere to be found in the spec.
>
> And let's especially not invent names that don't even fit
> the purpose. "Client" makes me think of "client/server" or
> some real world analogy. Neither of which seem to have any
> resemblence to how the term would be used for i2c.

Agreed.

I2C 7.0, I3C 1.1.1, and SMBus 3.2 have all switched to controller/target
terminology. The SMBus spec has additionally converted generic host
references to controller.

At least for i915 where I have some say in the matter, controller/target
it shall be.


BR,
Jani.


--
Jani Nikula, Intel

2024-04-03 14:27:58

by Christian König

[permalink] [raw]
Subject: Re: [PATCH v0 02/14] drm/amdgpu,drm/radeon: Make I2C terminology more inclusive

Am 03.04.24 um 15:12 schrieb Jani Nikula:
> On Wed, 03 Apr 2024, Ville Syrjälä <[email protected]> wrote:
>> On Fri, Mar 29, 2024 at 06:38:10PM +0100, Andi Shyti wrote:
>>> Hi,
>>>
>>> On Fri, Mar 29, 2024 at 10:28:14AM -0700, Easwar Hariharan wrote:
>>>> On 3/29/2024 10:16 AM, Andi Shyti wrote:
>>>>> Hi Easwar,
>>>>>
>>>>> On Fri, Mar 29, 2024 at 05:00:26PM +0000, Easwar Hariharan wrote:
>>>>>> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>>>>> I don't understand why we forget that i3c is 1.1.1 :-)
>>>> That's because it's a copy-paste error from Wolfram's cover letter. :) I'll update
>>>> next go-around.
>>> not a binding comment, though. Just for completeness, because we
>>> are giving the version to the i2c and smbus, but not i3c.
>>>
>>>>>> with more appropriate terms. Inspired by and following on to Wolfram's
>>>>>> series to fix drivers/i2c/[1], fix the terminology for users of
>>>>>> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
>>>>>> in the specification.
>>>>> The specification talks about:
>>>>>
>>>>> - master -> controller
>>>>> - slave -> target (and not client)
>>>>>
>>>>> But both you and Wolfram have used client. I'd like to reach
>>>>> some more consistency here.
>>>> I had the impression that remote targets (i.e external to the device) were to be called clients,
>>>> e.g. the QSFP FRUs in drivers/infiniband, and internal ones targets.
>>>> I chose the terminology according to that understanding, but now I can't find where I got that
>>>> information.
>>> The word "client" does not even appear in the documentation (only
>>> one instance in the i3c document), so that the change is not
>>> related to the document as stated in the commit log. Unless, of
>>> course, I am missing something.
>>>
>>> I'm OK with choosing a "customized" naming, but we need to reach
>>> an agreement.
>>>
>>> I raised the same question to Wolfram.
>> I don't know where that discussion happened, but my opinion
>> is NAK to "client". Life is already confusing enough with
>> these renames, so let's not make it even more confusing by
>> inventing new names nowhere to be found in the spec.
>>
>> And let's especially not invent names that don't even fit
>> the purpose. "Client" makes me think of "client/server" or
>> some real world analogy. Neither of which seem to have any
>> resemblence to how the term would be used for i2c.
> Agreed.
>
> I2C 7.0, I3C 1.1.1, and SMBus 3.2 have all switched to controller/target
> terminology. The SMBus spec has additionally converted generic host
> references to controller.
>
> At least for i915 where I have some say in the matter, controller/target
> it shall be.

+1 for using the same vocabulary in amdgpu as in the specifications.

My personal opinion is that master/slave was actually a pretty good
description of the relationship.

The "slave" or rather target of the communication is forced into
operation, can't speak back and potentially won't get any payment for
the serving.

If we remove the word slave from our vocabulary society will just sooner
or later start to forget the meaning, and that is probably not a good thing.

Regards,
Christian.

>
>
> BR,
> Jani.
>
>


2024-04-03 15:55:23

by Dennis Dalessandro

[permalink] [raw]
Subject: Re: [PATCH v0 01/14] IB/hfi1, IB/qib: Make I2C terminology more inclusive


On 4/3/24 4:30 AM, Leon Romanovsky wrote:
> On Fri, Mar 29, 2024 at 05:00:25PM +0000, Easwar Hariharan wrote:
>> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>> with more appropriate terms. Inspired by and following on to Wolfram's series
>> to fix drivers/i2c[1], fix the terminology where I had a role to play, now that
>> the approved verbiage exists in the specification.
>>
>> Compile tested, no functionality changes intended
>>
>> [1]: https://lore.kernel.org/all/[email protected]/
>>
>> Signed-off-by: Easwar Hariharan <[email protected]>
>> ---
>> drivers/infiniband/hw/hfi1/chip.c | 6 ++--
>> drivers/infiniband/hw/hfi1/chip.h | 2 +-
>> drivers/infiniband/hw/hfi1/chip_registers.h | 2 +-
>> drivers/infiniband/hw/hfi1/file_ops.c | 2 +-
>> drivers/infiniband/hw/hfi1/firmware.c | 22 ++++++-------
>> drivers/infiniband/hw/hfi1/pcie.c | 2 +-
>> drivers/infiniband/hw/hfi1/qsfp.c | 36 ++++++++++-----------
>> drivers/infiniband/hw/hfi1/user_exp_rcv.c | 2 +-
>> drivers/infiniband/hw/qib/qib_twsi.c | 6 ++--
>> 9 files changed, 40 insertions(+), 40 deletions(-)
>
> hfi1 and qib work perfectly fine with the current terminology. There is
> no need to change old code just for the sake of change.
>
> Let's drop this patch.

Agreed.

2024-04-03 16:42:37

by Easwar Hariharan

[permalink] [raw]
Subject: Re: [PATCH v0 02/14] drm/amdgpu,drm/radeon: Make I2C terminology more inclusive

On 4/3/2024 6:12 AM, Jani Nikula wrote:
> On Wed, 03 Apr 2024, Ville Syrjälä <[email protected]> wrote:
>> On Fri, Mar 29, 2024 at 06:38:10PM +0100, Andi Shyti wrote:
>>> Hi,
>>>
>>> On Fri, Mar 29, 2024 at 10:28:14AM -0700, Easwar Hariharan wrote:
>>>> On 3/29/2024 10:16 AM, Andi Shyti wrote:
>>>>> Hi Easwar,
>>>>>
>>>>> On Fri, Mar 29, 2024 at 05:00:26PM +0000, Easwar Hariharan wrote:
>>>>>> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>>>>>
>>>>> I don't understand why we forget that i3c is 1.1.1 :-)
>>>>
>>>> That's because it's a copy-paste error from Wolfram's cover letter. :) I'll update
>>>> next go-around.
>>>
>>> not a binding comment, though. Just for completeness, because we
>>> are giving the version to the i2c and smbus, but not i3c.
>>>
>>>>>> with more appropriate terms. Inspired by and following on to Wolfram's
>>>>>> series to fix drivers/i2c/[1], fix the terminology for users of
>>>>>> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
>>>>>> in the specification.
>>>>>
>>>>> The specification talks about:
>>>>>
>>>>> - master -> controller
>>>>> - slave -> target (and not client)
>>>>>
>>>>> But both you and Wolfram have used client. I'd like to reach
>>>>> some more consistency here.
>>>>
>>>> I had the impression that remote targets (i.e external to the device) were to be called clients,
>>>> e.g. the QSFP FRUs in drivers/infiniband, and internal ones targets.
>>>> I chose the terminology according to that understanding, but now I can't find where I got that
>>>> information.
>>>
>>> The word "client" does not even appear in the documentation (only
>>> one instance in the i3c document), so that the change is not
>>> related to the document as stated in the commit log. Unless, of
>>> course, I am missing something.
>>>
>>> I'm OK with choosing a "customized" naming, but we need to reach
>>> an agreement.
>>>
>>> I raised the same question to Wolfram.
>>
>> I don't know where that discussion happened, but my opinion
>> is NAK to "client". Life is already confusing enough with
>> these renames, so let's not make it even more confusing by
>> inventing new names nowhere to be found in the spec.
>>
>> And let's especially not invent names that don't even fit
>> the purpose. "Client" makes me think of "client/server" or
>> some real world analogy. Neither of which seem to have any
>> resemblence to how the term would be used for i2c.
>
> Agreed.
>
> I2C 7.0, I3C 1.1.1, and SMBus 3.2 have all switched to controller/target
> terminology. The SMBus spec has additionally converted generic host
> references to controller.
>
> At least for i915 where I have some say in the matter, controller/target
> it shall be.
>
>
> BR,
> Jani.
>
>

Will do in v1. Thanks for the review, Jani and Ville.

Thanks,
Easwar

2024-04-03 16:43:38

by Easwar Hariharan

[permalink] [raw]
Subject: Re: [PATCH v0 02/14] drm/amdgpu,drm/radeon: Make I2C terminology more inclusive

On 4/3/2024 7:26 AM, Christian König wrote:
> Am 03.04.24 um 15:12 schrieb Jani Nikula:
>> On Wed, 03 Apr 2024, Ville Syrjälä <[email protected]> wrote:
>>> On Fri, Mar 29, 2024 at 06:38:10PM +0100, Andi Shyti wrote:
>>>> Hi,
>>>>
>>>> On Fri, Mar 29, 2024 at 10:28:14AM -0700, Easwar Hariharan wrote:
>>>>> On 3/29/2024 10:16 AM, Andi Shyti wrote:
>>>>>> Hi Easwar,
>>>>>>
>>>>>> On Fri, Mar 29, 2024 at 05:00:26PM +0000, Easwar Hariharan wrote:
>>>>>>> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>>>>>> I don't understand why we forget that i3c is 1.1.1 :-)
>>>>> That's because it's a copy-paste error from Wolfram's cover letter. :) I'll update
>>>>> next go-around.
>>>> not a binding comment, though. Just for completeness, because we
>>>> are giving the version to the i2c and smbus, but not i3c.
>>>>
>>>>>>> with more appropriate terms. Inspired by and following on to Wolfram's
>>>>>>> series to fix drivers/i2c/[1], fix the terminology for users of
>>>>>>> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
>>>>>>> in the specification.
>>>>>> The specification talks about:
>>>>>>
>>>>>>   - master -> controller
>>>>>>   - slave -> target (and not client)
>>>>>>
>>>>>> But both you and Wolfram have used client. I'd like to reach
>>>>>> some more consistency here.
>>>>> I had the impression that remote targets (i.e external to the device) were to be called clients,
>>>>> e.g. the QSFP FRUs in drivers/infiniband, and internal ones targets.
>>>>> I chose the terminology according to that understanding, but now I can't find where I got that
>>>>> information.
>>>> The word "client" does not even appear in the documentation (only
>>>> one instance in the i3c document), so that the change is not
>>>> related to the document as stated in the commit log. Unless, of
>>>> course, I am missing something.
>>>>
>>>> I'm OK with choosing a "customized" naming, but we need to reach
>>>> an agreement.
>>>>
>>>> I raised the same question to Wolfram.
>>> I don't know where that discussion happened, but my opinion
>>> is NAK to "client". Life is already confusing enough with
>>> these renames, so let's not make it even more confusing by
>>> inventing new names nowhere to be found in the spec.
>>>
>>> And let's especially not invent names that don't even fit
>>> the purpose. "Client" makes me think of "client/server" or
>>> some real world analogy. Neither of which seem to have any
>>> resemblence to how the term would be used for i2c.
>> Agreed.
>>
>> I2C 7.0, I3C 1.1.1, and SMBus 3.2 have all switched to controller/target
>> terminology. The SMBus spec has additionally converted generic host
>> references to controller.
>>
>> At least for i915 where I have some say in the matter, controller/target
>> it shall be.
>
> +1 for using the same vocabulary in amdgpu as in the specifications.
>
> My personal opinion is that master/slave was actually a pretty good description of the relationship.
>
> The "slave" or rather target of the communication is forced into operation, can't speak back and potentially won't get any payment for the serving.
>
> If we remove the word slave from our vocabulary society will just sooner or later start to forget the meaning, and that is probably not a good thing.
>
> Regards,
> Christian.
>

Thanks for the review, Christian. I'll adapt to controller/target in v1.

Thanks,
Easwar


2024-04-03 16:45:01

by Easwar Hariharan

[permalink] [raw]
Subject: Re: [PATCH v0 01/14] IB/hfi1, IB/qib: Make I2C terminology more inclusive

On 4/3/2024 8:54 AM, Dennis Dalessandro wrote:
>
> On 4/3/24 4:30 AM, Leon Romanovsky wrote:
>> On Fri, Mar 29, 2024 at 05:00:25PM +0000, Easwar Hariharan wrote:
>>> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>>> with more appropriate terms. Inspired by and following on to Wolfram's series
>>> to fix drivers/i2c[1], fix the terminology where I had a role to play, now that
>>> the approved verbiage exists in the specification.
>>>
>>> Compile tested, no functionality changes intended
>>>
>>> [1]: https://lore.kernel.org/all/[email protected]/
>>>
>>> Signed-off-by: Easwar Hariharan <[email protected]>
>>> ---
>>> drivers/infiniband/hw/hfi1/chip.c | 6 ++--
>>> drivers/infiniband/hw/hfi1/chip.h | 2 +-
>>> drivers/infiniband/hw/hfi1/chip_registers.h | 2 +-
>>> drivers/infiniband/hw/hfi1/file_ops.c | 2 +-
>>> drivers/infiniband/hw/hfi1/firmware.c | 22 ++++++-------
>>> drivers/infiniband/hw/hfi1/pcie.c | 2 +-
>>> drivers/infiniband/hw/hfi1/qsfp.c | 36 ++++++++++-----------
>>> drivers/infiniband/hw/hfi1/user_exp_rcv.c | 2 +-
>>> drivers/infiniband/hw/qib/qib_twsi.c | 6 ++--
>>> 9 files changed, 40 insertions(+), 40 deletions(-)
>>
>> hfi1 and qib work perfectly fine with the current terminology. There is
>> no need to change old code just for the sake of change.
>>
>> Let's drop this patch.
>
> Agreed.

Will drop in v1.

Thanks,
Easwar

2024-04-04 19:18:37

by Easwar Hariharan

[permalink] [raw]
Subject: Re: [PATCH v0 10/14] sfc: falcon: Make I2C terminology more inclusive

On 4/2/2024 1:29 AM, Simon Horman wrote:
> On Fri, Mar 29, 2024 at 05:00:34PM +0000, Easwar Hariharan wrote:
>> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>> with more appropriate terms. Inspired by and following on to Wolfram's
>> series to fix drivers/i2c/[1], fix the terminology for users of
>> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
>> in the specification.
>>
>> Compile tested, no functionality changes intended
>>
>> [1]: https://lore.kernel.org/all/[email protected]/
>>
>> Signed-off-by: Easwar Hariharan <[email protected]>
>
> Reviewed-by: Simon Horman <[email protected]>


Thank you, Simon, for reviewing. I believe that we are settling on controller/target
terminology from feedback on the other drivers in this series. Would you want to re-review
v1 with that change, or should I add you R-B in v1 despite the change?

Thanks,
Easwar

2024-04-04 19:19:05

by Easwar Hariharan

[permalink] [raw]
Subject: Re: [PATCH v0 10/14] sfc: falcon: Make I2C terminology more inclusive

On 4/2/2024 2:00 AM, Martin Habets wrote:
> On Fri, Mar 29, 2024 at 05:00:34PM +0000, Easwar Hariharan wrote:
>> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>> with more appropriate terms. Inspired by and following on to Wolfram's
>> series to fix drivers/i2c/[1], fix the terminology for users of
>> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
>> in the specification.
>>
>> Compile tested, no functionality changes intended
>>
>> [1]: https://lore.kernel.org/all/[email protected]/
>>
>> Signed-off-by: Easwar Hariharan <[email protected]>
>
> Reviewed-by: Martin Habets <[email protected]>
>

Thank you, Martin, for reviewing. I believe that we are settling on controller/target
terminology from feedback on the other drivers in this series. Would you want to re-review
v1 with that change, or should I add your R-B in v1 despite the change?

Thanks,
Easwar


2024-04-05 10:27:42

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v0 00/14] Make I2C terminology more inclusive for I2C Algobit and consumers

Hello Easwar,

On Fri, Mar 29, 2024 at 05:00:24PM +0000, Easwar Hariharan wrote:
> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
> with more appropriate terms. Inspired by and following on to Wolfram's
> series to fix drivers/i2c/[1], fix the terminology for users of the
> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
> in the specification.

I really appreciate that you want to assist in this task to improve the
I2C core. I do. I am afraid, however, that you took the second step
before the first one, though. As I mentioned in my original cover
letter, this is not only about renaming but also improving the I2C API
(splitting up header files...). So, drivers are not a priority right
now. They can be better fixed once the core is ready.

It is true that I changed quite some controller drivers within the i2c
realm. I did this to gain experience. As you also noticed quite some
questions came up. We need to agree on answers first. And once we are
happy with the answers we found, then IMO we can go outside of the i2c
realm and send patches to other subsystems referencing agreed
precedence. I intentionally did not go outside i2c yet. Since your
patches are already there, you probably want to foster them until they
are ready for inclusion. Yet, regarding further patches, my suggestion
is to wait until the core is ready. That might take a while, though.
However, there is enough to discuss until the core is ready. So, your
collaboration there is highly appreciated!

> The last patch updating the .master_xfer method to .xfer depends on
> patch 1 of Wolfram's series below, but the series is otherwise
> independent. It may make sense for the last patch to go in with

Please drop the last patch from this series. It will nicely remove the
dependency. Also, like above, I first want to gain experience with i2c
before going to other subsystems. That was intended.

All the best and happy hacking,

Wolfram


Attachments:
(No filename) (1.97 kB)
signature.asc (849.00 B)
Download all attachments

2024-04-05 16:15:28

by Danilo Krummrich

[permalink] [raw]
Subject: Re: [PATCH v0 13/14] drm/nouveau: Make I2C terminology more inclusive

Hi Easwar,

On 3/29/24 18:00, Easwar Hariharan wrote:
> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
> with more appropriate terms. Inspired by and following on to Wolfram's
> series to fix drivers/i2c/[1], fix the terminology for users of
> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
> in the specification.
>
> Compile tested, no functionality changes intended
>
> [1]: https://lore.kernel.org/all/[email protected]/
>
> Signed-off-by: Easwar Hariharan <[email protected]>
> ---
> drivers/gpu/drm/nouveau/dispnv04/dfp.c | 14 +++++++-------
> .../gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h | 2 +-
> drivers/gpu/drm/nouveau/nouveau_bios.c | 4 ++--
> 3 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/dispnv04/dfp.c b/drivers/gpu/drm/nouveau/dispnv04/dfp.c
> index d5b129dc623b..65b791006b19 100644
> --- a/drivers/gpu/drm/nouveau/dispnv04/dfp.c
> +++ b/drivers/gpu/drm/nouveau/dispnv04/dfp.c
> @@ -149,7 +149,7 @@ void nv04_dfp_update_fp_control(struct drm_encoder *encoder, int mode)
> }
> }
>
> -static struct drm_encoder *get_tmds_slave(struct drm_encoder *encoder)
> +static struct drm_encoder *get_tmds_client(struct drm_encoder *encoder)
> {
> struct drm_device *dev = encoder->dev;
> struct dcb_output *dcb = nouveau_encoder(encoder)->dcb;
> @@ -172,7 +172,7 @@ static struct drm_encoder *get_tmds_slave(struct drm_encoder *encoder)
> struct dcb_output *slave_dcb = nouveau_encoder(slave)->dcb;
>
> if (slave_dcb->type == DCB_OUTPUT_TMDS && get_slave_funcs(slave) &&
> - slave_dcb->tmdsconf.slave_addr == dcb->tmdsconf.slave_addr)
> + slave_dcb->tmdsconf.client_addr == dcb->tmdsconf.client_addr)
> return slave;

While, personally, I think master/slave was well suiting for the device relationship
on those busses, I think that if we change it up to conform with the change in
specification, we should make sure to update drivers consistently.

We should make sure to also change the names of the sourrounding structures and variable
names, otherwise we just make this code harder to read.

- Danilo

> }
>
> @@ -471,7 +471,7 @@ static void nv04_dfp_commit(struct drm_encoder *encoder)
> NVWriteRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL + nv04_dac_output_offset(encoder), 0x00100000);
>
> /* Init external transmitters */
> - slave_encoder = get_tmds_slave(encoder);
> + slave_encoder = get_tmds_client(encoder);
> if (slave_encoder)
> get_slave_funcs(slave_encoder)->mode_set(
> slave_encoder, &nv_encoder->mode, &nv_encoder->mode);
> @@ -621,7 +621,7 @@ static void nv04_dfp_destroy(struct drm_encoder *encoder)
> kfree(nv_encoder);
> }
>
> -static void nv04_tmds_slave_init(struct drm_encoder *encoder)
> +static void nv04_tmds_client_init(struct drm_encoder *encoder)
> {
> struct drm_device *dev = encoder->dev;
> struct dcb_output *dcb = nouveau_encoder(encoder)->dcb;
> @@ -632,7 +632,7 @@ static void nv04_tmds_slave_init(struct drm_encoder *encoder)
> {
> {
> .type = "sil164",
> - .addr = (dcb->tmdsconf.slave_addr == 0x7 ? 0x3a : 0x38),
> + .addr = (dcb->tmdsconf.client_addr == 0x7 ? 0x3a : 0x38),
> .platform_data = &(struct sil164_encoder_params) {
> SIL164_INPUT_EDGE_RISING
> }
> @@ -642,7 +642,7 @@ static void nv04_tmds_slave_init(struct drm_encoder *encoder)
> };
> int type;
>
> - if (!nv_gf4_disp_arch(dev) || !bus || get_tmds_slave(encoder))
> + if (!nv_gf4_disp_arch(dev) || !bus || get_tmds_client(encoder))
> return;
>
> type = nvkm_i2c_bus_probe(bus, "TMDS transmitter", info, NULL, NULL);
> @@ -716,7 +716,7 @@ nv04_dfp_create(struct drm_connector *connector, struct dcb_output *entry)
>
> if (entry->type == DCB_OUTPUT_TMDS &&
> entry->location != DCB_LOC_ON_CHIP)
> - nv04_tmds_slave_init(encoder);
> + nv04_tmds_client_init(encoder);
>
> drm_connector_attach_encoder(connector, encoder);
> return 0;
> diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h
> index 73f9d9947e7e..5da40cf74b1a 100644
> --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h
> +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h
> @@ -50,7 +50,7 @@ struct dcb_output {
> } dpconf;
> struct {
> struct sor_conf sor;
> - int slave_addr;
> + int client_addr;
> } tmdsconf;
> };
> bool i2c_upper_default;
> diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
> index 479effcf607e..a91a5d3df3ca 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_bios.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
> @@ -1511,9 +1511,9 @@ parse_dcb20_entry(struct drm_device *dev, struct dcb_table *dcb,
> link = entry->tmdsconf.sor.link;
> }
> else if (dcb->version >= 0x30)
> - entry->tmdsconf.slave_addr = (conf & 0x00000700) >> 8;
> + entry->tmdsconf.client_addr = (conf & 0x00000700) >> 8;
> else if (dcb->version >= 0x22)
> - entry->tmdsconf.slave_addr = (conf & 0x00000070) >> 4;
> + entry->tmdsconf.client_addr = (conf & 0x00000070) >> 4;
> break;
> case DCB_OUTPUT_EOL:
> /* weird g80 mobile type that "nv" treats as a terminator */


2024-04-05 16:30:33

by Easwar Hariharan

[permalink] [raw]
Subject: Re: [PATCH v0 13/14] drm/nouveau: Make I2C terminology more inclusive

On 4/5/2024 9:15 AM, Danilo Krummrich wrote:
> Hi Easwar,
>
> On 3/29/24 18:00, Easwar Hariharan wrote:
>> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>> with more appropriate terms. Inspired by and following on to Wolfram's
>> series to fix drivers/i2c/[1], fix the terminology for users of
>> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
>> in the specification.
>>
>> Compile tested, no functionality changes intended
>>
>> [1]: https://lore.kernel.org/all/[email protected]/
>>
>> Signed-off-by: Easwar Hariharan <[email protected]>
>> ---
>>   drivers/gpu/drm/nouveau/dispnv04/dfp.c             | 14 +++++++-------
>>   .../gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h |  2 +-
>>   drivers/gpu/drm/nouveau/nouveau_bios.c             |  4 ++--
>>   3 files changed, 10 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/nouveau/dispnv04/dfp.c b/drivers/gpu/drm/nouveau/dispnv04/dfp.c
>> index d5b129dc623b..65b791006b19 100644
>> --- a/drivers/gpu/drm/nouveau/dispnv04/dfp.c
>> +++ b/drivers/gpu/drm/nouveau/dispnv04/dfp.c
>> @@ -149,7 +149,7 @@ void nv04_dfp_update_fp_control(struct drm_encoder *encoder, int mode)
>>       }
>>   }
>>   -static struct drm_encoder *get_tmds_slave(struct drm_encoder *encoder)
>> +static struct drm_encoder *get_tmds_client(struct drm_encoder *encoder)
>>   {
>>       struct drm_device *dev = encoder->dev;
>>       struct dcb_output *dcb = nouveau_encoder(encoder)->dcb;
>> @@ -172,7 +172,7 @@ static struct drm_encoder *get_tmds_slave(struct drm_encoder *encoder)
>>           struct dcb_output *slave_dcb = nouveau_encoder(slave)->dcb;
>>             if (slave_dcb->type == DCB_OUTPUT_TMDS && get_slave_funcs(slave) &&
>> -            slave_dcb->tmdsconf.slave_addr == dcb->tmdsconf.slave_addr)
>> +            slave_dcb->tmdsconf.client_addr == dcb->tmdsconf.client_addr)
>>               return slave;
>
> While, personally, I think master/slave was well suiting for the device relationship
> on those busses, I think that if we change it up to conform with the change in
> specification, we should make sure to update drivers consistently.
>
> We should make sure to also change the names of the sourrounding structures and variable
> names, otherwise we just make this code harder to read.
>
> - Danilo
>

Thanks for the review, and for the appetite to go further! So we are on the same page, you would prefer
renaming to controller/target like the feedback on other drm drivers (i915, gma500, radeon)?

Thanks,
Easwar


2024-04-05 17:10:59

by Easwar Hariharan

[permalink] [raw]
Subject: Re: [PATCH v0 00/14] Make I2C terminology more inclusive for I2C Algobit and consumers

Hi Wolfram,

On 4/5/2024 3:18 AM, Wolfram Sang wrote:
> Hello Easwar,
>
> On Fri, Mar 29, 2024 at 05:00:24PM +0000, Easwar Hariharan wrote:
>> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>> with more appropriate terms. Inspired by and following on to Wolfram's
>> series to fix drivers/i2c/[1], fix the terminology for users of the
>> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
>> in the specification.
>
> I really appreciate that you want to assist in this task to improve the
> I2C core. I do. I am afraid, however, that you took the second step
> before the first one, though. As I mentioned in my original cover
> letter, this is not only about renaming but also improving the I2C API
> (splitting up header files...). So, drivers are not a priority right
> now. They can be better fixed once the core is ready.
>

Sorry, got excited. :) There were drivers I'd been part of that I specifically
wanted to fixup, but then the scope grew to other users of algobit.

> It is true that I changed quite some controller drivers within the i2c
> realm. I did this to gain experience. As you also noticed quite some
> questions came up. We need to agree on answers first. And once we are
> happy with the answers we found, then IMO we can go outside of the i2c
> realm and send patches to other subsystems referencing agreed
> precedence. I intentionally did not go outside i2c yet. Since your
> patches are already there, you probably want to foster them until they
> are ready for inclusion.

Sorry, I don't quite follow what you mean by foster in this context. Are
you asking me to hold off on merging the series, or to follow through on
getting it merged?

Yet, regarding further patches, my suggestion
> is to wait until the core is ready. That might take a while, though.
> However, there is enough to discuss until the core is ready. So, your
> collaboration there is highly appreciated!
>
>> The last patch updating the .master_xfer method to .xfer depends on
>> patch 1 of Wolfram's series below, but the series is otherwise
>> independent. It may make sense for the last patch to go in with
>
> Please drop the last patch from this series. It will nicely remove the
> dependency. Also, like above, I first want to gain experience with i2c
> before going to other subsystems. That was intended.
>

Will do, thanks!

> All the best and happy hacking,
>
> Wolfram
>


2024-04-05 18:42:17

by Lyude Paul

[permalink] [raw]
Subject: Re: [PATCH v0 13/14] drm/nouveau: Make I2C terminology more inclusive

On Fri, 2024-04-05 at 09:30 -0700, Easwar Hariharan wrote:
>
> Thanks for the review, and for the appetite to go further! So we are
> on the same page, you would prefer
> renaming to controller/target like the feedback on other drm drivers
> (i915, gma500, radeon)?

FWIW I'm in support of this as well! As long as we make sure it gets
renamed everywhere :)

>
> Thanks,
> Easwar
>

--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat


2024-04-07 08:49:54

by Simon Horman

[permalink] [raw]
Subject: Re: [PATCH v0 10/14] sfc: falcon: Make I2C terminology more inclusive

On Thu, Apr 04, 2024 at 12:17:26PM -0700, Easwar Hariharan wrote:
> On 4/2/2024 1:29 AM, Simon Horman wrote:
> > On Fri, Mar 29, 2024 at 05:00:34PM +0000, Easwar Hariharan wrote:
> >> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
> >> with more appropriate terms. Inspired by and following on to Wolfram's
> >> series to fix drivers/i2c/[1], fix the terminology for users of
> >> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
> >> in the specification.
> >>
> >> Compile tested, no functionality changes intended
> >>
> >> [1]: https://lore.kernel.org/all/[email protected]/
> >>
> >> Signed-off-by: Easwar Hariharan <[email protected]>
> >
> > Reviewed-by: Simon Horman <[email protected]>
>
>
> Thank you, Simon, for reviewing. I believe that we are settling on controller/target
> terminology from feedback on the other drivers in this series. Would you want to re-review
> v1 with that change, or should I add you R-B in v1 despite the change?

Thanks for asking,

either way is fine by me.

2024-04-07 17:58:27

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v0 00/14] Make I2C terminology more inclusive for I2C Algobit and consumers

Hi Easwar,

> Sorry, got excited. :) There were drivers I'd been part of that I specifically
> wanted to fixup, but then the scope grew to other users of algobit.

Well, you got some positive feedback, so that is good.

> > It is true that I changed quite some controller drivers within the i2c
> > realm. I did this to gain experience. As you also noticed quite some
> > questions came up. We need to agree on answers first. And once we are
> > happy with the answers we found, then IMO we can go outside of the i2c
> > realm and send patches to other subsystems referencing agreed
> > precedence. I intentionally did not go outside i2c yet. Since your
> > patches are already there, you probably want to foster them until they
> > are ready for inclusion.
>
> Sorry, I don't quite follow what you mean by foster in this context. Are
> you asking me to hold off on merging the series, or to follow through on
> getting it merged?

I think they are your patches, so this is up to you to decide. With
"foster", I meant you keep working on them until everyone is happy. I
haven't looked at the drivers you modify. I can't tell if they can be
converted right away or if they use a lot of I2C API calls, so that it
makes sense to wait until the core is converted. I trust you to decide
this.

Happy hacking,

Wolfram


Attachments:
(No filename) (1.32 kB)
signature.asc (849.00 B)
Download all attachments

2024-04-08 07:53:47

by Hans Verkuil

[permalink] [raw]
Subject: Re: [PATCH v0 00/14] Make I2C terminology more inclusive for I2C Algobit and consumers

On 05/04/2024 12:18, Wolfram Sang wrote:
> Hello Easwar,
>
> On Fri, Mar 29, 2024 at 05:00:24PM +0000, Easwar Hariharan wrote:
>> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
>> with more appropriate terms. Inspired by and following on to Wolfram's
>> series to fix drivers/i2c/[1], fix the terminology for users of the
>> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
>> in the specification.
>
> I really appreciate that you want to assist in this task to improve the
> I2C core. I do. I am afraid, however, that you took the second step
> before the first one, though. As I mentioned in my original cover
> letter, this is not only about renaming but also improving the I2C API
> (splitting up header files...). So, drivers are not a priority right
> now. They can be better fixed once the core is ready.
>
> It is true that I changed quite some controller drivers within the i2c
> realm. I did this to gain experience. As you also noticed quite some
> questions came up. We need to agree on answers first. And once we are
> happy with the answers we found, then IMO we can go outside of the i2c
> realm and send patches to other subsystems referencing agreed
> precedence. I intentionally did not go outside i2c yet. Since your
> patches are already there, you probably want to foster them until they
> are ready for inclusion. Yet, regarding further patches, my suggestion
> is to wait until the core is ready. That might take a while, though.
> However, there is enough to discuss until the core is ready. So, your
> collaboration there is highly appreciated!
>
>> The last patch updating the .master_xfer method to .xfer depends on
>> patch 1 of Wolfram's series below, but the series is otherwise
>> independent. It may make sense for the last patch to go in with
>
> Please drop the last patch from this series. It will nicely remove the
> dependency. Also, like above, I first want to gain experience with i2c
> before going to other subsystems. That was intended.

OK, based on this I'll mark the media patches in this series as 'Deferred'
in our patchwork.

Regards,

Hans

>
> All the best and happy hacking,
>
> Wolfram
>


2024-04-08 08:36:35

by Martin Habets

[permalink] [raw]
Subject: Re: [PATCH v0 10/14] sfc: falcon: Make I2C terminology more inclusive

On Thu, Apr 04, 2024 at 12:18:06PM -0700, Easwar Hariharan wrote:
> On 4/2/2024 2:00 AM, Martin Habets wrote:
> > On Fri, Mar 29, 2024 at 05:00:34PM +0000, Easwar Hariharan wrote:
> >> I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave"
> >> with more appropriate terms. Inspired by and following on to Wolfram's
> >> series to fix drivers/i2c/[1], fix the terminology for users of
> >> I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists
> >> in the specification.
> >>
> >> Compile tested, no functionality changes intended
> >>
> >> [1]: https://lore.kernel.org/all/[email protected]/
> >>
> >> Signed-off-by: Easwar Hariharan <[email protected]>
> >
> > Reviewed-by: Martin Habets <[email protected]>
> >
>
> Thank you, Martin, for reviewing. I believe that we are settling on controller/target
> terminology from feedback on the other drivers in this series. Would you want to re-review
> v1 with that change, or should I add your R-B in v1 despite the change?

You can add in my Reviewed-by.

Martin

> Thanks,
> Easwar
>