Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp979795lqb; Wed, 29 May 2024 17:27:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUaxCty0xR7I79LnUNcNHVblaxrTWYaFBKfOuFzPZOldnc4VXNVo7O/dGdAt78zekJW2PcFvivNJyVt1Y9I4GDTH5dS4Sla94uUlPMSIQ== X-Google-Smtp-Source: AGHT+IFRRISfuXx7dRG35xBbkRrS5+Ar4rqEYYDaegUQWN5BTZPVfxA2OMR/zHV/FkvNFgPGwgwd X-Received: by 2002:a17:906:758:b0:a59:ba2b:5913 with SMTP id a640c23a62f3a-a65e9104362mr29263666b.62.1717028878560; Wed, 29 May 2024 17:27:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717028878; cv=pass; d=google.com; s=arc-20160816; b=ROwoIEy4tTllWLkwSwA8xGlofAEUhBbG3RpJnYRFHd76aYjB65Go58pl2jnZHHvDJj ZCv9zyzUwiPPt3V40zdY9BSHQ6+pTD96GoDBtIMgKbyYng/cf/UfFbfjOJtZV6CqlXF2 KphSl54Q9e0GbEw2EO5LVdS2jwEA/N3tQqlB2zH/KylLI85vM2r+Q+rO03tRqOrNYIyL X+Nt7AiShpZ7shRYZahEUB5yiqtIGVb8uvDdM3T8Rp9tpv8GajVIMr+uK2O32prdp8or 3h1daTHHO9IFW5cBSM40PiQRsgCHwDEViOxgTBPFSCiJvJhrv8fPSPI8pqQ2i8GSb5w8 TPFQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :cc:to:subject:from:date:dkim-signature; bh=WWdQIaU8VD8eDUpjBsSBJEcY19/AoaLeCk5Wvm3mzf0=; fh=crTOkhCQOgR6Ugoi4pgc4cat2F39itAKu7dT+09Oja4=; b=Ibvt9ScNk15eXYYuJbouZsV4HLxPo/FNgVXcER4I3bQMLQraObMI4UUFaruD/Gj2WH mdxzaPhiiWeFCl+9hjL1ROY/3oOMBjCFbTCBrG2KBx3RVdOm6TmpwfKmtbP+ypSZu6gW 2H5S5+cjQ0xzNZSiembL/WqLxB42KBQ8JzXjH1EiS40pepXADNgSUyQvktqfb0igoz6U otpTRw88pDQxDMnFuyBc6uJcveNBXHCeV2wKeKgyDbEZa74SOojVBaaE0WyHbxOQhir5 gPZ7wXR0NU7Ak4JMB7EHHmJZy+WzUB2meAPrRISKA/FH3oW2HLV7ATaHD2+MiuoYFHy9 Nk5A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@packett.cool header.s=key1 header.b=VrM+HlWy; arc=pass (i=1 spf=pass spfdomain=packett.cool dkim=pass dkdomain=packett.cool dmarc=pass fromdomain=packett.cool); spf=pass (google.com: domain of linux-kernel+bounces-194804-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194804-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=packett.cool Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6389910880si162469566b.865.2024.05.29.17.27.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 17:27:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194804-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@packett.cool header.s=key1 header.b=VrM+HlWy; arc=pass (i=1 spf=pass spfdomain=packett.cool dkim=pass dkdomain=packett.cool dmarc=pass fromdomain=packett.cool); spf=pass (google.com: domain of linux-kernel+bounces-194804-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194804-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=packett.cool Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9615B1F2323C for ; Thu, 30 May 2024 00:22:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3098D8C13; Thu, 30 May 2024 00:22:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=packett.cool header.i=@packett.cool header.b="VrM+HlWy" Received: from out-187.mta1.migadu.com (out-187.mta1.migadu.com [95.215.58.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 477DD23B1 for ; Thu, 30 May 2024 00:22:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717028557; cv=none; b=Q+FYTBDUYWnCtng1YX+vMltWGrWv0Zpv1OJqCERNWJn8IZvno15F9yI/0YSzi0o+IiduelbCgASxY82rnODUMezIRpDeXsm5Dm1iRkhdlkf5lTnuj30LQCimdaCIlZF4A9Xbwn2uyeBdI1naNNwKOMTIcNdqktYXOMdQLTujysQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717028557; c=relaxed/simple; bh=3YvoyIyeHlPcQ+qP7FZ8wCiJvObylauJHrD8vHHeh8w=; h=Date:From:Subject:To:Cc:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=L2MSsEEKdtafMZqth2El8Rp3ioKdzldfZAf5EufZAgQh9881VGPYjwmKfBvBVQWNYOVKRYBqXFjzhy2JWZ9DrTtHcuMRiUzdj6pmq2PhgvijGs/hMxeD4elk7bXOd2GcF0S+64raxEkQgzR059nf20t1EpEfM9n1I87uHC6qBxM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=packett.cool; spf=pass smtp.mailfrom=packett.cool; dkim=pass (2048-bit key) header.d=packett.cool header.i=@packett.cool header.b=VrM+HlWy; arc=none smtp.client-ip=95.215.58.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=packett.cool Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=packett.cool X-Envelope-To: mehdi.djait.k@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=packett.cool; s=key1; t=1717028553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WWdQIaU8VD8eDUpjBsSBJEcY19/AoaLeCk5Wvm3mzf0=; b=VrM+HlWyax8yE8du0ddSo7hL+gPaJ8485nub0XbhB1+7vFVx4hVHwMe1j9m49RIHfW3cFC kOEgzpgTMwI9hjkZXf84Nf96rgNQdVpl9JEuyiShO8RzjjP2emOHh/aaqOiPAUy8HsDCB0 kzcUkuendu4YJhlifvv/nte9ZUCmvgk9gTSypXQU2eB0QkwsKpCXc5y7M326dsLT/mhkEi 01p5j+N0h1ugqFEYBrqJw6QWtniSz7l+lQmzEIiJaLjriJYgbEJhfNCTdHN5xGUrBAJUnw PnwagxmnvWaRtys58OOjQjgznNQh18K6wEBI5216PvVYbfaw8O3zTeAYVKzpiA== X-Envelope-To: mchehab@kernel.org X-Envelope-To: heiko@sntech.de X-Envelope-To: hverkuil-cisco@xs4all.nl X-Envelope-To: krzysztof.kozlowski+dt@linaro.org X-Envelope-To: robh+dt@kernel.org X-Envelope-To: conor+dt@kernel.org X-Envelope-To: linux-media@vger.kernel.org X-Envelope-To: devicetree@vger.kernel.org X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: thomas.petazzoni@bootlin.com X-Envelope-To: alexandre.belloni@bootlin.com X-Envelope-To: maxime.chevallier@bootlin.com X-Envelope-To: paul.kocialkowski@bootlin.com X-Envelope-To: michael.riesch@wolfvision.net X-Envelope-To: laurent.pinchart@ideasonboard.com X-Envelope-To: mehdi.djait@bootlin.com Date: Wed, 29 May 2024 21:22:07 -0300 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Val Packett Subject: Re: [RESEND Patch v13 2/3] media: rockchip: Add a driver for Rockchip's camera interface To: Mehdi Djait Cc: mchehab@kernel.org, heiko@sntech.de, hverkuil-cisco@xs4all.nl, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, conor+dt@kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, alexandre.belloni@bootlin.com, maxime.chevallier@bootlin.com, paul.kocialkowski@bootlin.com, michael.riesch@wolfvision.net, laurent.pinchart@ideasonboard.com, Mehdi Djait Message-Id: In-Reply-To: <715d89214d1ed6a8bb16cbb6268718a737485560.1707677804.git.mehdi.djait.k@gmail.com> References: <715d89214d1ed6a8bb16cbb6268718a737485560.1707677804.git.mehdi.djait.k@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Hi, On Sun, Feb 11 2024 at 20:03:31 +01:00:00, Mehdi Djait=20 wrote: > This introduces a V4L2 driver for the Rockchip CIF video capture=20 > controller. >=20 > This controller can be found on RK3066, PX30, RK1808, RK3128 and=20 > RK3288, > but for now it's only been tested on the PX30. I've been testing it on an RK3066 tablet I'm bringing up mainline on,=20 recently figured out the clock situation that made the cameras appear=20 on I2C and got a camera driver to attach, but still not getting a frame=20 and will need to debug more.. Since you're familiar with the hardware,=20 could you quickly tell me what exactly causes the CIF interrupt to=20 fire? Is it a signal from the camera? Anyway, two things I noticed with the code: > +static int cif_enum_input(struct file *file, void *priv, > + struct v4l2_input *input) > +{ > + struct cif_stream *stream =3D video_drvdata(file); > + struct v4l2_subdev *sd =3D stream->cifdev->remote.sd; > + int ret; > + > + if (input->index > 0) > + return -EINVAL; > + > + ret =3D v4l2_subdev_call(sd, video, g_input_status, &input->status); > + if (ret && ret !=3D -EOPNOTSUPP) > + return ret; v4l2_subdev_call actually returns -ENOIOCTLCMD when the camera driver=20 does not handle the requested call. > +static int cif_plat_probe(struct platform_device *pdev) > +{ [=85] > + ret =3D devm_clk_bulk_get(dev, cif_dev->match_data->clks_num, > + cif_dev->match_data->clks); This looks like it's just modifying the `static` clocks array shared=20 between all instances of the driver and not copying the clock=20 references into the instance's private struct. Thanks, ~val