From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8FD8824B28; Fri, 27 Mar 2026 22:57:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774652256; cv=none; b=lkRLZaJP3+kgD1Tx1G1nVkdUrUbW/lxT0+aoH4c5F+HjZqJvzEL5d96EeCVU1jP8C8B39p4dN903F4RyQzLGiFb6YZoeAY4HLGl8CooRYWtx33EZt6CECcZrmBvWg2T+g8LFhQIKQa6sO5SFb96FVHx5kKmKUcJg1oiysCozMqQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774652256; c=relaxed/simple; bh=382ZzAjwznfU2ambOpURhZCaUOZizho9wnlqCZN8Ycc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=e49OvddJN9EtM6vyS8DIDxoNU4K/Ep4ggr7/E8lWg+xKpY8RhEoVPmsRU3zzZueH5d/j/xGJ18iWtwUSBbTFpjw+Dr6GTtG0V9ZEEqVKR3Gk0H/N11xgGgLwMXGfy86WDUua0G2FD33F5Yj+qYX6g7qiuTtV3pLNyw/YA+x7fEM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AZormfnx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AZormfnx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E84CFC2BC87; Fri, 27 Mar 2026 22:57:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774652256; bh=382ZzAjwznfU2ambOpURhZCaUOZizho9wnlqCZN8Ycc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=AZormfnxOGPv++BinyFO8R7Wtiv2nT/QnAZdEVtFlU/eavjIOKluZi45ymywR0tEs H2TY4qagxRcKs+icTlli4Rk5teaTDHF5pEklmesASduK5aTr83s686fbHkH4/KV+rZ n5D0nZVijEh9xEzEKAsirpZyF1Dtbd/O6XCtMiWCFHg5kmz2kOfeUKUt1VlTCpkcra FlUZAJqcd8wdVIzhX4/4uYiaOIHxqHs3L+ZNBP8cdHdXhVJ3NvffQq8a5oQQu2dSMZ nKNBxODdll3cindqVUyfmiOp/0NIkph66OxC4xToBmU2z3GjY0UNBZ1I0nroHm8Zkt qoNR7PyCHfoXw== Message-ID: <4ead0b6d-26a8-4e99-b5de-b7bf1ddc5fc4@kernel.org> Date: Fri, 27 Mar 2026 22:57:30 +0000 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v11 4/7] media: qcom: camss: Add support to populate sub-devices To: Loic Poulain , Bryan O'Donoghue Cc: Dmitry Baryshkov , Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Konrad Dybcio , Vladimir Zapolskiy , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Krzysztof Kozlowski References: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-0-5b93415be6dd@linaro.org> <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-4-5b93415be6dd@linaro.org> <7757b121-da4f-4157-93c9-4ba162b2696f@linaro.org> <8QluTwu20EKgDZw7aCJzUdLnbW1JPmcC1joptTrNEAhmI2vhOGtR1brQ4DMO2PAZGEcUsFwrmo8fAcc54yxMDg==@protonmail.internalid> From: Bryan O'Donoghue Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 27/03/2026 22:48, Loic Poulain wrote: > On Fri, Mar 27, 2026 at 11:37 PM Bryan O'Donoghue > wrote: >> On 27/03/2026 21:33, Dmitry Baryshkov wrote: >>>> Other drivers typically call the populate function at the end of the >>>> probe function. In this case, however, it is invoked before the main >>>> resources are enabled. I assume this is because the CSIPHY device >>>> needs to be available early. Aside from that, it looks good to me. >>> This becomes fragile. The CSI PHY might be built as a module, which >>> might be loaded later. >> Is it any more or less fragile than "simple-mfd" in a DT though ? >> Krzysztof isn't very much in favour of simple-mfd so this method of >> population is the alternative to hand. >> >> The CSIPHY driver uses devm_of_phy_get which handles deferred probe. If >> the PHY module isn't loaded yet when CAMSS tries to get it, CAMSS gets >> -EPROBE_DEFER and retries. > What about relying on v4l2_async_nf_register() in the same way as for > the sensors? That would allow both the sensors and the CSIPHY to be > bound asynchronously when they are ready, assuming the CSIPHY driver > registers a V4L2 subdevice... The point of + devm_of_platform_populate(dev); or simple-mfd is to allow all sub-devices to asynchronously probe wrt the existing camss node. OPE, IPE, BPS, ICP, CSIPHY - for the case of CSIPHY CAMSS cares about a phandle but for the others it does not. There's no bug here to solve that devm_of_phy_get() doesn't solve. --- bod