Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sakari Ailus and committed by
Mauro Carvalho Chehab
adb2dcd5 1029939b

+368 -361
+29 -22
Documentation/driver-api/media/v4l2-subdev.rst
··· 206 206 207 207 Before registering the notifier, bridge drivers must do two things: first, the 208 208 notifier must be initialized using the :c:func:`v4l2_async_nf_init`. Second, 209 - bridge drivers can then begin to form a list of subdevice descriptors that the 210 - bridge device needs for its operation. :c:func:`v4l2_async_nf_add_fwnode`, 209 + bridge drivers can then begin to form a list of async connection descriptors 210 + that the bridge device needs for its 211 + operation. :c:func:`v4l2_async_nf_add_fwnode`, 211 212 :c:func:`v4l2_async_nf_add_fwnode_remote` and :c:func:`v4l2_async_nf_add_i2c` 212 - are available for that purpose. 213 + 214 + Async connection descriptors describe connections to external sub-devices the 215 + drivers for which are not yet probed. Based on an async connection, a media data 216 + or ancillary link may be created when the related sub-device becomes 217 + available. There may be one or more async connections to a given sub-device but 218 + this is not known at the time of adding the connections to the notifier. Async 219 + connections are bound as matching async sub-devices are found, one by one. 213 220 214 221 Asynchronous sub-device registration helper for camera sensor drivers 215 222 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 216 223 217 224 :c:func:`v4l2_async_register_subdev_sensor` is a helper function for sensor 218 - drivers registering their own async sub-device, but it also registers a notifier 219 - and further registers async sub-devices for lens and flash devices found in 225 + drivers registering their own async connection, but it also registers a notifier 226 + and further registers async connections for lens and flash devices found in 220 227 firmware. The notifier for the sub-device is unregistered and cleaned up with 221 228 the async sub-device, using :c:func:`v4l2_async_unregister_subdev`. 222 229 223 230 Asynchronous sub-device notifier example 224 231 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 225 232 226 - These functions allocate an async sub-device descriptor which is of type struct 227 - :c:type:`v4l2_async_subdev` embedded in a driver-specific struct. The &struct 228 - :c:type:`v4l2_async_subdev` shall be the first member of this struct: 233 + These functions allocate an async connection descriptor which is of type struct 234 + :c:type:`v4l2_async_connection` embedded in a driver-specific struct. The &struct 235 + :c:type:`v4l2_async_connection` shall be the first member of this struct: 229 236 230 237 .. code-block:: c 231 238 232 - struct my_async_subdev { 233 - struct v4l2_async_subdev asd; 239 + struct my_async_connection { 240 + struct v4l2_async_connection asc; 234 241 ... 235 242 }; 236 243 237 - struct my_async_subdev *my_asd; 244 + struct my_async_connection *my_asc; 238 245 struct fwnode_handle *ep; 239 246 240 247 ... 241 248 242 - my_asd = v4l2_async_nf_add_fwnode_remote(&notifier, ep, 243 - struct my_async_subdev); 249 + my_asc = v4l2_async_nf_add_fwnode_remote(&notifier, ep, 250 + struct my_async_connection); 244 251 fwnode_handle_put(ep); 245 252 246 - if (IS_ERR(my_asd)) 247 - return PTR_ERR(my_asd); 253 + if (IS_ERR(my_asc)) 254 + return PTR_ERR(my_asc); 248 255 249 256 Asynchronous sub-device notifier callbacks 250 257 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 251 258 252 - The V4L2 core will then use these descriptors to match asynchronously 253 - registered subdevices to them. If a match is detected the ``.bound()`` 254 - notifier callback is called. After all subdevices have been located the 255 - .complete() callback is called. When a subdevice is removed from the 256 - system the .unbind() method is called. All three callbacks are optional. 259 + The V4L2 core will then use these connection descriptors to match asynchronously 260 + registered subdevices to them. If a match is detected the ``.bound()`` notifier 261 + callback is called. After all connections have been bound the .complete() 262 + callback is called. When a connection is removed from the system the 263 + ``.unbind()`` method is called. All three callbacks are optional. 257 264 258 265 Drivers can store any type of custom data in their driver-specific 259 - :c:type:`v4l2_async_subdev` wrapper. If any of that data requires special 266 + :c:type:`v4l2_async_connection` wrapper. If any of that data requires special 260 267 handling when the structure is freed, drivers must implement the ``.destroy()`` 261 268 notifier callback. The framework will call it right before freeing the 262 - :c:type:`v4l2_async_subdev`. 269 + :c:type:`v4l2_async_connection`. 263 270 264 271 Calling subdev operations 265 272 ~~~~~~~~~~~~~~~~~~~~~~~~~
+3 -3
drivers/media/i2c/ds90ub913.c
··· 518 518 519 519 static int ub913_notify_bound(struct v4l2_async_notifier *notifier, 520 520 struct v4l2_subdev *source_subdev, 521 - struct v4l2_async_subdev *asd) 521 + struct v4l2_async_connection *asd) 522 522 { 523 523 struct ub913_data *priv = sd_to_ub913(notifier->sd); 524 524 struct device *dev = &priv->client->dev; ··· 557 557 static int ub913_v4l2_notifier_register(struct ub913_data *priv) 558 558 { 559 559 struct device *dev = &priv->client->dev; 560 - struct v4l2_async_subdev *asd; 560 + struct v4l2_async_connection *asd; 561 561 struct fwnode_handle *ep_fwnode; 562 562 int ret; 563 563 ··· 571 571 v4l2_async_nf_init(&priv->notifier); 572 572 573 573 asd = v4l2_async_nf_add_fwnode_remote(&priv->notifier, ep_fwnode, 574 - struct v4l2_async_subdev); 574 + struct v4l2_async_connection); 575 575 576 576 fwnode_handle_put(ep_fwnode); 577 577
+3 -3
drivers/media/i2c/ds90ub953.c
··· 723 723 724 724 static int ub953_notify_bound(struct v4l2_async_notifier *notifier, 725 725 struct v4l2_subdev *source_subdev, 726 - struct v4l2_async_subdev *asd) 726 + struct v4l2_async_connection *asd) 727 727 { 728 728 struct ub953_data *priv = sd_to_ub953(notifier->sd); 729 729 struct device *dev = &priv->client->dev; ··· 762 762 static int ub953_v4l2_notifier_register(struct ub953_data *priv) 763 763 { 764 764 struct device *dev = &priv->client->dev; 765 - struct v4l2_async_subdev *asd; 765 + struct v4l2_async_connection *asd; 766 766 struct fwnode_handle *ep_fwnode; 767 767 int ret; 768 768 ··· 776 776 v4l2_async_nf_init(&priv->notifier); 777 777 778 778 asd = v4l2_async_nf_add_fwnode_remote(&priv->notifier, ep_fwnode, 779 - struct v4l2_async_subdev); 779 + struct v4l2_async_connection); 780 780 781 781 fwnode_handle_put(ep_fwnode); 782 782
+4 -4
drivers/media/i2c/ds90ub960.c
··· 471 471 }; 472 472 473 473 struct ub960_asd { 474 - struct v4l2_async_subdev base; 474 + struct v4l2_async_connection base; 475 475 struct ub960_rxport *rxport; 476 476 }; 477 477 478 - static inline struct ub960_asd *to_ub960_asd(struct v4l2_async_subdev *asd) 478 + static inline struct ub960_asd *to_ub960_asd(struct v4l2_async_connection *asd) 479 479 { 480 480 return container_of(asd, struct ub960_asd, base); 481 481 } ··· 3538 3538 3539 3539 static int ub960_notify_bound(struct v4l2_async_notifier *notifier, 3540 3540 struct v4l2_subdev *subdev, 3541 - struct v4l2_async_subdev *asd) 3541 + struct v4l2_async_connection *asd) 3542 3542 { 3543 3543 struct ub960_data *priv = sd_to_ub960(notifier->sd); 3544 3544 struct ub960_rxport *rxport = to_ub960_asd(asd)->rxport; ··· 3581 3581 3582 3582 static void ub960_notify_unbind(struct v4l2_async_notifier *notifier, 3583 3583 struct v4l2_subdev *subdev, 3584 - struct v4l2_async_subdev *asd) 3584 + struct v4l2_async_connection *asd) 3585 3585 { 3586 3586 struct ub960_rxport *rxport = to_ub960_asd(asd)->rxport; 3587 3587
+5 -4
drivers/media/i2c/max9286.c
··· 161 161 }; 162 162 163 163 struct max9286_asd { 164 - struct v4l2_async_subdev base; 164 + struct v4l2_async_connection base; 165 165 struct max9286_source *source; 166 166 }; 167 167 168 - static inline struct max9286_asd *to_max9286_asd(struct v4l2_async_subdev *asd) 168 + static inline struct max9286_asd * 169 + to_max9286_asd(struct v4l2_async_connection *asd) 169 170 { 170 171 return container_of(asd, struct max9286_asd, base); 171 172 } ··· 660 659 661 660 static int max9286_notify_bound(struct v4l2_async_notifier *notifier, 662 661 struct v4l2_subdev *subdev, 663 - struct v4l2_async_subdev *asd) 662 + struct v4l2_async_connection *asd) 664 663 { 665 664 struct max9286_priv *priv = sd_to_max9286(notifier->sd); 666 665 struct max9286_source *source = to_max9286_asd(asd)->source; ··· 722 721 723 722 static void max9286_notify_unbind(struct v4l2_async_notifier *notifier, 724 723 struct v4l2_subdev *subdev, 725 - struct v4l2_async_subdev *asd) 724 + struct v4l2_async_connection *asd) 726 725 { 727 726 struct max9286_priv *priv = sd_to_max9286(notifier->sd); 728 727 struct max9286_source *source = to_max9286_asd(asd)->source;
+4 -4
drivers/media/i2c/st-mipid02.c
··· 829 829 830 830 static int mipid02_async_bound(struct v4l2_async_notifier *notifier, 831 831 struct v4l2_subdev *s_subdev, 832 - struct v4l2_async_subdev *asd) 832 + struct v4l2_async_connection *asd) 833 833 { 834 834 struct mipid02_dev *bridge = to_mipid02_dev(notifier->sd); 835 835 struct i2c_client *client = bridge->i2c_client; ··· 863 863 864 864 static void mipid02_async_unbind(struct v4l2_async_notifier *notifier, 865 865 struct v4l2_subdev *s_subdev, 866 - struct v4l2_async_subdev *asd) 866 + struct v4l2_async_connection *asd) 867 867 { 868 868 struct mipid02_dev *bridge = to_mipid02_dev(notifier->sd); 869 869 ··· 879 879 { 880 880 struct v4l2_fwnode_endpoint ep = { .bus_type = V4L2_MBUS_CSI2_DPHY }; 881 881 struct i2c_client *client = bridge->i2c_client; 882 - struct v4l2_async_subdev *asd; 882 + struct v4l2_async_connection *asd; 883 883 struct device_node *ep_node; 884 884 int ret; 885 885 ··· 914 914 v4l2_async_nf_init(&bridge->notifier); 915 915 asd = v4l2_async_nf_add_fwnode_remote(&bridge->notifier, 916 916 of_fwnode_handle(ep_node), 917 - struct v4l2_async_subdev); 917 + struct v4l2_async_connection); 918 918 of_node_put(ep_node); 919 919 920 920 if (IS_ERR(asd)) {
+3 -3
drivers/media/i2c/tc358746.c
··· 1426 1426 1427 1427 static int tc358746_notify_bound(struct v4l2_async_notifier *notifier, 1428 1428 struct v4l2_subdev *sd, 1429 - struct v4l2_async_subdev *asd) 1429 + struct v4l2_async_connection *asd) 1430 1430 { 1431 1431 struct tc358746 *tc358746 = 1432 1432 container_of(notifier, struct tc358746, notifier); ··· 1445 1445 struct v4l2_fwnode_endpoint vep = { 1446 1446 .bus_type = V4L2_MBUS_PARALLEL, 1447 1447 }; 1448 - struct v4l2_async_subdev *asd; 1448 + struct v4l2_async_connection *asd; 1449 1449 struct fwnode_handle *ep; 1450 1450 int err; 1451 1451 ··· 1462 1462 1463 1463 v4l2_async_nf_init(&tc358746->notifier); 1464 1464 asd = v4l2_async_nf_add_fwnode_remote(&tc358746->notifier, ep, 1465 - struct v4l2_async_subdev); 1465 + struct v4l2_async_connection); 1466 1466 fwnode_handle_put(ep); 1467 1467 1468 1468 if (IS_ERR(asd)) {
+5 -5
drivers/media/pci/intel/ipu3/ipu3-cio2.c
··· 1372 1372 /******* V4L2 sub-device asynchronous registration callbacks***********/ 1373 1373 1374 1374 struct sensor_async_subdev { 1375 - struct v4l2_async_subdev asd; 1375 + struct v4l2_async_connection asd; 1376 1376 struct csi2_bus_info csi2; 1377 1377 }; 1378 1378 ··· 1382 1382 /* The .bound() notifier callback when a match is found */ 1383 1383 static int cio2_notifier_bound(struct v4l2_async_notifier *notifier, 1384 1384 struct v4l2_subdev *sd, 1385 - struct v4l2_async_subdev *asd) 1385 + struct v4l2_async_connection *asd) 1386 1386 { 1387 1387 struct cio2_device *cio2 = to_cio2_device(notifier); 1388 1388 struct sensor_async_subdev *s_asd = to_sensor_asd(asd); ··· 1403 1403 /* The .unbind callback */ 1404 1404 static void cio2_notifier_unbind(struct v4l2_async_notifier *notifier, 1405 1405 struct v4l2_subdev *sd, 1406 - struct v4l2_async_subdev *asd) 1406 + struct v4l2_async_connection *asd) 1407 1407 { 1408 1408 struct cio2_device *cio2 = to_cio2_device(notifier); 1409 1409 struct sensor_async_subdev *s_asd = to_sensor_asd(asd); ··· 1417 1417 struct cio2_device *cio2 = to_cio2_device(notifier); 1418 1418 struct device *dev = &cio2->pci_dev->dev; 1419 1419 struct sensor_async_subdev *s_asd; 1420 - struct v4l2_async_subdev *asd; 1420 + struct v4l2_async_connection *asd; 1421 1421 struct cio2_queue *q; 1422 1422 int ret; 1423 1423 1424 - list_for_each_entry(asd, &cio2->notifier.asd_list, asd_entry) { 1424 + list_for_each_entry(asd, &cio2->notifier.asc_list, asc_entry) { 1425 1425 s_asd = to_sensor_asd(asd); 1426 1426 q = &cio2->queue[s_asd->csi2.port]; 1427 1427
+4 -4
drivers/media/platform/atmel/atmel-isi.c
··· 1120 1120 1121 1121 static void isi_graph_notify_unbind(struct v4l2_async_notifier *notifier, 1122 1122 struct v4l2_subdev *sd, 1123 - struct v4l2_async_subdev *asd) 1123 + struct v4l2_async_connection *asd) 1124 1124 { 1125 1125 struct atmel_isi *isi = notifier_to_isi(notifier); 1126 1126 ··· 1132 1132 1133 1133 static int isi_graph_notify_bound(struct v4l2_async_notifier *notifier, 1134 1134 struct v4l2_subdev *subdev, 1135 - struct v4l2_async_subdev *asd) 1135 + struct v4l2_async_connection *asd) 1136 1136 { 1137 1137 struct atmel_isi *isi = notifier_to_isi(notifier); 1138 1138 ··· 1151 1151 1152 1152 static int isi_graph_init(struct atmel_isi *isi) 1153 1153 { 1154 - struct v4l2_async_subdev *asd; 1154 + struct v4l2_async_connection *asd; 1155 1155 struct device_node *ep; 1156 1156 int ret; 1157 1157 ··· 1163 1163 1164 1164 asd = v4l2_async_nf_add_fwnode_remote(&isi->notifier, 1165 1165 of_fwnode_handle(ep), 1166 - struct v4l2_async_subdev); 1166 + struct v4l2_async_connection); 1167 1167 of_node_put(ep); 1168 1168 1169 1169 if (IS_ERR(asd))
+3 -3
drivers/media/platform/cadence/cdns-csi2rx.c
··· 313 313 314 314 static int csi2rx_async_bound(struct v4l2_async_notifier *notifier, 315 315 struct v4l2_subdev *s_subdev, 316 - struct v4l2_async_subdev *asd) 316 + struct v4l2_async_connection *asd) 317 317 { 318 318 struct v4l2_subdev *subdev = notifier->sd; 319 319 struct csi2rx_priv *csi2rx = v4l2_subdev_to_csi2rx(subdev); ··· 440 440 static int csi2rx_parse_dt(struct csi2rx_priv *csi2rx) 441 441 { 442 442 struct v4l2_fwnode_endpoint v4l2_ep = { .bus_type = 0 }; 443 - struct v4l2_async_subdev *asd; 443 + struct v4l2_async_connection *asd; 444 444 struct fwnode_handle *fwh; 445 445 struct device_node *ep; 446 446 int ret; ··· 477 477 v4l2_async_nf_init(&csi2rx->notifier); 478 478 479 479 asd = v4l2_async_nf_add_fwnode_remote(&csi2rx->notifier, fwh, 480 - struct v4l2_async_subdev); 480 + struct v4l2_async_connection); 481 481 of_node_put(ep); 482 482 if (IS_ERR(asd)) 483 483 return PTR_ERR(asd);
+6 -6
drivers/media/platform/intel/pxa_camera.c
··· 2044 2044 2045 2045 static int pxa_camera_sensor_bound(struct v4l2_async_notifier *notifier, 2046 2046 struct v4l2_subdev *subdev, 2047 - struct v4l2_async_subdev *asd) 2047 + struct v4l2_async_connection *asd) 2048 2048 { 2049 2049 int err; 2050 2050 struct v4l2_device *v4l2_dev = notifier->v4l2_dev; ··· 2123 2123 2124 2124 static void pxa_camera_sensor_unbind(struct v4l2_async_notifier *notifier, 2125 2125 struct v4l2_subdev *subdev, 2126 - struct v4l2_async_subdev *asd) 2126 + struct v4l2_async_connection *asd) 2127 2127 { 2128 2128 struct pxa_camera_dev *pcdev = v4l2_dev_to_pcdev(notifier->v4l2_dev); 2129 2129 ··· 2197 2197 struct pxa_camera_dev *pcdev) 2198 2198 { 2199 2199 u32 mclk_rate; 2200 - struct v4l2_async_subdev *asd; 2200 + struct v4l2_async_connection *asd; 2201 2201 struct device_node *np = dev->of_node; 2202 2202 struct v4l2_fwnode_endpoint ep = { .bus_type = 0 }; 2203 2203 int err = of_property_read_u32(np, "clock-frequency", ··· 2252 2252 2253 2253 asd = v4l2_async_nf_add_fwnode_remote(&pcdev->notifier, 2254 2254 of_fwnode_handle(np), 2255 - struct v4l2_async_subdev); 2255 + struct v4l2_async_connection); 2256 2256 if (IS_ERR(asd)) 2257 2257 err = PTR_ERR(asd); 2258 2258 out: ··· 2299 2299 pcdev->res = res; 2300 2300 pcdev->pdata = pdev->dev.platform_data; 2301 2301 if (pcdev->pdata) { 2302 - struct v4l2_async_subdev *asd; 2302 + struct v4l2_async_connection *asd; 2303 2303 2304 2304 pcdev->platform_flags = pcdev->pdata->flags; 2305 2305 pcdev->mclk = pcdev->pdata->mclk_10khz * 10000; 2306 2306 asd = v4l2_async_nf_add_i2c(&pcdev->notifier, 2307 2307 pcdev->pdata->sensor_i2c_adapter_id, 2308 2308 pcdev->pdata->sensor_i2c_address, 2309 - struct v4l2_async_subdev); 2309 + struct v4l2_async_connection); 2310 2310 if (IS_ERR(asd)) 2311 2311 err = PTR_ERR(asd); 2312 2312 } else if (pdev->dev.of_node) {
+3 -2
drivers/media/platform/marvell/cafe-driver.c
··· 478 478 int ret; 479 479 struct cafe_camera *cam; 480 480 struct mcam_camera *mcam; 481 - struct v4l2_async_subdev *asd; 481 + struct v4l2_async_connection *asd; 482 482 struct i2c_client *i2c_dev; 483 483 484 484 /* ··· 540 540 541 541 asd = v4l2_async_nf_add_i2c(&mcam->notifier, 542 542 i2c_adapter_id(cam->i2c_adapter), 543 - ov7670_info.addr, struct v4l2_async_subdev); 543 + ov7670_info.addr, 544 + struct v4l2_async_connection); 544 545 if (IS_ERR(asd)) { 545 546 ret = PTR_ERR(asd); 546 547 goto out_smbus_shutdown;
+2 -2
drivers/media/platform/marvell/mcam-core.c
··· 1756 1756 */ 1757 1757 1758 1758 static int mccic_notify_bound(struct v4l2_async_notifier *notifier, 1759 - struct v4l2_subdev *subdev, struct v4l2_async_subdev *asd) 1759 + struct v4l2_subdev *subdev, struct v4l2_async_connection *asd) 1760 1760 { 1761 1761 struct mcam_camera *cam = notifier_to_mcam(notifier); 1762 1762 int ret; ··· 1801 1801 } 1802 1802 1803 1803 static void mccic_notify_unbind(struct v4l2_async_notifier *notifier, 1804 - struct v4l2_subdev *subdev, struct v4l2_async_subdev *asd) 1804 + struct v4l2_subdev *subdev, struct v4l2_async_connection *asd) 1805 1805 { 1806 1806 struct mcam_camera *cam = notifier_to_mcam(notifier); 1807 1807
+2 -2
drivers/media/platform/marvell/mmp-driver.c
··· 180 180 struct resource *res; 181 181 struct fwnode_handle *ep; 182 182 struct mmp_camera_platform_data *pdata; 183 - struct v4l2_async_subdev *asd; 183 + struct v4l2_async_connection *asd; 184 184 int ret; 185 185 186 186 cam = devm_kzalloc(&pdev->dev, sizeof(*cam), GFP_KERNEL); ··· 241 241 v4l2_async_nf_init(&mcam->notifier); 242 242 243 243 asd = v4l2_async_nf_add_fwnode_remote(&mcam->notifier, ep, 244 - struct v4l2_async_subdev); 244 + struct v4l2_async_connection); 245 245 fwnode_handle_put(ep); 246 246 if (IS_ERR(asd)) { 247 247 ret = PTR_ERR(asd);
+3 -3
drivers/media/platform/microchip/microchip-csi2dc.c
··· 476 476 477 477 static int csi2dc_async_bound(struct v4l2_async_notifier *notifier, 478 478 struct v4l2_subdev *subdev, 479 - struct v4l2_async_subdev *asd) 479 + struct v4l2_async_connection *asd) 480 480 { 481 481 struct csi2dc_device *csi2dc = container_of(notifier, 482 482 struct csi2dc_device, notifier); ··· 520 520 static int csi2dc_prepare_notifier(struct csi2dc_device *csi2dc, 521 521 struct fwnode_handle *input_fwnode) 522 522 { 523 - struct v4l2_async_subdev *asd; 523 + struct v4l2_async_connection *asd; 524 524 int ret = 0; 525 525 526 526 v4l2_async_nf_init(&csi2dc->notifier); 527 527 528 528 asd = v4l2_async_nf_add_fwnode_remote(&csi2dc->notifier, 529 529 input_fwnode, 530 - struct v4l2_async_subdev); 530 + struct v4l2_async_connection); 531 531 532 532 fwnode_handle_put(input_fwnode); 533 533
+2 -2
drivers/media/platform/microchip/microchip-isc-base.c
··· 1712 1712 1713 1713 static int isc_async_bound(struct v4l2_async_notifier *notifier, 1714 1714 struct v4l2_subdev *subdev, 1715 - struct v4l2_async_subdev *asd) 1715 + struct v4l2_async_connection *asd) 1716 1716 { 1717 1717 struct isc_device *isc = container_of(notifier->v4l2_dev, 1718 1718 struct isc_device, v4l2_dev); ··· 1741 1741 1742 1742 static void isc_async_unbind(struct v4l2_async_notifier *notifier, 1743 1743 struct v4l2_subdev *subdev, 1744 - struct v4l2_async_subdev *asd) 1744 + struct v4l2_async_connection *asd) 1745 1745 { 1746 1746 struct isc_device *isc = container_of(notifier->v4l2_dev, 1747 1747 struct isc_device, v4l2_dev);
+1 -1
drivers/media/platform/microchip/microchip-isc.h
··· 44 44 45 45 struct isc_subdev_entity { 46 46 struct v4l2_subdev *sd; 47 - struct v4l2_async_subdev *asd; 47 + struct v4l2_async_connection *asd; 48 48 struct device_node *epn; 49 49 struct v4l2_async_notifier notifier; 50 50
+2 -2
drivers/media/platform/microchip/microchip-sama5d2-isc.c
··· 523 523 } 524 524 525 525 list_for_each_entry(subdev_entity, &isc->subdev_entities, list) { 526 - struct v4l2_async_subdev *asd; 526 + struct v4l2_async_connection *asd; 527 527 struct fwnode_handle *fwnode = 528 528 of_fwnode_handle(subdev_entity->epn); 529 529 ··· 531 531 532 532 asd = v4l2_async_nf_add_fwnode_remote(&subdev_entity->notifier, 533 533 fwnode, 534 - struct v4l2_async_subdev); 534 + struct v4l2_async_connection); 535 535 536 536 of_node_put(subdev_entity->epn); 537 537 subdev_entity->epn = NULL;
+2 -2
drivers/media/platform/microchip/microchip-sama7g5-isc.c
··· 513 513 } 514 514 515 515 list_for_each_entry(subdev_entity, &isc->subdev_entities, list) { 516 - struct v4l2_async_subdev *asd; 516 + struct v4l2_async_connection *asd; 517 517 struct fwnode_handle *fwnode = 518 518 of_fwnode_handle(subdev_entity->epn); 519 519 ··· 521 521 522 522 asd = v4l2_async_nf_add_fwnode_remote(&subdev_entity->notifier, 523 523 fwnode, 524 - struct v4l2_async_subdev); 524 + struct v4l2_async_connection); 525 525 526 526 of_node_put(subdev_entity->epn); 527 527 subdev_entity->epn = NULL;
+3 -3
drivers/media/platform/nxp/imx-mipi-csis.c
··· 1229 1229 1230 1230 static int mipi_csis_notify_bound(struct v4l2_async_notifier *notifier, 1231 1231 struct v4l2_subdev *sd, 1232 - struct v4l2_async_subdev *asd) 1232 + struct v4l2_async_connection *asd) 1233 1233 { 1234 1234 struct mipi_csis_device *csis = mipi_notifier_to_csis_state(notifier); 1235 1235 struct media_pad *sink = &csis->sd.entity.pads[CSIS_PAD_SINK]; ··· 1246 1246 struct v4l2_fwnode_endpoint vep = { 1247 1247 .bus_type = V4L2_MBUS_CSI2_DPHY, 1248 1248 }; 1249 - struct v4l2_async_subdev *asd; 1249 + struct v4l2_async_connection *asd; 1250 1250 struct fwnode_handle *ep; 1251 1251 unsigned int i; 1252 1252 int ret; ··· 1277 1277 dev_dbg(csis->dev, "flags: 0x%08x\n", csis->bus.flags); 1278 1278 1279 1279 asd = v4l2_async_nf_add_fwnode_remote(&csis->notifier, ep, 1280 - struct v4l2_async_subdev); 1280 + struct v4l2_async_connection); 1281 1281 if (IS_ERR(asd)) { 1282 1282 ret = PTR_ERR(asd); 1283 1283 goto err_parse;
+3 -3
drivers/media/platform/nxp/imx7-media-csi.c
··· 2032 2032 2033 2033 static int imx7_csi_notify_bound(struct v4l2_async_notifier *notifier, 2034 2034 struct v4l2_subdev *sd, 2035 - struct v4l2_async_subdev *asd) 2035 + struct v4l2_async_connection *asd) 2036 2036 { 2037 2037 struct imx7_csi *csi = imx7_csi_notifier_to_dev(notifier); 2038 2038 struct media_pad *sink = &csi->sd.entity.pads[IMX7_CSI_PAD_SINK]; ··· 2057 2057 2058 2058 static int imx7_csi_async_register(struct imx7_csi *csi) 2059 2059 { 2060 - struct v4l2_async_subdev *asd; 2060 + struct v4l2_async_connection *asd; 2061 2061 struct fwnode_handle *ep; 2062 2062 int ret; 2063 2063 ··· 2072 2072 } 2073 2073 2074 2074 asd = v4l2_async_nf_add_fwnode_remote(&csi->notifier, ep, 2075 - struct v4l2_async_subdev); 2075 + struct v4l2_async_connection); 2076 2076 2077 2077 fwnode_handle_put(ep); 2078 2078
+4 -4
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
··· 30 30 */ 31 31 32 32 struct mxc_isi_async_subdev { 33 - struct v4l2_async_subdev asd; 33 + struct v4l2_async_connection asd; 34 34 unsigned int port; 35 35 }; 36 36 37 37 static inline struct mxc_isi_async_subdev * 38 - asd_to_mxc_isi_async_subdev(struct v4l2_async_subdev *asd) 38 + asd_to_mxc_isi_async_subdev(struct v4l2_async_connection *asd) 39 39 { 40 40 return container_of(asd, struct mxc_isi_async_subdev, asd); 41 41 }; ··· 48 48 49 49 static int mxc_isi_async_notifier_bound(struct v4l2_async_notifier *notifier, 50 50 struct v4l2_subdev *sd, 51 - struct v4l2_async_subdev *asd) 51 + struct v4l2_async_connection *asc) 52 52 { 53 53 const unsigned int link_flags = MEDIA_LNK_FL_IMMUTABLE 54 54 | MEDIA_LNK_FL_ENABLED; 55 55 struct mxc_isi_dev *isi = notifier_to_mxc_isi_dev(notifier); 56 - struct mxc_isi_async_subdev *masd = asd_to_mxc_isi_async_subdev(asd); 56 + struct mxc_isi_async_subdev *masd = asd_to_mxc_isi_async_subdev(asc); 57 57 struct media_pad *pad = &isi->crossbar.pads[masd->port]; 58 58 struct device_link *link; 59 59
+3 -3
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
··· 567 567 568 568 static int imx8mq_mipi_csi_notify_bound(struct v4l2_async_notifier *notifier, 569 569 struct v4l2_subdev *sd, 570 - struct v4l2_async_subdev *asd) 570 + struct v4l2_async_connection *asd) 571 571 { 572 572 struct csi_state *state = mipi_notifier_to_csi2_state(notifier); 573 573 struct media_pad *sink = &state->sd.entity.pads[MIPI_CSI2_PAD_SINK]; ··· 587 587 struct v4l2_fwnode_endpoint vep = { 588 588 .bus_type = V4L2_MBUS_CSI2_DPHY, 589 589 }; 590 - struct v4l2_async_subdev *asd; 590 + struct v4l2_async_connection *asd; 591 591 struct fwnode_handle *ep; 592 592 unsigned int i; 593 593 int ret; ··· 619 619 state->bus.flags); 620 620 621 621 asd = v4l2_async_nf_add_fwnode_remote(&state->notifier, ep, 622 - struct v4l2_async_subdev); 622 + struct v4l2_async_connection); 623 623 if (IS_ERR(asd)) { 624 624 ret = PTR_ERR(asd); 625 625 goto err_parse;
+1 -1
drivers/media/platform/qcom/camss/camss.c
··· 1383 1383 1384 1384 static int camss_subdev_notifier_bound(struct v4l2_async_notifier *async, 1385 1385 struct v4l2_subdev *subdev, 1386 - struct v4l2_async_subdev *asd) 1386 + struct v4l2_async_connection *asd) 1387 1387 { 1388 1388 struct camss *camss = container_of(async, struct camss, notifier); 1389 1389 struct camss_async_subdev *csd =
+1 -1
drivers/media/platform/qcom/camss/camss.h
··· 113 113 }; 114 114 115 115 struct camss_async_subdev { 116 - struct v4l2_async_subdev asd; /* must be first */ 116 + struct v4l2_async_connection asd; /* must be first */ 117 117 struct camss_camera_interface interface; 118 118 }; 119 119
+4 -4
drivers/media/platform/renesas/rcar-isp.c
··· 326 326 327 327 static int risp_notify_bound(struct v4l2_async_notifier *notifier, 328 328 struct v4l2_subdev *subdev, 329 - struct v4l2_async_subdev *asd) 329 + struct v4l2_async_connection *asd) 330 330 { 331 331 struct rcar_isp *isp = notifier_to_isp(notifier); 332 332 int pad; ··· 350 350 351 351 static void risp_notify_unbind(struct v4l2_async_notifier *notifier, 352 352 struct v4l2_subdev *subdev, 353 - struct v4l2_async_subdev *asd) 353 + struct v4l2_async_connection *asd) 354 354 { 355 355 struct rcar_isp *isp = notifier_to_isp(notifier); 356 356 ··· 366 366 367 367 static int risp_parse_dt(struct rcar_isp *isp) 368 368 { 369 - struct v4l2_async_subdev *asd; 369 + struct v4l2_async_connection *asd; 370 370 struct fwnode_handle *fwnode; 371 371 struct fwnode_handle *ep; 372 372 unsigned int id; ··· 396 396 isp->notifier.ops = &risp_notify_ops; 397 397 398 398 asd = v4l2_async_nf_add_fwnode(&isp->notifier, fwnode, 399 - struct v4l2_async_subdev); 399 + struct v4l2_async_connection); 400 400 fwnode_handle_put(fwnode); 401 401 if (IS_ERR(asd)) 402 402 return PTR_ERR(asd);
+22 -22
drivers/media/platform/renesas/rcar-vin/rcar-core.c
··· 251 251 252 252 static void rvin_group_notify_unbind(struct v4l2_async_notifier *notifier, 253 253 struct v4l2_subdev *subdev, 254 - struct v4l2_async_subdev *asd) 254 + struct v4l2_async_connection *asc) 255 255 { 256 256 struct rvin_dev *vin = v4l2_dev_to_vin(notifier->v4l2_dev); 257 257 unsigned int i; ··· 263 263 mutex_lock(&vin->group->lock); 264 264 265 265 for (i = 0; i < RVIN_CSI_MAX; i++) { 266 - if (vin->group->remotes[i].asd != asd) 266 + if (vin->group->remotes[i].asc != asc) 267 267 continue; 268 268 vin->group->remotes[i].subdev = NULL; 269 269 vin_dbg(vin, "Unbind %s from slot %u\n", subdev->name, i); ··· 277 277 278 278 static int rvin_group_notify_bound(struct v4l2_async_notifier *notifier, 279 279 struct v4l2_subdev *subdev, 280 - struct v4l2_async_subdev *asd) 280 + struct v4l2_async_connection *asc) 281 281 { 282 282 struct rvin_dev *vin = v4l2_dev_to_vin(notifier->v4l2_dev); 283 283 unsigned int i; ··· 285 285 mutex_lock(&vin->group->lock); 286 286 287 287 for (i = 0; i < RVIN_CSI_MAX; i++) { 288 - if (vin->group->remotes[i].asd != asd) 288 + if (vin->group->remotes[i].asc != asc) 289 289 continue; 290 290 vin->group->remotes[i].subdev = subdev; 291 291 vin_dbg(vin, "Bound %s to slot %u\n", subdev->name, i); ··· 310 310 struct v4l2_fwnode_endpoint vep = { 311 311 .bus_type = V4L2_MBUS_CSI2_DPHY, 312 312 }; 313 - struct v4l2_async_subdev *asd; 313 + struct v4l2_async_connection *asc; 314 314 int ret; 315 315 316 316 ep = fwnode_graph_get_endpoint_by_id(dev_fwnode(vin->dev), port, id, 0); ··· 326 326 goto out; 327 327 } 328 328 329 - asd = v4l2_async_nf_add_fwnode(&vin->group->notifier, fwnode, 330 - struct v4l2_async_subdev); 331 - if (IS_ERR(asd)) { 332 - ret = PTR_ERR(asd); 329 + asc = v4l2_async_nf_add_fwnode(&vin->group->notifier, fwnode, 330 + struct v4l2_async_connection); 331 + if (IS_ERR(asc)) { 332 + ret = PTR_ERR(asc); 333 333 goto out; 334 334 } 335 335 336 - vin->group->remotes[vep.base.id].asd = asd; 336 + vin->group->remotes[vep.base.id].asc = asc; 337 337 338 338 vin_dbg(vin, "Add group OF device %pOF to slot %u\n", 339 339 to_of_node(fwnode), vep.base.id); ··· 386 386 continue; 387 387 388 388 for (id = 0; id < max_id; id++) { 389 - if (vin->group->remotes[id].asd) 389 + if (vin->group->remotes[id].asc) 390 390 continue; 391 391 392 392 ret = rvin_group_parse_of(vin->group->vin[i], port, id); ··· 395 395 } 396 396 } 397 397 398 - if (list_empty(&vin->group->notifier.asd_list)) 398 + if (list_empty(&vin->group->notifier.asc_list)) 399 399 return 0; 400 400 401 401 vin->group->notifier.ops = &rvin_group_notify_ops; ··· 610 610 611 611 static void rvin_parallel_notify_unbind(struct v4l2_async_notifier *notifier, 612 612 struct v4l2_subdev *subdev, 613 - struct v4l2_async_subdev *asd) 613 + struct v4l2_async_connection *asc) 614 614 { 615 615 struct rvin_dev *vin = v4l2_dev_to_vin(notifier->v4l2_dev); 616 616 ··· 623 623 624 624 static int rvin_parallel_notify_bound(struct v4l2_async_notifier *notifier, 625 625 struct v4l2_subdev *subdev, 626 - struct v4l2_async_subdev *asd) 626 + struct v4l2_async_connection *asc) 627 627 { 628 628 struct rvin_dev *vin = v4l2_dev_to_vin(notifier->v4l2_dev); 629 629 int ret; ··· 655 655 struct v4l2_fwnode_endpoint vep = { 656 656 .bus_type = V4L2_MBUS_UNKNOWN, 657 657 }; 658 - struct v4l2_async_subdev *asd; 658 + struct v4l2_async_connection *asc; 659 659 int ret; 660 660 661 661 ep = fwnode_graph_get_endpoint_by_id(dev_fwnode(vin->dev), 0, 0, 0); ··· 686 686 goto out; 687 687 } 688 688 689 - asd = v4l2_async_nf_add_fwnode(&vin->notifier, fwnode, 690 - struct v4l2_async_subdev); 691 - if (IS_ERR(asd)) { 692 - ret = PTR_ERR(asd); 689 + asc = v4l2_async_nf_add_fwnode(&vin->notifier, fwnode, 690 + struct v4l2_async_connection); 691 + if (IS_ERR(asc)) { 692 + ret = PTR_ERR(asc); 693 693 goto out; 694 694 } 695 695 696 - vin->parallel.asd = asd; 696 + vin->parallel.asc = asc; 697 697 698 698 vin_dbg(vin, "Add parallel OF device %pOF\n", to_of_node(fwnode)); 699 699 out: ··· 718 718 if (ret) 719 719 return ret; 720 720 721 - if (!vin->parallel.asd) 721 + if (!vin->parallel.asc) 722 722 return -ENODEV; 723 723 724 724 vin_dbg(vin, "Found parallel subdevice %pOF\n", 725 - to_of_node(vin->parallel.asd->match.fwnode)); 725 + to_of_node(vin->parallel.asc->match.fwnode)); 726 726 727 727 vin->notifier.ops = &rvin_parallel_notify_ops; 728 728 ret = v4l2_async_nf_register(&vin->v4l2_dev, &vin->notifier);
+8 -8
drivers/media/platform/renesas/rcar-vin/rcar-csi2.c
··· 988 988 989 989 static int rcsi2_notify_bound(struct v4l2_async_notifier *notifier, 990 990 struct v4l2_subdev *subdev, 991 - struct v4l2_async_subdev *asd) 991 + struct v4l2_async_connection *asc) 992 992 { 993 993 struct rcar_csi2 *priv = notifier_to_csi2(notifier); 994 994 int pad; 995 995 996 - pad = media_entity_get_fwnode_pad(&subdev->entity, asd->match.fwnode, 996 + pad = media_entity_get_fwnode_pad(&subdev->entity, asc->match.fwnode, 997 997 MEDIA_PAD_FL_SOURCE); 998 998 if (pad < 0) { 999 999 dev_err(priv->dev, "Failed to find pad for %s\n", subdev->name); ··· 1013 1013 1014 1014 static void rcsi2_notify_unbind(struct v4l2_async_notifier *notifier, 1015 1015 struct v4l2_subdev *subdev, 1016 - struct v4l2_async_subdev *asd) 1016 + struct v4l2_async_connection *asc) 1017 1017 { 1018 1018 struct rcar_csi2 *priv = notifier_to_csi2(notifier); 1019 1019 ··· 1090 1090 1091 1091 static int rcsi2_parse_dt(struct rcar_csi2 *priv) 1092 1092 { 1093 - struct v4l2_async_subdev *asd; 1093 + struct v4l2_async_connection *asc; 1094 1094 struct fwnode_handle *fwnode; 1095 1095 struct fwnode_handle *ep; 1096 1096 struct v4l2_fwnode_endpoint v4l2_ep = { ··· 1125 1125 v4l2_async_nf_init(&priv->notifier); 1126 1126 priv->notifier.ops = &rcar_csi2_notify_ops; 1127 1127 1128 - asd = v4l2_async_nf_add_fwnode(&priv->notifier, fwnode, 1129 - struct v4l2_async_subdev); 1128 + asc = v4l2_async_nf_add_fwnode(&priv->notifier, fwnode, 1129 + struct v4l2_async_connection); 1130 1130 fwnode_handle_put(fwnode); 1131 - if (IS_ERR(asd)) 1132 - return PTR_ERR(asd); 1131 + if (IS_ERR(asc)) 1132 + return PTR_ERR(asc); 1133 1133 1134 1134 ret = v4l2_async_subdev_nf_register(&priv->subdev, &priv->notifier); 1135 1135 if (ret)
+5 -5
drivers/media/platform/renesas/rcar-vin/rcar-vin.h
··· 106 106 107 107 /** 108 108 * struct rvin_parallel_entity - Parallel video input endpoint descriptor 109 - * @asd: sub-device descriptor for async framework 109 + * @asc: async connection descriptor for async framework 110 110 * @subdev: subdevice matched using async framework 111 111 * @mbus_type: media bus type 112 112 * @bus: media bus parallel configuration ··· 115 115 * 116 116 */ 117 117 struct rvin_parallel_entity { 118 - struct v4l2_async_subdev *asd; 118 + struct v4l2_async_connection *asc; 119 119 struct v4l2_subdev *subdev; 120 120 121 121 enum v4l2_mbus_type mbus_type; ··· 272 272 * 273 273 * @lock: protects the count, notifier, vin and csi members 274 274 * @count: number of enabled VIN instances found in DT 275 - * @notifier: group notifier for CSI-2 async subdevices 275 + * @notifier: group notifier for CSI-2 async connections 276 276 * @vin: VIN instances which are part of the group 277 277 * @link_setup: Callback to create all links for the media graph 278 - * @remotes: array of pairs of fwnode and subdev pointers 278 + * @remotes: array of pairs of async connection and subdev pointers 279 279 * to all remote subdevices. 280 280 */ 281 281 struct rvin_group { ··· 291 291 int (*link_setup)(struct rvin_dev *vin); 292 292 293 293 struct { 294 - struct v4l2_async_subdev *asd; 294 + struct v4l2_async_connection *asc; 295 295 struct v4l2_subdev *subdev; 296 296 } remotes[RVIN_REMOTES_MAX]; 297 297 };
+4 -4
drivers/media/platform/renesas/rcar_drif.c
··· 1098 1098 /* Sub-device bound callback */ 1099 1099 static int rcar_drif_notify_bound(struct v4l2_async_notifier *notifier, 1100 1100 struct v4l2_subdev *subdev, 1101 - struct v4l2_async_subdev *asd) 1101 + struct v4l2_async_connection *asd) 1102 1102 { 1103 1103 struct rcar_drif_sdr *sdr = 1104 1104 container_of(notifier, struct rcar_drif_sdr, notifier); ··· 1113 1113 /* Sub-device unbind callback */ 1114 1114 static void rcar_drif_notify_unbind(struct v4l2_async_notifier *notifier, 1115 1115 struct v4l2_subdev *subdev, 1116 - struct v4l2_async_subdev *asd) 1116 + struct v4l2_async_connection *asd) 1117 1117 { 1118 1118 struct rcar_drif_sdr *sdr = 1119 1119 container_of(notifier, struct rcar_drif_sdr, notifier); ··· 1206 1206 { 1207 1207 struct v4l2_async_notifier *notifier = &sdr->notifier; 1208 1208 struct fwnode_handle *fwnode, *ep; 1209 - struct v4l2_async_subdev *asd; 1209 + struct v4l2_async_connection *asd; 1210 1210 1211 1211 v4l2_async_nf_init(notifier); 1212 1212 ··· 1226 1226 } 1227 1227 1228 1228 asd = v4l2_async_nf_add_fwnode(notifier, fwnode, 1229 - struct v4l2_async_subdev); 1229 + struct v4l2_async_connection); 1230 1230 fwnode_handle_put(fwnode); 1231 1231 if (IS_ERR(asd)) 1232 1232 return PTR_ERR(asd);
+3 -3
drivers/media/platform/renesas/renesas-ceu.c
··· 151 151 * ceu_subdev - Wraps v4l2 sub-device and provides async subdevice. 152 152 */ 153 153 struct ceu_subdev { 154 - struct v4l2_async_subdev asd; 154 + struct v4l2_async_connection asd; 155 155 struct v4l2_subdev *v4l2_sd; 156 156 157 157 /* per-subdevice mbus configuration options */ ··· 159 159 struct ceu_mbus_fmt mbus_fmt; 160 160 }; 161 161 162 - static struct ceu_subdev *to_ceu_subdev(struct v4l2_async_subdev *asd) 162 + static struct ceu_subdev *to_ceu_subdev(struct v4l2_async_connection *asd) 163 163 { 164 164 return container_of(asd, struct ceu_subdev, asd); 165 165 } ··· 1374 1374 1375 1375 static int ceu_notify_bound(struct v4l2_async_notifier *notifier, 1376 1376 struct v4l2_subdev *v4l2_sd, 1377 - struct v4l2_async_subdev *asd) 1377 + struct v4l2_async_connection *asd) 1378 1378 { 1379 1379 struct v4l2_device *v4l2_dev = notifier->v4l2_dev; 1380 1380 struct ceu_device *ceudev = v4l2_to_ceu(v4l2_dev);
+5 -5
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c
··· 92 92 93 93 static void rzg2l_cru_group_notify_unbind(struct v4l2_async_notifier *notifier, 94 94 struct v4l2_subdev *subdev, 95 - struct v4l2_async_subdev *asd) 95 + struct v4l2_async_connection *asd) 96 96 { 97 97 struct rzg2l_cru_dev *cru = notifier_to_cru(notifier); 98 98 ··· 110 110 111 111 static int rzg2l_cru_group_notify_bound(struct v4l2_async_notifier *notifier, 112 112 struct v4l2_subdev *subdev, 113 - struct v4l2_async_subdev *asd) 113 + struct v4l2_async_connection *asd) 114 114 { 115 115 struct rzg2l_cru_dev *cru = notifier_to_cru(notifier); 116 116 ··· 138 138 .bus_type = V4L2_MBUS_CSI2_DPHY, 139 139 }; 140 140 struct fwnode_handle *ep, *fwnode; 141 - struct v4l2_async_subdev *asd; 141 + struct v4l2_async_connection *asd; 142 142 int ret; 143 143 144 144 ep = fwnode_graph_get_endpoint_by_id(dev_fwnode(cru->dev), 1, 0, 0); ··· 162 162 } 163 163 164 164 asd = v4l2_async_nf_add_fwnode(&cru->notifier, fwnode, 165 - struct v4l2_async_subdev); 165 + struct v4l2_async_connection); 166 166 if (IS_ERR(asd)) { 167 167 ret = PTR_ERR(asd); 168 168 goto out; ··· 190 190 191 191 cru->notifier.ops = &rzg2l_cru_async_ops; 192 192 193 - if (list_empty(&cru->notifier.asd_list)) 193 + if (list_empty(&cru->notifier.asc_list)) 194 194 return 0; 195 195 196 196 ret = v4l2_async_nf_register(&cru->v4l2_dev, &cru->notifier);
+1 -1
drivers/media/platform/renesas/rzg2l-cru/rzg2l-cru.h
··· 45 45 }; 46 46 47 47 struct rzg2l_cru_csi { 48 - struct v4l2_async_subdev *asd; 48 + struct v4l2_async_connection *asd; 49 49 struct v4l2_subdev *subdev; 50 50 u32 channel; 51 51 };
+4 -4
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
··· 599 599 600 600 static int rzg2l_csi2_notify_bound(struct v4l2_async_notifier *notifier, 601 601 struct v4l2_subdev *subdev, 602 - struct v4l2_async_subdev *asd) 602 + struct v4l2_async_connection *asd) 603 603 { 604 604 struct rzg2l_csi2 *csi2 = notifier_to_csi2(notifier); 605 605 ··· 615 615 616 616 static void rzg2l_csi2_notify_unbind(struct v4l2_async_notifier *notifier, 617 617 struct v4l2_subdev *subdev, 618 - struct v4l2_async_subdev *asd) 618 + struct v4l2_async_connection *asd) 619 619 { 620 620 struct rzg2l_csi2 *csi2 = notifier_to_csi2(notifier); 621 621 ··· 646 646 struct v4l2_fwnode_endpoint v4l2_ep = { 647 647 .bus_type = V4L2_MBUS_CSI2_DPHY 648 648 }; 649 - struct v4l2_async_subdev *asd; 649 + struct v4l2_async_connection *asd; 650 650 struct fwnode_handle *fwnode; 651 651 struct fwnode_handle *ep; 652 652 int ret; ··· 677 677 csi2->notifier.ops = &rzg2l_csi2_notify_ops; 678 678 679 679 asd = v4l2_async_nf_add_fwnode(&csi2->notifier, fwnode, 680 - struct v4l2_async_subdev); 680 + struct v4l2_async_connection); 681 681 fwnode_handle_put(fwnode); 682 682 if (IS_ERR(asd)) 683 683 return PTR_ERR(asd);
+1 -1
drivers/media/platform/rockchip/rkisp1/rkisp1-common.h
··· 148 148 * @port: port number (0: MIPI, 1: Parallel) 149 149 */ 150 150 struct rkisp1_sensor_async { 151 - struct v4l2_async_subdev asd; 151 + struct v4l2_async_connection asd; 152 152 unsigned int index; 153 153 struct fwnode_handle *source_ep; 154 154 unsigned int lanes;
+4 -4
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
··· 122 122 123 123 static int rkisp1_subdev_notifier_bound(struct v4l2_async_notifier *notifier, 124 124 struct v4l2_subdev *sd, 125 - struct v4l2_async_subdev *asd) 125 + struct v4l2_async_connection *asc) 126 126 { 127 127 struct rkisp1_device *rkisp1 = 128 128 container_of(notifier, struct rkisp1_device, notifier); 129 129 struct rkisp1_sensor_async *s_asd = 130 - container_of(asd, struct rkisp1_sensor_async, asd); 130 + container_of(asc, struct rkisp1_sensor_async, asd); 131 131 int source_pad; 132 132 int ret; 133 133 ··· 165 165 return v4l2_device_register_subdev_nodes(&rkisp1->v4l2_dev); 166 166 } 167 167 168 - static void rkisp1_subdev_notifier_destroy(struct v4l2_async_subdev *asd) 168 + static void rkisp1_subdev_notifier_destroy(struct v4l2_async_connection *asc) 169 169 { 170 170 struct rkisp1_sensor_async *rk_asd = 171 - container_of(asd, struct rkisp1_sensor_async, asd); 171 + container_of(asc, struct rkisp1_sensor_async, asd); 172 172 173 173 fwnode_handle_put(rk_asd->source_ep); 174 174 }
+3 -3
drivers/media/platform/samsung/exynos4-is/media-dev.c
··· 400 400 int index = fmd->num_sensors; 401 401 struct fimc_source_info *pd = &fmd->sensor[index].pdata; 402 402 struct device_node *rem, *np; 403 - struct v4l2_async_subdev *asd; 403 + struct v4l2_async_connection *asd; 404 404 struct v4l2_fwnode_endpoint endpoint = { .bus_type = 0 }; 405 405 int ret; 406 406 ··· 465 465 466 466 asd = v4l2_async_nf_add_fwnode_remote(&fmd->subdev_notifier, 467 467 of_fwnode_handle(ep), 468 - struct v4l2_async_subdev); 468 + struct v4l2_async_connection); 469 469 470 470 of_node_put(ep); 471 471 ··· 1371 1371 1372 1372 static int subdev_notifier_bound(struct v4l2_async_notifier *notifier, 1373 1373 struct v4l2_subdev *subdev, 1374 - struct v4l2_async_subdev *asd) 1374 + struct v4l2_async_connection *asd) 1375 1375 { 1376 1376 struct fimc_md *fmd = notifier_to_fimc_md(notifier); 1377 1377 struct fimc_sensor_info *si = NULL;
+1 -1
drivers/media/platform/samsung/exynos4-is/media-dev.h
··· 82 82 */ 83 83 struct fimc_sensor_info { 84 84 struct fimc_source_info pdata; 85 - struct v4l2_async_subdev *asd; 85 + struct v4l2_async_connection *asd; 86 86 struct v4l2_subdev *subdev; 87 87 struct fimc_dev *host; 88 88 };
+4 -4
drivers/media/platform/st/stm32/stm32-dcmi.c
··· 1837 1837 1838 1838 static void dcmi_graph_notify_unbind(struct v4l2_async_notifier *notifier, 1839 1839 struct v4l2_subdev *sd, 1840 - struct v4l2_async_subdev *asd) 1840 + struct v4l2_async_connection *asd) 1841 1841 { 1842 1842 struct stm32_dcmi *dcmi = notifier_to_dcmi(notifier); 1843 1843 ··· 1849 1849 1850 1850 static int dcmi_graph_notify_bound(struct v4l2_async_notifier *notifier, 1851 1851 struct v4l2_subdev *subdev, 1852 - struct v4l2_async_subdev *asd) 1852 + struct v4l2_async_connection *asd) 1853 1853 { 1854 1854 struct stm32_dcmi *dcmi = notifier_to_dcmi(notifier); 1855 1855 unsigned int ret; ··· 1887 1887 1888 1888 static int dcmi_graph_init(struct stm32_dcmi *dcmi) 1889 1889 { 1890 - struct v4l2_async_subdev *asd; 1890 + struct v4l2_async_connection *asd; 1891 1891 struct device_node *ep; 1892 1892 int ret; 1893 1893 ··· 1901 1901 1902 1902 asd = v4l2_async_nf_add_fwnode_remote(&dcmi->notifier, 1903 1903 of_fwnode_handle(ep), 1904 - struct v4l2_async_subdev); 1904 + struct v4l2_async_connection); 1905 1905 1906 1906 of_node_put(ep); 1907 1907
+3 -3
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c
··· 41 41 42 42 static int sun4i_csi_notify_bound(struct v4l2_async_notifier *notifier, 43 43 struct v4l2_subdev *subdev, 44 - struct v4l2_async_subdev *asd) 44 + struct v4l2_async_connection *asd) 45 45 { 46 46 struct sun4i_csi *csi = container_of(notifier, struct sun4i_csi, 47 47 notifier); ··· 117 117 struct v4l2_fwnode_endpoint vep = { 118 118 .bus_type = V4L2_MBUS_PARALLEL, 119 119 }; 120 - struct v4l2_async_subdev *asd; 120 + struct v4l2_async_connection *asd; 121 121 struct fwnode_handle *ep; 122 122 int ret; 123 123 ··· 135 135 csi->bus = vep.bus.parallel; 136 136 137 137 asd = v4l2_async_nf_add_fwnode_remote(&csi->notifier, ep, 138 - struct v4l2_async_subdev); 138 + struct v4l2_async_connection); 139 139 if (IS_ERR(asd)) { 140 140 ret = PTR_ERR(asd); 141 141 goto out;
+1 -1
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c
··· 642 642 static int 643 643 sun6i_csi_bridge_notifier_bound(struct v4l2_async_notifier *notifier, 644 644 struct v4l2_subdev *remote_subdev, 645 - struct v4l2_async_subdev *async_subdev) 645 + struct v4l2_async_connection *async_subdev) 646 646 { 647 647 struct sun6i_csi_device *csi_dev = 648 648 container_of(notifier, struct sun6i_csi_device,
+1 -1
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.h
··· 34 34 }; 35 35 36 36 struct sun6i_csi_bridge_async_subdev { 37 - struct v4l2_async_subdev async_subdev; 37 + struct v4l2_async_connection async_subdev; 38 38 struct sun6i_csi_bridge_source *source; 39 39 }; 40 40
+3 -3
drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c
··· 407 407 static int 408 408 sun6i_mipi_csi2_notifier_bound(struct v4l2_async_notifier *notifier, 409 409 struct v4l2_subdev *remote_subdev, 410 - struct v4l2_async_subdev *async_subdev) 410 + struct v4l2_async_connection *async_subdev) 411 411 { 412 412 struct v4l2_subdev *subdev = notifier->sd; 413 413 struct sun6i_mipi_csi2_device *csi2_dev = ··· 461 461 { 462 462 struct v4l2_async_notifier *notifier = &csi2_dev->bridge.notifier; 463 463 struct v4l2_fwnode_endpoint *endpoint = &csi2_dev->bridge.endpoint; 464 - struct v4l2_async_subdev *subdev_async; 464 + struct v4l2_async_connection *subdev_async; 465 465 struct fwnode_handle *handle; 466 466 struct device *dev = csi2_dev->dev; 467 467 int ret; ··· 479 479 480 480 subdev_async = 481 481 v4l2_async_nf_add_fwnode_remote(notifier, handle, 482 - struct v4l2_async_subdev); 482 + struct v4l2_async_connection); 483 483 if (IS_ERR(subdev_async)) 484 484 ret = PTR_ERR(subdev_async); 485 485
+3 -3
drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c
··· 444 444 static int 445 445 sun8i_a83t_mipi_csi2_notifier_bound(struct v4l2_async_notifier *notifier, 446 446 struct v4l2_subdev *remote_subdev, 447 - struct v4l2_async_subdev *async_subdev) 447 + struct v4l2_async_connection *async_subdev) 448 448 { 449 449 struct v4l2_subdev *subdev = notifier->sd; 450 450 struct sun8i_a83t_mipi_csi2_device *csi2_dev = ··· 498 498 { 499 499 struct v4l2_async_notifier *notifier = &csi2_dev->bridge.notifier; 500 500 struct v4l2_fwnode_endpoint *endpoint = &csi2_dev->bridge.endpoint; 501 - struct v4l2_async_subdev *subdev_async; 501 + struct v4l2_async_connection *subdev_async; 502 502 struct fwnode_handle *handle; 503 503 struct device *dev = csi2_dev->dev; 504 504 int ret; ··· 516 516 517 517 subdev_async = 518 518 v4l2_async_nf_add_fwnode_remote(notifier, handle, 519 - struct v4l2_async_subdev); 519 + struct v4l2_async_connection); 520 520 if (IS_ERR(subdev_async)) 521 521 ret = PTR_ERR(subdev_async); 522 522
+2 -3
drivers/media/platform/ti/am437x/am437x-vpfe.c
··· 2144 2144 static int 2145 2145 vpfe_async_bound(struct v4l2_async_notifier *notifier, 2146 2146 struct v4l2_subdev *subdev, 2147 - struct v4l2_async_subdev *asd) 2147 + struct v4l2_async_connection *asd) 2148 2148 { 2149 2149 struct vpfe_device *vpfe = container_of(notifier->v4l2_dev, 2150 2150 struct vpfe_device, v4l2_dev); ··· 2370 2370 2371 2371 pdata->asd[i] = v4l2_async_nf_add_fwnode(&vpfe->notifier, 2372 2372 of_fwnode_handle(rem), 2373 - struct 2374 - v4l2_async_subdev); 2373 + struct v4l2_async_connection); 2375 2374 of_node_put(rem); 2376 2375 if (IS_ERR(pdata->asd[i])) 2377 2376 goto cleanup;
+1 -1
drivers/media/platform/ti/am437x/am437x-vpfe.h
··· 84 84 /* information about each subdev */ 85 85 struct vpfe_subdev_info sub_devs[VPFE_MAX_SUBDEV]; 86 86 /* Flat array, arranged in groups */ 87 - struct v4l2_async_subdev *asd[VPFE_MAX_SUBDEV]; 87 + struct v4l2_async_connection *asd[VPFE_MAX_SUBDEV]; 88 88 }; 89 89 90 90 struct vpfe_cap_buffer {
+3 -3
drivers/media/platform/ti/cal/cal.c
··· 774 774 */ 775 775 776 776 struct cal_v4l2_async_subdev { 777 - struct v4l2_async_subdev asd; /* Must be first */ 777 + struct v4l2_async_connection asd; /* Must be first */ 778 778 struct cal_camerarx *phy; 779 779 }; 780 780 781 781 static inline struct cal_v4l2_async_subdev * 782 - to_cal_asd(struct v4l2_async_subdev *asd) 782 + to_cal_asd(struct v4l2_async_connection *asd) 783 783 { 784 784 return container_of(asd, struct cal_v4l2_async_subdev, asd); 785 785 } 786 786 787 787 static int cal_async_notifier_bound(struct v4l2_async_notifier *notifier, 788 788 struct v4l2_subdev *subdev, 789 - struct v4l2_async_subdev *asd) 789 + struct v4l2_async_connection *asd) 790 790 { 791 791 struct cal_camerarx *phy = to_cal_asd(asd)->phy; 792 792 int pad;
+3 -4
drivers/media/platform/ti/davinci/vpif_capture.c
··· 1363 1363 1364 1364 static int vpif_async_bound(struct v4l2_async_notifier *notifier, 1365 1365 struct v4l2_subdev *subdev, 1366 - struct v4l2_async_subdev *asd) 1366 + struct v4l2_async_connection *asd) 1367 1367 { 1368 1368 int i; 1369 1369 1370 1370 for (i = 0; i < vpif_obj.config->asd_sizes[0]; i++) { 1371 - struct v4l2_async_subdev *_asd = vpif_obj.config->asd[i]; 1371 + struct v4l2_async_connection *_asd = vpif_obj.config->asd[i]; 1372 1372 const struct fwnode_handle *fwnode = _asd->match.fwnode; 1373 1373 1374 1374 if (fwnode == subdev->fwnode) { ··· 1570 1570 1571 1571 pdata->asd[i] = v4l2_async_nf_add_fwnode(&vpif_obj.notifier, 1572 1572 of_fwnode_handle(rem), 1573 - struct 1574 - v4l2_async_subdev); 1573 + struct v4l2_async_connection); 1575 1574 if (IS_ERR(pdata->asd[i])) 1576 1575 goto err_cleanup; 1577 1576
+2 -2
drivers/media/platform/ti/omap3isp/isp.c
··· 2024 2024 2025 2025 static int isp_subdev_notifier_bound(struct v4l2_async_notifier *async, 2026 2026 struct v4l2_subdev *sd, 2027 - struct v4l2_async_subdev *asd) 2027 + struct v4l2_async_connection *asc) 2028 2028 { 2029 2029 struct isp_device *isp = container_of(async, struct isp_device, 2030 2030 notifier); 2031 2031 struct isp_bus_cfg *bus_cfg = 2032 - &container_of(asd, struct isp_async_subdev, asd)->bus; 2032 + &container_of(asc, struct isp_async_subdev, asd)->bus; 2033 2033 int ret; 2034 2034 2035 2035 mutex_lock(&isp->media_dev.graph_mutex);
+1 -1
drivers/media/platform/ti/omap3isp/isp.h
··· 220 220 }; 221 221 222 222 struct isp_async_subdev { 223 - struct v4l2_async_subdev asd; 223 + struct v4l2_async_connection asd; 224 224 struct isp_bus_cfg bus; 225 225 }; 226 226
+3 -3
drivers/media/platform/video-mux.c
··· 314 314 315 315 static int video_mux_notify_bound(struct v4l2_async_notifier *notifier, 316 316 struct v4l2_subdev *sd, 317 - struct v4l2_async_subdev *asd) 317 + struct v4l2_async_connection *asd) 318 318 { 319 319 struct video_mux *vmux = notifier_to_video_mux(notifier); 320 320 ··· 334 334 v4l2_async_nf_init(&vmux->notifier); 335 335 336 336 for (i = 0; i < num_input_pads; i++) { 337 - struct v4l2_async_subdev *asd; 337 + struct v4l2_async_connection *asd; 338 338 struct fwnode_handle *ep, *remote_ep; 339 339 340 340 ep = fwnode_graph_get_endpoint_by_id( ··· 352 352 fwnode_handle_put(remote_ep); 353 353 354 354 asd = v4l2_async_nf_add_fwnode_remote(&vmux->notifier, ep, 355 - struct v4l2_async_subdev); 355 + struct v4l2_async_connection); 356 356 357 357 fwnode_handle_put(ep); 358 358
+11 -11
drivers/media/platform/xilinx/xilinx-vipp.c
··· 34 34 * @subdev: V4L2 subdev 35 35 */ 36 36 struct xvip_graph_entity { 37 - struct v4l2_async_subdev asd; /* must be first */ 37 + struct v4l2_async_connection asd; /* must be first */ 38 38 struct media_entity *entity; 39 39 struct v4l2_subdev *subdev; 40 40 }; 41 41 42 42 static inline struct xvip_graph_entity * 43 - to_xvip_entity(struct v4l2_async_subdev *asd) 43 + to_xvip_entity(struct v4l2_async_connection *asd) 44 44 { 45 45 return container_of(asd, struct xvip_graph_entity, asd); 46 46 } ··· 54 54 const struct fwnode_handle *fwnode) 55 55 { 56 56 struct xvip_graph_entity *entity; 57 - struct v4l2_async_subdev *asd; 57 + struct v4l2_async_connection *asd; 58 58 59 - list_for_each_entry(asd, &xdev->notifier.asd_list, asd_entry) { 59 + list_for_each_entry(asd, &xdev->notifier.asc_list, asc_entry) { 60 60 entity = to_xvip_entity(asd); 61 61 if (entity->asd.match.fwnode == fwnode) 62 62 return entity; ··· 285 285 struct xvip_composite_device *xdev = 286 286 container_of(notifier, struct xvip_composite_device, notifier); 287 287 struct xvip_graph_entity *entity; 288 - struct v4l2_async_subdev *asd; 288 + struct v4l2_async_connection *asd; 289 289 int ret; 290 290 291 291 dev_dbg(xdev->dev, "notify complete, all subdevs registered\n"); 292 292 293 293 /* Create links for every entity. */ 294 - list_for_each_entry(asd, &xdev->notifier.asd_list, asd_entry) { 294 + list_for_each_entry(asd, &xdev->notifier.asc_list, asc_entry) { 295 295 entity = to_xvip_entity(asd); 296 296 ret = xvip_graph_build_one(xdev, entity); 297 297 if (ret < 0) ··· 312 312 313 313 static int xvip_graph_notify_bound(struct v4l2_async_notifier *notifier, 314 314 struct v4l2_subdev *subdev, 315 - struct v4l2_async_subdev *asd) 315 + struct v4l2_async_connection *asc) 316 316 { 317 - struct xvip_graph_entity *entity = to_xvip_entity(asd); 317 + struct xvip_graph_entity *entity = to_xvip_entity(asc); 318 318 319 319 entity->entity = &subdev->entity; 320 320 entity->subdev = subdev; ··· 380 380 static int xvip_graph_parse(struct xvip_composite_device *xdev) 381 381 { 382 382 struct xvip_graph_entity *entity; 383 - struct v4l2_async_subdev *asd; 383 + struct v4l2_async_connection *asd; 384 384 int ret; 385 385 386 386 /* ··· 393 393 if (ret < 0) 394 394 return 0; 395 395 396 - list_for_each_entry(asd, &xdev->notifier.asd_list, asd_entry) { 396 + list_for_each_entry(asd, &xdev->notifier.asc_list, asc_entry) { 397 397 entity = to_xvip_entity(asd); 398 398 ret = xvip_graph_parse_one(xdev, entity->asd.match.fwnode); 399 399 if (ret < 0) { ··· 501 501 goto done; 502 502 } 503 503 504 - if (list_empty(&xdev->notifier.asd_list)) { 504 + if (list_empty(&xdev->notifier.asc_list)) { 505 505 dev_err(xdev->dev, "no subdev found in graph\n"); 506 506 ret = -ENOENT; 507 507 goto done;
+79 -80
drivers/media/v4l2-core/v4l2-async.c
··· 28 28 29 29 static int v4l2_async_nf_call_bound(struct v4l2_async_notifier *n, 30 30 struct v4l2_subdev *subdev, 31 - struct v4l2_async_subdev *asd) 31 + struct v4l2_async_connection *asc) 32 32 { 33 33 if (!n->ops || !n->ops->bound) 34 34 return 0; 35 35 36 - return n->ops->bound(n, subdev, asd); 36 + return n->ops->bound(n, subdev, asc); 37 37 } 38 38 39 39 static void v4l2_async_nf_call_unbind(struct v4l2_async_notifier *n, 40 40 struct v4l2_subdev *subdev, 41 - struct v4l2_async_subdev *asd) 41 + struct v4l2_async_connection *asc) 42 42 { 43 43 if (!n->ops || !n->ops->unbind) 44 44 return; 45 45 46 - n->ops->unbind(n, subdev, asd); 46 + n->ops->unbind(n, subdev, asc); 47 47 } 48 48 49 49 static int v4l2_async_nf_call_complete(struct v4l2_async_notifier *n) ··· 55 55 } 56 56 57 57 static void v4l2_async_nf_call_destroy(struct v4l2_async_notifier *n, 58 - struct v4l2_async_subdev *asd) 58 + struct v4l2_async_connection *asc) 59 59 { 60 60 if (!n->ops || !n->ops->destroy) 61 61 return; 62 62 63 - n->ops->destroy(asd); 63 + n->ops->destroy(asc); 64 64 } 65 65 66 66 static bool match_i2c(struct v4l2_async_notifier *notifier, ··· 151 151 static LIST_HEAD(notifier_list); 152 152 static DEFINE_MUTEX(list_lock); 153 153 154 - static struct v4l2_async_subdev * 154 + static struct v4l2_async_connection * 155 155 v4l2_async_find_match(struct v4l2_async_notifier *notifier, 156 156 struct v4l2_subdev *sd) 157 157 { 158 158 bool (*match)(struct v4l2_async_notifier *notifier, 159 159 struct v4l2_subdev *sd, 160 160 struct v4l2_async_match_desc *match); 161 - struct v4l2_async_subdev *asd; 161 + struct v4l2_async_connection *asc; 162 162 163 - list_for_each_entry(asd, &notifier->waiting_list, waiting_entry) { 163 + list_for_each_entry(asc, &notifier->waiting_list, waiting_entry) { 164 164 /* bus_type has been verified valid before */ 165 - switch (asd->match.type) { 165 + switch (asc->match.type) { 166 166 case V4L2_ASYNC_MATCH_TYPE_I2C: 167 167 match = match_i2c; 168 168 break; ··· 176 176 } 177 177 178 178 /* match cannot be NULL here */ 179 - if (match(notifier, sd, &asd->match)) 180 - return asd; 179 + if (match(notifier, sd, &asc->match)) 180 + return asc; 181 181 } 182 182 183 183 return NULL; ··· 310 310 static int v4l2_async_match_notify(struct v4l2_async_notifier *notifier, 311 311 struct v4l2_device *v4l2_dev, 312 312 struct v4l2_subdev *sd, 313 - struct v4l2_async_subdev *asd) 313 + struct v4l2_async_connection *asc) 314 314 { 315 315 struct v4l2_async_notifier *subdev_notifier; 316 316 int ret; ··· 319 319 if (ret < 0) 320 320 return ret; 321 321 322 - ret = v4l2_async_nf_call_bound(notifier, sd, asd); 322 + ret = v4l2_async_nf_call_bound(notifier, sd, asc); 323 323 if (ret < 0) { 324 324 v4l2_device_unregister_subdev(sd); 325 325 return ret; ··· 333 333 */ 334 334 ret = v4l2_async_create_ancillary_links(notifier, sd); 335 335 if (ret) { 336 - v4l2_async_nf_call_unbind(notifier, sd, asd); 336 + v4l2_async_nf_call_unbind(notifier, sd, asc); 337 337 v4l2_device_unregister_subdev(sd); 338 338 return ret; 339 339 } 340 340 341 - list_del(&asd->waiting_entry); 342 - sd->asd = asd; 341 + list_del(&asc->waiting_entry); 342 + sd->asd = asc; 343 343 sd->notifier = notifier; 344 344 345 345 /* Move from the global subdevice list to notifier's done */ ··· 380 380 381 381 again: 382 382 list_for_each_entry(sd, &subdev_list, async_list) { 383 - struct v4l2_async_subdev *asd; 383 + struct v4l2_async_connection *asc; 384 384 int ret; 385 385 386 - asd = v4l2_async_find_match(notifier, sd); 387 - if (!asd) 386 + asc = v4l2_async_find_match(notifier, sd); 387 + if (!asc) 388 388 continue; 389 389 390 390 dev_dbg(notifier_dev(notifier), 391 391 "v4l2-async: match found, subdev %s\n", sd->name); 392 392 393 - ret = v4l2_async_match_notify(notifier, v4l2_dev, sd, asd); 393 + ret = v4l2_async_match_notify(notifier, v4l2_dev, sd, asc); 394 394 if (ret < 0) 395 395 return ret; 396 396 ··· 448 448 v4l2_async_nf_has_async_match_entry(struct v4l2_async_notifier *notifier, 449 449 struct v4l2_async_match_desc *match) 450 450 { 451 - struct v4l2_async_subdev *asd; 451 + struct v4l2_async_connection *asc; 452 452 struct v4l2_subdev *sd; 453 453 454 - list_for_each_entry(asd, &notifier->waiting_list, waiting_entry) 455 - if (v4l2_async_match_equal(&asd->match, match)) 454 + list_for_each_entry(asc, &notifier->waiting_list, waiting_entry) 455 + if (v4l2_async_match_equal(&asc->match, match)) 456 456 return true; 457 457 458 458 list_for_each_entry(sd, &notifier->done_list, async_list) { ··· 477 477 struct v4l2_async_match_desc *match, 478 478 bool skip_self) 479 479 { 480 - struct v4l2_async_subdev *asd; 480 + struct v4l2_async_connection *asc; 481 481 482 482 lockdep_assert_held(&list_lock); 483 483 484 484 /* Check that an asd is not being added more than once. */ 485 - list_for_each_entry(asd, &notifier->asd_list, asd_entry) { 486 - if (skip_self && &asd->match == match) 485 + list_for_each_entry(asc, &notifier->asc_list, asc_entry) { 486 + if (skip_self && &asc->match == match) 487 487 continue; 488 - if (v4l2_async_match_equal(&asd->match, match)) 488 + if (v4l2_async_match_equal(&asc->match, match)) 489 489 return true; 490 490 } 491 491 492 - /* Check that an asd does not exist in other notifiers. */ 492 + /* Check that an asc does not exist in other notifiers. */ 493 493 list_for_each_entry(notifier, &notifier_list, notifier_entry) 494 494 if (v4l2_async_nf_has_async_match_entry(notifier, match)) 495 495 return true; ··· 523 523 524 524 void v4l2_async_nf_init(struct v4l2_async_notifier *notifier) 525 525 { 526 - INIT_LIST_HEAD(&notifier->asd_list); 526 + INIT_LIST_HEAD(&notifier->asc_list); 527 527 } 528 528 EXPORT_SYMBOL(v4l2_async_nf_init); 529 529 530 530 static int __v4l2_async_nf_register(struct v4l2_async_notifier *notifier) 531 531 { 532 - struct v4l2_async_subdev *asd; 532 + struct v4l2_async_connection *asc; 533 533 int ret; 534 534 535 535 INIT_LIST_HEAD(&notifier->waiting_list); ··· 537 537 538 538 mutex_lock(&list_lock); 539 539 540 - list_for_each_entry(asd, &notifier->asd_list, asd_entry) { 541 - ret = v4l2_async_nf_match_valid(notifier, &asd->match, true); 540 + list_for_each_entry(asc, &notifier->asc_list, asc_entry) { 541 + ret = v4l2_async_nf_match_valid(notifier, &asc->match, true); 542 542 if (ret) 543 543 goto err_unlock; 544 544 545 - list_add_tail(&asd->waiting_entry, &notifier->waiting_list); 545 + list_add_tail(&asc->waiting_entry, &notifier->waiting_list); 546 546 } 547 547 548 548 ret = v4l2_async_nf_try_all_subdevs(notifier); ··· 634 634 635 635 static void __v4l2_async_nf_cleanup(struct v4l2_async_notifier *notifier) 636 636 { 637 - struct v4l2_async_subdev *asd, *tmp; 637 + struct v4l2_async_connection *asc, *tmp; 638 638 639 - if (!notifier || !notifier->asd_list.next) 639 + if (!notifier || !notifier->asc_list.next) 640 640 return; 641 641 642 - list_for_each_entry_safe(asd, tmp, &notifier->asd_list, asd_entry) { 643 - switch (asd->match.type) { 642 + list_for_each_entry_safe(asc, tmp, &notifier->asc_list, asc_entry) { 643 + switch (asc->match.type) { 644 644 case V4L2_ASYNC_MATCH_TYPE_FWNODE: 645 - fwnode_handle_put(asd->match.fwnode); 645 + fwnode_handle_put(asc->match.fwnode); 646 646 break; 647 647 default: 648 648 break; 649 649 } 650 650 651 - list_del(&asd->asd_entry); 652 - v4l2_async_nf_call_destroy(notifier, asd); 653 - kfree(asd); 651 + list_del(&asc->asc_entry); 652 + v4l2_async_nf_call_destroy(notifier, asc); 653 + kfree(asc); 654 654 } 655 655 } 656 656 ··· 664 664 } 665 665 EXPORT_SYMBOL_GPL(v4l2_async_nf_cleanup); 666 666 667 - 668 - static int __v4l2_async_nf_add_subdev(struct v4l2_async_notifier *notifier, 669 - struct v4l2_async_subdev *asd) 667 + static int __v4l2_async_nf_add_connection(struct v4l2_async_notifier *notifier, 668 + struct v4l2_async_connection *asc) 670 669 { 671 670 int ret; 672 671 673 672 mutex_lock(&list_lock); 674 673 675 - ret = v4l2_async_nf_match_valid(notifier, &asd->match, false); 674 + ret = v4l2_async_nf_match_valid(notifier, &asc->match, false); 676 675 if (ret) 677 676 goto unlock; 678 677 679 - list_add_tail(&asd->asd_entry, &notifier->asd_list); 678 + list_add_tail(&asc->asc_entry, &notifier->asc_list); 680 679 681 680 unlock: 682 681 mutex_unlock(&list_lock); 683 682 return ret; 684 683 } 685 684 686 - struct v4l2_async_subdev * 685 + struct v4l2_async_connection * 687 686 __v4l2_async_nf_add_fwnode(struct v4l2_async_notifier *notifier, 688 687 struct fwnode_handle *fwnode, 689 - unsigned int asd_struct_size) 688 + unsigned int asc_struct_size) 690 689 { 691 - struct v4l2_async_subdev *asd; 690 + struct v4l2_async_connection *asc; 692 691 int ret; 693 692 694 - asd = kzalloc(asd_struct_size, GFP_KERNEL); 695 - if (!asd) 693 + asc = kzalloc(asc_struct_size, GFP_KERNEL); 694 + if (!asc) 696 695 return ERR_PTR(-ENOMEM); 697 696 698 - asd->match.type = V4L2_ASYNC_MATCH_TYPE_FWNODE; 699 - asd->match.fwnode = fwnode_handle_get(fwnode); 697 + asc->match.type = V4L2_ASYNC_MATCH_TYPE_FWNODE; 698 + asc->match.fwnode = fwnode_handle_get(fwnode); 700 699 701 - ret = __v4l2_async_nf_add_subdev(notifier, asd); 700 + ret = __v4l2_async_nf_add_connection(notifier, asc); 702 701 if (ret) { 703 702 fwnode_handle_put(fwnode); 704 - kfree(asd); 703 + kfree(asc); 705 704 return ERR_PTR(ret); 706 705 } 707 706 708 - return asd; 707 + return asc; 709 708 } 710 709 EXPORT_SYMBOL_GPL(__v4l2_async_nf_add_fwnode); 711 710 712 - struct v4l2_async_subdev * 711 + struct v4l2_async_connection * 713 712 __v4l2_async_nf_add_fwnode_remote(struct v4l2_async_notifier *notif, 714 713 struct fwnode_handle *endpoint, 715 - unsigned int asd_struct_size) 714 + unsigned int asc_struct_size) 716 715 { 717 - struct v4l2_async_subdev *asd; 716 + struct v4l2_async_connection *asc; 718 717 struct fwnode_handle *remote; 719 718 720 719 remote = fwnode_graph_get_remote_endpoint(endpoint); 721 720 if (!remote) 722 721 return ERR_PTR(-ENOTCONN); 723 722 724 - asd = __v4l2_async_nf_add_fwnode(notif, remote, asd_struct_size); 723 + asc = __v4l2_async_nf_add_fwnode(notif, remote, asc_struct_size); 725 724 /* 726 725 * Calling __v4l2_async_nf_add_fwnode grabs a refcount, 727 726 * so drop the one we got in fwnode_graph_get_remote_port_parent. 728 727 */ 729 728 fwnode_handle_put(remote); 730 - return asd; 729 + return asc; 731 730 } 732 731 EXPORT_SYMBOL_GPL(__v4l2_async_nf_add_fwnode_remote); 733 732 734 - struct v4l2_async_subdev * 733 + struct v4l2_async_connection * 735 734 __v4l2_async_nf_add_i2c(struct v4l2_async_notifier *notifier, int adapter_id, 736 - unsigned short address, unsigned int asd_struct_size) 735 + unsigned short address, unsigned int asc_struct_size) 737 736 { 738 - struct v4l2_async_subdev *asd; 737 + struct v4l2_async_connection *asc; 739 738 int ret; 740 739 741 - asd = kzalloc(asd_struct_size, GFP_KERNEL); 742 - if (!asd) 740 + asc = kzalloc(asc_struct_size, GFP_KERNEL); 741 + if (!asc) 743 742 return ERR_PTR(-ENOMEM); 744 743 745 - asd->match.type = V4L2_ASYNC_MATCH_TYPE_I2C; 746 - asd->match.i2c.adapter_id = adapter_id; 747 - asd->match.i2c.address = address; 744 + asc->match.type = V4L2_ASYNC_MATCH_TYPE_I2C; 745 + asc->match.i2c.adapter_id = adapter_id; 746 + asc->match.i2c.address = address; 748 747 749 - ret = __v4l2_async_nf_add_subdev(notifier, asd); 748 + ret = __v4l2_async_nf_add_connection(notifier, asc); 750 749 if (ret) { 751 - kfree(asd); 750 + kfree(asc); 752 751 return ERR_PTR(ret); 753 752 } 754 753 755 - return asd; 754 + return asc; 756 755 } 757 756 EXPORT_SYMBOL_GPL(__v4l2_async_nf_add_i2c); 758 757 ··· 783 784 list_for_each_entry(notifier, &notifier_list, notifier_entry) { 784 785 struct v4l2_device *v4l2_dev = 785 786 v4l2_async_nf_find_v4l2_dev(notifier); 786 - struct v4l2_async_subdev *asd; 787 + struct v4l2_async_connection *asc; 787 788 788 789 if (!v4l2_dev) 789 790 continue; 790 791 791 - asd = v4l2_async_find_match(notifier, sd); 792 - if (!asd) 792 + asc = v4l2_async_find_match(notifier, sd); 793 + if (!asc) 793 794 continue; 794 795 795 - ret = v4l2_async_match_notify(notifier, v4l2_dev, sd, asd); 796 + ret = v4l2_async_match_notify(notifier, v4l2_dev, sd, asc); 796 797 if (ret) 797 798 goto err_unbind; 798 799 ··· 897 898 static int pending_subdevs_show(struct seq_file *s, void *data) 898 899 { 899 900 struct v4l2_async_notifier *notif; 900 - struct v4l2_async_subdev *asd; 901 + struct v4l2_async_connection *asc; 901 902 902 903 mutex_lock(&list_lock); 903 904 904 905 list_for_each_entry(notif, &notifier_list, notifier_entry) { 905 906 seq_printf(s, "%s:\n", v4l2_async_nf_name(notif)); 906 - list_for_each_entry(asd, &notif->waiting_list, waiting_entry) 907 - print_waiting_match(s, &asd->match); 907 + list_for_each_entry(asc, &notif->waiting_list, waiting_entry) 908 + print_waiting_match(s, &asc->match); 908 909 } 909 910 910 911 mutex_unlock(&list_lock);
+4 -4
drivers/media/v4l2-core/v4l2-fwnode.c
··· 831 831 !(ret = fwnode_property_get_reference_args(dev_fwnode(dev), prop, 832 832 NULL, 0, index, &args)); 833 833 index++) { 834 - struct v4l2_async_subdev *asd; 834 + struct v4l2_async_connection *asd; 835 835 836 836 asd = v4l2_async_nf_add_fwnode(notifier, args.fwnode, 837 - struct v4l2_async_subdev); 837 + struct v4l2_async_connection); 838 838 fwnode_handle_put(args.fwnode); 839 839 if (IS_ERR(asd)) { 840 840 /* not an error if asd already exists */ ··· 1136 1136 props, 1137 1137 nprops))); 1138 1138 index++) { 1139 - struct v4l2_async_subdev *asd; 1139 + struct v4l2_async_connection *asd; 1140 1140 1141 1141 asd = v4l2_async_nf_add_fwnode(notifier, fwnode, 1142 - struct v4l2_async_subdev); 1142 + struct v4l2_async_connection); 1143 1143 fwnode_handle_put(fwnode); 1144 1144 if (IS_ERR(asd)) { 1145 1145 ret = PTR_ERR(asd);
+3 -3
drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c
··· 767 767 /******* V4L2 sub-device asynchronous registration callbacks***********/ 768 768 769 769 struct sensor_async_subdev { 770 - struct v4l2_async_subdev asd; 770 + struct v4l2_async_connection asd; 771 771 int port; 772 772 }; 773 773 ··· 777 777 /* .bound() notifier callback when a match is found */ 778 778 static int atomisp_notifier_bound(struct v4l2_async_notifier *notifier, 779 779 struct v4l2_subdev *sd, 780 - struct v4l2_async_subdev *asd) 780 + struct v4l2_async_connection *asd) 781 781 { 782 782 struct atomisp_device *isp = notifier_to_atomisp(notifier); 783 783 struct sensor_async_subdev *s_asd = to_sensor_asd(asd); ··· 799 799 /* The .unbind callback */ 800 800 static void atomisp_notifier_unbind(struct v4l2_async_notifier *notifier, 801 801 struct v4l2_subdev *sd, 802 - struct v4l2_async_subdev *asd) 802 + struct v4l2_async_connection *asd) 803 803 { 804 804 struct atomisp_device *isp = notifier_to_atomisp(notifier); 805 805 struct sensor_async_subdev *s_asd = to_sensor_asd(asd);
+2 -2
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
··· 1727 1727 1728 1728 static int isc_async_bound(struct v4l2_async_notifier *notifier, 1729 1729 struct v4l2_subdev *subdev, 1730 - struct v4l2_async_subdev *asd) 1730 + struct v4l2_async_connection *asd) 1731 1731 { 1732 1732 struct isc_device *isc = container_of(notifier->v4l2_dev, 1733 1733 struct isc_device, v4l2_dev); ··· 1746 1746 1747 1747 static void isc_async_unbind(struct v4l2_async_notifier *notifier, 1748 1748 struct v4l2_subdev *subdev, 1749 - struct v4l2_async_subdev *asd) 1749 + struct v4l2_async_connection *asd) 1750 1750 { 1751 1751 struct isc_device *isc = container_of(notifier->v4l2_dev, 1752 1752 struct isc_device, v4l2_dev);
+1 -1
drivers/staging/media/deprecated/atmel/atmel-isc.h
··· 44 44 45 45 struct isc_subdev_entity { 46 46 struct v4l2_subdev *sd; 47 - struct v4l2_async_subdev *asd; 47 + struct v4l2_async_connection *asd; 48 48 struct device_node *epn; 49 49 struct v4l2_async_notifier notifier; 50 50
+2 -2
drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c
··· 503 503 } 504 504 505 505 list_for_each_entry(subdev_entity, &isc->subdev_entities, list) { 506 - struct v4l2_async_subdev *asd; 506 + struct v4l2_async_connection *asd; 507 507 struct fwnode_handle *fwnode = 508 508 of_fwnode_handle(subdev_entity->epn); 509 509 ··· 511 511 512 512 asd = v4l2_async_nf_add_fwnode_remote(&subdev_entity->notifier, 513 513 fwnode, 514 - struct v4l2_async_subdev); 514 + struct v4l2_async_connection); 515 515 516 516 of_node_put(subdev_entity->epn); 517 517 subdev_entity->epn = NULL;
+2 -2
drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c
··· 493 493 } 494 494 495 495 list_for_each_entry(subdev_entity, &isc->subdev_entities, list) { 496 - struct v4l2_async_subdev *asd; 496 + struct v4l2_async_connection *asd; 497 497 struct fwnode_handle *fwnode = 498 498 of_fwnode_handle(subdev_entity->epn); 499 499 ··· 501 501 502 502 asd = v4l2_async_nf_add_fwnode_remote(&subdev_entity->notifier, 503 503 fwnode, 504 - struct v4l2_async_subdev); 504 + struct v4l2_async_connection); 505 505 506 506 of_node_put(subdev_entity->epn); 507 507 subdev_entity->epn = NULL;
+3 -3
drivers/staging/media/imx/imx-media-csi.c
··· 1892 1892 1893 1893 static int imx_csi_notify_bound(struct v4l2_async_notifier *notifier, 1894 1894 struct v4l2_subdev *sd, 1895 - struct v4l2_async_subdev *asd) 1895 + struct v4l2_async_connection *asd) 1896 1896 { 1897 1897 struct csi_priv *priv = notifier_to_dev(notifier); 1898 1898 struct media_pad *sink = &priv->sd.entity.pads[CSI_SINK_PAD]; ··· 1913 1913 1914 1914 static int imx_csi_async_register(struct csi_priv *priv) 1915 1915 { 1916 - struct v4l2_async_subdev *asd = NULL; 1916 + struct v4l2_async_connection *asd = NULL; 1917 1917 struct fwnode_handle *ep; 1918 1918 unsigned int port; 1919 1919 int ret; ··· 1930 1930 FWNODE_GRAPH_ENDPOINT_NEXT); 1931 1931 if (ep) { 1932 1932 asd = v4l2_async_nf_add_fwnode_remote(&priv->notifier, ep, 1933 - struct v4l2_async_subdev); 1933 + struct v4l2_async_connection); 1934 1934 1935 1935 fwnode_handle_put(ep); 1936 1936
+1 -1
drivers/staging/media/imx/imx-media-dev-common.c
··· 384 384 int ret; 385 385 386 386 /* no subdevs? just bail */ 387 - if (list_empty(&imxmd->notifier.asd_list)) { 387 + if (list_empty(&imxmd->notifier.asc_list)) { 388 388 v4l2_err(&imxmd->v4l2_dev, "no subdevs\n"); 389 389 return -ENODEV; 390 390 }
+1 -1
drivers/staging/media/imx/imx-media-dev.c
··· 20 20 /* async subdev bound notifier */ 21 21 static int imx_media_subdev_bound(struct v4l2_async_notifier *notifier, 22 22 struct v4l2_subdev *sd, 23 - struct v4l2_async_subdev *asd) 23 + struct v4l2_async_connection *asd) 24 24 { 25 25 struct imx_media_dev *imxmd = notifier2dev(notifier); 26 26 int ret;
+2 -2
drivers/staging/media/imx/imx-media-of.c
··· 19 19 static int imx_media_of_add_csi(struct imx_media_dev *imxmd, 20 20 struct device_node *csi_np) 21 21 { 22 - struct v4l2_async_subdev *asd; 22 + struct v4l2_async_connection *asd; 23 23 int ret = 0; 24 24 25 25 if (!of_device_is_available(csi_np)) { ··· 31 31 /* add CSI fwnode to async notifier */ 32 32 asd = v4l2_async_nf_add_fwnode(&imxmd->notifier, 33 33 of_fwnode_handle(csi_np), 34 - struct v4l2_async_subdev); 34 + struct v4l2_async_connection); 35 35 if (IS_ERR(asd)) { 36 36 ret = PTR_ERR(asd); 37 37 if (ret == -EEXIST)
+4 -4
drivers/staging/media/imx/imx6-mipi-csi2.c
··· 636 636 637 637 static int csi2_notify_bound(struct v4l2_async_notifier *notifier, 638 638 struct v4l2_subdev *sd, 639 - struct v4l2_async_subdev *asd) 639 + struct v4l2_async_connection *asd) 640 640 { 641 641 struct csi2_dev *csi2 = notifier_to_dev(notifier); 642 642 struct media_pad *sink = &csi2->sd.entity.pads[CSI2_SINK_PAD]; ··· 659 659 660 660 static void csi2_notify_unbind(struct v4l2_async_notifier *notifier, 661 661 struct v4l2_subdev *sd, 662 - struct v4l2_async_subdev *asd) 662 + struct v4l2_async_connection *asd) 663 663 { 664 664 struct csi2_dev *csi2 = notifier_to_dev(notifier); 665 665 ··· 676 676 struct v4l2_fwnode_endpoint vep = { 677 677 .bus_type = V4L2_MBUS_CSI2_DPHY, 678 678 }; 679 - struct v4l2_async_subdev *asd; 679 + struct v4l2_async_connection *asd; 680 680 struct fwnode_handle *ep; 681 681 int ret; 682 682 ··· 697 697 dev_dbg(csi2->dev, "flags: 0x%08x\n", vep.bus.mipi_csi2.flags); 698 698 699 699 asd = v4l2_async_nf_add_fwnode_remote(&csi2->notifier, ep, 700 - struct v4l2_async_subdev); 700 + struct v4l2_async_connection); 701 701 fwnode_handle_put(ep); 702 702 703 703 if (IS_ERR(asd))
+1 -1
drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c
··· 395 395 396 396 static int sun6i_isp_proc_notifier_bound(struct v4l2_async_notifier *notifier, 397 397 struct v4l2_subdev *remote_subdev, 398 - struct v4l2_async_subdev *async_subdev) 398 + struct v4l2_async_connection *async_subdev) 399 399 { 400 400 struct sun6i_isp_device *isp_dev = 401 401 container_of(notifier, struct sun6i_isp_device, proc.notifier);
+1 -1
drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.h
··· 34 34 }; 35 35 36 36 struct sun6i_isp_proc_async_subdev { 37 - struct v4l2_async_subdev async_subdev; 37 + struct v4l2_async_connection async_subdev; 38 38 struct sun6i_isp_proc_source *source; 39 39 }; 40 40
+8 -8
drivers/staging/media/tegra-video/vi.c
··· 40 40 * @subdev: V4L2 subdev 41 41 */ 42 42 struct tegra_vi_graph_entity { 43 - struct v4l2_async_subdev asd; 43 + struct v4l2_async_connection asd; 44 44 struct media_entity *entity; 45 45 struct v4l2_subdev *subdev; 46 46 }; ··· 58 58 } 59 59 60 60 static inline struct tegra_vi_graph_entity * 61 - to_tegra_vi_graph_entity(struct v4l2_async_subdev *asd) 61 + to_tegra_vi_graph_entity(struct v4l2_async_connection *asd) 62 62 { 63 63 return container_of(asd, struct tegra_vi_graph_entity, asd); 64 64 } ··· 1462 1462 const struct fwnode_handle *fwnode) 1463 1463 { 1464 1464 struct tegra_vi_graph_entity *entity; 1465 - struct v4l2_async_subdev *asd; 1465 + struct v4l2_async_connection *asd; 1466 1466 1467 - list_for_each_entry(asd, &chan->notifier.asd_list, asd_entry) { 1467 + list_for_each_entry(asd, &chan->notifier.asc_list, asc_entry) { 1468 1468 entity = to_tegra_vi_graph_entity(asd); 1469 1469 if (entity->asd.match.fwnode == fwnode) 1470 1470 return entity; ··· 1578 1578 static int tegra_vi_graph_notify_complete(struct v4l2_async_notifier *notifier) 1579 1579 { 1580 1580 struct tegra_vi_graph_entity *entity; 1581 - struct v4l2_async_subdev *asd; 1581 + struct v4l2_async_connection *asd; 1582 1582 struct v4l2_subdev *subdev; 1583 1583 struct tegra_vi_channel *chan; 1584 1584 struct tegra_vi *vi; ··· 1608 1608 } 1609 1609 1610 1610 /* create links between the entities */ 1611 - list_for_each_entry(asd, &chan->notifier.asd_list, asd_entry) { 1611 + list_for_each_entry(asd, &chan->notifier.asc_list, asc_entry) { 1612 1612 entity = to_tegra_vi_graph_entity(asd); 1613 1613 ret = tegra_vi_graph_build(chan, entity); 1614 1614 if (ret < 0) ··· 1651 1651 1652 1652 static int tegra_vi_graph_notify_bound(struct v4l2_async_notifier *notifier, 1653 1653 struct v4l2_subdev *subdev, 1654 - struct v4l2_async_subdev *asd) 1654 + struct v4l2_async_connection *asd) 1655 1655 { 1656 1656 struct tegra_vi_graph_entity *entity; 1657 1657 struct tegra_vi *vi; ··· 1775 1775 1776 1776 ret = tegra_vi_graph_parse_one(chan, remote); 1777 1777 fwnode_handle_put(remote); 1778 - if (ret < 0 || list_empty(&chan->notifier.asd_list)) 1778 + if (ret < 0 || list_empty(&chan->notifier.asc_list)) 1779 1779 continue; 1780 1780 1781 1781 chan->notifier.ops = &tegra_vi_async_ops;
+1 -1
include/media/davinci/vpif_types.h
··· 72 72 int i2c_adapter_id; 73 73 const char *card_name; 74 74 75 - struct v4l2_async_subdev *asd[VPIF_CAPTURE_MAX_CHANNELS]; 75 + struct v4l2_async_connection *asd[VPIF_CAPTURE_MAX_CHANNELS]; 76 76 int asd_sizes[VPIF_CAPTURE_MAX_CHANNELS]; 77 77 }; 78 78 #endif /* _VPIF_TYPES_H */
+44 -43
include/media/v4l2-async.h
··· 25 25 * @V4L2_ASYNC_MATCH_TYPE_I2C: Match will check for I2C adapter ID and address 26 26 * @V4L2_ASYNC_MATCH_TYPE_FWNODE: Match will use firmware node 27 27 * 28 - * This enum is used by the asynchronous sub-device logic to define the 28 + * This enum is used by the asynchronous connection logic to define the 29 29 * algorithm that will be used to match an asynchronous device. 30 30 */ 31 31 enum v4l2_async_match_type { ··· 34 34 }; 35 35 36 36 /** 37 - * struct v4l2_async_match_desc - async sub-device match information 37 + * struct v4l2_async_match_desc - async connection match information 38 38 * 39 39 * @type: type of match that will be used 40 40 * @fwnode: pointer to &struct fwnode_handle to be matched. ··· 62 62 }; 63 63 64 64 /** 65 - * struct v4l2_async_subdev - sub-device descriptor, as known to a bridge 65 + * struct v4l2_async_connection - connection descriptor, as known to a bridge 66 66 * 67 67 * @match: struct of match type and per-bus type matching data sets 68 - * @asd_entry: used to add struct v4l2_async_subdev objects to the 69 - * master notifier @asd_list 70 - * @waiting_entry: used to link struct v4l2_async_subdev objects, waiting to be 71 - * probed, to a notifier->waiting_list list 68 + * @asc_entry: used to add struct v4l2_async_connection objects to the 69 + * master notifier @asc_list 70 + * @waiting_entry: used to link struct v4l2_async_connection objects, waiting to 71 + * be probed, to a notifier->waiting_list list 72 72 * 73 73 * When this struct is used as a member in a driver specific struct, 74 74 * the driver specific struct shall contain the &struct 75 - * v4l2_async_subdev as its first member. 75 + * v4l2_async_connection as its first member. 76 76 */ 77 - struct v4l2_async_subdev { 77 + struct v4l2_async_connection { 78 78 struct v4l2_async_match_desc match; 79 - struct list_head asd_entry; 79 + struct list_head asc_entry; 80 80 struct list_head waiting_entry; 81 81 }; 82 82 ··· 86 86 * @complete: All subdevices have been probed successfully. The complete 87 87 * callback is only executed for the root notifier. 88 88 * @unbind: a subdevice is leaving 89 - * @destroy: the asd is about to be freed 89 + * @destroy: the asc is about to be freed 90 90 */ 91 91 struct v4l2_async_notifier_operations { 92 92 int (*bound)(struct v4l2_async_notifier *notifier, 93 93 struct v4l2_subdev *subdev, 94 - struct v4l2_async_subdev *asd); 94 + struct v4l2_async_connection *asc); 95 95 int (*complete)(struct v4l2_async_notifier *notifier); 96 96 void (*unbind)(struct v4l2_async_notifier *notifier, 97 97 struct v4l2_subdev *subdev, 98 - struct v4l2_async_subdev *asd); 99 - void (*destroy)(struct v4l2_async_subdev *asd); 98 + struct v4l2_async_connection *asc); 99 + void (*destroy)(struct v4l2_async_connection *asc); 100 100 }; 101 101 102 102 /** ··· 106 106 * @v4l2_dev: v4l2_device of the root notifier, NULL otherwise 107 107 * @sd: sub-device that registered the notifier, NULL otherwise 108 108 * @parent: parent notifier 109 - * @asd_list: master list of struct v4l2_async_subdev 110 - * @waiting_list: list of struct v4l2_async_subdev, waiting for their drivers 109 + * @asc_list: master list of struct v4l2_async_connection 110 + * @waiting_list: list of struct v4l2_async_connection, waiting for their 111 + * drivers 111 112 * @done_list: list of struct v4l2_subdev, already probed 112 113 * @notifier_entry: member in a global list of notifiers 113 114 */ ··· 117 116 struct v4l2_device *v4l2_dev; 118 117 struct v4l2_subdev *sd; 119 118 struct v4l2_async_notifier *parent; 120 - struct list_head asd_list; 119 + struct list_head asc_list; 121 120 struct list_head waiting_list; 122 121 struct list_head done_list; 123 122 struct list_head notifier_entry; ··· 135 134 * 136 135 * @notifier: pointer to &struct v4l2_async_notifier 137 136 * 138 - * This function initializes the notifier @asd_list. It must be called 137 + * This function initializes the notifier @asc_list. It must be called 139 138 * before adding a subdevice to a notifier, using one of: 140 139 * v4l2_async_nf_add_fwnode_remote(), v4l2_async_nf_add_fwnode() or 141 140 * v4l2_async_nf_add_i2c(). 142 141 */ 143 142 void v4l2_async_nf_init(struct v4l2_async_notifier *notifier); 144 143 145 - struct v4l2_async_subdev * 144 + struct v4l2_async_connection * 146 145 __v4l2_async_nf_add_fwnode(struct v4l2_async_notifier *notifier, 147 146 struct fwnode_handle *fwnode, 148 - unsigned int asd_struct_size); 147 + unsigned int asc_struct_size); 149 148 /** 150 149 * v4l2_async_nf_add_fwnode - Allocate and add a fwnode async 151 - * subdev to the notifier's master asd_list. 150 + * subdev to the notifier's master asc_list. 152 151 * 153 152 * @notifier: pointer to &struct v4l2_async_notifier 154 153 * @fwnode: fwnode handle of the sub-device to be matched, pointer to 155 154 * &struct fwnode_handle 156 - * @type: Type of the driver's async sub-device struct. The &struct 157 - * v4l2_async_subdev shall be the first member of the driver's async 158 - * sub-device struct, i.e. both begin at the same memory address. 155 + * @type: Type of the driver's async sub-device or connection struct. The 156 + * &struct v4l2_async_connection shall be the first member of the 157 + * driver's async struct, i.e. both begin at the same memory address. 159 158 * 160 - * Allocate a fwnode-matched asd of size asd_struct_size, and add it to the 161 - * notifiers @asd_list. The function also gets a reference of the fwnode which 159 + * Allocate a fwnode-matched asc of size asc_struct_size, and add it to the 160 + * notifiers @asc_list. The function also gets a reference of the fwnode which 162 161 * is released later at notifier cleanup time. 163 162 */ 164 163 #define v4l2_async_nf_add_fwnode(notifier, fwnode, type) \ 165 164 ((type *)__v4l2_async_nf_add_fwnode(notifier, fwnode, sizeof(type))) 166 165 167 - struct v4l2_async_subdev * 166 + struct v4l2_async_connection * 168 167 __v4l2_async_nf_add_fwnode_remote(struct v4l2_async_notifier *notif, 169 168 struct fwnode_handle *endpoint, 170 - unsigned int asd_struct_size); 169 + unsigned int asc_struct_size); 171 170 /** 172 171 * v4l2_async_nf_add_fwnode_remote - Allocate and add a fwnode 173 172 * remote async subdev to the 174 - * notifier's master asd_list. 173 + * notifier's master asc_list. 175 174 * 176 175 * @notifier: pointer to &struct v4l2_async_notifier 177 - * @ep: local endpoint pointing to the remote sub-device to be matched, 176 + * @ep: local endpoint pointing to the remote connection to be matched, 178 177 * pointer to &struct fwnode_handle 179 - * @type: Type of the driver's async sub-device struct. The &struct 180 - * v4l2_async_subdev shall be the first member of the driver's async 181 - * sub-device struct, i.e. both begin at the same memory address. 178 + * @type: Type of the driver's async connection struct. The &struct 179 + * v4l2_async_connection shall be the first member of the driver's async 180 + * connection struct, i.e. both begin at the same memory address. 182 181 * 183 182 * Gets the remote endpoint of a given local endpoint, set it up for fwnode 184 - * matching and adds the async sub-device to the notifier's @asd_list. The 183 + * matching and adds the async connection to the notifier's @asc_list. The 185 184 * function also gets a reference of the fwnode which is released later at 186 185 * notifier cleanup time. 187 186 * ··· 191 190 #define v4l2_async_nf_add_fwnode_remote(notifier, ep, type) \ 192 191 ((type *)__v4l2_async_nf_add_fwnode_remote(notifier, ep, sizeof(type))) 193 192 194 - struct v4l2_async_subdev * 193 + struct v4l2_async_connection * 195 194 __v4l2_async_nf_add_i2c(struct v4l2_async_notifier *notifier, 196 195 int adapter_id, unsigned short address, 197 - unsigned int asd_struct_size); 196 + unsigned int asc_struct_size); 198 197 /** 199 198 * v4l2_async_nf_add_i2c - Allocate and add an i2c async 200 - * subdev to the notifier's master asd_list. 199 + * subdev to the notifier's master asc_list. 201 200 * 202 201 * @notifier: pointer to &struct v4l2_async_notifier 203 202 * @adapter: I2C adapter ID to be matched 204 - * @address: I2C address of sub-device to be matched 205 - * @type: Type of the driver's async sub-device struct. The &struct 206 - * v4l2_async_subdev shall be the first member of the driver's async 207 - * sub-device struct, i.e. both begin at the same memory address. 203 + * @address: I2C address of connection to be matched 204 + * @type: Type of the driver's async connection struct. The &struct 205 + * v4l2_async_connection shall be the first member of the driver's async 206 + * connection struct, i.e. both begin at the same memory address. 208 207 * 209 208 * Same as v4l2_async_nf_add_fwnode() but for I2C matched 210 - * sub-devices. 209 + * connections. 211 210 */ 212 211 #define v4l2_async_nf_add_i2c(notifier, adapter, address, type) \ 213 212 ((type *)__v4l2_async_nf_add_i2c(notifier, adapter, address, \ ··· 245 244 * @notifier: the notifier the resources of which are to be cleaned up 246 245 * 247 246 * Release memory resources related to a notifier, including the async 248 - * sub-devices allocated for the purposes of the notifier but not the notifier 247 + * connections allocated for the purposes of the notifier but not the notifier 249 248 * itself. The user is responsible for calling this function to clean up the 250 249 * notifier after calling v4l2_async_nf_add_fwnode_remote(), 251 250 * v4l2_async_nf_add_fwnode() or v4l2_async_nf_add_i2c().
+2 -2
include/media/v4l2-subdev.h
··· 1022 1022 * either dev->of_node->fwnode or dev->fwnode (whichever is non-NULL). 1023 1023 * @async_list: Links this subdev to a global subdev_list or 1024 1024 * @notifier->done_list list. 1025 - * @asd: Pointer to respective &struct v4l2_async_subdev. 1025 + * @asd: Pointer to respective &struct v4l2_async_connection. 1026 1026 * @notifier: Pointer to the managing notifier. 1027 1027 * @subdev_notifier: A sub-device notifier implicitly registered for the sub- 1028 1028 * device using v4l2_async_register_subdev_sensor(). ··· 1065 1065 struct device *dev; 1066 1066 struct fwnode_handle *fwnode; 1067 1067 struct list_head async_list; 1068 - struct v4l2_async_subdev *asd; 1068 + struct v4l2_async_connection *asd; 1069 1069 struct v4l2_async_notifier *notifier; 1070 1070 struct v4l2_async_notifier *subdev_notifier; 1071 1071 struct v4l2_subdev_platform_data *pdata;