Re: [PATCH v7 5/8] media: qcom: camss: csiphy-3ph: Add Gen2 v1.1 MIPI CSI-2 C-PHY init

David Heidelberg <[email protected]>
Newsgroups org.kernel.vger.phone-devel,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-media
Message-ID <[email protected]>
On 08/06/2026 11:00, Bryan O'Donoghue wrote:
> On 05/06/2026 14:14, David Heidelberg via B4 Relay wrote:
>>       case CAMSS_845:
>>           if (c->phy_cfg == V4L2_MBUS_CSI2_CPHY) {
>> -            regs->lane_regs = NULL;
>> -            regs->lane_array_size = 0;
>> +            regs->lane_regs = &lane_regs_sdm845_3ph[0];
>> +            regs->lane_array_size = ARRAY_SIZE(lane_regs_sdm845_3ph);
>>           } else {
>>               regs->lane_regs = &lane_regs_sdm845[0];
>>               regs->lane_array_size = ARRAY_SIZE(lane_regs_sdm845);
>>           }
> 
> The nittiest nit pick I can make sorry ...
> 
> IMO the default in the code should be DPHY with CPHY the alternative.

Sounds good, thou, the original lane regs, due to being only D-PHY available at 
that time, were uncoditional on V4L2_MBUS_CSI2_DPHY (which I assume has to be 
set anyway).

I was aiming to keep the original logic (thus else { ... D-PHY }).

Then I would do
if (DPHY)
elseif (CPHY)

if that's desired.
My pref would be another switch statement, but yo dawg, I heard you have switch 
statement inside the switch statement.... :)

David

> 
> Globally that should be true in this code.
> 
> ---
> bod

-- 
David Heidelberg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.