Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4231072imm; Mon, 17 Sep 2018 10:15:08 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaUlpC7aGzia0dUboIv5zooyHcQvgs6l0Pd1JsxMJOWRJR51ETK3E97gn1DET8tO+uDEx2N X-Received: by 2002:a63:3207:: with SMTP id y7-v6mr24493508pgy.101.1537204508415; Mon, 17 Sep 2018 10:15:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537204508; cv=none; d=google.com; s=arc-20160816; b=mXlgvt2MxH0NjlOxeO3KUHoSlbDRqs7xwarNjq9frKwxSFZDz7ab5TjbEYT0Rkikx8 Lnxjl+Q3pTnD4sh0w/6g/bD/WL2Y7Md34/+8nHQvnEsBpPe+HjE1WxBL40y6QzXd8oku aA3tmgAqg6TrqbUd/HIbo/cvlOP//48jUYRCi5hHf25/OgD0xWhbWLpAKkOa/EOJUOVo nO/wWofNaPdAb8I6RKgCGjYvILtN6TG7BIcq0I698CBcUC0XTbi9YPUQXEhZZii/dxPm EJL1/2jaC21JjCl+nFELqUX2svGpxoEToncxGL8sb+xOr95cb6E6yPfD3c3DaS+tBwGg Oc2A== 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; bh=iCcefDMzqqHHHZEzWwEP+D7P6IpYV1UOsdEg+D3uDh0=; b=OZ2EYxGgKER0aqd0JRQK3Y8fe9XfVg5ZOLtrNo7UBFazALBcxjYkT26ovBG+F0KXME 3bf9+z7k5NMuwUYcid26fkNkgDyHCtjQbvqRVuegajATCu4tcgzpvFyCbWBHkrORmCh5 Ybo9EhOOaVOyZtCgc9jMGpVv4YKw2q2fWpTzdXf8k3pRKiIlgwkKZ9qfO5kpznYOHUCa rd8oAwywRQYgwDATaWTYWZOvCO0ESax5G9Amd9sbtxg7sJDB00aHuQY+ae1rwQkaa22X sNwjglA1lPIOYivtWo2OHCK4xm5kDdbweCq8RoBMQRhG9AAQY3Vk3zgoze1qxTCvjR0U APBA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r2-v6si15015736pgk.452.2018.09.17.10.14.51; Mon, 17 Sep 2018 10:15:08 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728311AbeIQWmD (ORCPT + 99 others); Mon, 17 Sep 2018 18:42:03 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:50951 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726795AbeIQWmD (ORCPT ); Mon, 17 Sep 2018 18:42:03 -0400 Received: by mail-wm1-f66.google.com with SMTP id s12-v6so10530934wmc.0 for ; Mon, 17 Sep 2018 10:13:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=iCcefDMzqqHHHZEzWwEP+D7P6IpYV1UOsdEg+D3uDh0=; b=Fm3iyL4S/HIG15C2PKgwJnYMQ8OIXOktVTxoehs9lZe0kNu/UhdNHhU2nT3gBJ6lfj FPVKDvyg72cKN2QQVs7klOcg7gbSE5zm+YPpPTqLT77swLckdV4U9oaxm8lJZ4NCpsYu KTHKLc5q7vrkRhGKEU9c4Zekg10zUo0cq/W4ypwxSyY/dehA0cGwtJkLzjmoSz7trIUX /NmbYIqtC/DWKlvFsh89Yr9VxX6ujwGRHMTIpyCJpw7DZwrrcoDNhdwjIwrBYhRqAfrT zL5d4vFOMZiFpq5AfaBsbDTZotYBi/VI2l2Sp0GTX8/Zgv+ZPAaAinCr2P+0ia4NPMe2 1v8A== X-Gm-Message-State: APzg51DRrj2DGOs1d47nKIB8y/xg8KSVYaQ9hanSTvx+U6dFV0NXs5X0 xE1VpLGIP235tbAVXEKmLGd8rA== X-Received: by 2002:a1c:b143:: with SMTP id a64-v6mr11588412wmf.114.1537204425323; Mon, 17 Sep 2018 10:13:45 -0700 (PDT) Received: from [192.168.1.13] ([90.168.169.92]) by smtp.gmail.com with ESMTPSA id x65-v6sm9252467wmg.39.2018.09.17.10.13.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Sep 2018 10:13:44 -0700 (PDT) Subject: Re: [PATCH 1/2] [media] v4l: allow to register dev nodes for individual v4l2 subdevs To: Sakari Ailus Cc: linux-kernel@vger.kernel.org, Tian Shu Qiu , Mauro Carvalho Chehab , Hans Verkuil , linux-media@vger.kernel.org References: <20180904113018.14428-1-javierm@redhat.com> <20180904113018.14428-2-javierm@redhat.com> <20180917164634.arevvwkrvdmmteem@paasikivi.fi.intel.com> From: Javier Martinez Canillas Message-ID: <0788d9f0-b98b-ecf8-c006-7f2f2172561c@redhat.com> Date: Mon, 17 Sep 2018 19:13:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180917164634.arevvwkrvdmmteem@paasikivi.fi.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sakari, On 9/17/18 6:46 PM, Sakari Ailus wrote: > Hi Javier, > > On Tue, Sep 04, 2018 at 01:30:17PM +0200, Javier Martinez Canillas wrote: >> Currently there's only a function to register device nodes for all subdevs >> of a v4l2 device that are marked with the V4L2_SUBDEV_FL_HAS_DEVNODE flag. >> >> But drivers may want to register device nodes for individual subdevices, >> so add a v4l2_device_register_subdev_node() for this purpose. >> >> A use case for this function is for media device drivers to register the >> device nodes in the v4l2 async notifier .bound callback instead of doing >> a registration for all subdevices in the .complete callback. > > Thanks for the set. > > I've been doing some work to add events to MC; with Hans's property API > set, assuming it could be used to tell the registration is complete, we > have all bits for a complete solution. > Great. > As the driver is buggy and fails to work correctly in the case if not every > sub-devices probes successfully, I see no reason to postpone applying the > two patches now. > Yes, agreed. > One more comment below. (No need to resend just for that IMO.) > >> >> Signed-off-by: Javier Martinez Canillas [snip] >> >> +/** >> + * v4l2_device_register_subdev_node - Registers a device node for a subdev >> + * of the v4l2 device. >> + * >> + * @v4l2_dev: pointer to struct v4l2_device > > struct -> &struct > Thanks, I'm not well versed in kernel-doc / Sphinx markup syntax so I missed it. BTW, I copied from another place in include/media/v4l2-device.h, and now I notice that it has a mix of "&struct foo", "struct &foo" and "struct foo". It would be nice to fix this so cross-reference works properly in all cases. >> + * @sd: pointer to &struct v4l2_subdev >> + */ >> +int __must_check v4l2_device_register_subdev_node(struct v4l2_device *v4l2_dev, >> + struct v4l2_subdev *sd); >> + >> /** >> * v4l2_device_register_subdev_nodes - Registers device nodes for all subdevs >> * of the v4l2 device that are marked with > Best regards, -- Javier Martinez Canillas Software Engineer - Desktop Hardware Enablement Red Hat