Skip to content

Commit 60e63b5

Browse files
6by9popcornmix
authored andcommitted
media: platform: Move bcm2835-unicam compatible to downstream driver
The upstream Unicam driver needs a set of userland changes to get libcamera to run, and those aren't written or merged yet. Move the "brcm,bcm2835-unicam" compatible from the upstream driver to the old downstream version so that users can run libcamera against 6.10. Once the libcamera changes have been merged this can be reverted to use the upstream driver. If using the non-legacy compatible then assume we want to use media-controller API for configuration. Signed-off-by: Dave Stevenson <[email protected]>
1 parent ea0c700 commit 60e63b5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

drivers/media/platform/bcm2835/bcm2835-unicam.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3381,6 +3381,11 @@ static int unicam_probe(struct platform_device *pdev)
33813381
* device tree requests it.
33823382
*/
33833383
unicam->mc_api = media_controller;
3384+
3385+
/* Compatible is for the non-legacy version of the driver - use compatible */
3386+
if (of_device_get_match_data(&unicam->pdev->dev))
3387+
unicam->mc_api = true;
3388+
33843389
if (of_property_read_bool(pdev->dev.of_node, "brcm,media-controller"))
33853390
unicam->mc_api = true;
33863391

@@ -3500,7 +3505,8 @@ static void unicam_remove(struct platform_device *pdev)
35003505
}
35013506

35023507
static const struct of_device_id unicam_of_match[] = {
3503-
{ .compatible = "brcm,bcm2835-unicam-legacy", },
3508+
{ .compatible = "brcm,bcm2835-unicam", .data = (void *)1 },
3509+
{ .compatible = "brcm,bcm2835-unicam-legacy", .data = 0 },
35043510
{ /* sentinel */ },
35053511
};
35063512
MODULE_DEVICE_TABLE(of, unicam_of_match);

drivers/media/platform/broadcom/bcm2835-unicam/bcm2835-unicam.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2735,7 +2735,6 @@ static void unicam_remove(struct platform_device *pdev)
27352735
}
27362736

27372737
static const struct of_device_id unicam_of_match[] = {
2738-
{ .compatible = "brcm,bcm2835-unicam", },
27392738
{ .compatible = "brcm,bcm2835-unicam-upstream", },
27402739
{ /* sentinel */ },
27412740
};

0 commit comments

Comments
 (0)