]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: stm32: dcmipp: fill media ctl hw_revision field
authorAlain Volmat <alain.volmat@foss.st.com>
Thu, 12 Dec 2024 09:17:35 +0000 (10:17 +0100)
committerHans Verkuil <hverkuil@xs4all.nl>
Thu, 12 Dec 2024 12:22:26 +0000 (13:22 +0100)
Add hw_revision field information of the media controller so that
application can distinguish between variants of DCMIPP implementations.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c

index 97590079bb5aafd2a7c720c6b792932889515b1e..62dd17e0488d2c67961aa19622383f632ddcd937 100644 (file)
@@ -87,6 +87,7 @@ struct dcmipp_pipeline_config {
        size_t num_ents;
        const struct dcmipp_ent_link *links;
        size_t num_links;
+       u32 hw_revision;
 };
 
 /* --------------------------------------------------------------------------
@@ -122,11 +123,13 @@ static const struct dcmipp_ent_link stm32mp13_ent_links[] = {
                        MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE),
 };
 
+#define DCMIPP_STM32MP13_VERR  0x10
 static const struct dcmipp_pipeline_config stm32mp13_pipe_cfg = {
        .ents           = stm32mp13_ent_config,
        .num_ents       = ARRAY_SIZE(stm32mp13_ent_config),
        .links          = stm32mp13_ent_links,
-       .num_links      = ARRAY_SIZE(stm32mp13_ent_links)
+       .num_links      = ARRAY_SIZE(stm32mp13_ent_links),
+       .hw_revision    = DCMIPP_STM32MP13_VERR
 };
 
 #define LINK_FLAG_TO_STR(f) ((f) == 0 ? "" :\
@@ -496,6 +499,7 @@ static int dcmipp_probe(struct platform_device *pdev)
        /* Initialize media device */
        strscpy(dcmipp->mdev.model, DCMIPP_MDEV_MODEL_NAME,
                sizeof(dcmipp->mdev.model));
+       dcmipp->mdev.hw_revision = pipe_cfg->hw_revision;
        dcmipp->mdev.dev = &pdev->dev;
        media_device_init(&dcmipp->mdev);