diff for duplicates of <20160429101506.GB22743@amd> diff --git a/a/1.txt b/N1/1.txt index fae749f..8121346 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -19,3 +19,38 @@ Ok, I attempted to forward-port the patches to v4.6. Not sure if I was successfu -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: 0001-omap3isp-Fix-async-notifier-registration-order.patch +Type: text/x-diff +Size: 4550 bytes +Desc: not available +URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160429/250b3c03/attachment-0005.bin> +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: 0002-Solve-conflict-I-missed.patch +Type: text/x-diff +Size: 1354 bytes +Desc: not available +URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160429/250b3c03/attachment-0006.bin> +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: 0003-Cherry-pick-manually.patch +Type: text/x-diff +Size: 5662 bytes +Desc: not available +URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160429/250b3c03/attachment-0007.bin> +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: 0004-omap3isp-Assign-a-group-ID-for-sensor-and-flash-enti.patch +Type: text/x-diff +Size: 3782 bytes +Desc: not available +URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160429/250b3c03/attachment-0008.bin> +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: 0005-Fix-work-around-compilation.patch +Type: text/x-diff +Size: 833 bytes +Desc: not available +URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160429/250b3c03/attachment-0009.bin> diff --git a/a/2.hdr b/a/2.hdr deleted file mode 100644 index 244544e..0000000 --- a/a/2.hdr +++ /dev/null @@ -1,2 +0,0 @@ -Content-Type: text/x-diff; charset=us-ascii -Content-Disposition: attachment; filename="0001-omap3isp-Fix-async-notifier-registration-order.patch" diff --git a/a/2.txt b/a/2.txt deleted file mode 100644 index d6cae49..0000000 --- a/a/2.txt +++ /dev/null @@ -1,159 +0,0 @@ ->From fad952ee3d1e888401b047c9657f04afeaf40fc5 Mon Sep 17 00:00:00 2001 -From: Sakari Ailus <sakari.ailus@iki.fi> -Date: Sat, 16 May 2015 23:34:34 +0300 -Subject: [PATCH 1/5] omap3isp: Fix async notifier registration order - -The async notifier was registered before the v4l2_device was registered and -before the notifier callbacks were set. This could lead to missing the -bound() and complete() callbacks and to attempting to spin_lock() and -uninitialised spin lock. - -Also fix unregistering the async notifier in the case of an error --- the -function may not fail anymore after the notifier is registered. - -Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> - -Conflicts: - drivers/media/platform/omap3isp/isp.c ---- - arch/arm/boot/dts/omap3-n900.dts | 24 ++++++++++++++++++++++++ - drivers/media/i2c/ad5820.c | 2 +- - drivers/media/i2c/adp1653.c | 9 ++++++++- - drivers/media/platform/omap3isp/isp.c | 12 ++++++++++++ - 4 files changed, 45 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts -index 640d409..0729c69 100644 ---- a/arch/arm/boot/dts/omap3-n900.dts -+++ b/arch/arm/boot/dts/omap3-n900.dts -@@ -186,6 +186,7 @@ - module { - model = "TCM8341MD"; - sensor = <&cam1>; -+ focus = <&autofocus>; - }; - }; - -@@ -198,6 +199,11 @@ - }; - }; - -+ autofocus: dac-camera-autofocus { -+ compatible = "dac-camera-autofocus"; -+ io-channels = <&ad5820>; -+ }; -+ - video-bus-switch { - compatible = "video-bus-switch"; - -@@ -255,6 +261,11 @@ - crc = <0>; - }; - }; -+ port@99 { -+ adp1653_link: endpoint { -+ remote-endpoint = <&adp1653_ep>; -+ }; -+ }; - }; - }; - -@@ -696,6 +707,11 @@ - indicator { - led-max-microamp = <17500>; - }; -+ port { -+ adp1653_ep: endpoint { -+ remote-endpoint = <&adp1653_link>; -+ }; -+ }; - }; - - lp5523: lp5523@32 { -@@ -879,6 +895,14 @@ - }; - }; - }; -+ -+ /* D/A converter for auto-focus */ -+ ad5820: dac@0c { -+ compatible = "adi,ad5820"; -+ reg = <0x0c>; -+ -+ #io-channel-cells = <0>; -+ }; - }; - - &mmc1 { -diff --git a/drivers/media/i2c/ad5820.c b/drivers/media/i2c/ad5820.c -index 58a44f1..400200c 100644 ---- a/drivers/media/i2c/ad5820.c -+++ b/drivers/media/i2c/ad5820.c -@@ -421,7 +421,7 @@ static int ad5820_probe(struct i2c_client *client, - coil->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - coil->subdev.internal_ops = &ad5820_internal_ops; - -- ret = media_entity_init(&coil->subdev.entity, 0, NULL, 0); -+ ret = media_entity_pads_init(&coil->subdev.entity, 0, NULL); - if (ret < 0) - kfree(coil); - -diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c -index b90e15b..6dd5d6a 100644 ---- a/drivers/media/i2c/adp1653.c -+++ b/drivers/media/i2c/adp1653.c -@@ -515,6 +515,7 @@ static int adp1653_probe(struct i2c_client *client, - v4l2_i2c_subdev_init(&flash->subdev, client, &adp1653_ops); - flash->subdev.internal_ops = &adp1653_internal_ops; - flash->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; -+ strcpy(flash->subdev.name, "adp1653 flash"); - - ret = adp1653_init_controls(flash); - if (ret) -@@ -524,7 +525,13 @@ static int adp1653_probe(struct i2c_client *client, - if (ret < 0) - goto free_and_quit; - -- dev_info(&client->dev, "adp1653 probe: should be ok\n"); -+ dev_info(&client->dev, "adp1653 probe: should be ok\n"); -+ -+ ret = v4l2_async_register_subdev(&flash->subdev); -+ if (ret < 0) -+ goto free_and_quit; -+ -+ dev_info(&client->dev, "adp1653 probe: async register subdev ok\n"); - - flash->subdev.entity.function = MEDIA_ENT_F_FLASH; - -diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c -index 6361fde..9f51127 100644 ---- a/drivers/media/platform/omap3isp/isp.c -+++ b/drivers/media/platform/omap3isp/isp.c -@@ -2392,6 +2392,7 @@ static int isp_probe(struct platform_device *pdev) - if (ret < 0) - goto error_modules; - -+<<<<<<< HEAD - ret = isp_create_links(isp); - if (ret < 0) - goto error_register_entities; -@@ -2402,6 +2403,17 @@ static int isp_probe(struct platform_device *pdev) - ret = v4l2_async_notifier_register(&isp->v4l2_dev, &isp->notifier); - if (ret) - goto error_register_entities; -+======= -+ if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) { -+ isp->notifier.bound = isp_subdev_notifier_bound; -+ isp->notifier.complete = isp_subdev_notifier_complete; -+ -+ ret = v4l2_async_notifier_register(&isp->v4l2_dev, -+ &isp->notifier); -+ if (ret) -+ goto error_register_entities; -+ } -+>>>>>>> a035633... omap3isp: Fix async notifier registration order - - isp_core_init(isp, 1); - omap3isp_put(isp); --- -2.1.4 diff --git a/a/3.hdr b/a/3.hdr deleted file mode 100644 index 8187cd3..0000000 --- a/a/3.hdr +++ /dev/null @@ -1,2 +0,0 @@ -Content-Type: text/x-diff; charset=us-ascii -Content-Disposition: attachment; filename="0002-Solve-conflict-I-missed.patch" diff --git a/a/3.txt b/a/3.txt deleted file mode 100644 index 49f25be..0000000 --- a/a/3.txt +++ /dev/null @@ -1,43 +0,0 @@ ->From 4f8286dfb13a14c1e166a61837ec20f5a096ed7b Mon Sep 17 00:00:00 2001 -From: Pavel <pavel@ucw.cz> -Date: Fri, 29 Apr 2016 12:02:07 +0200 -Subject: [PATCH 2/5] Solve conflict I missed. - ---- - drivers/media/platform/omap3isp/isp.c | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) - -diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c -index 9f51127..7419404 100644 ---- a/drivers/media/platform/omap3isp/isp.c -+++ b/drivers/media/platform/omap3isp/isp.c -@@ -2392,18 +2392,14 @@ static int isp_probe(struct platform_device *pdev) - if (ret < 0) - goto error_modules; - --<<<<<<< HEAD - ret = isp_create_links(isp); - if (ret < 0) - goto error_register_entities; - -- isp->notifier.bound = isp_subdev_notifier_bound; -- isp->notifier.complete = isp_subdev_notifier_complete; -- - ret = v4l2_async_notifier_register(&isp->v4l2_dev, &isp->notifier); - if (ret) - goto error_register_entities; --======= -+ - if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) { - isp->notifier.bound = isp_subdev_notifier_bound; - isp->notifier.complete = isp_subdev_notifier_complete; -@@ -2413,7 +2409,6 @@ static int isp_probe(struct platform_device *pdev) - if (ret) - goto error_register_entities; - } -->>>>>>> a035633... omap3isp: Fix async notifier registration order - - isp_core_init(isp, 1); - omap3isp_put(isp); --- -2.1.4 diff --git a/a/4.hdr b/a/4.hdr deleted file mode 100644 index ca2c758..0000000 --- a/a/4.hdr +++ /dev/null @@ -1,2 +0,0 @@ -Content-Type: text/x-diff; charset=us-ascii -Content-Disposition: attachment; filename="0003-Cherry-pick-manually.patch" diff --git a/a/4.txt b/a/4.txt deleted file mode 100644 index 4e29c41..0000000 --- a/a/4.txt +++ /dev/null @@ -1,191 +0,0 @@ ->From b402e5a19c46a9c264a311b7656c0e7e0d65322f Mon Sep 17 00:00:00 2001 -From: Pavel <pavel@ucw.cz> -Date: Fri, 29 Apr 2016 12:06:32 +0200 -Subject: [PATCH 3/5] Cherry-pick (manually) - -commit b3691ff97a99bcf28790c4da906ffc17c822844a -Author: Sakari Ailus <sakari.ailus@iki.fi> -Date: Sat May 16 23:56:03 2015 +0300 - - omap3isp: Support the ti,camera-flashes property - - Before this patch the omap3isp driver only supported external - devices that - are connected to it by a data bus. This patch adds support for - flash - devices, in form of an array of phandles to sensor and - associated flash - devices, respectively, in the "ti,camera-flashes" property. - - The non image source devices are recognised by empty bus field in - struct - isp_async_subdev, which is made a pointer by the patch. - - Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> ---- - drivers/media/platform/omap3isp/isp.c | 90 +++++++++++++++++++++-------- - drivers/media/platform/omap3isp/isp.h | 2 +- - drivers/media/platform/omap3isp/ispcsiphy.c | 2 +- - 3 files changed, 67 insertions(+), 27 deletions(-) - -diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c -index 7419404..a1c3bdb 100644 ---- a/drivers/media/platform/omap3isp/isp.c -+++ b/drivers/media/platform/omap3isp/isp.c -@@ -2095,13 +2095,20 @@ static void isp_of_parse_node_csi2(struct device *dev, - buscfg->bus.csi2.crc = 1; - } - --static int isp_of_parse_node(struct device *dev, struct device_node *node, -- struct isp_async_subdev *isd) -+static int isp_of_parse_node_endpoint(struct device *dev, -+ struct device_node *node, -+ struct isp_async_subdev *isd) - { -- struct isp_bus_cfg *buscfg = &isd->bus; -+ struct isp_bus_cfg *buscfg; - struct v4l2_of_endpoint vep; - int ret; - -+ isd->bus = devm_kzalloc(dev, sizeof(*isd->bus), GFP_KERNEL); -+ if (!isd->bus) -+ return -ENOMEM; -+ -+ buscfg = isd->bus; -+ - ret = v4l2_of_parse_endpoint(node, &vep); - if (ret) - return ret; -@@ -2144,10 +2151,48 @@ static int isp_of_parse_node(struct device *dev, struct device_node *node, - return 0; - } - -+static int isp_of_parse_node(struct device *dev, struct device_node *node, -+ struct v4l2_async_notifier *notifier, bool link) -+{ -+ struct isp_async_subdev *isd; -+ -+ isd = devm_kzalloc(dev, sizeof(*isd), GFP_KERNEL); -+ if (!isd) { -+ of_node_put(node); -+ return -ENOMEM; -+ } -+ -+ notifier->subdevs[notifier->num_subdevs] = &isd->asd; -+ -+ if (link) { -+ if (isp_of_parse_node_endpoint(dev, node, isd)) { -+ of_node_put(node); -+ return -EINVAL; -+ } -+ -+ isd->asd.match.of.node = of_graph_get_remote_port_parent(node); -+ of_node_put(node); -+ } else { -+ isd->asd.match.of.node = node; -+ } -+ -+ if (!isd->asd.match.of.node) { -+ dev_warn(dev, "bad remote port parent\n"); -+ return -EINVAL; -+ } -+ -+ isd->asd.match_type = V4L2_ASYNC_MATCH_OF; -+ notifier->num_subdevs++; -+ -+ return 0; -+} -+ - static int isp_of_parse_nodes(struct device *dev, - struct v4l2_async_notifier *notifier) - { - struct device_node *node = NULL; -+ int ret; -+ unsigned int flash = 0; - - notifier->subdevs = devm_kcalloc( - dev, ISP_MAX_SUBDEVS, sizeof(*notifier->subdevs), GFP_KERNEL); -@@ -2156,30 +2201,25 @@ static int isp_of_parse_nodes(struct device *dev, - - while (notifier->num_subdevs < ISP_MAX_SUBDEVS && - (node = of_graph_get_next_endpoint(dev->of_node, node))) { -- struct isp_async_subdev *isd; -- -- isd = devm_kzalloc(dev, sizeof(*isd), GFP_KERNEL); -- if (!isd) { -- of_node_put(node); -- return -ENOMEM; -- } -- -- notifier->subdevs[notifier->num_subdevs] = &isd->asd; -- -- if (isp_of_parse_node(dev, node, isd)) { -- of_node_put(node); -- return -EINVAL; -- } -+ ret = isp_of_parse_node(dev, node, notifier, true); -+ if (ret) -+ return ret; -+ } - -- isd->asd.match.of.node = of_graph_get_remote_port_parent(node); -- of_node_put(node); -- if (!isd->asd.match.of.node) { -- dev_warn(dev, "bad remote port parent\n"); -+ while (notifier->num_subdevs < ISP_MAX_SUBDEVS && -+ (node = of_parse_phandle(dev->of_node, "ti,camera-flashes", -+ flash++))) { -+ struct device_node *sensor_node = -+ of_parse_phandle(dev->of_node, "ti,camera-flashes", -+ flash++); -+ unsigned int i; -+ -+ if (!sensor_node) - return -EINVAL; -- } - -- isd->asd.match_type = V4L2_ASYNC_MATCH_OF; -- notifier->num_subdevs++; -+ ret = isp_of_parse_node(dev, node, notifier, false); -+ if (ret) -+ return ret; - } - - return notifier->num_subdevs; -@@ -2193,7 +2233,7 @@ static int isp_subdev_notifier_bound(struct v4l2_async_notifier *async, - container_of(asd, struct isp_async_subdev, asd); - - isd->sd = subdev; -- isd->sd->host_priv = &isd->bus; -+ isd->sd->host_priv = isd->bus; - - return 0; - } -diff --git a/drivers/media/platform/omap3isp/isp.h b/drivers/media/platform/omap3isp/isp.h -index 7e6f663..c0b9d1d 100644 ---- a/drivers/media/platform/omap3isp/isp.h -+++ b/drivers/media/platform/omap3isp/isp.h -@@ -228,7 +228,7 @@ struct isp_device { - - struct isp_async_subdev { - struct v4l2_subdev *sd; -- struct isp_bus_cfg bus; -+ struct isp_bus_cfg *bus; - struct v4l2_async_subdev asd; - }; - -diff --git a/drivers/media/platform/omap3isp/ispcsiphy.c b/drivers/media/platform/omap3isp/ispcsiphy.c -index 495447d..750ce93 100644 ---- a/drivers/media/platform/omap3isp/ispcsiphy.c -+++ b/drivers/media/platform/omap3isp/ispcsiphy.c -@@ -177,7 +177,7 @@ static int omap3isp_csiphy_config(struct isp_csiphy *phy) - struct isp_async_subdev *isd = - container_of(pipe->external->asd, - struct isp_async_subdev, asd); -- buscfg = &isd->bus; -+ buscfg = isd->bus; - } - - if (buscfg->interface == ISP_INTERFACE_CCP2B_PHY1 --- -2.1.4 diff --git a/a/5.hdr b/a/5.hdr deleted file mode 100644 index efb533c..0000000 --- a/a/5.hdr +++ /dev/null @@ -1,2 +0,0 @@ -Content-Type: text/x-diff; charset=us-ascii -Content-Disposition: attachment; filename="0004-omap3isp-Assign-a-group-ID-for-sensor-and-flash-enti.patch" diff --git a/a/5.txt b/a/5.txt deleted file mode 100644 index 3d9cf56..0000000 --- a/a/5.txt +++ /dev/null @@ -1,121 +0,0 @@ ->From 568ea9c5c8aa61ee44e30aa4134d2b59e55a5b45 Mon Sep 17 00:00:00 2001 -From: Sakari Ailus <sakari.ailus@iki.fi> -Date: Sat, 23 May 2015 15:24:55 +0300 -Subject: [PATCH 4/5] omap3isp: Assign a group ID for sensor and flash entities - -Starting from zero, assign a group ID for each sensor. Look for the -associated flash device node and based on nodes found, assign the same group -ID for them. - -Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> ---- - drivers/media/platform/omap3isp/isp.c | 42 ++++++++++++++++++++++++++++++++--- - drivers/media/platform/omap3isp/isp.h | 1 + - 2 files changed, 40 insertions(+), 3 deletions(-) - -diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c -index a1c3bdb..f89abea 100644 ---- a/drivers/media/platform/omap3isp/isp.c -+++ b/drivers/media/platform/omap3isp/isp.c -@@ -2152,7 +2152,8 @@ static int isp_of_parse_node_endpoint(struct device *dev, - } - - static int isp_of_parse_node(struct device *dev, struct device_node *node, -- struct v4l2_async_notifier *notifier, bool link) -+ struct v4l2_async_notifier *notifier, -+ u32 group_id, bool link) - { - struct isp_async_subdev *isd; - -@@ -2182,6 +2183,7 @@ static int isp_of_parse_node(struct device *dev, struct device_node *node, - } - - isd->asd.match_type = V4L2_ASYNC_MATCH_OF; -+ isd->group_id = group_id; - notifier->num_subdevs++; - - return 0; -@@ -2193,6 +2195,7 @@ static int isp_of_parse_nodes(struct device *dev, - struct device_node *node = NULL; - int ret; - unsigned int flash = 0; -+ u32 group_id = 0; - - notifier->subdevs = devm_kcalloc( - dev, ISP_MAX_SUBDEVS, sizeof(*notifier->subdevs), GFP_KERNEL); -@@ -2201,7 +2204,7 @@ static int isp_of_parse_nodes(struct device *dev, - - while (notifier->num_subdevs < ISP_MAX_SUBDEVS && - (node = of_graph_get_next_endpoint(dev->of_node, node))) { -- ret = isp_of_parse_node(dev, node, notifier, true); -+ ret = isp_of_parse_node(dev, node, notifier, group_id++, true); - if (ret) - return ret; - } -@@ -2213,11 +2216,43 @@ static int isp_of_parse_nodes(struct device *dev, - of_parse_phandle(dev->of_node, "ti,camera-flashes", - flash++); - unsigned int i; -+ u32 flash_group_id; - - if (!sensor_node) - return -EINVAL; - -- ret = isp_of_parse_node(dev, node, notifier, false); -+ for (i = 0; i < notifier->num_subdevs; i++) { -+ struct isp_async_subdev *isd = container_of( -+ notifier->subdevs[i], struct isp_async_subdev, -+ asd); -+ -+ if (!isd->bus) -+ continue; -+ -+ dev_dbg(dev, "match \"%s\", \"%s\"\n",sensor_node->name, -+ isd->asd.match.of.node->name); -+ -+ if (sensor_node != isd->asd.match.of.node) -+ continue; -+ -+ dev_dbg(dev, "found\n"); -+ -+ flash_group_id = isd->group_id; -+ break; -+ } -+ -+ /* -+ * No sensor was found --- complain and allocate a new -+ * group ID. -+ */ -+ if (i == notifier->num_subdevs) { -+ dev_warn(dev, "no device node \"%s\" was found", -+ sensor_node->name); -+ flash_group_id = group_id++; -+ } -+ -+ ret = isp_of_parse_node(dev, node, notifier, flash_group_id, -+ false); - if (ret) - return ret; - } -@@ -2232,6 +2267,7 @@ static int isp_subdev_notifier_bound(struct v4l2_async_notifier *async, - struct isp_async_subdev *isd = - container_of(asd, struct isp_async_subdev, asd); - -+ subdev->entity.group_id = isd->group_id; - isd->sd = subdev; - isd->sd->host_priv = isd->bus; - -diff --git a/drivers/media/platform/omap3isp/isp.h b/drivers/media/platform/omap3isp/isp.h -index c0b9d1d..639b3ca 100644 ---- a/drivers/media/platform/omap3isp/isp.h -+++ b/drivers/media/platform/omap3isp/isp.h -@@ -230,6 +230,7 @@ struct isp_async_subdev { - struct v4l2_subdev *sd; - struct isp_bus_cfg *bus; - struct v4l2_async_subdev asd; -+ u32 group_id; - }; - - #define v4l2_dev_to_isp_device(dev) \ --- -2.1.4 diff --git a/a/6.hdr b/a/6.hdr deleted file mode 100644 index ed93590..0000000 --- a/a/6.hdr +++ /dev/null @@ -1,2 +0,0 @@ -Content-Type: text/x-diff; charset=us-ascii -Content-Disposition: attachment; filename="0005-Fix-work-around-compilation.patch" diff --git a/a/6.txt b/a/6.txt deleted file mode 100644 index 5b8a225..0000000 --- a/a/6.txt +++ /dev/null @@ -1,24 +0,0 @@ ->From 70e7eada67a5a4170f2a9e268d8134a7c773e225 Mon Sep 17 00:00:00 2001 -From: Pavel <pavel@ucw.cz> -Date: Fri, 29 Apr 2016 12:13:24 +0200 -Subject: [PATCH 5/5] Fix (work around?) compilation. - ---- - drivers/media/platform/omap3isp/isp.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c -index f89abea..dd96a4b 100644 ---- a/drivers/media/platform/omap3isp/isp.c -+++ b/drivers/media/platform/omap3isp/isp.c -@@ -2267,7 +2267,7 @@ static int isp_subdev_notifier_bound(struct v4l2_async_notifier *async, - struct isp_async_subdev *isd = - container_of(asd, struct isp_async_subdev, asd); - -- subdev->entity.group_id = isd->group_id; -+// subdev->entity.group_id = isd->group_id; - isd->sd = subdev; - isd->sd->host_priv = isd->bus; - --- -2.1.4 diff --git a/a/content_digest b/N1/content_digest index 422af17..38de621 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -2,26 +2,11 @@ "ref\020160429071525.GA4823@amd\0" "ref\057230DE7.3020701@xs4all.nl\0" "ref\020160429075649.GG32125@valkosipuli.retiisi.org.uk\0" - "From\0Pavel Machek <pavel@ucw.cz>\0" - "Subject\0Re: v4l subdevs without big device was Re: drivers/media/i2c/adp1653.c: does not show as /dev/video* or v4l-subdev*\0" + "From\0pavel@ucw.cz (Pavel Machek)\0" + "Subject\0v4l subdevs without big device was Re: drivers/media/i2c/adp1653.c: does not show as /dev/video* or v4l-subdev*\0" "Date\0Fri, 29 Apr 2016 12:15:06 +0200\0" - "To\0Sakari Ailus <sakari.ailus@iki.fi>\0" - "Cc\0Hans Verkuil <hverkuil@xs4all.nl>" - pali.rohar@gmail.com - sre@kernel.org - kernel list <linux-kernel@vger.kernel.org> - linux-arm-kernel <linux-arm-kernel@lists.infradead.org> - linux-omap@vger.kernel.org - tony@atomide.com - khilman@kernel.org - aaro.koskinen@iki.fi - ivo.g.dimitrov.75@gmail.com - patrikbachan@gmail.com - serge@hallyn.com - tuukkat76@gmail.com - mchehab@osg.samsung.com - " linux-media@vger.kernel.org\0" - "\01:1\0" + "To\0linux-arm-kernel@lists.infradead.org\0" + "\00:1\0" "b\0" "Hi!\n" "\n" @@ -43,559 +28,41 @@ "\n" "-- \n" "(english) http://www.livejournal.com/~pavelmachek\n" - (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - "\01:2\0" - "fn\00001-omap3isp-Fix-async-notifier-registration-order.patch\0" - "b\0" - ">From fad952ee3d1e888401b047c9657f04afeaf40fc5 Mon Sep 17 00:00:00 2001\n" - "From: Sakari Ailus <sakari.ailus@iki.fi>\n" - "Date: Sat, 16 May 2015 23:34:34 +0300\n" - "Subject: [PATCH 1/5] omap3isp: Fix async notifier registration order\n" - "\n" - "The async notifier was registered before the v4l2_device was registered and\n" - "before the notifier callbacks were set. This could lead to missing the\n" - "bound() and complete() callbacks and to attempting to spin_lock() and\n" - "uninitialised spin lock.\n" - "\n" - "Also fix unregistering the async notifier in the case of an error --- the\n" - "function may not fail anymore after the notifier is registered.\n" - "\n" - "Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>\n" - "\n" - "Conflicts:\n" - "\tdrivers/media/platform/omap3isp/isp.c\n" - "---\n" - " arch/arm/boot/dts/omap3-n900.dts | 24 ++++++++++++++++++++++++\n" - " drivers/media/i2c/ad5820.c | 2 +-\n" - " drivers/media/i2c/adp1653.c | 9 ++++++++-\n" - " drivers/media/platform/omap3isp/isp.c | 12 ++++++++++++\n" - " 4 files changed, 45 insertions(+), 2 deletions(-)\n" - "\n" - "diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts\n" - "index 640d409..0729c69 100644\n" - "--- a/arch/arm/boot/dts/omap3-n900.dts\n" - "+++ b/arch/arm/boot/dts/omap3-n900.dts\n" - "@@ -186,6 +186,7 @@\n" - " \t\tmodule {\n" - " \t\t\tmodel = \"TCM8341MD\";\n" - " \t\t\tsensor = <&cam1>;\n" - "+\t\t\tfocus = <&autofocus>;\t\t\t\n" - " \t\t};\n" - " \t};\n" - " \n" - "@@ -198,6 +199,11 @@\n" - " \t\t};\n" - " \t};\n" - " \n" - "+\tautofocus: dac-camera-autofocus {\n" - "+\t\tcompatible = \"dac-camera-autofocus\";\n" - "+\t\tio-channels = <&ad5820>;\n" - "+\t};\n" - "+\n" - " \tvideo-bus-switch {\n" - " \t\tcompatible = \"video-bus-switch\";\n" - " \n" - "@@ -255,6 +261,11 @@\n" - " \t\t\t\tcrc = <0>;\n" - " \t\t\t};\n" - " \t\t};\n" - "+\t\tport@99 {\n" - "+\t\t\tadp1653_link: endpoint {\n" - "+\t\t\t\t remote-endpoint = <&adp1653_ep>;\n" - "+\t\t\t};\n" - "+\t\t};\n" - " \t};\n" - " };\n" - " \n" - "@@ -696,6 +707,11 @@\n" - " \t\tindicator {\n" - " \t\t\tled-max-microamp = <17500>;\n" - " \t\t};\n" - "+\t\tport {\n" - "+\t\t\tadp1653_ep: endpoint {\n" - "+\t\t\t\t remote-endpoint = <&adp1653_link>;\n" - "+ \t\t\t};\n" - "+ \t\t};\n" - " \t};\n" - " \n" - " \tlp5523: lp5523@32 {\n" - "@@ -879,6 +895,14 @@\n" - " \t\t\t};\n" - " \t\t};\n" - " \t};\n" - "+\n" - "+\t/* D/A converter for auto-focus */\n" - "+\tad5820: dac@0c {\n" - "+\t\tcompatible = \"adi,ad5820\";\n" - "+\t\treg = <0x0c>;\n" - "+\n" - "+\t\t#io-channel-cells = <0>;\n" - "+\t};\n" - " };\n" - " \n" - " &mmc1 {\n" - "diff --git a/drivers/media/i2c/ad5820.c b/drivers/media/i2c/ad5820.c\n" - "index 58a44f1..400200c 100644\n" - "--- a/drivers/media/i2c/ad5820.c\n" - "+++ b/drivers/media/i2c/ad5820.c\n" - "@@ -421,7 +421,7 @@ static int ad5820_probe(struct i2c_client *client,\n" - " \tcoil->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;\n" - " \tcoil->subdev.internal_ops = &ad5820_internal_ops;\n" - " \n" - "-\tret = media_entity_init(&coil->subdev.entity, 0, NULL, 0);\n" - "+\tret = media_entity_pads_init(&coil->subdev.entity, 0, NULL);\n" - " \tif (ret < 0)\n" - " \t\tkfree(coil);\n" - " \n" - "diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c\n" - "index b90e15b..6dd5d6a 100644\n" - "--- a/drivers/media/i2c/adp1653.c\n" - "+++ b/drivers/media/i2c/adp1653.c\n" - "@@ -515,6 +515,7 @@ static int adp1653_probe(struct i2c_client *client,\n" - " \tv4l2_i2c_subdev_init(&flash->subdev, client, &adp1653_ops);\n" - " \tflash->subdev.internal_ops = &adp1653_internal_ops;\n" - " \tflash->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;\n" - "+\tstrcpy(flash->subdev.name, \"adp1653 flash\");\n" - " \n" - " \tret = adp1653_init_controls(flash);\n" - " \tif (ret)\n" - "@@ -524,7 +525,13 @@ static int adp1653_probe(struct i2c_client *client,\n" - " \tif (ret < 0)\n" - " \t\tgoto free_and_quit;\n" - " \n" - "-\tdev_info(&client->dev, \"adp1653 probe: should be ok\\n\");\t\t\n" - "+\tdev_info(&client->dev, \"adp1653 probe: should be ok\\n\");\n" - "+\n" - "+\tret = v4l2_async_register_subdev(&flash->subdev);\n" - "+\tif (ret < 0)\n" - "+\t\tgoto free_and_quit;\n" - "+\n" - "+\tdev_info(&client->dev, \"adp1653 probe: async register subdev ok\\n\");\t\n" - " \n" - " \tflash->subdev.entity.function = MEDIA_ENT_F_FLASH;\n" - " \n" - "diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c\n" - "index 6361fde..9f51127 100644\n" - "--- a/drivers/media/platform/omap3isp/isp.c\n" - "+++ b/drivers/media/platform/omap3isp/isp.c\n" - "@@ -2392,6 +2392,7 @@ static int isp_probe(struct platform_device *pdev)\n" - " \tif (ret < 0)\n" - " \t\tgoto error_modules;\n" - " \n" - "+<<<<<<< HEAD\n" - " \tret = isp_create_links(isp);\n" - " \tif (ret < 0)\n" - " \t\tgoto error_register_entities;\n" - "@@ -2402,6 +2403,17 @@ static int isp_probe(struct platform_device *pdev)\n" - " \tret = v4l2_async_notifier_register(&isp->v4l2_dev, &isp->notifier);\n" - " \tif (ret)\n" - " \t\tgoto error_register_entities;\n" - "+=======\n" - "+\tif (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) {\n" - "+\t\tisp->notifier.bound = isp_subdev_notifier_bound;\n" - "+\t\tisp->notifier.complete = isp_subdev_notifier_complete;\n" - "+\n" - "+\t\tret = v4l2_async_notifier_register(&isp->v4l2_dev,\n" - "+\t\t\t\t\t\t &isp->notifier);\n" - "+\t\tif (ret)\n" - "+\t\t\tgoto error_register_entities;\n" - "+\t}\n" - "+>>>>>>> a035633... omap3isp: Fix async notifier registration order\n" - " \n" - " \tisp_core_init(isp, 1);\n" - " \tomap3isp_put(isp);\n" - "-- \n" - 2.1.4 - "\01:3\0" - "fn\00002-Solve-conflict-I-missed.patch\0" - "b\0" - ">From 4f8286dfb13a14c1e166a61837ec20f5a096ed7b Mon Sep 17 00:00:00 2001\n" - "From: Pavel <pavel@ucw.cz>\n" - "Date: Fri, 29 Apr 2016 12:02:07 +0200\n" - "Subject: [PATCH 2/5] Solve conflict I missed.\n" - "\n" - "---\n" - " drivers/media/platform/omap3isp/isp.c | 7 +------\n" - " 1 file changed, 1 insertion(+), 6 deletions(-)\n" - "\n" - "diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c\n" - "index 9f51127..7419404 100644\n" - "--- a/drivers/media/platform/omap3isp/isp.c\n" - "+++ b/drivers/media/platform/omap3isp/isp.c\n" - "@@ -2392,18 +2392,14 @@ static int isp_probe(struct platform_device *pdev)\n" - " \tif (ret < 0)\n" - " \t\tgoto error_modules;\n" - " \n" - "-<<<<<<< HEAD\n" - " \tret = isp_create_links(isp);\n" - " \tif (ret < 0)\n" - " \t\tgoto error_register_entities;\n" - " \n" - "-\tisp->notifier.bound = isp_subdev_notifier_bound;\n" - "-\tisp->notifier.complete = isp_subdev_notifier_complete;\n" - "-\n" - " \tret = v4l2_async_notifier_register(&isp->v4l2_dev, &isp->notifier);\n" - " \tif (ret)\n" - " \t\tgoto error_register_entities;\n" - "-=======\n" - "+\n" - " \tif (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) {\n" - " \t\tisp->notifier.bound = isp_subdev_notifier_bound;\n" - " \t\tisp->notifier.complete = isp_subdev_notifier_complete;\n" - "@@ -2413,7 +2409,6 @@ static int isp_probe(struct platform_device *pdev)\n" - " \t\tif (ret)\n" - " \t\t\tgoto error_register_entities;\n" - " \t}\n" - "->>>>>>> a035633... omap3isp: Fix async notifier registration order\n" - " \n" - " \tisp_core_init(isp, 1);\n" - " \tomap3isp_put(isp);\n" - "-- \n" - 2.1.4 - "\01:4\0" - "fn\00003-Cherry-pick-manually.patch\0" - "b\0" - ">From b402e5a19c46a9c264a311b7656c0e7e0d65322f Mon Sep 17 00:00:00 2001\n" - "From: Pavel <pavel@ucw.cz>\n" - "Date: Fri, 29 Apr 2016 12:06:32 +0200\n" - "Subject: [PATCH 3/5] Cherry-pick (manually)\n" - "\n" - "commit b3691ff97a99bcf28790c4da906ffc17c822844a\n" - "Author: Sakari Ailus <sakari.ailus@iki.fi>\n" - "Date: Sat May 16 23:56:03 2015 +0300\n" - "\n" - " omap3isp: Support the ti,camera-flashes property\n" - "\n" - " Before this patch the omap3isp driver only supported external\n" - " devices that\n" - " are connected to it by a data bus. This patch adds support for\n" - " flash\n" - " devices, in form of an array of phandles to sensor and\n" - " associated flash\n" - " devices, respectively, in the \"ti,camera-flashes\" property.\n" - "\n" - " The non image source devices are recognised by empty bus field in\n" - " struct\n" - " isp_async_subdev, which is made a pointer by the patch.\n" - "\n" - " Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>\n" - "---\n" - " drivers/media/platform/omap3isp/isp.c | 90 +++++++++++++++++++++--------\n" - " drivers/media/platform/omap3isp/isp.h | 2 +-\n" - " drivers/media/platform/omap3isp/ispcsiphy.c | 2 +-\n" - " 3 files changed, 67 insertions(+), 27 deletions(-)\n" - "\n" - "diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c\n" - "index 7419404..a1c3bdb 100644\n" - "--- a/drivers/media/platform/omap3isp/isp.c\n" - "+++ b/drivers/media/platform/omap3isp/isp.c\n" - "@@ -2095,13 +2095,20 @@ static void isp_of_parse_node_csi2(struct device *dev,\n" - " \tbuscfg->bus.csi2.crc = 1;\n" - " }\n" - " \n" - "-static int isp_of_parse_node(struct device *dev, struct device_node *node,\n" - "-\t\t\t struct isp_async_subdev *isd)\n" - "+static int isp_of_parse_node_endpoint(struct device *dev,\n" - "+\t\t\t\t struct device_node *node,\n" - "+\t\t\t\t struct isp_async_subdev *isd)\n" - " {\n" - "-\tstruct isp_bus_cfg *buscfg = &isd->bus;\n" - "+\tstruct isp_bus_cfg *buscfg;\n" - " \tstruct v4l2_of_endpoint vep;\n" - " \tint ret;\n" - " \n" - "+\tisd->bus = devm_kzalloc(dev, sizeof(*isd->bus), GFP_KERNEL);\n" - "+\tif (!isd->bus)\n" - "+\t\treturn -ENOMEM;\n" - "+\n" - "+\tbuscfg = isd->bus;\n" - "+\n" - " \tret = v4l2_of_parse_endpoint(node, &vep);\n" - " \tif (ret)\n" - " \t\treturn ret;\n" - "@@ -2144,10 +2151,48 @@ static int isp_of_parse_node(struct device *dev, struct device_node *node,\n" - " \treturn 0;\n" - " }\n" - " \n" - "+static int isp_of_parse_node(struct device *dev, struct device_node *node,\n" - "+\t\t\t struct v4l2_async_notifier *notifier, bool link)\n" - "+{\n" - "+\tstruct isp_async_subdev *isd;\n" - "+\n" - "+\tisd = devm_kzalloc(dev, sizeof(*isd), GFP_KERNEL);\n" - "+\tif (!isd) {\n" - "+\t\tof_node_put(node);\n" - "+\t\treturn -ENOMEM;\n" - "+\t}\n" - "+\n" - "+\tnotifier->subdevs[notifier->num_subdevs] = &isd->asd;\n" - "+\n" - "+\tif (link) {\n" - "+\t\tif (isp_of_parse_node_endpoint(dev, node, isd)) {\n" - "+\t\t\tof_node_put(node);\n" - "+\t\t\treturn -EINVAL;\n" - "+\t\t}\n" - "+\n" - "+\t\tisd->asd.match.of.node = of_graph_get_remote_port_parent(node);\n" - "+\t\tof_node_put(node);\n" - "+\t} else {\n" - "+\t\tisd->asd.match.of.node = node;\n" - "+\t}\n" - "+\n" - "+\tif (!isd->asd.match.of.node) {\n" - "+\t\tdev_warn(dev, \"bad remote port parent\\n\");\n" - "+\t\treturn -EINVAL;\n" - "+\t}\n" - "+\n" - "+\tisd->asd.match_type = V4L2_ASYNC_MATCH_OF;\n" - "+\tnotifier->num_subdevs++;\n" - "+\n" - "+\treturn 0;\n" - "+}\n" - "+\n" - " static int isp_of_parse_nodes(struct device *dev,\n" - " \t\t\t struct v4l2_async_notifier *notifier)\n" - " {\n" - " \tstruct device_node *node = NULL;\n" - "+\tint ret;\n" - "+\tunsigned int flash = 0;\n" - " \n" - " \tnotifier->subdevs = devm_kcalloc(\n" - " \t\tdev, ISP_MAX_SUBDEVS, sizeof(*notifier->subdevs), GFP_KERNEL);\n" - "@@ -2156,30 +2201,25 @@ static int isp_of_parse_nodes(struct device *dev,\n" - " \n" - " \twhile (notifier->num_subdevs < ISP_MAX_SUBDEVS &&\n" - " \t (node = of_graph_get_next_endpoint(dev->of_node, node))) {\n" - "-\t\tstruct isp_async_subdev *isd;\n" - "-\n" - "-\t\tisd = devm_kzalloc(dev, sizeof(*isd), GFP_KERNEL);\n" - "-\t\tif (!isd) {\n" - "-\t\t\tof_node_put(node);\n" - "-\t\t\treturn -ENOMEM;\n" - "-\t\t}\n" - "-\n" - "-\t\tnotifier->subdevs[notifier->num_subdevs] = &isd->asd;\n" - "-\n" - "-\t\tif (isp_of_parse_node(dev, node, isd)) {\n" - "-\t\t\tof_node_put(node);\n" - "-\t\t\treturn -EINVAL;\n" - "-\t\t}\n" - "+\t\tret = isp_of_parse_node(dev, node, notifier, true);\n" - "+\t\tif (ret)\n" - "+\t\t\treturn ret;\n" - "+\t}\n" - " \n" - "-\t\tisd->asd.match.of.node = of_graph_get_remote_port_parent(node);\n" - "-\t\tof_node_put(node);\n" - "-\t\tif (!isd->asd.match.of.node) {\n" - "-\t\t\tdev_warn(dev, \"bad remote port parent\\n\");\n" - "+\twhile (notifier->num_subdevs < ISP_MAX_SUBDEVS &&\n" - "+\t (node = of_parse_phandle(dev->of_node, \"ti,camera-flashes\",\n" - "+\t\t\t\t\tflash++))) {\n" - "+\t\tstruct device_node *sensor_node =\n" - "+\t\t\tof_parse_phandle(dev->of_node, \"ti,camera-flashes\",\n" - "+\t\t\t\t\t flash++);\n" - "+\t\tunsigned int i;\n" - "+\n" - "+\t\tif (!sensor_node)\n" - " \t\t\treturn -EINVAL;\n" - "-\t\t}\n" - " \n" - "-\t\tisd->asd.match_type = V4L2_ASYNC_MATCH_OF;\n" - "-\t\tnotifier->num_subdevs++;\n" - "+\t\tret = isp_of_parse_node(dev, node, notifier, false);\n" - "+\t\tif (ret)\n" - "+\t\t\treturn ret;\n" - " \t}\n" - " \n" - " \treturn notifier->num_subdevs;\n" - "@@ -2193,7 +2233,7 @@ static int isp_subdev_notifier_bound(struct v4l2_async_notifier *async,\n" - " \t\tcontainer_of(asd, struct isp_async_subdev, asd);\n" - " \n" - " \tisd->sd = subdev;\n" - "-\tisd->sd->host_priv = &isd->bus;\n" - "+\tisd->sd->host_priv = isd->bus;\n" - " \n" - " \treturn 0;\n" - " }\n" - "diff --git a/drivers/media/platform/omap3isp/isp.h b/drivers/media/platform/omap3isp/isp.h\n" - "index 7e6f663..c0b9d1d 100644\n" - "--- a/drivers/media/platform/omap3isp/isp.h\n" - "+++ b/drivers/media/platform/omap3isp/isp.h\n" - "@@ -228,7 +228,7 @@ struct isp_device {\n" - " \n" - " struct isp_async_subdev {\n" - " \tstruct v4l2_subdev *sd;\n" - "-\tstruct isp_bus_cfg bus;\n" - "+\tstruct isp_bus_cfg *bus;\n" - " \tstruct v4l2_async_subdev asd;\n" - " };\n" - " \n" - "diff --git a/drivers/media/platform/omap3isp/ispcsiphy.c b/drivers/media/platform/omap3isp/ispcsiphy.c\n" - "index 495447d..750ce93 100644\n" - "--- a/drivers/media/platform/omap3isp/ispcsiphy.c\n" - "+++ b/drivers/media/platform/omap3isp/ispcsiphy.c\n" - "@@ -177,7 +177,7 @@ static int omap3isp_csiphy_config(struct isp_csiphy *phy)\n" - " \t\tstruct isp_async_subdev *isd =\n" - " \t\t\tcontainer_of(pipe->external->asd,\n" - " \t\t\t\t struct isp_async_subdev, asd);\n" - "-\t\tbuscfg = &isd->bus;\n" - "+\t\tbuscfg = isd->bus;\n" - " \t}\n" - " \n" - " \tif (buscfg->interface == ISP_INTERFACE_CCP2B_PHY1\n" - "-- \n" - 2.1.4 - "\01:5\0" - "fn\00004-omap3isp-Assign-a-group-ID-for-sensor-and-flash-enti.patch\0" - "b\0" - ">From 568ea9c5c8aa61ee44e30aa4134d2b59e55a5b45 Mon Sep 17 00:00:00 2001\n" - "From: Sakari Ailus <sakari.ailus@iki.fi>\n" - "Date: Sat, 23 May 2015 15:24:55 +0300\n" - "Subject: [PATCH 4/5] omap3isp: Assign a group ID for sensor and flash entities\n" - "\n" - "Starting from zero, assign a group ID for each sensor. Look for the\n" - "associated flash device node and based on nodes found, assign the same group\n" - "ID for them.\n" - "\n" - "Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>\n" - "---\n" - " drivers/media/platform/omap3isp/isp.c | 42 ++++++++++++++++++++++++++++++++---\n" - " drivers/media/platform/omap3isp/isp.h | 1 +\n" - " 2 files changed, 40 insertions(+), 3 deletions(-)\n" - "\n" - "diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c\n" - "index a1c3bdb..f89abea 100644\n" - "--- a/drivers/media/platform/omap3isp/isp.c\n" - "+++ b/drivers/media/platform/omap3isp/isp.c\n" - "@@ -2152,7 +2152,8 @@ static int isp_of_parse_node_endpoint(struct device *dev,\n" - " }\n" - " \n" - " static int isp_of_parse_node(struct device *dev, struct device_node *node,\n" - "-\t\t\t struct v4l2_async_notifier *notifier, bool link)\n" - "+\t\t\t struct v4l2_async_notifier *notifier,\n" - "+\t\t\t u32 group_id, bool link)\n" - " {\n" - " \tstruct isp_async_subdev *isd;\n" - " \n" - "@@ -2182,6 +2183,7 @@ static int isp_of_parse_node(struct device *dev, struct device_node *node,\n" - " \t}\n" - " \n" - " \tisd->asd.match_type = V4L2_ASYNC_MATCH_OF;\n" - "+\tisd->group_id = group_id;\n" - " \tnotifier->num_subdevs++;\n" - " \n" - " \treturn 0;\n" - "@@ -2193,6 +2195,7 @@ static int isp_of_parse_nodes(struct device *dev,\n" - " \tstruct device_node *node = NULL;\n" - " \tint ret;\n" - " \tunsigned int flash = 0;\n" - "+\tu32 group_id = 0;\n" - " \n" - " \tnotifier->subdevs = devm_kcalloc(\n" - " \t\tdev, ISP_MAX_SUBDEVS, sizeof(*notifier->subdevs), GFP_KERNEL);\n" - "@@ -2201,7 +2204,7 @@ static int isp_of_parse_nodes(struct device *dev,\n" - " \n" - " \twhile (notifier->num_subdevs < ISP_MAX_SUBDEVS &&\n" - " \t (node = of_graph_get_next_endpoint(dev->of_node, node))) {\n" - "-\t\tret = isp_of_parse_node(dev, node, notifier, true);\n" - "+\t\tret = isp_of_parse_node(dev, node, notifier, group_id++, true);\n" - " \t\tif (ret)\n" - " \t\t\treturn ret;\n" - " \t}\n" - "@@ -2213,11 +2216,43 @@ static int isp_of_parse_nodes(struct device *dev,\n" - " \t\t\tof_parse_phandle(dev->of_node, \"ti,camera-flashes\",\n" - " \t\t\t\t\t flash++);\n" - " \t\tunsigned int i;\n" - "+\t\tu32 flash_group_id;\n" - " \n" - " \t\tif (!sensor_node)\n" - " \t\t\treturn -EINVAL;\n" - " \n" - "-\t\tret = isp_of_parse_node(dev, node, notifier, false);\n" - "+\t\tfor (i = 0; i < notifier->num_subdevs; i++) {\n" - "+\t\t\tstruct isp_async_subdev *isd = container_of(\n" - "+\t\t\t\tnotifier->subdevs[i], struct isp_async_subdev,\n" - "+\t\t\t\tasd);\n" - "+\n" - "+\t\t\tif (!isd->bus)\n" - "+\t\t\t\tcontinue;\n" - "+\n" - "+\t\t\tdev_dbg(dev, \"match \\\"%s\\\", \\\"%s\\\"\\n\",sensor_node->name,\n" - "+\t\t\t\tisd->asd.match.of.node->name);\n" - "+\n" - "+\t\t\tif (sensor_node != isd->asd.match.of.node)\n" - "+\t\t\t\tcontinue;\n" - "+\n" - "+\t\t\tdev_dbg(dev, \"found\\n\");\n" - "+\n" - "+\t\t\tflash_group_id = isd->group_id;\n" - "+\t\t\tbreak;\n" - "+\t\t}\n" - "+\n" - "+\t\t/*\n" - "+\t\t * No sensor was found --- complain and allocate a new\n" - "+\t\t * group ID.\n" - "+\t\t */\n" - "+\t\tif (i == notifier->num_subdevs) {\n" - "+\t\t\tdev_warn(dev, \"no device node \\\"%s\\\" was found\",\n" - "+\t\t\t\t sensor_node->name);\n" - "+\t\t\tflash_group_id = group_id++;\n" - "+\t\t}\n" - "+\n" - "+\t\tret = isp_of_parse_node(dev, node, notifier, flash_group_id,\n" - "+\t\t\t\t\tfalse);\n" - " \t\tif (ret)\n" - " \t\t\treturn ret;\n" - " \t}\n" - "@@ -2232,6 +2267,7 @@ static int isp_subdev_notifier_bound(struct v4l2_async_notifier *async,\n" - " \tstruct isp_async_subdev *isd =\n" - " \t\tcontainer_of(asd, struct isp_async_subdev, asd);\n" - " \n" - "+\tsubdev->entity.group_id = isd->group_id;\n" - " \tisd->sd = subdev;\n" - " \tisd->sd->host_priv = isd->bus;\n" - " \n" - "diff --git a/drivers/media/platform/omap3isp/isp.h b/drivers/media/platform/omap3isp/isp.h\n" - "index c0b9d1d..639b3ca 100644\n" - "--- a/drivers/media/platform/omap3isp/isp.h\n" - "+++ b/drivers/media/platform/omap3isp/isp.h\n" - "@@ -230,6 +230,7 @@ struct isp_async_subdev {\n" - " \tstruct v4l2_subdev *sd;\n" - " \tstruct isp_bus_cfg *bus;\n" - " \tstruct v4l2_async_subdev asd;\n" - "+\tu32 group_id;\n" - " };\n" - " \n" - " #define v4l2_dev_to_isp_device(dev) \\\n" - "-- \n" - 2.1.4 - "\01:6\0" - "fn\00005-Fix-work-around-compilation.patch\0" - "b\0" - ">From 70e7eada67a5a4170f2a9e268d8134a7c773e225 Mon Sep 17 00:00:00 2001\n" - "From: Pavel <pavel@ucw.cz>\n" - "Date: Fri, 29 Apr 2016 12:13:24 +0200\n" - "Subject: [PATCH 5/5] Fix (work around?) compilation.\n" - "\n" - "---\n" - " drivers/media/platform/omap3isp/isp.c | 2 +-\n" - " 1 file changed, 1 insertion(+), 1 deletion(-)\n" - "\n" - "diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c\n" - "index f89abea..dd96a4b 100644\n" - "--- a/drivers/media/platform/omap3isp/isp.c\n" - "+++ b/drivers/media/platform/omap3isp/isp.c\n" - "@@ -2267,7 +2267,7 @@ static int isp_subdev_notifier_bound(struct v4l2_async_notifier *async,\n" - " \tstruct isp_async_subdev *isd =\n" - " \t\tcontainer_of(asd, struct isp_async_subdev, asd);\n" - " \n" - "-\tsubdev->entity.group_id = isd->group_id;\n" - "+//\tsubdev->entity.group_id = isd->group_id;\n" - " \tisd->sd = subdev;\n" - " \tisd->sd->host_priv = isd->bus;\n" - " \n" - "-- \n" - 2.1.4 + "(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html\n" + "-------------- next part --------------\n" + "A non-text attachment was scrubbed...\n" + "Name: 0001-omap3isp-Fix-async-notifier-registration-order.patch\n" + "Type: text/x-diff\n" + "Size: 4550 bytes\n" + "Desc: not available\n" + "URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160429/250b3c03/attachment-0005.bin>\n" + "-------------- next part --------------\n" + "A non-text attachment was scrubbed...\n" + "Name: 0002-Solve-conflict-I-missed.patch\n" + "Type: text/x-diff\n" + "Size: 1354 bytes\n" + "Desc: not available\n" + "URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160429/250b3c03/attachment-0006.bin>\n" + "-------------- next part --------------\n" + "A non-text attachment was scrubbed...\n" + "Name: 0003-Cherry-pick-manually.patch\n" + "Type: text/x-diff\n" + "Size: 5662 bytes\n" + "Desc: not available\n" + "URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160429/250b3c03/attachment-0007.bin>\n" + "-------------- next part --------------\n" + "A non-text attachment was scrubbed...\n" + "Name: 0004-omap3isp-Assign-a-group-ID-for-sensor-and-flash-enti.patch\n" + "Type: text/x-diff\n" + "Size: 3782 bytes\n" + "Desc: not available\n" + "URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160429/250b3c03/attachment-0008.bin>\n" + "-------------- next part --------------\n" + "A non-text attachment was scrubbed...\n" + "Name: 0005-Fix-work-around-compilation.patch\n" + "Type: text/x-diff\n" + "Size: 833 bytes\n" + "Desc: not available\n" + URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160429/250b3c03/attachment-0009.bin> -1b6310b97b0372c11582cb56a4352d100947c14245e579dcbf5dd7c9eafb439c +975cb2e9bc2976db1c506f5d2022e8706f41a35072b61511c739423d0f75488c
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.