All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: designware: Sort timing parameter ACPI method calls by the speed
@ 2022-04-20 12:58 Jarkko Nikula
  2022-04-26 13:14 ` Andy Shevchenko
  2022-05-14 13:44 ` Wolfram Sang
  0 siblings, 2 replies; 3+ messages in thread
From: Jarkko Nikula @ 2022-04-20 12:58 UTC (permalink / raw)
  To: linux-i2c
  Cc: Wolfram Sang, Andy Shevchenko, Mika Westerberg, Jan Dabros,
	Jarkko Nikula

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(-)

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] i2c: designware: Sort timing parameter ACPI method calls by the speed
  2022-04-20 12:58 [PATCH] i2c: designware: Sort timing parameter ACPI method calls by the speed Jarkko Nikula
@ 2022-04-26 13:14 ` Andy Shevchenko
  2022-05-14 13:44 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2022-04-26 13:14 UTC (permalink / raw)
  To: Jarkko Nikula; +Cc: linux-i2c, Wolfram Sang, Mika Westerberg, Jan Dabros

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
> 

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] i2c: designware: Sort timing parameter ACPI method calls by the speed
  2022-04-20 12:58 [PATCH] i2c: designware: Sort timing parameter ACPI method calls by the speed Jarkko Nikula
  2022-04-26 13:14 ` Andy Shevchenko
@ 2022-05-14 13:44 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2022-05-14 13:44 UTC (permalink / raw)
  To: Jarkko Nikula; +Cc: linux-i2c, Andy Shevchenko, Mika Westerberg, Jan Dabros

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

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!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-14 13:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-20 12:58 [PATCH] i2c: designware: Sort timing parameter ACPI method calls by the speed Jarkko Nikula
2022-04-26 13:14 ` Andy Shevchenko
2022-05-14 13:44 ` Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.