Re: [RESEND PATCH v2 5/9] mfd: rtsx: update phy register

From: Lee Jones
Date: Mon Feb 16 2015 - 09:07:31 EST


On Thu, 22 Jan 2015, micky_ching@xxxxxxxxxxxxxx wrote:

> From: Micky Ching <micky_ching@xxxxxxxxxxxxxx>
>
> update phy register value and using direct value instead of macros.
> It is much easier to debug using constant value than a lot of macros.
> We usually need compare the value directly to check the configure.

This is no longer an adequate description of the patch.

> Signed-off-by: Micky Ching <micky_ching@xxxxxxxxxxxxxx>
> ---
> drivers/mfd/rts5249.c | 55 ++++++++++++----------
> include/linux/mfd/rtsx_pci.h | 109 ++++++++++++++++++++++---------------------
> 2 files changed, 85 insertions(+), 79 deletions(-)
>
> diff --git a/drivers/mfd/rts5249.c b/drivers/mfd/rts5249.c
> index 2fe2854..d8072f6 100644
> --- a/drivers/mfd/rts5249.c
> +++ b/drivers/mfd/rts5249.c
> @@ -132,57 +132,62 @@ static int rts5249_optimize_phy(struct rtsx_pcr *pcr)
> if (err < 0)
> return err;
>
> - err = rtsx_pci_write_phy_register(pcr, PHY_REG_REV,
> - PHY_REG_REV_RESV | PHY_REG_REV_RXIDLE_LATCHED |
> - PHY_REG_REV_P1_EN | PHY_REG_REV_RXIDLE_EN |
> - PHY_REG_REV_RX_PWST | PHY_REG_REV_CLKREQ_DLY_TIMER_1_0 |
> - PHY_REG_REV_STOP_CLKRD | PHY_REG_REV_STOP_CLKWR);
> + err = rtsx_pci_write_phy_register(pcr, PHY_REV,
> + PHY_REV_RESV | PHY_REV_RXIDLE_LATCHED |
> + PHY_REV_P1_EN | PHY_REV_RXIDLE_EN |
> + PHY_REV_CLKREQ_TX_EN | PHY_REV_RX_PWST |
> + PHY_REV_CLKREQ_DT_1_0 | PHY_REV_STOP_CLKRD |
> + PHY_REV_STOP_CLKWR);

The tabbing changes make it difficult to see what you're _really_
doing. If you think the tabs are important (I think they were better
before personally), then send them as a separate patch.

> if (err < 0)
> return err;
>
> msleep(1);
>
> err = rtsx_pci_write_phy_register(pcr, PHY_BPCR,
> - PHY_BPCR_IBRXSEL | PHY_BPCR_IBTXSEL |
> - PHY_BPCR_IB_FILTER | PHY_BPCR_CMIRROR_EN);
> + PHY_BPCR_IBRXSEL | PHY_BPCR_IBTXSEL |
> + PHY_BPCR_IB_FILTER | PHY_BPCR_CMIRROR_EN);

More nonsense?

> if (err < 0)
> return err;
> +
> err = rtsx_pci_write_phy_register(pcr, PHY_PCR,
> - PHY_PCR_FORCE_CODE | PHY_PCR_OOBS_CALI_50 |
> - PHY_PCR_OOBS_VCM_08 | PHY_PCR_OOBS_SEN_90 |
> - PHY_PCR_RSSI_EN);
> + PHY_PCR_FORCE_CODE | PHY_PCR_OOBS_CALI_50 |
> + PHY_PCR_OOBS_VCM_08 | PHY_PCR_OOBS_SEN_90 |
> + PHY_PCR_RSSI_EN | PHY_PCR_RX10K);

Etc.

I'm going to stop here. Please resubmit this patch properly.

[...]

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org â Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/