Re: [PATCH v1 5/9] phy: qcom-qmp: Get dp_com I/O resource by index

2020-08-26 Thread Bjorn Andersson
On Wed 26 Aug 16:32 CDT 2020, Stephen Boyd wrote:

> Quoting Bjorn Andersson (2020-08-25 21:36:16)
> > On Tue 25 Aug 21:47 CDT 2020, Stephen Boyd wrote:
> > 
> > > The dp_com resource is always at index 1 according to the dts files in
> > > the kernel. Get this resource by index so that we don't need to make
> > > future additions to the DT binding use 'reg-names'.
> > > 
> > 
> > Afaict the DT binding for the USB/DP phy defines that there should be a
> > reg name of "dp_com" and the current dts files all specifies this. Am I
> > missing something?
> 
> Yes the binding enforces this but this patch is removing that
> enforcement and instead mandating that dp_com is always at index 1 (i.e.
> the second one) so that we can add the DP serdes region directly after
> and avoid adding yet another reg-names property. I changed the binding
> for this usb3-dp phy compatible to make reg-names optional as well. I
> don't see any gain from using reg-names.
> 

Thanks for the explanation, I don't have any objections to this.

> > 
> > PS. Why isn't this a devm_platform_ioremap_resource{,_byname}()?
> 
> Sure. I'll roll that into this patch.

Thanks,
Bjorn


Re: [PATCH v1 5/9] phy: qcom-qmp: Get dp_com I/O resource by index

2020-08-26 Thread Stephen Boyd
Quoting Bjorn Andersson (2020-08-25 21:36:16)
> On Tue 25 Aug 21:47 CDT 2020, Stephen Boyd wrote:
> 
> > The dp_com resource is always at index 1 according to the dts files in
> > the kernel. Get this resource by index so that we don't need to make
> > future additions to the DT binding use 'reg-names'.
> > 
> 
> Afaict the DT binding for the USB/DP phy defines that there should be a
> reg name of "dp_com" and the current dts files all specifies this. Am I
> missing something?

Yes the binding enforces this but this patch is removing that
enforcement and instead mandating that dp_com is always at index 1 (i.e.
the second one) so that we can add the DP serdes region directly after
and avoid adding yet another reg-names property. I changed the binding
for this usb3-dp phy compatible to make reg-names optional as well. I
don't see any gain from using reg-names.

> 
> PS. Why isn't this a devm_platform_ioremap_resource{,_byname}()?

Sure. I'll roll that into this patch.


Re: [PATCH v1 5/9] phy: qcom-qmp: Get dp_com I/O resource by index

2020-08-25 Thread Bjorn Andersson
On Tue 25 Aug 21:47 CDT 2020, Stephen Boyd wrote:

> The dp_com resource is always at index 1 according to the dts files in
> the kernel. Get this resource by index so that we don't need to make
> future additions to the DT binding use 'reg-names'.
> 

Afaict the DT binding for the USB/DP phy defines that there should be a
reg name of "dp_com" and the current dts files all specifies this. Am I
missing something?

PS. Why isn't this a devm_platform_ioremap_resource{,_byname}()?

Regards,
Bjorn

> Cc: Jeykumar Sankaran 
> Cc: Chandan Uddaraju 
> Cc: Vara Reddy 
> Cc: Tanmay Shah 
> Cc: Bjorn Andersson 
> Cc: Manu Gautam 
> Cc: Sandeep Maheswaram 
> Cc: Douglas Anderson 
> Cc: Sean Paul 
> Cc: Jonathan Marek 
> Cc: Dmitry Baryshkov 
> Cc: Rob Clark 
> Signed-off-by: Stephen Boyd 
> ---
>  drivers/phy/qualcomm/phy-qcom-qmp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c 
> b/drivers/phy/qualcomm/phy-qcom-qmp.c
> index 40c051813c34..76d7a9e80f04 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c
> @@ -3266,8 +3266,7 @@ static int qcom_qmp_phy_probe(struct platform_device 
> *pdev)
>  
>   /* per PHY dp_com; if PHY has dp_com control block */
>   if (cfg->has_phy_dp_com_ctrl) {
> - res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
> -"dp_com");
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
>   base = devm_ioremap_resource(dev, res);
>   if (IS_ERR(base))
>   return PTR_ERR(base);
> -- 
> Sent by a computer, using git, on the internet
> 


[PATCH v1 5/9] phy: qcom-qmp: Get dp_com I/O resource by index

2020-08-25 Thread Stephen Boyd
The dp_com resource is always at index 1 according to the dts files in
the kernel. Get this resource by index so that we don't need to make
future additions to the DT binding use 'reg-names'.

Cc: Jeykumar Sankaran 
Cc: Chandan Uddaraju 
Cc: Vara Reddy 
Cc: Tanmay Shah 
Cc: Bjorn Andersson 
Cc: Manu Gautam 
Cc: Sandeep Maheswaram 
Cc: Douglas Anderson 
Cc: Sean Paul 
Cc: Jonathan Marek 
Cc: Dmitry Baryshkov 
Cc: Rob Clark 
Signed-off-by: Stephen Boyd 
---
 drivers/phy/qualcomm/phy-qcom-qmp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c 
b/drivers/phy/qualcomm/phy-qcom-qmp.c
index 40c051813c34..76d7a9e80f04 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp.c
@@ -3266,8 +3266,7 @@ static int qcom_qmp_phy_probe(struct platform_device 
*pdev)
 
/* per PHY dp_com; if PHY has dp_com control block */
if (cfg->has_phy_dp_com_ctrl) {
-   res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-  "dp_com");
+   res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
base = devm_ioremap_resource(dev, res);
if (IS_ERR(base))
return PTR_ERR(base);
-- 
Sent by a computer, using git, on the internet