From patchwork Thu Jul 11 05:27:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 812141 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CCC178287A; Thu, 11 Jul 2024 05:28:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720675741; cv=none; b=a83Q7Kf0taNTVe47tLJcZrmAMBbMJabceKDjG7lJDQG1oJb/4n7Nid08jttd3VPQ2NNH8gJd544WQ6ePFT8gRubKGFyaE1hJocxTRWrbSVX6UvtABn2uSCUYYSeiEsQqbgPCKDuxgnzw9MNfkCLBa8bJnzycKhMPPoUm+LqUfhA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720675741; c=relaxed/simple; bh=2PkvWz7NNRN6c5hE4MvQMZT9YrS2VYNgEg9nTjF3mjw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=eIwV27FhiddPR9DgyuTyxqY/YyNTV55OwATKi+0oa9luHpO3zF7skSzbaP7xqgBWY91SN6R83p9qqEIrdMih+1gbMm2UOIWQTrFtHiHuWwi+7asPpqicTWHdB1ZPzBcsbSnuPnCaeUeMF6nHzBX3hwHiSanwn4uDjD9FCkxrIQk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=TF51oVSj; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="TF51oVSj" Received: from rrs24-12-35.corp.microsoft.com (unknown [131.107.159.213]) by linux.microsoft.com (Postfix) with ESMTPSA id 7898F20B7165; Wed, 10 Jul 2024 22:28:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7898F20B7165 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1720675739; bh=trdnBqLVSPpomRu6Y6Umj1cFxyQIE9BVrl6xkyiidhA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TF51oVSjez9I59mCiy2N2ZPbXhxQ9I+VxsXd1AkWmI3JlSQ1nQDDOfxv3Va6wireW ZKno+bEnWPxKiqrXnRirNCSkDrJSRhCbDTkYy0GOQDjO6p0asw3ef7otYRoL1Cwrue T2S2jciu4ledtJBw7NCoMa86YVbC9xBKYjYydAoI= From: Easwar Hariharan To: Patrik Jakobsson , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org (open list) Cc: Wolfram Sang , Andi Shyti , Easwar Hariharan , amd-gfx@lists.freedesktop.org (open list:RADEON and AMDGPU DRM DRIVERS), linux-kernel@vger.kernel.org (open list), intel-gfx@lists.freedesktop.org (open list:INTEL DRM DISPLAY FOR XE AND I915 DRIVERS), intel-xe@lists.freedesktop.org (open list:INTEL DRM DISPLAY FOR XE AND I915 DRIVERS), linux-i2c@vger.kernel.org (open list:I2C SUBSYSTEM HOST DRIVERS), linux-fbdev@vger.kernel.org (open list:FRAMEBUFFER LAYER) Subject: [PATCH v4 2/6] drm/gma500: Make I2C terminology more inclusive Date: Thu, 11 Jul 2024 05:27:30 +0000 Message-Id: <20240711052734.1273652-3-eahariha@linux.microsoft.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240711052734.1273652-1-eahariha@linux.microsoft.com> References: <20240711052734.1273652-1-eahariha@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 I2C v7, SMBus 3.2, and I3C 1.1.1 specifications have replaced "master/slave" with more appropriate terms. Inspired by Wolfram's series to fix drivers/i2c/, fix the terminology for users of I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists in the specification. Acked-by: Thomas Zimmermann Signed-off-by: Easwar Hariharan --- 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 ++++++++++++------------- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/drm/gma500/cdv_intel_lvds.c b/drivers/gpu/drm/gma500/cdv_intel_lvds.c index f08a6803dc184..c7652a02b42ec 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->target_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 8245b5603d2c0..d5924ca3ed050 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 TARGET_ADDR1 0x70 +#define TARGET_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->target_addr != TARGET_ADDR1 && + p_child->target_addr != TARGET_ADDR2) { /* - * If the slave address is neither 0x70 nor 0x72, + * If the target 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 target addr %2x is found on" " %s port\n", - p_child->slave_addr, + p_child->target_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->target_addr = p_child->target_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->target_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->target2_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 target2_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 0e6facf21e332..b5adea2a20c38 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 target_addr; u8 ddc_pin; u16 edid_ptr; u8 dvo_cfg; /* See DEVICE_CFG_* above */ u8 dvo2_port; u8 i2c2_pin; - u8 slave2_addr; + u8 target2_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 aa45509859f21..ee8b047587f25 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 target'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 83c17689c454f..bddf89b82fecc 100644 --- a/drivers/gpu/drm/gma500/psb_drv.h +++ b/drivers/gpu/drm/gma500/psb_drv.h @@ -202,7 +202,7 @@ struct psb_intel_opregion { struct sdvo_device_mapping { u8 initialized; u8 dvo_port; - u8 slave_addr; + u8 target_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 c111e933e1ed2..2499fd6a80c9d 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 target_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 8486de230ec91..d1cd9a9403959 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->target_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->target_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 e4f914decebae..8dafff963ca8b 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 target_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->target_addr, .flags = 0, .len = 1, .buf = &addr, }, { - .addr = psb_intel_sdvo->slave_addr, + .addr = psb_intel_sdvo->target_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->target_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->target_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->target_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->target_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_target_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->target_addr) + return my_mapping->target_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->target_addr) { + if (other_mapping->target_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->target_addr = psb_intel_sdvo_get_target_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); From patchwork Thu Jul 11 05:27:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 812140 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7046712C460; Thu, 11 Jul 2024 05:29:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720675748; cv=none; b=M+XLxEWajwtC18tY1AI8nS1vJSyRbnw75yxMXm7Y6+ZBBuOoiMXmWZmi8H536RHnj/ffuBxfy/rEoofOOPfxII81aDc1C7TLq2bKxWpUenk/0caShx+q8kyxMFaMNGw4PvwOnV2CTponl5MI5lrq05I6y66/egGOj5Y/GmSsLZ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720675748; c=relaxed/simple; bh=WzclvGDns4ilFyPJYI1eK0hLWJ++VUvbpLuIl5YywWM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=t4XjVUrpcffYSZym14NWHOe5iQ0En2fTtk/yhYkgUMNvP+xtJPVFPE7RHOEMoKZRs3luS3AfwatdHJ0ifczSRqwdVWoNf2r0eYEUMNsk4lpjIAuuMhmPQPlgAZW45NAPGFcnutvvEOLkvL1U4HITrwZFvs84y8xExDZcD6F8UGA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=FgqA5hE1; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="FgqA5hE1" Received: from rrs24-12-35.corp.microsoft.com (unknown [131.107.159.213]) by linux.microsoft.com (Postfix) with ESMTPSA id E6E4C20B7177; Wed, 10 Jul 2024 22:29:06 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E6E4C20B7177 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1720675747; bh=GrgZD0Hkzoqg2er45AV4orVx3uv9DRAW9Ig4kQ3bnBw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FgqA5hE1sXB4iOkQPdDG5oG9oTeIMjYhZ5UIYE3JRiwap/WtMWEgaO891wM+JZ6Sv s2E9Dz+xi/D2+eauPa8a8ZHf3itnSOfI1uKgEfPTRnjWkkbZ28GKFirbWcoCmruE1X X8hwgXpltyxj3N8GgmZDjnahP5QfC/z6V4/402Ik= From: Easwar Hariharan To: Edward Cree , Martin Habets , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Easwar Hariharan , netdev@vger.kernel.org (open list:SFC NETWORK DRIVER), linux-net-drivers@amd.com (open list:SFC NETWORK DRIVER), linux-kernel@vger.kernel.org (open list) Cc: Wolfram Sang , Andi Shyti , amd-gfx@lists.freedesktop.org (open list:RADEON and AMDGPU DRM DRIVERS), dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), linux-kernel@vger.kernel.org (open list), intel-gfx@lists.freedesktop.org (open list:INTEL DRM DISPLAY FOR XE AND I915 DRIVERS), intel-xe@lists.freedesktop.org (open list:INTEL DRM DISPLAY FOR XE AND I915 DRIVERS), linux-i2c@vger.kernel.org (open list:I2C SUBSYSTEM HOST DRIVERS), linux-fbdev@vger.kernel.org (open list:FRAMEBUFFER LAYER) Subject: [PATCH v4 4/6] sfc: falcon: Make I2C terminology more inclusive Date: Thu, 11 Jul 2024 05:27:32 +0000 Message-Id: <20240711052734.1273652-5-eahariha@linux.microsoft.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240711052734.1273652-1-eahariha@linux.microsoft.com> References: <20240711052734.1273652-1-eahariha@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 I2C v7, SMBus 3.2, and I3C 1.1.1 specifications have replaced "master/slave" with more appropriate terms. Inspired by Wolfram's series to fix drivers/i2c/, fix the terminology for users of I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists in the specification. Reviewed-by: Martin Habets Reviewed-by: Simon Horman Signed-off-by: Easwar Hariharan --- 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 7a1c9337081b5..36114ce88034c 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 target to let us pull SCL high */ .timeout = DIV_ROUND_UP(HZ, 20), }; From patchwork Thu Jul 11 05:27:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 812139 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D943812EBD6; Thu, 11 Jul 2024 05:29:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720675751; cv=none; b=RxabEphfCr25ZBRssi4ExS6V1EcWiF7G6ZrLPEXE5DpgRUI1wW8Zv8vtCGXyF+sA0Qi6ZastNxWb5RmuWC4EyVlhnJq4nvBub/7SyJ8/83QwknTxT6JTsEYH7zZZJ2wlaIZ/dgAvzglG9ijhBu6u1BjVgF/2fDduU7QgUKSJRR0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720675751; c=relaxed/simple; bh=LjVFHUW1i5MW8BjuRxPGqlUs0KNO8F20PvjjZxW7Msg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ls1xt/Pt48bgf9Zy3xN24PIIiB+cPbqymwHB/T4r2c17F4E9QFArY3IYyYy/XHurRb+MmPEpDJgnMitiCsTPgfeEeeAj8OJ6OPDBLg1l6wf4hMGT3A2Ol1I4fOzQVc0FfhK5/mhBoJmbjn4lEE74GTEvYcxl76uw+XL+Ev/cKbk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=eoGn8Qek; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="eoGn8Qek" Received: from rrs24-12-35.corp.microsoft.com (unknown [131.107.159.213]) by linux.microsoft.com (Postfix) with ESMTPSA id 91CE520B7165; Wed, 10 Jul 2024 22:29:09 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 91CE520B7165 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1720675749; bh=4zzt0sxaEK28Q73el3r0U92JO8hyIlQcIdU1sMN5SYU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eoGn8Qek5E9XSsJ2C10alVGfeRI/GzNSHI1/EexKzjrgWsychWzp8Ge+lGek14A/J MUw7Gos/0iZHXuMnVkt3Ib9Gd6v9b9vWi3i9BPGB45RuwnW2BN8APCzd4c6a7/vLya 0KvnYyDte6YcPv6Z07Lp3J2rdrUZVExWoJeNWNLg= From: Easwar Hariharan To: Florian Tobias Schandinat , Helge Deller , linux-fbdev@vger.kernel.org (open list:VIA UNICHROME(PRO)/CHROME9 FRAMEBUFFER DRIVER), dri-devel@lists.freedesktop.org (open list:FRAMEBUFFER LAYER), linux-kernel@vger.kernel.org (open list) Cc: Wolfram Sang , Andi Shyti , Easwar Hariharan , amd-gfx@lists.freedesktop.org (open list:RADEON and AMDGPU DRM DRIVERS), dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), linux-kernel@vger.kernel.org (open list), intel-gfx@lists.freedesktop.org (open list:INTEL DRM DISPLAY FOR XE AND I915 DRIVERS), intel-xe@lists.freedesktop.org (open list:INTEL DRM DISPLAY FOR XE AND I915 DRIVERS), linux-i2c@vger.kernel.org (open list:I2C SUBSYSTEM HOST DRIVERS), linux-fbdev@vger.kernel.org (open list:FRAMEBUFFER LAYER), Thomas Zimmermann Subject: [PATCH v4 6/6] fbdev/viafb: Make I2C terminology more inclusive Date: Thu, 11 Jul 2024 05:27:34 +0000 Message-Id: <20240711052734.1273652-7-eahariha@linux.microsoft.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240711052734.1273652-1-eahariha@linux.microsoft.com> References: <20240711052734.1273652-1-eahariha@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 I2C v7, SMBus 3.2, and I3C 1.1.1 specifications have replaced "master/slave" with more appropriate terms. Inspired by Wolfram's series to fix drivers/i2c/, fix the terminology for users of I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists in the specification. Acked-by: Thomas Zimmermann Signed-off-by: Easwar Hariharan --- 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 f0a19cbcb9e5d..f81af13630e28 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 Target 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 Target 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_target_addr; int output_interface; int i2c_port; }; struct lvds_chip_information { int lvds_chip_name; - int lvds_chip_slave_addr; + int lvds_chip_target_addr; int output_interface; int i2c_port; }; diff --git a/drivers/video/fbdev/via/dvi.c b/drivers/video/fbdev/via/dvi.c index 13147e3066ebf..27990a73bfa39 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_target_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_target_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_target_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_target_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_target_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_target_addr; + viaparinfo->chip_info->tmds_chip_info.tmds_chip_target_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_target_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_target_addr; + tmds_chip->tmds_chip_target_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_target_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_target_addr, 0x08, data); } } diff --git a/drivers/video/fbdev/via/lcd.c b/drivers/video/fbdev/via/lcd.c index beec5c8d4d083..8673fced87492 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_target_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_target_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_target_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 0933bbf20e588..464723fd514ca 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 target 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 5825028105759..5edd3827ca271 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 target_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 = target_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 target_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 = target_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 target_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 = target_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 8d8cfdb05618f..0d58ca144e190 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_target_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_target_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_target_addr = VT1636_LVDS_I2C_ADDR; /* Check vendor ID first: */