[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZbvzoklqE/V66a3P@lizhi-Precision-Tower-5810>
Date: Thu, 1 Feb 2024 14:40:18 -0500
From: Frank Li <Frank.li@....com>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>, Jingoo Han <jingoohan1@...il.com>,
Gustavo Pimentel <gustavo.pimentel@...opsys.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof WilczyĆski <kw@...ux.com>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>, imx@...ts.linux.dev,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org
Subject: Re: [PATCH v2 6/6] PCI: dwc: Add common send PME_Turn_Off message
method
On Thu, Feb 01, 2024 at 12:03:49PM -0600, Bjorn Helgaas wrote:
> On Thu, Feb 01, 2024 at 11:13:30AM -0500, Frank Li wrote:
> > Set outbound ATU map memory write to send PCI message. So one MMIO write
> > can trigger a PCI message, such as PME_Turn_Off.
> >
> > Add common dw_pcie_send_pme_turn_off_by_atu() function.
> > ...
>
> > - if (!pci->pp.ops->pme_turn_off)
> > - return 0;
> > + if (pci->pp.ops->pme_turn_off)
> > + pci->pp.ops->pme_turn_off(&pci->pp);
> > + else
> > + ret = dw_pcie_send_pme_turn_off_by_atu(pci);
>
> I think it's nice if function names match the function pointer names.
>
> E.g., we currently already have:
>
> .pme_turn_off = ls_pcie_send_turnoff_msg,
> .pme_turn_off = ls1021a_pcie_send_turnoff_msg,
> .pme_turn_off = ls1043a_pcie_send_turnoff_msg,
>
> which is slightly annoying because it's always useful to compare
> implementations, but "git grep pme_turn_off" doesn't find the actual
> functions, so I wish these were named "ls_pcie_pme_turn_off()", etc.
>
> You don't have to fix those existing layerscape ones now, but I think
> the same applies to dw_pcie_send_pme_turn_off_by_atu(): it would be
> nice if it were named something like "dw_pcie_pme_turn_off()" so
> grep/cscope would find it easily.
Okay, these funcition can be removed because this patch. But It takes some
time to test it at these platform. Add need dts update also. There are
still long road.
Frank
>
> Bjorn
Powered by blists - more mailing lists