Re: [PATCH v6 2/7] reset: mchp: sparx5: Use the second reg item when cpu-syscon is not present

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 1, 2024, at 16:30, Herve Codina wrote:
> On Mon, 30 Sep 2024 16:26:16 +0200
> Herve Codina <herve.codina@xxxxxxxxxxx> wrote:
> --- 8< ---
>
> In mchp_sparx5_map_syscon(), I will call the syscon API or the local
> function based on the device compatible string:
> 	--- 8< ---
> 	if (of_device_is_compatible(pdev->dev.of_node, 
> "microchip,lan966x-switch-reset"))
> 		regmap = mchp_lan966x_syscon_to_regmap(&pdev->dev, syscon_np);
> 	else
> 		regmap = syscon_node_to_regmap(syscon_np);
> 	--- 8< ---
>
> Is this kind of solution you were expecting?
> If you have thought about something different, can you give me some pointers?

Hi Hervé,

The way I had imagined this was to not need an if() check
at all but unconditionally map the syscon registers in the
reset driver.

The most important part here is to have sensible bindings
that don't need to describe the difference between PCI
and SoC mode. This seems fine for the lan966x case, but
I'm not sure why you need to handle sparx5 differently here.
Do you expect the syscon to be shared with other drivers
on sparx5 but not lan966x?

I don't thinkt this bit matters too much and what you suggest
works fine, I just want to be sure I understand what you are
doing.

      Arnd





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux