From: Jigarkumar Zala <jigarkumar.zala@oss.qualcomm.com>
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org
Cc: anusha.nandi@oss.qualcomm.com,
hariram.purushothaman@oss.qualcomm.com,
wenmeng.liu@oss.qualcomm.com,
Vikram Sharma <vikram.sharma@oss.qualcomm.com>,
Nihal Kumar Gupta <nihal.gupta@oss.qualcomm.com>,
hangxiang.ma@oss.qualcomm.com, vijay.tumati@oss.qualcomm.com,
udayc@quicinc.com
Subject: Re: Reg: Re: [PATCH RFC 0/6] phy/media: Add generic MIPI C-PHY support to CSI-2 stack
Date: Thu, 19 Nov 2026 14:33:39 -0800 [thread overview]
Message-ID: <564e8e85-3991-4ec7-afc3-317dc8732a4a@oss.qualcomm.com> (raw)
In-Reply-To: <09896b0c-b670-4d34-82f9-1e880a9cc188@linaro.org>
Hi Bryan,
Thanks for the feedback.
The original proposal was a little different from what was shown in the
diagram. The intent was for phy-qocom-mipi-csi2-core.c to act as the
interface with phy-core.c,
while the functionality which is currently in phy-mipi-csi2-3ph-dphy.c
would be generalized and renamed to something like
phy-mipi-csi2-core-utils.c, and extended to support additional PHY modes
beyond the current D-PHY implementation.
However, based on your comment, we're now considering a simpler
approach. Rather to maintain Mode specific operation in core-utils.c file,
we could merge the common functionality from
phy-qcom-mipi-csi2-3ph-dphy.c directly into the existing
phy-qcom-mipi-csi2-core.c and evolve that file to support the different
PHY modes.
The PHY-specific pieces such as register definitions, mode-specific
constants, and related definitions could then be maintained in separate
headers, for example:
-- phy-qcom-mipi-csi2-dphy_regs.h
-- phy-qcom-mipi-csi2-cphy_regs.h
-- Additional mode-specific headers as needed
With this structure, phy-qcom-mipi-csi2-core.c would contain the common
implementation and dispatch the appropriate operations based on the
selected PHY mode (D-PHY, C-PHY, split modes, etc.),
avoiding the need for an additional intermediate source file while still
allowing us to extend support for future PHY configurations.
We'll put together the proposed patches and share them, which should
make the intended separation between common and mode-specific
functionality clearer.
Top Level architecture will look like below:
camss.c
|
v
phy-core.c
|
v
phy-qcom-mipi-csi2-core.c
^
| (#include)
+--------------+--------------+
| | |
D-PHY.h C-PHY.h Future Modes
| | |
+--------------+--------------+
Mode-specific register headers
phy-mipi-csi2-dphy_regs.h
phy-mipi-csi2-cphy_regs.h
Best Regards,
Jigar
On 11/19/2026 1:12 AM, Bryan O'Donoghue wrote:
> On 19/11/2026 06:37, Jigarkumar Zala wrote:
>> Hi Bryan,
>>
>> As part of the C-PHY enablement work, we are thinking to organize the
>> PHY driver such that the common functionality is consolidated into a
>> shared implementation file, *phy-mipi-csi2-core-utils.c*, while
>> keeping the PHY-specific register definitions separated:
>>
>> * *phy-mipi-csi2-dphy_regs.h* – D-PHY register definitions
>> * *phy-mipi-csi2-cphy_regs.h* – C-PHY register definitions
>> * *phy-mipi-csi2-core-utils.c* – Shared core implementation and
>> utilities used by different PHY modes
>>
>> Conceptually:
>>
>> Plain Text
>>
>> |dphy_regs.h cphy_regs.h \ /
>> \ / \ / phy-mipi-csi2-
>> core-utils.c |
>
> We already have a phy-mipi-csi2-core.c file so why does it need to be
> renamed ?
>
> [141] % ls drivers/phy/qualcomm/phy-qcom-mipi-csi2*.c
> drivers/phy/qualcomm/phy-qcom-mipi-csi2-3ph-dphy.c
> drivers/phy/qualcomm/phy-qcom-mipi-csi2-core.c
>
> I think anything that needs consolidation should go into the existing
> core.c file - I also suspect there is still a use-case for
> phy-qcom-mipi-csi2-3ph-dphy.c and phy-qcom-mipi-csi2-3ph-cphy.c
>
> But its hard to comment more without seeing what you guys are proposing.
>
> ---
> bod
parent reply other threads:[~2026-11-19 22:33 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <09896b0c-b670-4d34-82f9-1e880a9cc188@linaro.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=564e8e85-3991-4ec7-afc3-317dc8732a4a@oss.qualcomm.com \
--to=jigarkumar.zala@oss.qualcomm.com \
--cc=anusha.nandi@oss.qualcomm.com \
--cc=bryan.odonoghue@linaro.org \
--cc=hangxiang.ma@oss.qualcomm.com \
--cc=hariram.purushothaman@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=nihal.gupta@oss.qualcomm.com \
--cc=udayc@quicinc.com \
--cc=vijay.tumati@oss.qualcomm.com \
--cc=vikram.sharma@oss.qualcomm.com \
--cc=wenmeng.liu@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®