media: {cdi,is}_gpio: Initialize parent dev for gpio chip

Set the parent node of the gc to the gpio device so that
core will get the of_node of device from parent node.

Bug 4387902

Change-Id: I795e612c11bdf72067b85d23ce5914abdcc3c139
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3052126
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Laxman Dewangan
2024-01-12 09:47:58 +00:00
committed by mobile promotions
parent 9de3e799ae
commit d09293e954
2 changed files with 2 additions and 0 deletions

View File

@@ -288,6 +288,7 @@ static int cdi_gpio_probe(struct platform_device *pdev)
gc->base = -1; gc->base = -1;
gc->ngpio = pd->max_gpio; gc->ngpio = pd->max_gpio;
gc->label = "cdi-gpio"; gc->label = "cdi-gpio";
gc->parent = &pdev->dev;
#if defined(NV_GPIO_CHIP_STRUCT_HAS_OF_NODE_PRESENT) /* Linux 6.2 */ #if defined(NV_GPIO_CHIP_STRUCT_HAS_OF_NODE_PRESENT) /* Linux 6.2 */
gc->of_node = pdev->dev.of_node; gc->of_node = pdev->dev.of_node;
#endif #endif

View File

@@ -288,6 +288,7 @@ static int isc_gpio_probe(struct platform_device *pdev)
gc->base = -1; gc->base = -1;
gc->ngpio = pd->max_gpio; gc->ngpio = pd->max_gpio;
gc->label = "isc-gpio"; gc->label = "isc-gpio";
gc->parent = &pdev->dev;
#if defined(NV_GPIO_CHIP_STRUCT_HAS_OF_NODE_PRESENT) /* Linux 6.2 */ #if defined(NV_GPIO_CHIP_STRUCT_HAS_OF_NODE_PRESENT) /* Linux 6.2 */
gc->of_node = pdev->dev.of_node; gc->of_node = pdev->dev.of_node;
#endif #endif