summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2023-02-16 14:54:53 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-07-28 10:44:25 +0200
commitadb2dcd5f2d49d3ba3171160fabd4be0d4b2a86c (patch)
tree826bdfeb400c1c336cf4caf1c848f96720ec6e13 /drivers/media/i2c
parentmedia: v4l: async: Simplify async sub-device fwnode matching (diff)
downloadlinux-adb2dcd5f2d49d3ba3171160fabd4be0d4b2a86c.tar.xz
linux-adb2dcd5f2d49d3ba3171160fabd4be0d4b2a86c.zip
media: v4l: async: Rename v4l2_async_subdev as v4l2_async_connection
Rename v4l2_async_subdev as v4l2_async_connection, in order to differentiate between the sub-devices and their connections: one sub-device can have many connections but the V4L2 async framework has so far allowed just a single one. Connections in this context will later translate into either MC ancillary or data links. This patch prepares changing that relation by changing existing users of v4l2_async_subdev to switch to v4l2_async_connection. Async sub-devices themselves will not be needed anymore Additionally, __v4l2_async_nf_add_subdev() has been renamed __v4l2_async_nf_add_connection(). Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> # imx6qp Tested-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> # rcar + adv746x Tested-by: Aishwarya Kothari <aishwarya.kothari@toradex.com> # Apalis i.MX6Q with TC358743 Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # Renesas RZ/G2L SMARC Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/ds90ub913.c6
-rw-r--r--drivers/media/i2c/ds90ub953.c6
-rw-r--r--drivers/media/i2c/ds90ub960.c8
-rw-r--r--drivers/media/i2c/max9286.c9
-rw-r--r--drivers/media/i2c/st-mipid02.c8
-rw-r--r--drivers/media/i2c/tc358746.c6
6 files changed, 22 insertions, 21 deletions
diff --git a/drivers/media/i2c/ds90ub913.c b/drivers/media/i2c/ds90ub913.c
index 55be28463ca2..349c34724eee 100644
--- a/drivers/media/i2c/ds90ub913.c
+++ b/drivers/media/i2c/ds90ub913.c
@@ -518,7 +518,7 @@ static const struct media_entity_operations ub913_entity_ops = {
static int ub913_notify_bound(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *source_subdev,
- struct v4l2_async_subdev *asd)
+ struct v4l2_async_connection *asd)
{
struct ub913_data *priv = sd_to_ub913(notifier->sd);
struct device *dev = &priv->client->dev;
@@ -557,7 +557,7 @@ static const struct v4l2_async_notifier_operations ub913_notify_ops = {
static int ub913_v4l2_notifier_register(struct ub913_data *priv)
{
struct device *dev = &priv->client->dev;
- struct v4l2_async_subdev *asd;
+ struct v4l2_async_connection *asd;
struct fwnode_handle *ep_fwnode;
int ret;
@@ -571,7 +571,7 @@ static int ub913_v4l2_notifier_register(struct ub913_data *priv)
v4l2_async_nf_init(&priv->notifier);
asd = v4l2_async_nf_add_fwnode_remote(&priv->notifier, ep_fwnode,
- struct v4l2_async_subdev);
+ struct v4l2_async_connection);
fwnode_handle_put(ep_fwnode);
diff --git a/drivers/media/i2c/ds90ub953.c b/drivers/media/i2c/ds90ub953.c
index 591b52bf71c2..440af7bdd73a 100644
--- a/drivers/media/i2c/ds90ub953.c
+++ b/drivers/media/i2c/ds90ub953.c
@@ -723,7 +723,7 @@ static const struct media_entity_operations ub953_entity_ops = {
static int ub953_notify_bound(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *source_subdev,
- struct v4l2_async_subdev *asd)
+ struct v4l2_async_connection *asd)
{
struct ub953_data *priv = sd_to_ub953(notifier->sd);
struct device *dev = &priv->client->dev;
@@ -762,7 +762,7 @@ static const struct v4l2_async_notifier_operations ub953_notify_ops = {
static int ub953_v4l2_notifier_register(struct ub953_data *priv)
{
struct device *dev = &priv->client->dev;
- struct v4l2_async_subdev *asd;
+ struct v4l2_async_connection *asd;
struct fwnode_handle *ep_fwnode;
int ret;
@@ -776,7 +776,7 @@ static int ub953_v4l2_notifier_register(struct ub953_data *priv)
v4l2_async_nf_init(&priv->notifier);
asd = v4l2_async_nf_add_fwnode_remote(&priv->notifier, ep_fwnode,
- struct v4l2_async_subdev);
+ struct v4l2_async_connection);
fwnode_handle_put(ep_fwnode);
diff --git a/drivers/media/i2c/ds90ub960.c b/drivers/media/i2c/ds90ub960.c
index b9a1ef63629b..a2b1056ba99b 100644
--- a/drivers/media/i2c/ds90ub960.c
+++ b/drivers/media/i2c/ds90ub960.c
@@ -471,11 +471,11 @@ struct ub960_rxport {
};
struct ub960_asd {
- struct v4l2_async_subdev base;
+ struct v4l2_async_connection base;
struct ub960_rxport *rxport;
};
-static inline struct ub960_asd *to_ub960_asd(struct v4l2_async_subdev *asd)
+static inline struct ub960_asd *to_ub960_asd(struct v4l2_async_connection *asd)
{
return container_of(asd, struct ub960_asd, base);
}
@@ -3538,7 +3538,7 @@ err_free_rxports:
static int ub960_notify_bound(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *subdev,
- struct v4l2_async_subdev *asd)
+ struct v4l2_async_connection *asd)
{
struct ub960_data *priv = sd_to_ub960(notifier->sd);
struct ub960_rxport *rxport = to_ub960_asd(asd)->rxport;
@@ -3581,7 +3581,7 @@ static int ub960_notify_bound(struct v4l2_async_notifier *notifier,
static void ub960_notify_unbind(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *subdev,
- struct v4l2_async_subdev *asd)
+ struct v4l2_async_connection *asd)
{
struct ub960_rxport *rxport = to_ub960_asd(asd)->rxport;
diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c
index a1f86dbc9e1a..78c77cd50823 100644
--- a/drivers/media/i2c/max9286.c
+++ b/drivers/media/i2c/max9286.c
@@ -161,11 +161,12 @@ struct max9286_source {
};
struct max9286_asd {
- struct v4l2_async_subdev base;
+ struct v4l2_async_connection base;
struct max9286_source *source;
};
-static inline struct max9286_asd *to_max9286_asd(struct v4l2_async_subdev *asd)
+static inline struct max9286_asd *
+to_max9286_asd(struct v4l2_async_connection *asd)
{
return container_of(asd, struct max9286_asd, base);
}
@@ -659,7 +660,7 @@ static int max9286_set_pixelrate(struct max9286_priv *priv)
static int max9286_notify_bound(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *subdev,
- struct v4l2_async_subdev *asd)
+ struct v4l2_async_connection *asd)
{
struct max9286_priv *priv = sd_to_max9286(notifier->sd);
struct max9286_source *source = to_max9286_asd(asd)->source;
@@ -721,7 +722,7 @@ static int max9286_notify_bound(struct v4l2_async_notifier *notifier,
static void max9286_notify_unbind(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *subdev,
- struct v4l2_async_subdev *asd)
+ struct v4l2_async_connection *asd)
{
struct max9286_priv *priv = sd_to_max9286(notifier->sd);
struct max9286_source *source = to_max9286_asd(asd)->source;
diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c
index 906553a28676..5cd87b1d5759 100644
--- a/drivers/media/i2c/st-mipid02.c
+++ b/drivers/media/i2c/st-mipid02.c
@@ -829,7 +829,7 @@ static const struct media_entity_operations mipid02_subdev_entity_ops = {
static int mipid02_async_bound(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *s_subdev,
- struct v4l2_async_subdev *asd)
+ struct v4l2_async_connection *asd)
{
struct mipid02_dev *bridge = to_mipid02_dev(notifier->sd);
struct i2c_client *client = bridge->i2c_client;
@@ -863,7 +863,7 @@ static int mipid02_async_bound(struct v4l2_async_notifier *notifier,
static void mipid02_async_unbind(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *s_subdev,
- struct v4l2_async_subdev *asd)
+ struct v4l2_async_connection *asd)
{
struct mipid02_dev *bridge = to_mipid02_dev(notifier->sd);
@@ -879,7 +879,7 @@ static int mipid02_parse_rx_ep(struct mipid02_dev *bridge)
{
struct v4l2_fwnode_endpoint ep = { .bus_type = V4L2_MBUS_CSI2_DPHY };
struct i2c_client *client = bridge->i2c_client;
- struct v4l2_async_subdev *asd;
+ struct v4l2_async_connection *asd;
struct device_node *ep_node;
int ret;
@@ -914,7 +914,7 @@ static int mipid02_parse_rx_ep(struct mipid02_dev *bridge)
v4l2_async_nf_init(&bridge->notifier);
asd = v4l2_async_nf_add_fwnode_remote(&bridge->notifier,
of_fwnode_handle(ep_node),
- struct v4l2_async_subdev);
+ struct v4l2_async_connection);
of_node_put(ep_node);
if (IS_ERR(asd)) {
diff --git a/drivers/media/i2c/tc358746.c b/drivers/media/i2c/tc358746.c
index f37373c257c6..203eb337efce 100644
--- a/drivers/media/i2c/tc358746.c
+++ b/drivers/media/i2c/tc358746.c
@@ -1426,7 +1426,7 @@ static int tc358746_init_controls(struct tc358746 *tc358746)
static int tc358746_notify_bound(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *sd,
- struct v4l2_async_subdev *asd)
+ struct v4l2_async_connection *asd)
{
struct tc358746 *tc358746 =
container_of(notifier, struct tc358746, notifier);
@@ -1445,7 +1445,7 @@ static int tc358746_async_register(struct tc358746 *tc358746)
struct v4l2_fwnode_endpoint vep = {
.bus_type = V4L2_MBUS_PARALLEL,
};
- struct v4l2_async_subdev *asd;
+ struct v4l2_async_connection *asd;
struct fwnode_handle *ep;
int err;
@@ -1462,7 +1462,7 @@ static int tc358746_async_register(struct tc358746 *tc358746)
v4l2_async_nf_init(&tc358746->notifier);
asd = v4l2_async_nf_add_fwnode_remote(&tc358746->notifier, ep,
- struct v4l2_async_subdev);
+ struct v4l2_async_connection);
fwnode_handle_put(ep);
if (IS_ERR(asd)) {