mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: Reg: Re: [PATCH RFC 0/6] phy/media: Add generic MIPI C-PHY support to CSI-2 stack
       [not found]       ` <09896b0c-b670-4d34-82f9-1e880a9cc188@linaro.org>
@ 2026-11-19 22:33         ` Jigarkumar Zala
  0 siblings, 0 replies; only message in thread
From: Jigarkumar Zala @ 2026-11-19 22:33 UTC (permalink / raw)
  To: Bryan O'Donoghue, linux-phy, linux-kernel, linux-media
  Cc: anusha.nandi, hariram.purushothaman, wenmeng.liu, Vikram Sharma,
	Nihal Kumar Gupta, hangxiang.ma, vijay.tumati, udayc

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-19 22:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <d78ab29e-8751-4356-a801-d56d3782abb9@oss.qualcomm.com>
     [not found] ` <3e8ad5f6-fdb2-41d3-a944-3f3fd378e657@linaro.org>
     [not found]   ` <6ec4c83c-cdca-4137-9de3-81abed60dbb3@oss.qualcomm.com>
     [not found]     ` <c9271d11-b5de-4a05-9214-8bfe5a6ccf9b@oss.qualcomm.com>
     [not found]       ` <09896b0c-b670-4d34-82f9-1e880a9cc188@linaro.org>
2026-11-19 22:33         ` Reg: Re: [PATCH RFC 0/6] phy/media: Add generic MIPI C-PHY support to CSI-2 stack Jigarkumar Zala

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®