Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2337943imu; Thu, 10 Jan 2019 12:21:18 -0800 (PST) X-Google-Smtp-Source: ALg8bN4KqQOitEKWdxyILqwRfRrQxor86dLfz9G8N93obLY6ItNATDEaHNL5PjS9LFWEFd0V7nQn X-Received: by 2002:a17:902:bd46:: with SMTP id b6mr11650064plx.231.1547151678357; Thu, 10 Jan 2019 12:21:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547151678; cv=none; d=google.com; s=arc-20160816; b=uQJRHwUABTRi3UVVahp/yeKjGcVtAAuCZYZKK8DjXSBrUt18Xii5qSDj4x2GnVgSgL c90YdnpeuASkLFFbiPP/y+hbr2xJ+smSebEKES5b5XhNQt6Dm+ovJpcHpNmekB3Mhc+H mq1og37U/zFkvlaLlXjhoX6r1nQyz4iOY17qGsaRGWtiGzRPzCTVli1TknbfVBAho9ao 0IapJqmAMRAadInLN6FCB34Awu4XchRoYFflsXpW6ECg1MxR88jzit8ud8+/MCFgAm+P oRWGQ504FlhpONomBCZQhlB6b33ECC0BOrfDtGrY0xXCkPv9UGLUeNyytXO7JbdMWbB9 +4/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=8m0n/rDkAjJxZ6ExS8/Np2uBG17J50GLRqW4Dyi1nto=; b=VpCIHwCo9w5OMZBLyYvmnUXzaiCS4Fd0Y+198kptFz1JeX+sSpvxzhP4aW2GjSosiB XRlMgDLRaGvQRXSmPJ57RTYDamBkrHnFdgM8/41Gbk+q5IfaFZHijAywlvhPG+wxCB6R W9D+MeH1nwAeP1GsYr7GRyvMb9iVsTnUdFzAsTd/z/VIRRsAGGy5pR+J6U5EMuXneCAI zZYdZt7Jq62q/oQagHeBJC2dMHLNJGVvtFU7Av8MtpdV7HfSM5EEE2nZqmyIXskPNEo5 vKvQIZNHa9J+1bED6IF0ytATn35Q49m/rszZU+Mb9JYN6gP/VPrYAwb/KUsiJ7yfzKFJ w5HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=ZMnfRO2E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w185si28904328pgd.518.2019.01.10.12.21.02; Thu, 10 Jan 2019 12:21:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=ZMnfRO2E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728021AbfAJQL1 (ORCPT + 99 others); Thu, 10 Jan 2019 11:11:27 -0500 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:41148 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727710AbfAJQL1 (ORCPT ); Thu, 10 Jan 2019 11:11:27 -0500 Received: from mailhost.synopsys.com (mailhost2.synopsys.com [10.13.184.66]) by smtprelay.synopsys.com (Postfix) with ESMTP id 9F6EB24E1242; Thu, 10 Jan 2019 08:11:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1547136686; bh=V1dk82MJv0Cqk7QD27S8dVm82/bTFkKWV2QTx2TOXEY=; h=Subject:To:CC:References:From:Date:In-Reply-To:From; b=ZMnfRO2EitCtklyok15An7enh7eB8frYyZXoIGTRYvP+ulQE9SvruUTrw/vK31nOe q1L/pOewzT2ZFXVrrDBE2EUuFs2DUoHixr6chXuxUSM5F4nZhHXmfIPWWCQlpWgCup +MwCJ17AixE0p9iJLCMwbjDaA+4AU/dLQbMihfh+eMcE3HOlKQW7gtB92+G+bF0Tb1 F/ifeZ3WmHkIR7jyV2y8FNb4PTXCPaLk072tt5wbbn4tvIb+adoEeBszutOaGRPdU/ Cbxlf4QAZ7XeJG0tw+yeMMBeJSwWsKL9IVF7wel3IppVllzIp0DIbj3NMdeKvlj2Hi Us3q22rZG+dlw== Received: from US01WEHTC2.internal.synopsys.com (us01wehtc2.internal.synopsys.com [10.12.239.237]) by mailhost.synopsys.com (Postfix) with ESMTP id 4EE3933BA; Thu, 10 Jan 2019 08:11:23 -0800 (PST) Received: from DE02WEHTCA.internal.synopsys.com (10.225.19.92) by US01WEHTC2.internal.synopsys.com (10.12.239.237) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 10 Jan 2019 08:11:23 -0800 Received: from DE02WEHTCB.internal.synopsys.com (10.225.19.94) by DE02WEHTCA.internal.synopsys.com (10.225.19.92) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 10 Jan 2019 17:11:20 +0100 Received: from [10.107.19.13] (10.107.19.13) by DE02WEHTCB.internal.synopsys.com (10.225.19.80) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 10 Jan 2019 17:11:20 +0100 Subject: Re: [V3, 4/4] media: platform: dwc: Add MIPI CSI-2 controller driver To: "Eugen.Hristev@microchip.com" , "luis.oliveira@synopsys.com" , "linux-media@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: "joao.pinto@synopsys.com" , "festevam@gmail.com" , "mchehab@kernel.org" , "gregkh@linuxfoundation.org" , "davem@davemloft.net" , "akpm@linux-foundation.org" , "arnd@arndb.de" , "hans.verkuil@cisco.com" , "laurent.pinchart@ideasonboard.com" , "geert@linux-m68k.org" , "narmstrong@baylibre.com" , "p.zabel@pengutronix.de" , "treding@nvidia.com" , "maxime.ripard@bootlin.com" , "todor.tomov@linaro.org" References: <1539953556-35762-1-git-send-email-lolivei@synopsys.com> <1539953556-35762-5-git-send-email-lolivei@synopsys.com> From: Luis de Oliveira Message-ID: Date: Thu, 10 Jan 2019 16:11:18 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.107.19.13] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> --- >> 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.