All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3] Set sda-hold-time based on ACPI *CNT value
@ 2017-03-28  8:48 Tan Chin Yew
  2017-03-28  8:48 ` [PATCH] i2c: designware: Get selected speed mode sda-hold-time via ACPI Tan Chin Yew
  0 siblings, 1 reply; 19+ messages in thread
From: Tan Chin Yew @ 2017-03-28  8:48 UTC (permalink / raw)
  To: Wolfram Sang, Jarkko Nikula, Andy Shevchenko, Mika Westerberg
  Cc: linux-i2c, linux-kernel

For I2c to operate correctly under all speed mode, sda-hold-time need to
be perfectly tuned. However, sda-hold-time is precalculated according to
circuit parameter which make it platform-specific.

In order to get accurate sda-hold-time for all platforms, pretuned
sda-hold-time for particular platform is stored in ACPI table and driver
to load the sda holding time from ACPI table.

This patch read the I2c sda-hold-time from ACPI table and assigned the
suitable hold time based on the i2c clock frequency.

Tested on Intel Apollo Lake.

Changes in V3:
	- Remove null handling in function dw_i2c_acpi_params.
	- Add descriptions to commit message.

Changes in V2:
	- The code is realigned according to suggestion.
	- "case 400000:" is added on top of "default:" for readability.

Tan Chin Yew (1):
  i2c: designware: Get selected speed mode sda-hold-time via ACPI

 drivers/i2c/busses/i2c-designware-platdrv.c | 31 ++++++++++++++++++++---------
 1 file changed, 22 insertions(+), 9 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH v2] Set sda-hold-time based on ACPI *CNT value
@ 2017-02-14  5:54 chin.yew.tan
  2017-02-14  5:54 ` [PATCH] i2c: designware: Get selected speed mode sda-hold-time via ACPI chin.yew.tan
  0 siblings, 1 reply; 19+ messages in thread
From: chin.yew.tan @ 2017-02-14  5:54 UTC (permalink / raw)
  To: jarkko.nikula, andriy.shevchenko, mika.westerberg; +Cc: linux-i2c

From: Tan Chin Yew <chin.yew.tan@intel.com>

For I2c to operate correctly under all speed mode, sda-hold-time need to
be perfectly tuned. However, sda-hold-time is precalculated according to
circuit parameter which make it platform-specific.

In order to get accurate sda-hold-time for all platforms, pretuned
sda-hold-time for particular platform is stored in ACPI table and driver
to load the sda holding time from ACPI table.

This patch read the I2c sda-hold-time from ACPI table and assigned the
suitable hold time based on the i2c clock frequency.

Tested on Intel Apollo Lake.

Changes in V2:
	- The code is realigned according to suggestion.
	- "case 400000:" is added on top of "default:" for readability.

Tan Chin Yew (1):
  i2c: designware: Get selected speed mode sda-hold-time via ACPI

 drivers/i2c/busses/i2c-designware-platdrv.c | 28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH] Set sda-hold-time based on ACPI *CNT value
@ 2017-02-10 11:28 chin.yew.tan
  2017-02-10 11:28 ` [PATCH] i2c: designware: Get selected speed mode sda-hold-time via ACPI chin.yew.tan
  0 siblings, 1 reply; 19+ messages in thread
From: chin.yew.tan @ 2017-02-10 11:28 UTC (permalink / raw)
  To: jarkko.nikula, andriy.shevchenko, mika.westerberg; +Cc: linux-i2c

From: Tan Chin Yew <chin.yew.tan@intel.com>

For I2c to operate correctly under all speed mode, sda-hold-time need to
be perfectly tuned. However, sda-hold-time is precalculated according to
circuit parameter which make it platform-specific.

In order to get accurate sda-hold-time for all platforms, pretuned
sda-hold-time for particular platform is stored in ACPI table and driver
to load the sda holding time from ACPI table.

This patch read the I2c sda-hold-time from ACPI table and assigned the
suitable hold time based on the i2c clock frequency.

Tested on Intel Apollo Lake.

Tan Chin Yew (1):
  i2c: designware: Get selected speed mode sda-hold-time via ACPI

 drivers/i2c/busses/i2c-designware-platdrv.c | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)

-- 
1.9.1

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

end of thread, other threads:[~2017-04-19 18:57 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28  8:48 [PATCH V3] Set sda-hold-time based on ACPI *CNT value Tan Chin Yew
2017-03-28  8:48 ` [PATCH] i2c: designware: Get selected speed mode sda-hold-time via ACPI Tan Chin Yew
2017-03-28  9:13   ` Andy Shevchenko
2017-03-31 12:12     ` Jarkko Nikula
2017-04-19 18:57   ` Wolfram Sang
  -- strict thread matches above, loose matches on Subject: below --
2017-02-14  5:54 [PATCH v2] Set sda-hold-time based on ACPI *CNT value chin.yew.tan
2017-02-14  5:54 ` [PATCH] i2c: designware: Get selected speed mode sda-hold-time via ACPI chin.yew.tan
2017-02-14  7:00   ` Jarkko Nikula
2017-03-06 12:30     ` Tan, Chin Yew
2017-02-14 10:05   ` Andy Shevchenko
2017-03-23 20:58   ` Wolfram Sang
2017-03-23 21:00     ` Wolfram Sang
2017-03-27  9:43       ` Tan, Chin Yew
2017-03-27 10:07         ` Wolfram Sang
2017-02-10 11:28 [PATCH] Set sda-hold-time based on ACPI *CNT value chin.yew.tan
2017-02-10 11:28 ` [PATCH] i2c: designware: Get selected speed mode sda-hold-time via ACPI chin.yew.tan
2017-02-10 12:28   ` Jarkko Nikula
2017-02-10 12:31   ` Andy Shevchenko
2017-02-13  8:41     ` Tan, Chin Yew
2017-02-13  9:33       ` Jarkko Nikula
2017-02-13 10:56         ` Andy Shevchenko

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.