mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
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 <dave.stevenson@raspberrypi.com>
This commit is contained in:
committed by
Dom Cobley
parent
a59c69b3bc
commit
d53d1e2a1f
@@ -3381,6 +3381,11 @@ static int unicam_probe(struct platform_device *pdev)
|
||||
* device tree requests it.
|
||||
*/
|
||||
unicam->mc_api = media_controller;
|
||||
|
||||
/* Compatible is for the non-legacy version of the driver - use compatible */
|
||||
if (of_device_get_match_data(&unicam->pdev->dev))
|
||||
unicam->mc_api = true;
|
||||
|
||||
if (of_property_read_bool(pdev->dev.of_node, "brcm,media-controller"))
|
||||
unicam->mc_api = true;
|
||||
|
||||
@@ -3500,7 +3505,8 @@ static void unicam_remove(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
static const struct of_device_id unicam_of_match[] = {
|
||||
{ .compatible = "brcm,bcm2835-unicam-legacy", },
|
||||
{ .compatible = "brcm,bcm2835-unicam", .data = (void *)1 },
|
||||
{ .compatible = "brcm,bcm2835-unicam-legacy", .data = 0 },
|
||||
{ /* sentinel */ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, unicam_of_match);
|
||||
|
||||
@@ -2735,7 +2735,7 @@ static void unicam_remove(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
static const struct of_device_id unicam_of_match[] = {
|
||||
{ .compatible = "brcm,bcm2835-unicam", },
|
||||
{ .compatible = "brcm,bcm2835-unicam-upstream", },
|
||||
{ /* sentinel */ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, unicam_of_match);
|
||||
|
||||
Reference in New Issue
Block a user