linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: m65xx: drop superfluous quirk structure
@ 2017-02-27 19:25 Wolfram Sang
  2017-03-07  2:36 ` liguo zhang
  2017-03-09 14:41 ` Wolfram Sang
  0 siblings, 2 replies; 4+ messages in thread
From: Wolfram Sang @ 2017-02-27 19:25 UTC (permalink / raw)
  To: linux-i2c
  Cc: Eddie Huang, Liguo Zhang, Sascha Hauer, Daniel Kurtz,
	Yingjoe Chen, Wolfram Sang

All length fields in Linux I2C are u16, so a HW length limitation of 16
bit lengths is not a limitation. Remove the quirk structure.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---

Compile tested only, don't have the hardware. Would appreciate if one of you
had the time to test this. Thank you!

 drivers/i2c/busses/i2c-mt65xx.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
index 4a7d9bc2142ba3..45d61714c81bd2 100644
--- a/drivers/i2c/busses/i2c-mt65xx.c
+++ b/drivers/i2c/busses/i2c-mt65xx.c
@@ -172,14 +172,6 @@ static const struct i2c_adapter_quirks mt6577_i2c_quirks = {
 	.max_comb_2nd_msg_len = 31,
 };
 
-static const struct i2c_adapter_quirks mt8173_i2c_quirks = {
-	.max_num_msgs = 65535,
-	.max_write_len = 65535,
-	.max_read_len = 65535,
-	.max_comb_1st_msg_len = 65535,
-	.max_comb_2nd_msg_len = 65535,
-};
-
 static const struct mtk_i2c_compatible mt6577_compat = {
 	.quirks = &mt6577_i2c_quirks,
 	.pmic_i2c = 0,
@@ -199,7 +191,6 @@ static const struct mtk_i2c_compatible mt6589_compat = {
 };
 
 static const struct mtk_i2c_compatible mt8173_compat = {
-	.quirks = &mt8173_i2c_quirks,
 	.pmic_i2c = 0,
 	.dcm = 1,
 	.auto_restart = 1,
-- 
2.11.0

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

* Re: [PATCH] i2c: m65xx: drop superfluous quirk structure
  2017-02-27 19:25 [PATCH] i2c: m65xx: drop superfluous quirk structure Wolfram Sang
@ 2017-03-07  2:36 ` liguo zhang
  2017-03-07  8:05   ` Wolfram Sang
  2017-03-09 14:41 ` Wolfram Sang
  1 sibling, 1 reply; 4+ messages in thread
From: liguo zhang @ 2017-03-07  2:36 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Eddie Huang, Sascha Hauer, Daniel Kurtz, Yingjoe Chen,
	JunGao

On Mon, 2017-02-27 at 20:25 +0100, Wolfram Sang wrote:
> All length fields in Linux I2C are u16, so a HW length limitation of 16
> bit lengths is not a limitation. Remove the quirk structure.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
We have tested this patch and it is OK.
Tested-by:Jun Gao <jun.gao@mediatek.com>

> Compile tested only, don't have the hardware. Would appreciate if one of you
> had the time to test this. Thank you!
> 
>  drivers/i2c/busses/i2c-mt65xx.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
> index 4a7d9bc2142ba3..45d61714c81bd2 100644
> --- a/drivers/i2c/busses/i2c-mt65xx.c
> +++ b/drivers/i2c/busses/i2c-mt65xx.c
> @@ -172,14 +172,6 @@ static const struct i2c_adapter_quirks mt6577_i2c_quirks = {
>  	.max_comb_2nd_msg_len = 31,
>  };
>  
> -static const struct i2c_adapter_quirks mt8173_i2c_quirks = {
> -	.max_num_msgs = 65535,
> -	.max_write_len = 65535,
> -	.max_read_len = 65535,
> -	.max_comb_1st_msg_len = 65535,
> -	.max_comb_2nd_msg_len = 65535,
> -};
> -
>  static const struct mtk_i2c_compatible mt6577_compat = {
>  	.quirks = &mt6577_i2c_quirks,
>  	.pmic_i2c = 0,
> @@ -199,7 +191,6 @@ static const struct mtk_i2c_compatible mt6589_compat = {
>  };
>  
>  static const struct mtk_i2c_compatible mt8173_compat = {
> -	.quirks = &mt8173_i2c_quirks,
>  	.pmic_i2c = 0,
>  	.dcm = 1,
>  	.auto_restart = 1,

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

* Re: [PATCH] i2c: m65xx: drop superfluous quirk structure
  2017-03-07  2:36 ` liguo zhang
@ 2017-03-07  8:05   ` Wolfram Sang
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2017-03-07  8:05 UTC (permalink / raw)
  To: liguo zhang
  Cc: linux-i2c, Eddie Huang, Sascha Hauer, Daniel Kurtz, Yingjoe Chen,
	JunGao

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

On Tue, Mar 07, 2017 at 10:36:01AM +0800, liguo zhang wrote:
> On Mon, 2017-02-27 at 20:25 +0100, Wolfram Sang wrote:
> > All length fields in Linux I2C are u16, so a HW length limitation of 16
> > bit lengths is not a limitation. Remove the quirk structure.
> > 
> > Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> > ---
> We have tested this patch and it is OK.
> Tested-by:Jun Gao <jun.gao@mediatek.com>

Thank you for testing!


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

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

* Re: [PATCH] i2c: m65xx: drop superfluous quirk structure
  2017-02-27 19:25 [PATCH] i2c: m65xx: drop superfluous quirk structure Wolfram Sang
  2017-03-07  2:36 ` liguo zhang
@ 2017-03-09 14:41 ` Wolfram Sang
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2017-03-09 14:41 UTC (permalink / raw)
  To: linux-i2c
  Cc: Eddie Huang, Liguo Zhang, Sascha Hauer, Daniel Kurtz,
	Yingjoe Chen

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

On Mon, Feb 27, 2017 at 08:25:05PM +0100, Wolfram Sang wrote:
> All length fields in Linux I2C are u16, so a HW length limitation of 16
> bit lengths is not a limitation. Remove the quirk structure.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Applied to for-current, thanks!


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

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

end of thread, other threads:[~2017-03-09 14:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-27 19:25 [PATCH] i2c: m65xx: drop superfluous quirk structure Wolfram Sang
2017-03-07  2:36 ` liguo zhang
2017-03-07  8:05   ` Wolfram Sang
2017-03-09 14:41 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).