From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C071313552 for ; Sun, 29 Mar 2026 11:21:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774783295; cv=none; b=MhyC4hbatR+nkuDB6CqCgxnFOb5ixuV+rMbxrpfFeRv1HXmcAHONZBHj2ZBxpQxLXtTXR1UWHUnSBkpV+Ih4NKZO41tgDiWu4aVlYyiv0t45RD+80NJPrLwt8dVRTtw1OPMTx+4KXPit8+652xdvv1WdynImwtGGk7rcLU9Wz6A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774783295; c=relaxed/simple; bh=0wR+MgHijwGTIMJCNQj0goJOmIz68prqo+nba/9TQrc=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=lEzQyJKU57s2U5C/auQwjdgOeOTAe/yJeBkv9Ey7uyecPxqTvPtDTdt/BzmgZhrG3qNk5WCPnjZPpJVHv/ExFNut1/qZ/JnsomqFSvceX7lKabMasIiDtrX+Uslx9HjNsXcNDjRQI1Vs9JfqeEDvsoVbiZbgUqVzgfX4MlCjrgQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=PRk0z8yR; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PRk0z8yR" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4853e1ce427so43302065e9.3 for ; Sun, 29 Mar 2026 04:21:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1774783293; x=1775388093; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :reply-to:cc:to:from:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=TwR3yI+NB25G7HZGBpVG+F40teFK60brAC7VV58HZik=; b=PRk0z8yRSIwFZ6p9ut7PnccqOAOZxtNAGJE5fOb6BoheoJ/ssv7jhrgQ7Xks+IVkLo WX76YAmAFEqHtUgQQ1LPOWJkyp8C6JefHDjZdwTkdVclx0UKT1gAFbdIEicyut3aBx0s 4HLE8OE7cpFTX5edbZ+95n2cM0g72s9EQla8hfEUuWr8d7mAACk+hPnmadKjsOcwJihX zQbt2Kl2BHywtjjDlXN/8TT1iZisQMpClIhuGZjcpc+4StgY9MMHPNPY5EqPixUXeP2K tvN6Wir0npo1fYgz0CQ17pNsKMqKRehjxw9TsjwX7eMI2YFrN6QwC21gGhQlvsbRE2gK di0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774783293; x=1775388093; h=content-transfer-encoding:in-reply-to:content-language:references :reply-to:cc:to:from:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TwR3yI+NB25G7HZGBpVG+F40teFK60brAC7VV58HZik=; b=KtCW6SN/JXnC+8GwFvwPj9sGgWWsOQm7uMdkclEmX8Oul4q1eVpl8YjwLRRizDUeLw 4A9CO82rAEHDa93KJJtYhH5IVhSeEmETqAUeZR7MkTnm/7mYwr3sNbt4i1ca5dmxtvN7 ztoLl4+1TQN9xSb1IkBcqVJ6EGLIXOQkJxn28zy8lNMh6gO5FWVnfEwR2ck8NMb4hTuA R0hu4qz+7SeX1JHJP77uTTAW73WgzhV3EF1+D5URp87m5pq6gpf3jZSuqs0rQLuv1VOq n6PIi96g7p/BwUv35wYrwzkovRkVVtCa5xRbs+8fO0+0O6eN385Yu156qPUu1JxBgNKs Zj1A== X-Forwarded-Encrypted: i=1; AJvYcCVnzJPHGDk2O/LLJrlYUnp6O/yzv3I2UfQdO7gTc598rmi4z2I6rY6cM2P/hLBQBlk5gXbDGyEzwHljo/g=@vger.kernel.org X-Gm-Message-State: AOJu0YxdlfmNwkOrgZyyIZCqjPX9qWx2iAN71UHgw5J6Sb4zdOkLOMAc hIzT95siVdRZiuIYO4UtglVRbQREDwh4t+vTKIaIcUH2xzdDqnnloIqJKdgEtYQQ4To= X-Gm-Gg: ATEYQzyZ+AhuUazBxi8T3ajMIRgKgw9UJ1L8Trgw+/rirso64PH3Q9Rm0AVjf+PKaVF ZDRqpVOssbwrv2dLBt/fco5aVKiQ0WxBAJhJAuvCut08juUmc0cvPUarbts4uHm0/MfTSagZ93z a4VsfdcX7QBC1y30AcILQmoZjDuENgx1YY84T4RjWl9sS2NPtquqe1Ux2CUIdtXWBarcNDIyjAn KSpxQfoKUSm3U4RIinClwfmDj960I3fsGLfyOgtgKwAvrSAxnPHu5IndmbqWtf3W7hre/m4ADGH zHPuW8mffJN77bC5w2AceW/ygeIpQP7g4tgfHYjNbWvlmZrYeZKUMdkc8fu0sMXBLsNsp9/HED2 ReAxL0bb4a/xQso8LDYUoy52p8Lqc0+/ivM7s9P3Flr+mtKZIDshGs7jjkWobkczO40nlM6W/Z5 oDc3Jk+EokMGNATEnyt3BVZ45kIiuHMns= X-Received: by 2002:a05:600c:1d15:b0:47e:e48b:506d with SMTP id 5b1f17b1804b1-48727ee9a7amr146841945e9.16.1774783292450; Sun, 29 Mar 2026 04:21:32 -0700 (PDT) Received: from [192.168.0.35] ([64.43.41.12]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48725d9403esm84895655e9.1.2026.03.29.04.21.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Mar 2026 04:21:31 -0700 (PDT) Message-ID: <7b580a09-672d-4e9a-b2df-0b931d00a5f2@linaro.org> Date: Sun, 29 Mar 2026 12:21:34 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH WIP v4 8/9] media: qcom: camss: csiphy-3ph: C-PHY needs own lane configuration From: Bryan O'Donoghue To: david@ixit.cz, Robert Foss , Todor Tomov , Vladimir Zapolskiy , Mauro Carvalho Chehab , Luca Weiss , Petr Hodina , Casey Connolly , "Dr. Git" Cc: Konrad Dybcio , Joel Selvaraj , Kieran Bingham , Sakari Ailus , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org Reply-To: Bryan O'Donoghue References: <20260301-qcom-cphy-v4-0-e53316d2cc65@ixit.cz> <20260301-qcom-cphy-v4-8-e53316d2cc65@ixit.cz> <10c3e5f1-b078-4b48-bfc6-32199270b86b@linaro.org> Content-Language: en-US In-Reply-To: <10c3e5f1-b078-4b48-bfc6-32199270b86b@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 03/03/2026 09:59, Bryan O'Donoghue wrote: > On 01/03/2026 00:51, David Heidelberg via B4 Relay wrote: >> @bod >> Proliferating special cases in switch statements on a per-SoC basis is >> verboten. > > Hmm, your ideas are intriguing to me, and I wish to subscribe to your > newsletter. > > --- > bod > @David. I'm realising my Simpson's reference probably isn't actionable development feedback ;) How about embeddding a pointer to either a DPHY or CPHY init sequence somewhere and checking that pointer ? If it the CPHY init sequence/table in this case, is NULL return -EOPTNOTSUPP. That way instead of constantly extending a switch for each new SoC we enumerate a pointer and check that pointer's validity. Then we have nice clean code which just checks the value of a pointer, instead of an ever-growing list of SoCs in a switch. --- bod