summaryrefslogtreecommitdiff
path: root/drivers/media/pci/intel/ipu6/ipu6.c
diff options
context:
space:
mode:
authorBingbu Cao <bingbu.cao@intel.com>2024-01-31 17:51:02 +0800
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2024-04-29 14:56:38 +0200
commitf50c4ca0a82003b8a542c3332fd292cf1bc355a2 (patch)
tree866924237d183aec7ed8707e1b62c11e5dc6af20 /drivers/media/pci/intel/ipu6/ipu6.c
parent3c1dfb5a69cf836f513a2a49113ee946a4b9d95d (diff)
media: intel/ipu6: add the main input system driver
The main input system driver does basic ISYS hardware setup, IRQ handling and sets up device nodes. Signed-off-by: Bingbu Cao <bingbu.cao@intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/pci/intel/ipu6/ipu6.c')
-rw-r--r--drivers/media/pci/intel/ipu6/ipu6.c35
1 files changed, 4 insertions, 31 deletions
diff --git a/drivers/media/pci/intel/ipu6/ipu6.c b/drivers/media/pci/intel/ipu6/ipu6.c
index 4b63e810b319..4b1f69d14d71 100644
--- a/drivers/media/pci/intel/ipu6/ipu6.c
+++ b/drivers/media/pci/intel/ipu6/ipu6.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * Copyright (C) 2013 - 2024 Intel Corporation
+ * Copyright (C) 2013--2024 Intel Corporation
*/
#include <linux/bitfield.h>
@@ -364,47 +364,20 @@ static void ipu6_internal_pdata_init(struct ipu6_device *isp)
}
}
-static int ipu6_isys_check_fwnode_graph(struct fwnode_handle *fwnode)
-{
- struct fwnode_handle *endpoint;
-
- if (IS_ERR_OR_NULL(fwnode))
- return -EINVAL;
-
- endpoint = fwnode_graph_get_next_endpoint(fwnode, NULL);
- if (endpoint) {
- fwnode_handle_put(endpoint);
- return 0;
- }
-
- return ipu6_isys_check_fwnode_graph(fwnode->secondary);
-}
-
static struct ipu6_bus_device *
ipu6_isys_init(struct pci_dev *pdev, struct device *parent,
struct ipu6_buttress_ctrl *ctrl, void __iomem *base,
const struct ipu6_isys_internal_pdata *ipdata)
{
struct device *dev = &pdev->dev;
- struct fwnode_handle *fwnode = dev_fwnode(dev);
struct ipu6_bus_device *isys_adev;
struct ipu6_isys_pdata *pdata;
int ret;
- /* check fwnode at first, fallback into bridge if no fwnode graph */
- ret = ipu6_isys_check_fwnode_graph(fwnode);
+ ret = ipu_bridge_init(dev, ipu_bridge_parse_ssdb);
if (ret) {
- if (fwnode && !IS_ERR_OR_NULL(fwnode->secondary)) {
- dev_err(dev,
- "fwnode graph has no endpoints connection\n");
- return ERR_PTR(-EINVAL);
- }
-
- ret = ipu_bridge_init(dev, ipu_bridge_parse_ssdb);
- if (ret) {
- dev_err_probe(dev, ret, "IPU6 bridge init failed\n");
- return ERR_PTR(ret);
- }
+ dev_err_probe(dev, ret, "IPU6 bridge init failed\n");
+ return ERR_PTR(ret);
}
pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);