From: Lee Jones <hidden> Date: 2012-08-06 15:17:45
At this moment in time there is only one known configuration for the
Nomadik I2C driver. By not holding that configuration in the driver
adds some unnecessary overhead in platform code. The configuration
as already been removed from platform code, this patch checks for any
over-riding configurations. If there aren't any, the default is used.
Cc: linux-i2c at vger.kernel.org
Acked-by: srinidhi kasagar <redacted>
Acked-by: Linus Walleij <redacted>
Signed-off-by: Lee Jones <redacted>
---
drivers/i2c/busses/i2c-nomadik.c | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
@@ -350,10 +350,6 @@ static void setup_i2c_controller(struct nmk_i2c_dev *dev)i2c_clk=clk_get_rate(dev->clk);-/* fallback to std. mode if machine has not provided it */-if(dev->cfg.clk_freq==0)-dev->cfg.clk_freq=100000;-/**Thespecsays,incaseofstd.modethedivideris*2whereasitis3forfastandfastplusmodeof
@@ -911,20 +907,32 @@ static const struct i2c_algorithm nmk_i2c_algo = {.functionality=nmk_i2c_functionality};+staticstructnmk_i2c_controlleru8500_i2c={+/*+*Slavedatasetuptime;250ns,100ns,and10ns,which+*is14,6and2respectivelyfora48Mhzi2cclock.+*/+.slsu=0xe,+.tft=1,/* Tx FIFO threshold */+.rft=8,/* Rx FIFO threshold */+.clk_freq=400000,/* fast mode operation */+.timeout=200,/* Slave response timeout(ms) */+.sm=I2C_FREQ_MODE_FAST,+};+staticatomic_tadapter_id=ATOMIC_INIT(0);staticintnmk_i2c_probe(structamba_device*adev,conststructamba_id*id){intret=0;-structnmk_i2c_controller*pdata=-adev->dev.platform_data;+structnmk_i2c_controller*pdata=pdev->dev.platform_data;structnmk_i2c_dev*dev;structi2c_adapter*adap;-if(!pdata){-dev_warn(&adev->dev,"no platform data\n");-return-ENODEV;-}+if(!pdata)+/* No i2c configuration found, using the default. */+pdata=&u8500_i2c;+dev=kzalloc(sizeof(structnmk_i2c_dev),GFP_KERNEL);if(!dev){dev_err(&adev->dev,"cannot allocate memory\n");
From: Lee Jones <hidden> Date: 2012-08-06 15:35:13
Looks like I introduced a merge error on the last patch. Trying again:
From: Lee Jones <redacted>
Date: Mon, 6 Aug 2012 11:04:14 +0100
Subject: [PATCH 1/1 v2] i2c: Add default configuration into the Nomadik I2C
driver.
At this moment in time there is only one known configuration for the
Nomadik I2C driver. By not holding that configuration in the driver
adds some unnecessary overhead in platform code. The configuration
as already been removed from platform code, this patch checks for any
over-riding configurations. If there aren't any, the default is used.
Cc: linux-i2c at vger.kernel.org
Acked-by: srinidhi kasagar <redacted>
Acked-by: Linus Walleij <redacted>
Signed-off-by: Lee Jones <redacted>
---
.../mali/mali400ko/driver/src/devicedrv/mali/arch | 1 +
drivers/i2c/busses/i2c-nomadik.c | 28 +++++++++++++-------
2 files changed, 19 insertions(+), 10 deletions(-)
create mode 120000 drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/arch
@@ -350,10 +350,6 @@ static void setup_i2c_controller(struct nmk_i2c_dev *dev)i2c_clk=clk_get_rate(dev->clk);-/* fallback to std. mode if machine has not provided it */-if(dev->cfg.clk_freq==0)-dev->cfg.clk_freq=100000;-/**Thespecsays,incaseofstd.modethedivideris*2whereasitis3forfastandfastplusmodeof
@@ -911,20 +907,32 @@ static const struct i2c_algorithm nmk_i2c_algo = {.functionality=nmk_i2c_functionality};+staticstructnmk_i2c_controlleru8500_i2c={+/*+*Slavedatasetuptime;250ns,100ns,and10ns,which+*is14,6and2respectivelyfora48Mhzi2cclock.+*/+.slsu=0xe,+.tft=1,/* Tx FIFO threshold */+.rft=8,/* Rx FIFO threshold */+.clk_freq=400000,/* fast mode operation */+.timeout=200,/* Slave response timeout(ms) */+.sm=I2C_FREQ_MODE_FAST,+};+staticatomic_tadapter_id=ATOMIC_INIT(0);staticintnmk_i2c_probe(structamba_device*adev,conststructamba_id*id){intret=0;-structnmk_i2c_controller*pdata=-adev->dev.platform_data;+structnmk_i2c_controller*pdata=adev->dev.platform_data;structnmk_i2c_dev*dev;structi2c_adapter*adap;-if(!pdata){-dev_warn(&adev->dev,"no platform data\n");-return-ENODEV;-}+if(!pdata)+/* No i2c configuration found, using the default. */+pdata=&u8500_i2c;+dev=kzalloc(sizeof(structnmk_i2c_dev),GFP_KERNEL);if(!dev){dev_err(&adev->dev,"cannot allocate memory\n");
NACK, what is this stuff? It's even out-of-tree code.
Please be careful with git add -A, I prefer to use git add <pathspec>
I suspect that may be why this happened...
Please fix it up and send a v3.
Yours,
Linus Walleij
NACK, what is this stuff? It's even out-of-tree code.
Whoa, no idea! Good spot though, I missed this completely.
Please be careful with git add -A, I prefer to use git add <pathspec>
I suspect that may be why this happened...
I don't use `git add -A`, ever. If I'm adding files, I usually use
`git commit -s -- <pathspec>`, or `git commit -a` if I'm sure I require
all the necessary changes. I guess I could have accidentally collected
it using `git add -i` whist fixing it up, or a similar misdemeanor.
Please fix it up and send a v3.
Of course.
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
From: Lee Jones <hidden> Date: 2012-08-07 15:31:19
From: Lee Jones <redacted>
Date: Tue, 7 Aug 2012 12:27:24 +0100
Subject: [PATCH 1/1 v3] i2c: Add default configuration into the Nomadik I2C
driver.
At this moment in time there is only one known configuration for the
Nomadik I2C driver. By not holding that configuration in the driver
adds some unnecessary overhead in platform code. The configuration
as already been removed from platform code, this patch checks for any
over-riding configurations. If there aren't any, the default is used.
Cc: linux-i2c at vger.kernel.org
Acked-by: srinidhi kasagar <redacted>
Acked-by: Linus Walleij <redacted>
Signed-off-by: Lee Jones <redacted>
Signed-off-by: Lee Jones <redacted>
---
drivers/i2c/busses/i2c-nomadik.c | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
@@ -350,10 +350,6 @@ static void setup_i2c_controller(struct nmk_i2c_dev *dev)i2c_clk=clk_get_rate(dev->clk);-/* fallback to std. mode if machine has not provided it */-if(dev->cfg.clk_freq==0)-dev->cfg.clk_freq=100000;-/**Thespecsays,incaseofstd.modethedivideris*2whereasitis3forfastandfastplusmodeof
@@ -911,20 +907,32 @@ static const struct i2c_algorithm nmk_i2c_algo = {.functionality=nmk_i2c_functionality};+staticstructnmk_i2c_controlleru8500_i2c={+/*+*Slavedatasetuptime;250ns,100ns,and10ns,which+*is14,6and2respectivelyfora48Mhzi2cclock.+*/+.slsu=0xe,+.tft=1,/* Tx FIFO threshold */+.rft=8,/* Rx FIFO threshold */+.clk_freq=400000,/* fast mode operation */+.timeout=200,/* Slave response timeout(ms) */+.sm=I2C_FREQ_MODE_FAST,+};+staticatomic_tadapter_id=ATOMIC_INIT(0);staticintnmk_i2c_probe(structamba_device*adev,conststructamba_id*id){intret=0;-structnmk_i2c_controller*pdata=-adev->dev.platform_data;+structnmk_i2c_controller*pdata=adev->dev.platform_data;structnmk_i2c_dev*dev;structi2c_adapter*adap;-if(!pdata){-dev_warn(&adev->dev,"no platform data\n");-return-ENODEV;-}+if(!pdata)+/* No i2c configuration found, using the default. */+pdata=&u8500_i2c;+dev=kzalloc(sizeof(structnmk_i2c_dev),GFP_KERNEL);if(!dev){dev_err(&adev->dev,"cannot allocate memory\n");
On Tue, Aug 7, 2012 at 5:31 PM, Lee Jones [off-list ref] wrote:
From: Lee Jones <redacted>
Date: Tue, 7 Aug 2012 12:27:24 +0100
Subject: [PATCH 1/1 v3] i2c: Add default configuration into the Nomadik I2C
driver.
This has some bad whitespace damage, and the subject should
be "i2c/nomadik:"
Cc: linux-i2c at vger.kernel.org
Acked-by: srinidhi kasagar <redacted>
Acked-by: Linus Walleij <redacted>
Signed-off-by: Lee Jones <redacted>
Signed-off-by: Lee Jones <redacted>
Double sign-off.
Unless Wolfram volunteers to fix this up I suggest you
fix it nocheinmal und senden einer neues version.
Ihre,
Linus Walleij
From: Lee Jones <hidden> Date: 2012-08-08 13:10:06
On Wed, Aug 08, 2012 at 02:38:23PM +0200, Linus Walleij wrote:
On Tue, Aug 7, 2012 at 5:31 PM, Lee Jones [off-list ref] wrote:
quoted
From: Lee Jones <redacted>
Date: Tue, 7 Aug 2012 12:27:24 +0100
Subject: [PATCH 1/1 v3] i2c: Add default configuration into the Nomadik I2C
driver.
This has some bad whitespace damage, and the subject should
be "i2c/nomadik:"
White space damage? You mean the subject line-wrap?
`git format-patch` does that. I'll change the subject line to i2c/nomadik.
quoted
Cc: linux-i2c at vger.kernel.org
Acked-by: srinidhi kasagar <redacted>
Acked-by: Linus Walleij <redacted>
Signed-off-by: Lee Jones <redacted>
Signed-off-by: Lee Jones <redacted>
Double sign-off.
Hmm... this is fast becoming my nemosis patch!
Unless Wolfram volunteers to fix this up I suggest you
fix it nocheinmal und senden einer neues version.
That's okay, it's my error, I'll fix.
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
From: Lee Jones <hidden> Date: 2012-08-08 13:12:07
From: Lee Jones <redacted>
Date: Tue, 7 Aug 2012 12:27:24 +0100
Subject: [PATCH 1/1 v4] i2c/nomadik: Add default configuration into the Nomadik I2C driver
At this moment in time there is only one known configuration for the
Nomadik I2C driver. By not holding that configuration in the driver
adds some unnecessary overhead in platform code. The configuration
as already been removed from platform code, this patch checks for any
over-riding configurations. If there aren't any, the default is used.
Cc: linux-i2c at vger.kernel.org
Acked-by: srinidhi kasagar <redacted>
Acked-by: Linus Walleij <redacted>
Signed-off-by: Lee Jones <redacted>
---
drivers/i2c/busses/i2c-nomadik.c | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
@@ -350,10 +350,6 @@ static void setup_i2c_controller(struct nmk_i2c_dev *dev)i2c_clk=clk_get_rate(dev->clk);-/* fallback to std. mode if machine has not provided it */-if(dev->cfg.clk_freq==0)-dev->cfg.clk_freq=100000;-/**Thespecsays,incaseofstd.modethedivideris*2whereasitis3forfastandfastplusmodeof
@@ -911,20 +907,32 @@ static const struct i2c_algorithm nmk_i2c_algo = {.functionality=nmk_i2c_functionality};+staticstructnmk_i2c_controlleru8500_i2c={+/*+*Slavedatasetuptime;250ns,100ns,and10ns,which+*is14,6and2respectivelyfora48Mhzi2cclock.+*/+.slsu=0xe,+.tft=1,/* Tx FIFO threshold */+.rft=8,/* Rx FIFO threshold */+.clk_freq=400000,/* fast mode operation */+.timeout=200,/* Slave response timeout(ms) */+.sm=I2C_FREQ_MODE_FAST,+};+staticatomic_tadapter_id=ATOMIC_INIT(0);staticintnmk_i2c_probe(structamba_device*adev,conststructamba_id*id){intret=0;-structnmk_i2c_controller*pdata=-adev->dev.platform_data;+structnmk_i2c_controller*pdata=adev->dev.platform_data;structnmk_i2c_dev*dev;structi2c_adapter*adap;-if(!pdata){-dev_warn(&adev->dev,"no platform data\n");-return-ENODEV;-}+if(!pdata)+/* No i2c configuration found, using the default. */+pdata=&u8500_i2c;+dev=kzalloc(sizeof(structnmk_i2c_dev),GFP_KERNEL);if(!dev){dev_err(&adev->dev,"cannot allocate memory\n");
On Wed, Aug 8, 2012 at 3:11 PM, Lee Jones [off-list ref] wrote:
From: Lee Jones <redacted>
Date: Tue, 7 Aug 2012 12:27:24 +0100
Subject: [PATCH 1/1 v4] i2c/nomadik: Add default configuration into the Nomadik I2C driver
Wolfram are you taking this v4 patch into the i2c tree for the -rc:s?
Right now this is causing boot regressions so we need it badly...
Yours,
Linus Walleij
From: Wolfram Sang <hidden> Date: 2012-08-17 19:05:51
On Fri, Aug 17, 2012 at 05:02:32PM +0200, Linus Walleij wrote:
On Wed, Aug 8, 2012 at 3:11 PM, Lee Jones [off-list ref] wrote:
quoted
From: Lee Jones <redacted>
Date: Tue, 7 Aug 2012 12:27:24 +0100
Subject: [PATCH 1/1 v4] i2c/nomadik: Add default configuration into the Nomadik I2C driver
Wolfram are you taking this v4 patch into the i2c tree for the -rc:s?
Right now this is causing boot regressions so we need it badly...
From: Wolfram Sang <hidden> Date: 2012-08-18 08:01:29
On Wed, Aug 08, 2012 at 02:11:59PM +0100, Lee Jones wrote:
From: Lee Jones <redacted>
Date: Tue, 7 Aug 2012 12:27:24 +0100
Subject: [PATCH 1/1 v4] i2c/nomadik: Add default configuration into the Nomadik I2C driver
Actually, unlike Linus said, I prefer "i2c: nomadik:"; minor nit,
though.
At this moment in time there is only one known configuration for the
Nomadik I2C driver. By not holding that configuration in the driver
adds some unnecessary overhead in platform code. The configuration
as already been removed from platform code, this patch checks for any
^^ has ( I fixed it )
over-riding configurations. If there aren't any, the default is used.
Cc: linux-i2c at vger.kernel.org
Acked-by: srinidhi kasagar <redacted>
Acked-by: Linus Walleij <redacted>
Signed-off-by: Lee Jones <redacted>
Applied to -current, thanks! I added a note from Linus that it is needed
because of boot regressions. That is also useful in commit messages.
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120818/226190a7/attachment.sig>