lkml.org 
[lkml]   [2019]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [V3, 4/4] media: platform: dwc: Add MIPI CSI-2 controller driver
    From
    Date


    On 10-Dec-18 12:39, Eugen.Hristev@microchip.com wrote:
    >
    >
    > On 19.10.2018 15:52, Luis Oliveira wrote:
    >> Add the Synopsys MIPI CSI-2 controller driver. This
    >> controller driver is divided in platform dependent functions
    >> and core functions. It also includes a platform for future
    >> DesignWare drivers.
    >>
    >> Signed-off-by: Luis Oliveira <lolivei@synopsys.com>
    >> ---
    >> Changelog
    >> v2-V3
    >> - exposed IPI settings to userspace
    >> - fixed headers
    > [...]
    >
    > snip
    >
    >
    >> +
    >> +static int
    >> +dw_mipi_csi_parse_dt(struct platform_device *pdev, struct mipi_csi_dev *dev)
    >> +{
    >> + struct device_node *node = pdev->dev.of_node;
    >> + struct v4l2_fwnode_endpoint endpoint;
    >
    > Hello Luis,
    >
    > I believe you have to initialize "endpoint" here correctly, otherwise
    > the parsing mechanism (fwnode_endpoint_parse) will consider you have a
    > specific mbus type and fail to probe the endpoint: bail out with debug
    > message "expecting bus type not found "
    >
    > (namely, initialize to zero which is the UNKNOWN mbus type, or , to a
    > specific mbus (from DT or whatever source))
    >
    > Eugen
    >
    Hi Eugen,

    Sorry for my late reply, I was on Christmas break.
    You are right, I will add that fix.

    >
    >> + int ret;
    >> +
    >> + node = of_graph_get_next_endpoint(node, NULL);
    >> + if (!node) {
    >> + dev_err(&pdev->dev, "No port node at %s\n",
    >> + pdev->dev.of_node->full_name);
    >> + return -EINVAL;
    >> + }
    >> +
    >> + ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(node), &endpoint);
    >> + if (ret)
    >> + goto err;
    >> +
    >> + dev->index = endpoint.base.port - 1;
    >> + if (dev->index >= CSI_MAX_ENTITIES) {
    >> + ret = -ENXIO;
    >> + goto err;
    >> + }
    >> + dev->hw.num_lanes = endpoint.bus.mipi_csi2.num_data_lanes;
    >> +
    >> +err:
    >> + of_node_put(node);
    >> + return ret;
    >> +}
    >> +
    >
    > snip
    >
    Thank you.

    \
     
     \ /
      Last update: 2019-01-10 17:12    [W:7.124 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site