All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Douglas Anderson <dianders@chromium.org>
Cc: Andrzej Hajda <a.hajda@samsung.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Sam Ravnborg <sam@ravnborg.org>, Wolfram Sang <wsa@kernel.org>,
	Stephen Boyd <swboyd@chromium.org>,
	robdclark@chromium.org,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>,
	Steev Klimaszewski <steev@kali.org>,
	linux-arm-msm@vger.kernel.org, Linus W <linus.walleij@linaro.org>,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
	Robert Foss <robert.foss@linaro.org>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 09/27] drm/bridge: ti-sn65dsi86: More renames in prep for sub-devices
Date: Fri, 23 Apr 2021 09:30:19 -0500	[thread overview]
Message-ID: <YILZ+6bYlvGQquz+@builder.lan> (raw)
In-Reply-To: <20210416153909.v4.9.I4b28c737933a44548662df42ccd37db89ec739c1@changeid>

On Fri 16 Apr 17:39 CDT 2021, Douglas Anderson wrote:

> Like the previous patch ("drm/bridge: ti-sn65dsi86: Rename the main
> driver data structure") this is just a no-op rename in preparation for
> splitting the driver up a bit.
> 
> Here I've attempted to rename functions / structures making sure that
> anything applicable to the whole chip (instead of just the MIPI to eDP
> bridge part) included "sn65dsi86" somewhere in the name instead of
> just "ti_sn_bridge".
> 

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> 
> (no changes since v1)
> 
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c | 84 +++++++++++++--------------
>  1 file changed, 42 insertions(+), 42 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> index f00ceb9dda29..57574132e200 100644
> --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> @@ -164,30 +164,30 @@ struct ti_sn65dsi86 {
>  #endif
>  };
>  
> -static const struct regmap_range ti_sn_bridge_volatile_ranges[] = {
> +static const struct regmap_range ti_sn65dsi86_volatile_ranges[] = {
>  	{ .range_min = 0, .range_max = 0xFF },
>  };
>  
>  static const struct regmap_access_table ti_sn_bridge_volatile_table = {
> -	.yes_ranges = ti_sn_bridge_volatile_ranges,
> -	.n_yes_ranges = ARRAY_SIZE(ti_sn_bridge_volatile_ranges),
> +	.yes_ranges = ti_sn65dsi86_volatile_ranges,
> +	.n_yes_ranges = ARRAY_SIZE(ti_sn65dsi86_volatile_ranges),
>  };
>  
> -static const struct regmap_config ti_sn_bridge_regmap_config = {
> +static const struct regmap_config ti_sn65dsi86_regmap_config = {
>  	.reg_bits = 8,
>  	.val_bits = 8,
>  	.volatile_table = &ti_sn_bridge_volatile_table,
>  	.cache_type = REGCACHE_NONE,
>  };
>  
> -static void ti_sn_bridge_write_u16(struct ti_sn65dsi86 *pdata,
> +static void ti_sn65dsi86_write_u16(struct ti_sn65dsi86 *pdata,
>  				   unsigned int reg, u16 val)
>  {
>  	regmap_write(pdata->regmap, reg, val & 0xFF);
>  	regmap_write(pdata->regmap, reg + 1, val >> 8);
>  }
>  
> -static int __maybe_unused ti_sn_bridge_resume(struct device *dev)
> +static int __maybe_unused ti_sn65dsi86_resume(struct device *dev)
>  {
>  	struct ti_sn65dsi86 *pdata = dev_get_drvdata(dev);
>  	int ret;
> @@ -203,7 +203,7 @@ static int __maybe_unused ti_sn_bridge_resume(struct device *dev)
>  	return ret;
>  }
>  
> -static int __maybe_unused ti_sn_bridge_suspend(struct device *dev)
> +static int __maybe_unused ti_sn65dsi86_suspend(struct device *dev)
>  {
>  	struct ti_sn65dsi86 *pdata = dev_get_drvdata(dev);
>  	int ret;
> @@ -217,8 +217,8 @@ static int __maybe_unused ti_sn_bridge_suspend(struct device *dev)
>  	return ret;
>  }
>  
> -static const struct dev_pm_ops ti_sn_bridge_pm_ops = {
> -	SET_RUNTIME_PM_OPS(ti_sn_bridge_suspend, ti_sn_bridge_resume, NULL)
> +static const struct dev_pm_ops ti_sn65dsi86_pm_ops = {
> +	SET_RUNTIME_PM_OPS(ti_sn65dsi86_suspend, ti_sn65dsi86_resume, NULL)
>  	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
>  				pm_runtime_force_resume)
>  };
> @@ -245,7 +245,7 @@ static int status_show(struct seq_file *s, void *data)
>  
>  DEFINE_SHOW_ATTRIBUTE(status);
>  
> -static void ti_sn_debugfs_init(struct ti_sn65dsi86 *pdata)
> +static void ti_sn65dsi86_debugfs_init(struct ti_sn65dsi86 *pdata)
>  {
>  	pdata->debugfs = debugfs_create_dir(dev_name(pdata->dev), NULL);
>  
> @@ -253,7 +253,7 @@ static void ti_sn_debugfs_init(struct ti_sn65dsi86 *pdata)
>  			&status_fops);
>  }
>  
> -static void ti_sn_debugfs_remove(struct ti_sn65dsi86 *pdata)
> +static void ti_sn65dsi86_debugfs_remove(struct ti_sn65dsi86 *pdata)
>  {
>  	debugfs_remove_recursive(pdata->debugfs);
>  	pdata->debugfs = NULL;
> @@ -261,14 +261,14 @@ static void ti_sn_debugfs_remove(struct ti_sn65dsi86 *pdata)
>  
>  /* Connector funcs */
>  static struct ti_sn65dsi86 *
> -connector_to_ti_sn_bridge(struct drm_connector *connector)
> +connector_to_ti_sn65dsi86(struct drm_connector *connector)
>  {
>  	return container_of(connector, struct ti_sn65dsi86, connector);
>  }
>  
>  static int ti_sn_bridge_connector_get_modes(struct drm_connector *connector)
>  {
> -	struct ti_sn65dsi86 *pdata = connector_to_ti_sn_bridge(connector);
> +	struct ti_sn65dsi86 *pdata = connector_to_ti_sn65dsi86(connector);
>  	struct edid *edid = pdata->edid;
>  	int num, ret;
>  
> @@ -314,12 +314,12 @@ static const struct drm_connector_funcs ti_sn_bridge_connector_funcs = {
>  	.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
>  };
>  
> -static struct ti_sn65dsi86 *bridge_to_ti_sn_bridge(struct drm_bridge *bridge)
> +static struct ti_sn65dsi86 *bridge_to_ti_sn65dsi86(struct drm_bridge *bridge)
>  {
>  	return container_of(bridge, struct ti_sn65dsi86, bridge);
>  }
>  
> -static int ti_sn_bridge_parse_regulators(struct ti_sn65dsi86 *pdata)
> +static int ti_sn65dsi86_parse_regulators(struct ti_sn65dsi86 *pdata)
>  {
>  	unsigned int i;
>  	const char * const ti_sn_bridge_supply_names[] = {
> @@ -337,7 +337,7 @@ static int ti_sn_bridge_attach(struct drm_bridge *bridge,
>  			       enum drm_bridge_attach_flags flags)
>  {
>  	int ret, val;
> -	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn_bridge(bridge);
> +	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn65dsi86(bridge);
>  	struct mipi_dsi_host *host;
>  	struct mipi_dsi_device *dsi;
>  	const struct mipi_dsi_device_info info = { .type = "ti_sn_bridge",
> @@ -425,12 +425,12 @@ static int ti_sn_bridge_attach(struct drm_bridge *bridge,
>  
>  static void ti_sn_bridge_detach(struct drm_bridge *bridge)
>  {
> -	drm_dp_aux_unregister(&bridge_to_ti_sn_bridge(bridge)->aux);
> +	drm_dp_aux_unregister(&bridge_to_ti_sn65dsi86(bridge)->aux);
>  }
>  
>  static void ti_sn_bridge_disable(struct drm_bridge *bridge)
>  {
> -	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn_bridge(bridge);
> +	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn65dsi86(bridge);
>  
>  	drm_panel_disable(pdata->panel);
>  
> @@ -648,9 +648,9 @@ static void ti_sn_bridge_set_video_timings(struct ti_sn65dsi86 *pdata)
>  	if (mode->flags & DRM_MODE_FLAG_PVSYNC)
>  		vsync_polarity = CHA_VSYNC_POLARITY;
>  
> -	ti_sn_bridge_write_u16(pdata, SN_CHA_ACTIVE_LINE_LENGTH_LOW_REG,
> +	ti_sn65dsi86_write_u16(pdata, SN_CHA_ACTIVE_LINE_LENGTH_LOW_REG,
>  			       mode->hdisplay);
> -	ti_sn_bridge_write_u16(pdata, SN_CHA_VERTICAL_DISPLAY_SIZE_LOW_REG,
> +	ti_sn65dsi86_write_u16(pdata, SN_CHA_VERTICAL_DISPLAY_SIZE_LOW_REG,
>  			       mode->vdisplay);
>  	regmap_write(pdata->regmap, SN_CHA_HSYNC_PULSE_WIDTH_LOW_REG,
>  		     (mode->hsync_end - mode->hsync_start) & 0xFF);
> @@ -751,7 +751,7 @@ static int ti_sn_link_training(struct ti_sn65dsi86 *pdata, int dp_rate_idx,
>  
>  static void ti_sn_bridge_enable(struct drm_bridge *bridge)
>  {
> -	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn_bridge(bridge);
> +	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn65dsi86(bridge);
>  	bool rate_valid[ARRAY_SIZE(ti_sn_bridge_dp_rate_lut)] = { };
>  	const char *last_err_str = "No supported DP rate";
>  	int dp_rate_idx;
> @@ -822,7 +822,7 @@ static void ti_sn_bridge_enable(struct drm_bridge *bridge)
>  
>  static void ti_sn_bridge_pre_enable(struct drm_bridge *bridge)
>  {
> -	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn_bridge(bridge);
> +	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn65dsi86(bridge);
>  
>  	pm_runtime_get_sync(pdata->dev);
>  
> @@ -853,7 +853,7 @@ static void ti_sn_bridge_pre_enable(struct drm_bridge *bridge)
>  
>  static void ti_sn_bridge_post_disable(struct drm_bridge *bridge)
>  {
> -	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn_bridge(bridge);
> +	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn65dsi86(bridge);
>  
>  	drm_panel_unprepare(pdata->panel);
>  
> @@ -871,7 +871,7 @@ static const struct drm_bridge_funcs ti_sn_bridge_funcs = {
>  	.post_disable = ti_sn_bridge_post_disable,
>  };
>  
> -static struct ti_sn65dsi86 *aux_to_ti_sn_bridge(struct drm_dp_aux *aux)
> +static struct ti_sn65dsi86 *aux_to_ti_sn65dsi86(struct drm_dp_aux *aux)
>  {
>  	return container_of(aux, struct ti_sn65dsi86, aux);
>  }
> @@ -879,7 +879,7 @@ static struct ti_sn65dsi86 *aux_to_ti_sn_bridge(struct drm_dp_aux *aux)
>  static ssize_t ti_sn_aux_transfer(struct drm_dp_aux *aux,
>  				  struct drm_dp_aux_msg *msg)
>  {
> -	struct ti_sn65dsi86 *pdata = aux_to_ti_sn_bridge(aux);
> +	struct ti_sn65dsi86 *pdata = aux_to_ti_sn65dsi86(aux);
>  	u32 request = msg->request & ~(DP_AUX_I2C_MOT | DP_AUX_I2C_WRITE_STATUS_UPDATE);
>  	u32 request_val = AUX_CMD_REQ(msg->request);
>  	u8 *buf = msg->buffer;
> @@ -1213,7 +1213,7 @@ static void ti_sn_bridge_parse_lanes(struct ti_sn65dsi86 *pdata,
>  	pdata->ln_polrs = ln_polrs;
>  }
>  
> -static int ti_sn_bridge_probe(struct i2c_client *client,
> +static int ti_sn65dsi86_probe(struct i2c_client *client,
>  			      const struct i2c_device_id *id)
>  {
>  	struct ti_sn65dsi86 *pdata;
> @@ -1230,7 +1230,7 @@ static int ti_sn_bridge_probe(struct i2c_client *client,
>  		return -ENOMEM;
>  
>  	pdata->regmap = devm_regmap_init_i2c(client,
> -					     &ti_sn_bridge_regmap_config);
> +					     &ti_sn65dsi86_regmap_config);
>  	if (IS_ERR(pdata->regmap)) {
>  		DRM_ERROR("regmap i2c init failed\n");
>  		return PTR_ERR(pdata->regmap);
> @@ -1257,7 +1257,7 @@ static int ti_sn_bridge_probe(struct i2c_client *client,
>  
>  	ti_sn_bridge_parse_lanes(pdata, client->dev.of_node);
>  
> -	ret = ti_sn_bridge_parse_regulators(pdata);
> +	ret = ti_sn65dsi86_parse_regulators(pdata);
>  	if (ret) {
>  		DRM_ERROR("failed to parse regulators\n");
>  		return ret;
> @@ -1291,12 +1291,12 @@ static int ti_sn_bridge_probe(struct i2c_client *client,
>  
>  	drm_bridge_add(&pdata->bridge);
>  
> -	ti_sn_debugfs_init(pdata);
> +	ti_sn65dsi86_debugfs_init(pdata);
>  
>  	return 0;
>  }
>  
> -static int ti_sn_bridge_remove(struct i2c_client *client)
> +static int ti_sn65dsi86_remove(struct i2c_client *client)
>  {
>  	struct ti_sn65dsi86 *pdata = i2c_get_clientdata(client);
>  
> @@ -1310,7 +1310,7 @@ static int ti_sn_bridge_remove(struct i2c_client *client)
>  
>  	kfree(pdata->edid);
>  
> -	ti_sn_debugfs_remove(pdata);
> +	ti_sn65dsi86_debugfs_remove(pdata);
>  
>  	drm_bridge_remove(&pdata->bridge);
>  
> @@ -1321,29 +1321,29 @@ static int ti_sn_bridge_remove(struct i2c_client *client)
>  	return 0;
>  }
>  
> -static struct i2c_device_id ti_sn_bridge_id[] = {
> +static struct i2c_device_id ti_sn65dsi86_id[] = {
>  	{ "ti,sn65dsi86", 0},
>  	{},
>  };
> -MODULE_DEVICE_TABLE(i2c, ti_sn_bridge_id);
> +MODULE_DEVICE_TABLE(i2c, ti_sn65dsi86_id);
>  
> -static const struct of_device_id ti_sn_bridge_match_table[] = {
> +static const struct of_device_id ti_sn65dsi86_match_table[] = {
>  	{.compatible = "ti,sn65dsi86"},
>  	{},
>  };
> -MODULE_DEVICE_TABLE(of, ti_sn_bridge_match_table);
> +MODULE_DEVICE_TABLE(of, ti_sn65dsi86_match_table);
>  
> -static struct i2c_driver ti_sn_bridge_driver = {
> +static struct i2c_driver ti_sn65dsi86_driver = {
>  	.driver = {
>  		.name = "ti_sn65dsi86",
> -		.of_match_table = ti_sn_bridge_match_table,
> -		.pm = &ti_sn_bridge_pm_ops,
> +		.of_match_table = ti_sn65dsi86_match_table,
> +		.pm = &ti_sn65dsi86_pm_ops,
>  	},
> -	.probe = ti_sn_bridge_probe,
> -	.remove = ti_sn_bridge_remove,
> -	.id_table = ti_sn_bridge_id,
> +	.probe = ti_sn65dsi86_probe,
> +	.remove = ti_sn65dsi86_remove,
> +	.id_table = ti_sn65dsi86_id,
>  };
> -module_i2c_driver(ti_sn_bridge_driver);
> +module_i2c_driver(ti_sn65dsi86_driver);
>  
>  MODULE_AUTHOR("Sandeep Panda <spanda@codeaurora.org>");
>  MODULE_DESCRIPTION("sn65dsi86 DSI to eDP bridge driver");
> -- 
> 2.31.1.368.gbe11c130af-goog
> 

WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Douglas Anderson <dianders@chromium.org>
Cc: robdclark@chromium.org,
	Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	dri-devel@lists.freedesktop.org, Jonas Karlman <jonas@kwiboo.se>,
	David Airlie <airlied@linux.ie>,
	linux-arm-msm@vger.kernel.org,
	Neil Armstrong <narmstrong@baylibre.com>,
	linux-kernel@vger.kernel.org, Steev Klimaszewski <steev@kali.org>,
	Stephen Boyd <swboyd@chromium.org>, Wolfram Sang <wsa@kernel.org>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	Robert Foss <robert.foss@linaro.org>
Subject: Re: [PATCH v4 09/27] drm/bridge: ti-sn65dsi86: More renames in prep for sub-devices
Date: Fri, 23 Apr 2021 09:30:19 -0500	[thread overview]
Message-ID: <YILZ+6bYlvGQquz+@builder.lan> (raw)
In-Reply-To: <20210416153909.v4.9.I4b28c737933a44548662df42ccd37db89ec739c1@changeid>

On Fri 16 Apr 17:39 CDT 2021, Douglas Anderson wrote:

> Like the previous patch ("drm/bridge: ti-sn65dsi86: Rename the main
> driver data structure") this is just a no-op rename in preparation for
> splitting the driver up a bit.
> 
> Here I've attempted to rename functions / structures making sure that
> anything applicable to the whole chip (instead of just the MIPI to eDP
> bridge part) included "sn65dsi86" somewhere in the name instead of
> just "ti_sn_bridge".
> 

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> 
> (no changes since v1)
> 
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c | 84 +++++++++++++--------------
>  1 file changed, 42 insertions(+), 42 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> index f00ceb9dda29..57574132e200 100644
> --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> @@ -164,30 +164,30 @@ struct ti_sn65dsi86 {
>  #endif
>  };
>  
> -static const struct regmap_range ti_sn_bridge_volatile_ranges[] = {
> +static const struct regmap_range ti_sn65dsi86_volatile_ranges[] = {
>  	{ .range_min = 0, .range_max = 0xFF },
>  };
>  
>  static const struct regmap_access_table ti_sn_bridge_volatile_table = {
> -	.yes_ranges = ti_sn_bridge_volatile_ranges,
> -	.n_yes_ranges = ARRAY_SIZE(ti_sn_bridge_volatile_ranges),
> +	.yes_ranges = ti_sn65dsi86_volatile_ranges,
> +	.n_yes_ranges = ARRAY_SIZE(ti_sn65dsi86_volatile_ranges),
>  };
>  
> -static const struct regmap_config ti_sn_bridge_regmap_config = {
> +static const struct regmap_config ti_sn65dsi86_regmap_config = {
>  	.reg_bits = 8,
>  	.val_bits = 8,
>  	.volatile_table = &ti_sn_bridge_volatile_table,
>  	.cache_type = REGCACHE_NONE,
>  };
>  
> -static void ti_sn_bridge_write_u16(struct ti_sn65dsi86 *pdata,
> +static void ti_sn65dsi86_write_u16(struct ti_sn65dsi86 *pdata,
>  				   unsigned int reg, u16 val)
>  {
>  	regmap_write(pdata->regmap, reg, val & 0xFF);
>  	regmap_write(pdata->regmap, reg + 1, val >> 8);
>  }
>  
> -static int __maybe_unused ti_sn_bridge_resume(struct device *dev)
> +static int __maybe_unused ti_sn65dsi86_resume(struct device *dev)
>  {
>  	struct ti_sn65dsi86 *pdata = dev_get_drvdata(dev);
>  	int ret;
> @@ -203,7 +203,7 @@ static int __maybe_unused ti_sn_bridge_resume(struct device *dev)
>  	return ret;
>  }
>  
> -static int __maybe_unused ti_sn_bridge_suspend(struct device *dev)
> +static int __maybe_unused ti_sn65dsi86_suspend(struct device *dev)
>  {
>  	struct ti_sn65dsi86 *pdata = dev_get_drvdata(dev);
>  	int ret;
> @@ -217,8 +217,8 @@ static int __maybe_unused ti_sn_bridge_suspend(struct device *dev)
>  	return ret;
>  }
>  
> -static const struct dev_pm_ops ti_sn_bridge_pm_ops = {
> -	SET_RUNTIME_PM_OPS(ti_sn_bridge_suspend, ti_sn_bridge_resume, NULL)
> +static const struct dev_pm_ops ti_sn65dsi86_pm_ops = {
> +	SET_RUNTIME_PM_OPS(ti_sn65dsi86_suspend, ti_sn65dsi86_resume, NULL)
>  	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
>  				pm_runtime_force_resume)
>  };
> @@ -245,7 +245,7 @@ static int status_show(struct seq_file *s, void *data)
>  
>  DEFINE_SHOW_ATTRIBUTE(status);
>  
> -static void ti_sn_debugfs_init(struct ti_sn65dsi86 *pdata)
> +static void ti_sn65dsi86_debugfs_init(struct ti_sn65dsi86 *pdata)
>  {
>  	pdata->debugfs = debugfs_create_dir(dev_name(pdata->dev), NULL);
>  
> @@ -253,7 +253,7 @@ static void ti_sn_debugfs_init(struct ti_sn65dsi86 *pdata)
>  			&status_fops);
>  }
>  
> -static void ti_sn_debugfs_remove(struct ti_sn65dsi86 *pdata)
> +static void ti_sn65dsi86_debugfs_remove(struct ti_sn65dsi86 *pdata)
>  {
>  	debugfs_remove_recursive(pdata->debugfs);
>  	pdata->debugfs = NULL;
> @@ -261,14 +261,14 @@ static void ti_sn_debugfs_remove(struct ti_sn65dsi86 *pdata)
>  
>  /* Connector funcs */
>  static struct ti_sn65dsi86 *
> -connector_to_ti_sn_bridge(struct drm_connector *connector)
> +connector_to_ti_sn65dsi86(struct drm_connector *connector)
>  {
>  	return container_of(connector, struct ti_sn65dsi86, connector);
>  }
>  
>  static int ti_sn_bridge_connector_get_modes(struct drm_connector *connector)
>  {
> -	struct ti_sn65dsi86 *pdata = connector_to_ti_sn_bridge(connector);
> +	struct ti_sn65dsi86 *pdata = connector_to_ti_sn65dsi86(connector);
>  	struct edid *edid = pdata->edid;
>  	int num, ret;
>  
> @@ -314,12 +314,12 @@ static const struct drm_connector_funcs ti_sn_bridge_connector_funcs = {
>  	.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
>  };
>  
> -static struct ti_sn65dsi86 *bridge_to_ti_sn_bridge(struct drm_bridge *bridge)
> +static struct ti_sn65dsi86 *bridge_to_ti_sn65dsi86(struct drm_bridge *bridge)
>  {
>  	return container_of(bridge, struct ti_sn65dsi86, bridge);
>  }
>  
> -static int ti_sn_bridge_parse_regulators(struct ti_sn65dsi86 *pdata)
> +static int ti_sn65dsi86_parse_regulators(struct ti_sn65dsi86 *pdata)
>  {
>  	unsigned int i;
>  	const char * const ti_sn_bridge_supply_names[] = {
> @@ -337,7 +337,7 @@ static int ti_sn_bridge_attach(struct drm_bridge *bridge,
>  			       enum drm_bridge_attach_flags flags)
>  {
>  	int ret, val;
> -	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn_bridge(bridge);
> +	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn65dsi86(bridge);
>  	struct mipi_dsi_host *host;
>  	struct mipi_dsi_device *dsi;
>  	const struct mipi_dsi_device_info info = { .type = "ti_sn_bridge",
> @@ -425,12 +425,12 @@ static int ti_sn_bridge_attach(struct drm_bridge *bridge,
>  
>  static void ti_sn_bridge_detach(struct drm_bridge *bridge)
>  {
> -	drm_dp_aux_unregister(&bridge_to_ti_sn_bridge(bridge)->aux);
> +	drm_dp_aux_unregister(&bridge_to_ti_sn65dsi86(bridge)->aux);
>  }
>  
>  static void ti_sn_bridge_disable(struct drm_bridge *bridge)
>  {
> -	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn_bridge(bridge);
> +	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn65dsi86(bridge);
>  
>  	drm_panel_disable(pdata->panel);
>  
> @@ -648,9 +648,9 @@ static void ti_sn_bridge_set_video_timings(struct ti_sn65dsi86 *pdata)
>  	if (mode->flags & DRM_MODE_FLAG_PVSYNC)
>  		vsync_polarity = CHA_VSYNC_POLARITY;
>  
> -	ti_sn_bridge_write_u16(pdata, SN_CHA_ACTIVE_LINE_LENGTH_LOW_REG,
> +	ti_sn65dsi86_write_u16(pdata, SN_CHA_ACTIVE_LINE_LENGTH_LOW_REG,
>  			       mode->hdisplay);
> -	ti_sn_bridge_write_u16(pdata, SN_CHA_VERTICAL_DISPLAY_SIZE_LOW_REG,
> +	ti_sn65dsi86_write_u16(pdata, SN_CHA_VERTICAL_DISPLAY_SIZE_LOW_REG,
>  			       mode->vdisplay);
>  	regmap_write(pdata->regmap, SN_CHA_HSYNC_PULSE_WIDTH_LOW_REG,
>  		     (mode->hsync_end - mode->hsync_start) & 0xFF);
> @@ -751,7 +751,7 @@ static int ti_sn_link_training(struct ti_sn65dsi86 *pdata, int dp_rate_idx,
>  
>  static void ti_sn_bridge_enable(struct drm_bridge *bridge)
>  {
> -	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn_bridge(bridge);
> +	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn65dsi86(bridge);
>  	bool rate_valid[ARRAY_SIZE(ti_sn_bridge_dp_rate_lut)] = { };
>  	const char *last_err_str = "No supported DP rate";
>  	int dp_rate_idx;
> @@ -822,7 +822,7 @@ static void ti_sn_bridge_enable(struct drm_bridge *bridge)
>  
>  static void ti_sn_bridge_pre_enable(struct drm_bridge *bridge)
>  {
> -	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn_bridge(bridge);
> +	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn65dsi86(bridge);
>  
>  	pm_runtime_get_sync(pdata->dev);
>  
> @@ -853,7 +853,7 @@ static void ti_sn_bridge_pre_enable(struct drm_bridge *bridge)
>  
>  static void ti_sn_bridge_post_disable(struct drm_bridge *bridge)
>  {
> -	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn_bridge(bridge);
> +	struct ti_sn65dsi86 *pdata = bridge_to_ti_sn65dsi86(bridge);
>  
>  	drm_panel_unprepare(pdata->panel);
>  
> @@ -871,7 +871,7 @@ static const struct drm_bridge_funcs ti_sn_bridge_funcs = {
>  	.post_disable = ti_sn_bridge_post_disable,
>  };
>  
> -static struct ti_sn65dsi86 *aux_to_ti_sn_bridge(struct drm_dp_aux *aux)
> +static struct ti_sn65dsi86 *aux_to_ti_sn65dsi86(struct drm_dp_aux *aux)
>  {
>  	return container_of(aux, struct ti_sn65dsi86, aux);
>  }
> @@ -879,7 +879,7 @@ static struct ti_sn65dsi86 *aux_to_ti_sn_bridge(struct drm_dp_aux *aux)
>  static ssize_t ti_sn_aux_transfer(struct drm_dp_aux *aux,
>  				  struct drm_dp_aux_msg *msg)
>  {
> -	struct ti_sn65dsi86 *pdata = aux_to_ti_sn_bridge(aux);
> +	struct ti_sn65dsi86 *pdata = aux_to_ti_sn65dsi86(aux);
>  	u32 request = msg->request & ~(DP_AUX_I2C_MOT | DP_AUX_I2C_WRITE_STATUS_UPDATE);
>  	u32 request_val = AUX_CMD_REQ(msg->request);
>  	u8 *buf = msg->buffer;
> @@ -1213,7 +1213,7 @@ static void ti_sn_bridge_parse_lanes(struct ti_sn65dsi86 *pdata,
>  	pdata->ln_polrs = ln_polrs;
>  }
>  
> -static int ti_sn_bridge_probe(struct i2c_client *client,
> +static int ti_sn65dsi86_probe(struct i2c_client *client,
>  			      const struct i2c_device_id *id)
>  {
>  	struct ti_sn65dsi86 *pdata;
> @@ -1230,7 +1230,7 @@ static int ti_sn_bridge_probe(struct i2c_client *client,
>  		return -ENOMEM;
>  
>  	pdata->regmap = devm_regmap_init_i2c(client,
> -					     &ti_sn_bridge_regmap_config);
> +					     &ti_sn65dsi86_regmap_config);
>  	if (IS_ERR(pdata->regmap)) {
>  		DRM_ERROR("regmap i2c init failed\n");
>  		return PTR_ERR(pdata->regmap);
> @@ -1257,7 +1257,7 @@ static int ti_sn_bridge_probe(struct i2c_client *client,
>  
>  	ti_sn_bridge_parse_lanes(pdata, client->dev.of_node);
>  
> -	ret = ti_sn_bridge_parse_regulators(pdata);
> +	ret = ti_sn65dsi86_parse_regulators(pdata);
>  	if (ret) {
>  		DRM_ERROR("failed to parse regulators\n");
>  		return ret;
> @@ -1291,12 +1291,12 @@ static int ti_sn_bridge_probe(struct i2c_client *client,
>  
>  	drm_bridge_add(&pdata->bridge);
>  
> -	ti_sn_debugfs_init(pdata);
> +	ti_sn65dsi86_debugfs_init(pdata);
>  
>  	return 0;
>  }
>  
> -static int ti_sn_bridge_remove(struct i2c_client *client)
> +static int ti_sn65dsi86_remove(struct i2c_client *client)
>  {
>  	struct ti_sn65dsi86 *pdata = i2c_get_clientdata(client);
>  
> @@ -1310,7 +1310,7 @@ static int ti_sn_bridge_remove(struct i2c_client *client)
>  
>  	kfree(pdata->edid);
>  
> -	ti_sn_debugfs_remove(pdata);
> +	ti_sn65dsi86_debugfs_remove(pdata);
>  
>  	drm_bridge_remove(&pdata->bridge);
>  
> @@ -1321,29 +1321,29 @@ static int ti_sn_bridge_remove(struct i2c_client *client)
>  	return 0;
>  }
>  
> -static struct i2c_device_id ti_sn_bridge_id[] = {
> +static struct i2c_device_id ti_sn65dsi86_id[] = {
>  	{ "ti,sn65dsi86", 0},
>  	{},
>  };
> -MODULE_DEVICE_TABLE(i2c, ti_sn_bridge_id);
> +MODULE_DEVICE_TABLE(i2c, ti_sn65dsi86_id);
>  
> -static const struct of_device_id ti_sn_bridge_match_table[] = {
> +static const struct of_device_id ti_sn65dsi86_match_table[] = {
>  	{.compatible = "ti,sn65dsi86"},
>  	{},
>  };
> -MODULE_DEVICE_TABLE(of, ti_sn_bridge_match_table);
> +MODULE_DEVICE_TABLE(of, ti_sn65dsi86_match_table);
>  
> -static struct i2c_driver ti_sn_bridge_driver = {
> +static struct i2c_driver ti_sn65dsi86_driver = {
>  	.driver = {
>  		.name = "ti_sn65dsi86",
> -		.of_match_table = ti_sn_bridge_match_table,
> -		.pm = &ti_sn_bridge_pm_ops,
> +		.of_match_table = ti_sn65dsi86_match_table,
> +		.pm = &ti_sn65dsi86_pm_ops,
>  	},
> -	.probe = ti_sn_bridge_probe,
> -	.remove = ti_sn_bridge_remove,
> -	.id_table = ti_sn_bridge_id,
> +	.probe = ti_sn65dsi86_probe,
> +	.remove = ti_sn65dsi86_remove,
> +	.id_table = ti_sn65dsi86_id,
>  };
> -module_i2c_driver(ti_sn_bridge_driver);
> +module_i2c_driver(ti_sn65dsi86_driver);
>  
>  MODULE_AUTHOR("Sandeep Panda <spanda@codeaurora.org>");
>  MODULE_DESCRIPTION("sn65dsi86 DSI to eDP bridge driver");
> -- 
> 2.31.1.368.gbe11c130af-goog
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-04-23 14:30 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16 22:39 [PATCH v4 00/27] drm: Fix EDID reading on ti-sn65dsi86; solve some chicken-and-egg problems Douglas Anderson
2021-04-16 22:39 ` Douglas Anderson
2021-04-16 22:39 ` [PATCH v4 01/27] drm/bridge: Fix the stop condition of drm_bridge_chain_pre_enable() Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-16 22:39 ` [PATCH v4 02/27] drm/bridge: ti-sn65dsi86: Simplify refclk handling Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-16 22:39 ` [PATCH v4 03/27] drm/bridge: ti-sn65dsi86: Remove incorrectly tagged kerneldoc comment Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-16 22:39 ` [PATCH v4 04/27] drm/bridge: ti-sn65dsi86: Reorder remove() Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-16 22:39 ` [PATCH v4 05/27] drm/bridge: ti-sn65dsi86: Move drm_panel_unprepare() to post_disable() Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-16 22:39 ` [PATCH v4 06/27] drm/bridge: ti-sn65dsi86: Get rid of the useless detect() function Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-16 22:39 ` [PATCH v4 07/27] drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-16 22:39 ` [PATCH v4 08/27] drm/bridge: ti-sn65dsi86: Rename the main driver data structure Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-23 14:28   ` Bjorn Andersson
2021-04-23 14:28     ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 09/27] drm/bridge: ti-sn65dsi86: More renames in prep for sub-devices Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-23 14:30   ` Bjorn Andersson [this message]
2021-04-23 14:30     ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 10/27] drm/bridge: ti-sn65dsi86: Clean debugfs code Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-23 14:35   ` Bjorn Andersson
2021-04-23 14:35     ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 11/27] drm/bridge: ti-sn65dsi86: Add local var for "dev" to simplify probe Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-23 14:38   ` Bjorn Andersson
2021-04-23 14:38     ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 12/27] drm/bridge: ti-sn65dsi86: Cleanup managing of drvdata Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-23 14:38   ` Bjorn Andersson
2021-04-23 14:38     ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 13/27] drm/bridge: ti-sn65dsi86: Use devm to do our runtime_disable Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-23 14:39   ` Bjorn Andersson
2021-04-23 14:39     ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 14/27] drm/bridge: ti-sn65dsi86: Move all the chip-related init to the start Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-23 14:41   ` Bjorn Andersson
2021-04-23 14:41     ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 15/27] drm/bridge: ti-sn65dsi86: Break GPIO and MIPI-to-eDP bridge into sub-drivers Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-17  2:31   ` kernel test robot
2021-04-17  2:31     ` kernel test robot
2021-04-19 15:43     ` Doug Anderson
2021-04-19 15:43       ` Doug Anderson
2021-04-23 14:49   ` Bjorn Andersson
2021-04-23 14:49     ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 16/27] drm/panel: panel-simple: Get rid of hacky HPD chicken-and-egg code Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-23 14:50   ` Bjorn Andersson
2021-04-23 14:50     ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 17/27] drm/bridge: ti-sn65dsi86: Use pm_runtime autosuspend Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-23 14:51   ` Bjorn Andersson
2021-04-23 14:51     ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 18/27] drm/bridge: ti-sn65dsi86: Code motion of refclk management functions Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-23 14:51   ` Bjorn Andersson
2021-04-23 14:51     ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 19/27] drm/bridge: ti-sn65dsi86: If refclk, DP AUX can happen w/out pre-enable Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-23 14:56   ` Bjorn Andersson
2021-04-23 14:56     ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 20/27] drm/bridge: ti-sn65dsi86: Promote the AUX channel to its own sub-dev Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-23 14:59   ` Bjorn Andersson
2021-04-23 14:59     ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 21/27] i2c: i2c-core-of: Fix corner case of finding adapter by node Douglas Anderson
2021-04-23 15:12   ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 22/27] drm/panel: panel-simple: Remove extra call: drm_connector_update_edid_property() Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-23 15:15   ` Bjorn Andersson
2021-04-23 15:15     ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 23/27] drm/panel: panel-simple: Power the panel when reading the EDID Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-23 15:16   ` Bjorn Andersson
2021-04-23 15:16     ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 24/27] drm/panel: panel-simple: Cache the EDID as long as we retain power Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-23 16:12   ` Bjorn Andersson
2021-04-23 16:12     ` Bjorn Andersson
2021-04-23 16:30     ` Doug Anderson
2021-04-23 16:30       ` Doug Anderson
2021-04-16 22:39 ` [PATCH v4 25/27] drm/bridge: ti-sn65dsi86: Don't read EDID blob over DDC Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-23 16:13   ` Bjorn Andersson
2021-04-23 16:13     ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 26/27] arm64: dts: qcom: Link the panel to the bridge's DDC bus Douglas Anderson
2021-04-23 16:16   ` Bjorn Andersson
2021-04-16 22:39 ` [PATCH v4 27/27] drm/panel: panel-simple: Prepare/unprepare are refcounted, not forced Douglas Anderson
2021-04-16 22:39   ` Douglas Anderson
2021-04-23 16:16   ` Bjorn Andersson
2021-04-23 16:16     ` Bjorn Andersson
2021-04-23 16:46   ` Doug Anderson
2021-04-23 16:46     ` Doug Anderson
2021-04-20 16:42 ` [PATCH v4 00/27] drm: Fix EDID reading on ti-sn65dsi86; solve some chicken-and-egg problems Doug Anderson
2021-04-20 16:42   ` Doug Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YILZ+6bYlvGQquz+@builder.lan \
    --to=bjorn.andersson@linaro.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@siol.net \
    --cc=jonas@kwiboo.se \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=narmstrong@baylibre.com \
    --cc=robdclark@chromium.org \
    --cc=robert.foss@linaro.org \
    --cc=sam@ravnborg.org \
    --cc=stanislav.lisovskiy@intel.com \
    --cc=steev@kali.org \
    --cc=swboyd@chromium.org \
    --cc=wsa@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.