diff mbox series

i2c: designware: Sort timing parameter ACPI method calls by the speed

Message ID 20220420125802.352306-1-jarkko.nikula@linux.intel.com
State Accepted
Commit e17daa3b58ed8ba187475b4bb12ca21193596cb3
Headers show
Series i2c: designware: Sort timing parameter ACPI method calls by the speed | expand

Commit Message

Jarkko Nikula April 20, 2022, 12:58 p.m. UTC
It's more logical to read these get timing parameters ACPI method calls
sorted by speed categories in increasing order: Standard-mode,
Fast-mode, Fast-mode Plus and High-speed mode.

Originally these were in order after commit a92ec1746f10
("i2c: designware: get fast plus and high speed *CNT configuration") but
got mixed up over the years.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
 drivers/i2c/busses/i2c-designware-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andy Shevchenko April 26, 2022, 1:14 p.m. UTC | #1
On Wed, Apr 20, 2022 at 03:58:02PM +0300, Jarkko Nikula wrote:
> It's more logical to read these get timing parameters ACPI method calls
> sorted by speed categories in increasing order: Standard-mode,
> Fast-mode, Fast-mode Plus and High-speed mode.
> 
> Originally these were in order after commit a92ec1746f10
> ("i2c: designware: get fast plus and high speed *CNT configuration") but
> got mixed up over the years.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
>  drivers/i2c/busses/i2c-designware-common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c
> index 9f8574320eb2..e7d316b1401a 100644
> --- a/drivers/i2c/busses/i2c-designware-common.c
> +++ b/drivers/i2c/busses/i2c-designware-common.c
> @@ -266,9 +266,9 @@ int i2c_dw_acpi_configure(struct device *device)
>  	 * selected speed modes.
>  	 */
>  	i2c_dw_acpi_params(device, "SSCN", &dev->ss_hcnt, &dev->ss_lcnt, &ss_ht);
> +	i2c_dw_acpi_params(device, "FMCN", &dev->fs_hcnt, &dev->fs_lcnt, &fs_ht);
>  	i2c_dw_acpi_params(device, "FPCN", &dev->fp_hcnt, &dev->fp_lcnt, &fp_ht);
>  	i2c_dw_acpi_params(device, "HSCN", &dev->hs_hcnt, &dev->hs_lcnt, &hs_ht);
> -	i2c_dw_acpi_params(device, "FMCN", &dev->fs_hcnt, &dev->fs_lcnt, &fs_ht);
>  
>  	switch (t->bus_freq_hz) {
>  	case I2C_MAX_STANDARD_MODE_FREQ:
> -- 
> 2.35.1
>
Wolfram Sang May 14, 2022, 1:44 p.m. UTC | #2
On Wed, Apr 20, 2022 at 03:58:02PM +0300, Jarkko Nikula wrote:
> It's more logical to read these get timing parameters ACPI method calls
> sorted by speed categories in increasing order: Standard-mode,
> Fast-mode, Fast-mode Plus and High-speed mode.
> 
> Originally these were in order after commit a92ec1746f10
> ("i2c: designware: get fast plus and high speed *CNT configuration") but
> got mixed up over the years.
> 
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

Applied to for-next, thanks!
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c
index 9f8574320eb2..e7d316b1401a 100644
--- a/drivers/i2c/busses/i2c-designware-common.c
+++ b/drivers/i2c/busses/i2c-designware-common.c
@@ -266,9 +266,9 @@  int i2c_dw_acpi_configure(struct device *device)
 	 * selected speed modes.
 	 */
 	i2c_dw_acpi_params(device, "SSCN", &dev->ss_hcnt, &dev->ss_lcnt, &ss_ht);
+	i2c_dw_acpi_params(device, "FMCN", &dev->fs_hcnt, &dev->fs_lcnt, &fs_ht);
 	i2c_dw_acpi_params(device, "FPCN", &dev->fp_hcnt, &dev->fp_lcnt, &fp_ht);
 	i2c_dw_acpi_params(device, "HSCN", &dev->hs_hcnt, &dev->hs_lcnt, &hs_ht);
-	i2c_dw_acpi_params(device, "FMCN", &dev->fs_hcnt, &dev->fs_lcnt, &fs_ht);
 
 	switch (t->bus_freq_hz) {
 	case I2C_MAX_STANDARD_MODE_FREQ: