All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lu Jingchang-B35083 <B35083-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: "wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org"
	<wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
	"shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
	<shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Estevam Fabio-R49496
	<r49496-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	"linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	Jin Zhengxiong-R64188
	<R64188-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	Li Xiaochun-B41219
	<B41219-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Subject: RE: [PATCH v2 2/2] i2c: imx: Add Vybrid VF610 I2C controller support
Date: Fri, 28 Jun 2013 08:49:41 +0000	[thread overview]
Message-ID: <B56CDBE15CE27145A4B77D2D24263E851E39D8@039-SN1MPN1-005.039d.mgd.msft.net> (raw)
In-Reply-To: <20130620080406.GD14308-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

>-----Original Message-----
>From: Sascha Hauer [mailto:s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org]
>Sent: Thursday, June 20, 2013 4:04 PM
>To: Lu Jingchang-B35083
>Cc: wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org; shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org; Estevam Fabio-R49496; linux-
>i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org; Jin Zhengxiong-
>R64188; Li Xiaochun-B41219
>Subject: Re: [PATCH v2 2/2] i2c: imx: Add Vybrid VF610 I2C controller
>support
>
>On Tue, Jun 18, 2013 at 04:48:47PM +0800, Jingchang Lu wrote:
>> +static u16 imx_i2c_clk_div[50][2] = {
>>  	{ 22,	0x20 }, { 24,	0x21 }, { 26,	0x22 }, { 28,	0x23 },
>>  	{ 30,	0x00 },	{ 32,	0x24 }, { 36,	0x25 }, { 40,	0x26 },
>>  	{ 42,	0x03 }, { 44,	0x27 },	{ 48,	0x28 }, { 52,	0x05 },
>> @@ -112,11 +107,67 @@ static u16 __initdata i2c_clk_div[50][2] = {
>>  	{ 3072,	0x1E }, { 3840,	0x1F }
>>  };
>>
>> +/* Vybrid VF610 clock divider, register value pairs */
>> +static u16 vf610_i2c_clk_div[60][2] = {
>> +	{ 20,   0x00 }, { 22,   0x01 }, { 24,   0x02 }, { 26,   0x03 },
>> +	{ 28,   0x04 }, { 30,   0x05 }, { 32,   0x09 }, { 34,   0x06 },
>> +	{ 36,   0x0A }, { 40,   0x07 }, { 44,   0x0C }, { 48,   0x0D },
>> +	{ 52,   0x43 }, { 56,   0x0E }, { 60,   0x45 }, { 64,   0x12 },
>> +	{ 68,   0x0F }, { 72,   0x13 }, { 80,   0x14 }, { 88,   0x15 },
>> +	{ 96,   0x19 }, { 104,  0x16 }, { 112,  0x1A }, { 128,  0x17 },
>> +	{ 136,  0x4F }, { 144,  0x1C }, { 160,  0x1D }, { 176,  0x55 },
>> +	{ 192,  0x1E }, { 208,  0x56 }, { 224,  0x22 }, { 228,  0x24 },
>> +	{ 240,  0x1F }, { 256,  0x23 }, { 288,  0x5C }, { 320,  0x25 },
>> +	{ 384,  0x26 }, { 448,  0x2A }, { 480,  0x27 }, { 512,  0x2B },
>> +	{ 576,  0x2C }, { 640,  0x2D }, { 768,  0x31 }, { 896,  0x32 },
>> +	{ 960,  0x2F }, { 1024, 0x33 }, { 1152, 0x34 }, { 1280, 0x35 },
>> +	{ 1536, 0x36 }, { 1792, 0x3A }, { 1920, 0x37 }, { 2048, 0x3B },
>> +	{ 2304, 0x3C }, { 2560, 0x3D }, { 3072, 0x3E }, { 3584, 0x7A },
>> +	{ 3840, 0x3F }, { 4096, 0x7B }, { 5120, 0x7D }, { 6144, 0x7E },
>> +};
>
>...
>
>> +static struct imx_i2c_hwdata imx_i2c_hwdata = {
>> +	.addr_reg		= 0x00,
>> +	.freq_reg		= 0x04,
>> +	.ctrl_reg		= 0x08,
>> +	.status_reg		= 0x0c,
>> +	.data_reg		= 0x10,
>> +	.clk_div		= imx_i2c_clk_div,
>> +	.ndivs			= ARRAY_SIZE(imx_i2c_clk_div),
>> +	.i2sr_clr_opcode	= I2SR_CLR_OPCODE_W0C,
>> +	.i2cr_ien_opcode	= I2CR_IEN_OPCODE_1,
>> +
>> +};
>> +
>> +static struct imx_i2c_hwdata vf610_i2c_hwdata = {
>> +	.addr_reg		= 0x00,
>> +	.freq_reg		= 0x01,
>> +	.ctrl_reg		= 0x02,
>> +	.status_reg		= 0x03,
>> +	.data_reg		= 0x04,
>> +	.clk_div		= vf610_i2c_clk_div,
>> +	.ndivs			= ARRAY_SIZE(vf610_i2c_clk_div),
>> +	.i2sr_clr_opcode	= I2SR_CLR_OPCODE_W1C,
>> +	.i2cr_ien_opcode	= I2CR_IEN_OPCODE_0,
>> +
>> +};
>
>Wow. The i2c unit remained unchanged since the i.MX21 days. Shuffling
>some registers or divider values was long overdue...
>
[Lu Jingchang-B35083] 
 Could I understand that you are OK for the patch? If yes, Could you please ACKed it? Thanks.


Best Regards,
Jingchang

WARNING: multiple messages have this Message-ID (diff)
From: B35083@freescale.com (Lu Jingchang-B35083)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] i2c: imx: Add Vybrid VF610 I2C controller support
Date: Fri, 28 Jun 2013 08:49:41 +0000	[thread overview]
Message-ID: <B56CDBE15CE27145A4B77D2D24263E851E39D8@039-SN1MPN1-005.039d.mgd.msft.net> (raw)
In-Reply-To: <20130620080406.GD14308@pengutronix.de>

>-----Original Message-----
>From: Sascha Hauer [mailto:s.hauer at pengutronix.de]
>Sent: Thursday, June 20, 2013 4:04 PM
>To: Lu Jingchang-B35083
>Cc: wsa at the-dreams.de; shawn.guo at linaro.org; Estevam Fabio-R49496; linux-
>i2c at vger.kernel.org; linux-arm-kernel at lists.infradead.org; Jin Zhengxiong-
>R64188; Li Xiaochun-B41219
>Subject: Re: [PATCH v2 2/2] i2c: imx: Add Vybrid VF610 I2C controller
>support
>
>On Tue, Jun 18, 2013 at 04:48:47PM +0800, Jingchang Lu wrote:
>> +static u16 imx_i2c_clk_div[50][2] = {
>>  	{ 22,	0x20 }, { 24,	0x21 }, { 26,	0x22 }, { 28,	0x23 },
>>  	{ 30,	0x00 },	{ 32,	0x24 }, { 36,	0x25 }, { 40,	0x26 },
>>  	{ 42,	0x03 }, { 44,	0x27 },	{ 48,	0x28 }, { 52,	0x05 },
>> @@ -112,11 +107,67 @@ static u16 __initdata i2c_clk_div[50][2] = {
>>  	{ 3072,	0x1E }, { 3840,	0x1F }
>>  };
>>
>> +/* Vybrid VF610 clock divider, register value pairs */
>> +static u16 vf610_i2c_clk_div[60][2] = {
>> +	{ 20,   0x00 }, { 22,   0x01 }, { 24,   0x02 }, { 26,   0x03 },
>> +	{ 28,   0x04 }, { 30,   0x05 }, { 32,   0x09 }, { 34,   0x06 },
>> +	{ 36,   0x0A }, { 40,   0x07 }, { 44,   0x0C }, { 48,   0x0D },
>> +	{ 52,   0x43 }, { 56,   0x0E }, { 60,   0x45 }, { 64,   0x12 },
>> +	{ 68,   0x0F }, { 72,   0x13 }, { 80,   0x14 }, { 88,   0x15 },
>> +	{ 96,   0x19 }, { 104,  0x16 }, { 112,  0x1A }, { 128,  0x17 },
>> +	{ 136,  0x4F }, { 144,  0x1C }, { 160,  0x1D }, { 176,  0x55 },
>> +	{ 192,  0x1E }, { 208,  0x56 }, { 224,  0x22 }, { 228,  0x24 },
>> +	{ 240,  0x1F }, { 256,  0x23 }, { 288,  0x5C }, { 320,  0x25 },
>> +	{ 384,  0x26 }, { 448,  0x2A }, { 480,  0x27 }, { 512,  0x2B },
>> +	{ 576,  0x2C }, { 640,  0x2D }, { 768,  0x31 }, { 896,  0x32 },
>> +	{ 960,  0x2F }, { 1024, 0x33 }, { 1152, 0x34 }, { 1280, 0x35 },
>> +	{ 1536, 0x36 }, { 1792, 0x3A }, { 1920, 0x37 }, { 2048, 0x3B },
>> +	{ 2304, 0x3C }, { 2560, 0x3D }, { 3072, 0x3E }, { 3584, 0x7A },
>> +	{ 3840, 0x3F }, { 4096, 0x7B }, { 5120, 0x7D }, { 6144, 0x7E },
>> +};
>
>...
>
>> +static struct imx_i2c_hwdata imx_i2c_hwdata = {
>> +	.addr_reg		= 0x00,
>> +	.freq_reg		= 0x04,
>> +	.ctrl_reg		= 0x08,
>> +	.status_reg		= 0x0c,
>> +	.data_reg		= 0x10,
>> +	.clk_div		= imx_i2c_clk_div,
>> +	.ndivs			= ARRAY_SIZE(imx_i2c_clk_div),
>> +	.i2sr_clr_opcode	= I2SR_CLR_OPCODE_W0C,
>> +	.i2cr_ien_opcode	= I2CR_IEN_OPCODE_1,
>> +
>> +};
>> +
>> +static struct imx_i2c_hwdata vf610_i2c_hwdata = {
>> +	.addr_reg		= 0x00,
>> +	.freq_reg		= 0x01,
>> +	.ctrl_reg		= 0x02,
>> +	.status_reg		= 0x03,
>> +	.data_reg		= 0x04,
>> +	.clk_div		= vf610_i2c_clk_div,
>> +	.ndivs			= ARRAY_SIZE(vf610_i2c_clk_div),
>> +	.i2sr_clr_opcode	= I2SR_CLR_OPCODE_W1C,
>> +	.i2cr_ien_opcode	= I2CR_IEN_OPCODE_0,
>> +
>> +};
>
>Wow. The i2c unit remained unchanged since the i.MX21 days. Shuffling
>some registers or divider values was long overdue...
>
[Lu Jingchang-B35083] 
 Could I understand that you are OK for the patch? If yes, Could you please ACKed it? Thanks.


Best Regards,
Jingchang

  parent reply	other threads:[~2013-06-28  8:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18  8:48 [PATCH v2 2/2] i2c: imx: Add Vybrid VF610 I2C controller support Jingchang Lu
2013-06-18  8:48 ` Jingchang Lu
     [not found] ` <1371545327-12481-1-git-send-email-b35083-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2013-06-19  8:51   ` Shawn Guo
2013-06-19  8:51     ` Shawn Guo
2013-06-20  8:04   ` Sascha Hauer
2013-06-20  8:04     ` Sascha Hauer
     [not found]     ` <20130620080406.GD14308-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-06-28  8:49       ` Lu Jingchang-B35083 [this message]
2013-06-28  8:49         ` Lu Jingchang-B35083
2013-08-01 20:33   ` Sascha Hauer
2013-08-01 20:33     ` Sascha Hauer
     [not found]     ` <20130801203301.GB5117-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-08-02  5:19       ` Lu Jingchang-B35083
2013-08-02  5:19         ` Lu Jingchang-B35083

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B56CDBE15CE27145A4B77D2D24263E851E39D8@039-SN1MPN1-005.039d.mgd.msft.net \
    --to=b35083-kzfg59tc24xl57midrcfdg@public.gmane.org \
    --cc=B41219-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=R64188-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=r49496-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.