* [PATCH 1/1] i2c: Add default configuration into the Nomadik I2C driver. @ 2012-08-06 15:17 Lee Jones [not found] ` <1344266253-14050-1-git-send-email-lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 0 siblings, 1 reply; 11+ messages in thread From: Lee Jones @ 2012-08-06 15:17 UTC (permalink / raw) To: linux-arm-kernel, linux-kernel Cc: STEricsson_nomadik_linux, linus.walleij, arnd, w.sang, Lee Jones, linux-i2c 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@vger.kernel.org Acked-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/i2c/busses/i2c-nomadik.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c index 5e6f1ee..e42e526 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c @@ -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; - /* * The spec says, in case of std. mode the divider is * 2 whereas it is 3 for fast and fastplus mode of @@ -911,20 +907,32 @@ static const struct i2c_algorithm nmk_i2c_algo = { .functionality = nmk_i2c_functionality }; +static struct nmk_i2c_controller u8500_i2c = { + /* + * Slave data setup time; 250ns, 100ns, and 10ns, which + * is 14, 6 and 2 respectively for a 48Mhz i2c clock. + */ + .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, +}; + static atomic_t adapter_id = ATOMIC_INIT(0); static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id) { int ret = 0; - struct nmk_i2c_controller *pdata = - adev->dev.platform_data; + struct nmk_i2c_controller *pdata = pdev->dev.platform_data; struct nmk_i2c_dev *dev; struct i2c_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(struct nmk_i2c_dev), GFP_KERNEL); if (!dev) { dev_err(&adev->dev, "cannot allocate memory\n"); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 11+ messages in thread
[parent not found: <1344266253-14050-1-git-send-email-lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]
* [PATCH 1/1 v2] i2c: Add default configuration into the Nomadik I2C driver. [not found] ` <1344266253-14050-1-git-send-email-lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2012-08-06 15:35 ` Lee Jones 2012-08-07 9:47 ` Linus Walleij 2012-08-08 13:11 ` [PATCH 1/1 v4] " Lee Jones 1 sibling, 1 reply; 11+ messages in thread From: Lee Jones @ 2012-08-06 15:35 UTC (permalink / raw) To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA Cc: STEricsson_nomadik_linux-nkJGhpqTU55BDgjK7y7TUQ, linus.walleij-0IS4wlFg1OjSUeElwK9/Pw, arnd-r2nGTMty4D4, w.sang-bIcnvbaLZ9MEGnE8C9+IrQ, linux-i2c-u79uwXL29TY76Z2rM5mHXA Looks like I introduced a merge error on the last patch. Trying again: From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Acked-by: srinidhi kasagar <srinidhi.kasagar-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org> Acked-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Signed-off-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> --- .../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 diff --git a/drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/arch b/drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/arch new file mode 120000 index 0000000..427334b --- /dev/null +++ b/drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/arch @@ -0,0 +1 @@ +/home/ljkenny/projects/linaro/snowball/snowball/drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/arch-ux500 \ No newline at end of file diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c index 5e6f1ee..61b00ed 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c @@ -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; - /* * The spec says, in case of std. mode the divider is * 2 whereas it is 3 for fast and fastplus mode of @@ -911,20 +907,32 @@ static const struct i2c_algorithm nmk_i2c_algo = { .functionality = nmk_i2c_functionality }; +static struct nmk_i2c_controller u8500_i2c = { + /* + * Slave data setup time; 250ns, 100ns, and 10ns, which + * is 14, 6 and 2 respectively for a 48Mhz i2c clock. + */ + .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, +}; + static atomic_t adapter_id = ATOMIC_INIT(0); static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id) { int ret = 0; - struct nmk_i2c_controller *pdata = - adev->dev.platform_data; + struct nmk_i2c_controller *pdata = adev->dev.platform_data; struct nmk_i2c_dev *dev; struct i2c_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(struct nmk_i2c_dev), GFP_KERNEL); if (!dev) { dev_err(&adev->dev, "cannot allocate memory\n"); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1 v2] i2c: Add default configuration into the Nomadik I2C driver. 2012-08-06 15:35 ` [PATCH 1/1 v2] " Lee Jones @ 2012-08-07 9:47 ` Linus Walleij 2012-08-07 11:41 ` Lee Jones 2012-08-07 15:31 ` Lee Jones 0 siblings, 2 replies; 11+ messages in thread From: Linus Walleij @ 2012-08-07 9:47 UTC (permalink / raw) To: Lee Jones Cc: linux-arm-kernel, linux-kernel, STEricsson_nomadik_linux, linus.walleij, arnd, w.sang, linux-i2c On Mon, Aug 6, 2012 at 5:35 PM, Lee Jones <lee.jones@linaro.org> wrote: > Looks like I introduced a merge error on the last patch. Trying again: > .../mali/mali400ko/driver/src/devicedrv/mali/arch | 1 + (...) > diff --git a/drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/arch b/drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/arch > new file mode 120000 > index 0000000..427334b > --- /dev/null > +++ b/drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/arch > @@ -0,0 +1 @@ > +/home/ljkenny/projects/linaro/snowball/snowball/drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/arch-ux500 > \ No newline at end of file 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1 v2] i2c: Add default configuration into the Nomadik I2C driver. 2012-08-07 9:47 ` Linus Walleij @ 2012-08-07 11:41 ` Lee Jones 2012-08-07 15:31 ` Lee Jones 1 sibling, 0 replies; 11+ messages in thread From: Lee Jones @ 2012-08-07 11:41 UTC (permalink / raw) To: Linus Walleij Cc: linux-arm-kernel, linux-kernel, STEricsson_nomadik_linux, linus.walleij, arnd, w.sang, linux-i2c > > diff --git a/drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/arch b/drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/arch > > new file mode 120000 > > index 0000000..427334b > > --- /dev/null > > +++ b/drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/arch > > @@ -0,0 +1 @@ > > 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1 v2] i2c: Add default configuration into the Nomadik I2C driver. 2012-08-07 9:47 ` Linus Walleij 2012-08-07 11:41 ` Lee Jones @ 2012-08-07 15:31 ` Lee Jones [not found] ` <20120807153112.GF10719-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 1 sibling, 1 reply; 11+ messages in thread From: Lee Jones @ 2012-08-07 15:31 UTC (permalink / raw) To: Linus Walleij Cc: linux-arm-kernel, linux-kernel, STEricsson_nomadik_linux, linus.walleij, arnd, w.sang, linux-i2c From: Lee Jones <lee.jones@linaro.org> 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@vger.kernel.org Acked-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/i2c/busses/i2c-nomadik.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c index 5e6f1ee..61b00ed 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c @@ -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; - /* * The spec says, in case of std. mode the divider is * 2 whereas it is 3 for fast and fastplus mode of @@ -911,20 +907,32 @@ static const struct i2c_algorithm nmk_i2c_algo = { .functionality = nmk_i2c_functionality }; +static struct nmk_i2c_controller u8500_i2c = { + /* + * Slave data setup time; 250ns, 100ns, and 10ns, which + * is 14, 6 and 2 respectively for a 48Mhz i2c clock. + */ + .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, +}; + static atomic_t adapter_id = ATOMIC_INIT(0); static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id) { int ret = 0; - struct nmk_i2c_controller *pdata = - adev->dev.platform_data; + struct nmk_i2c_controller *pdata = adev->dev.platform_data; struct nmk_i2c_dev *dev; struct i2c_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(struct nmk_i2c_dev), GFP_KERNEL); if (!dev) { dev_err(&adev->dev, "cannot allocate memory\n"); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 11+ messages in thread
[parent not found: <20120807153112.GF10719-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH 1/1 v2] i2c: Add default configuration into the Nomadik I2C driver. [not found] ` <20120807153112.GF10719-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2012-08-08 12:38 ` Linus Walleij [not found] ` <CACRpkdZj2LqFF_i6f3M2uzUkhG6og5n2cTzUgqRZA1_NmhWBNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 11+ messages in thread From: Linus Walleij @ 2012-08-08 12:38 UTC (permalink / raw) To: Lee Jones Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, STEricsson_nomadik_linux-nkJGhpqTU55BDgjK7y7TUQ, linus.walleij-0IS4wlFg1OjSUeElwK9/Pw, arnd-r2nGTMty4D4, w.sang-bIcnvbaLZ9MEGnE8C9+IrQ, linux-i2c-u79uwXL29TY76Z2rM5mHXA On Tue, Aug 7, 2012 at 5:31 PM, Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote: > From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Acked-by: srinidhi kasagar <srinidhi.kasagar-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org> > Acked-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > Signed-off-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > > Signed-off-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Double sign-off. Unless Wolfram volunteers to fix this up I suggest you fix it nocheinmal und senden einer neues version. Ihre, Linus Walleij ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <CACRpkdZj2LqFF_i6f3M2uzUkhG6og5n2cTzUgqRZA1_NmhWBNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH 1/1 v2] i2c: Add default configuration into the Nomadik I2C driver. [not found] ` <CACRpkdZj2LqFF_i6f3M2uzUkhG6og5n2cTzUgqRZA1_NmhWBNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2012-08-08 13:09 ` Lee Jones 0 siblings, 0 replies; 11+ messages in thread From: Lee Jones @ 2012-08-08 13:09 UTC (permalink / raw) To: Linus Walleij Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, STEricsson_nomadik_linux-nkJGhpqTU55BDgjK7y7TUQ, linus.walleij-0IS4wlFg1OjSUeElwK9/Pw, arnd-r2nGTMty4D4, w.sang-bIcnvbaLZ9MEGnE8C9+IrQ, linux-i2c-u79uwXL29TY76Z2rM5mHXA On Wed, Aug 08, 2012 at 02:38:23PM +0200, Linus Walleij wrote: > On Tue, Aug 7, 2012 at 5:31 PM, Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote: > > > From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > > 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. > > Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > > Acked-by: srinidhi kasagar <srinidhi.kasagar-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org> > > Acked-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > > Signed-off-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > > > > Signed-off-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > > 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/1 v4] i2c: Add default configuration into the Nomadik I2C driver. [not found] ` <1344266253-14050-1-git-send-email-lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2012-08-06 15:35 ` [PATCH 1/1 v2] " Lee Jones @ 2012-08-08 13:11 ` Lee Jones [not found] ` <20120808131158.GD8227-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2012-08-18 8:01 ` Wolfram Sang 1 sibling, 2 replies; 11+ messages in thread From: Lee Jones @ 2012-08-08 13:11 UTC (permalink / raw) To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA Cc: STEricsson_nomadik_linux-nkJGhpqTU55BDgjK7y7TUQ, linus.walleij-0IS4wlFg1OjSUeElwK9/Pw, arnd-r2nGTMty4D4, w.sang-bIcnvbaLZ9MEGnE8C9+IrQ, linux-i2c-u79uwXL29TY76Z2rM5mHXA From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Acked-by: srinidhi kasagar <srinidhi.kasagar-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org> Acked-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Signed-off-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> --- drivers/i2c/busses/i2c-nomadik.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c index 5e6f1ee..61b00ed 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c @@ -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; - /* * The spec says, in case of std. mode the divider is * 2 whereas it is 3 for fast and fastplus mode of @@ -911,20 +907,32 @@ static const struct i2c_algorithm nmk_i2c_algo = { .functionality = nmk_i2c_functionality }; +static struct nmk_i2c_controller u8500_i2c = { + /* + * Slave data setup time; 250ns, 100ns, and 10ns, which + * is 14, 6 and 2 respectively for a 48Mhz i2c clock. + */ + .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, +}; + static atomic_t adapter_id = ATOMIC_INIT(0); static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id) { int ret = 0; - struct nmk_i2c_controller *pdata = - adev->dev.platform_data; + struct nmk_i2c_controller *pdata = adev->dev.platform_data; struct nmk_i2c_dev *dev; struct i2c_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(struct nmk_i2c_dev), GFP_KERNEL); if (!dev) { dev_err(&adev->dev, "cannot allocate memory\n"); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 11+ messages in thread
[parent not found: <20120808131158.GD8227-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH 1/1 v4] i2c: Add default configuration into the Nomadik I2C driver. [not found] ` <20120808131158.GD8227-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2012-08-17 15:02 ` Linus Walleij [not found] ` <CACRpkdb+6S5yYvVjrr2f+wubE43dzD3i=OVfWtM_U+HW_XZX1A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 11+ messages in thread From: Linus Walleij @ 2012-08-17 15:02 UTC (permalink / raw) To: Wolfram Sang Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, STEricsson_nomadik_linux-nkJGhpqTU55BDgjK7y7TUQ, linus.walleij-0IS4wlFg1OjSUeElwK9/Pw, arnd-r2nGTMty4D4, linux-i2c-u79uwXL29TY76Z2rM5mHXA, Lee Jones On Wed, Aug 8, 2012 at 3:11 PM, Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote: > From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <CACRpkdb+6S5yYvVjrr2f+wubE43dzD3i=OVfWtM_U+HW_XZX1A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH 1/1 v4] i2c: Add default configuration into the Nomadik I2C driver. [not found] ` <CACRpkdb+6S5yYvVjrr2f+wubE43dzD3i=OVfWtM_U+HW_XZX1A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2012-08-17 19:05 ` Wolfram Sang 0 siblings, 0 replies; 11+ messages in thread From: Wolfram Sang @ 2012-08-17 19:05 UTC (permalink / raw) To: Linus Walleij Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, STEricsson_nomadik_linux-nkJGhpqTU55BDgjK7y7TUQ, linus.walleij-0IS4wlFg1OjSUeElwK9/Pw, arnd-r2nGTMty4D4, linux-i2c-u79uwXL29TY76Z2rM5mHXA, Lee Jones [-- Attachment #1: Type: text/plain, Size: 741 bytes --] On Fri, Aug 17, 2012 at 05:02:32PM +0200, Linus Walleij wrote: > On Wed, Aug 8, 2012 at 3:11 PM, Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote: > > > From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > > 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... I am collecting patches for rc3 this weekend. -- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1 v4] i2c: Add default configuration into the Nomadik I2C driver. 2012-08-08 13:11 ` [PATCH 1/1 v4] " Lee Jones [not found] ` <20120808131158.GD8227-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2012-08-18 8:01 ` Wolfram Sang 1 sibling, 0 replies; 11+ messages in thread From: Wolfram Sang @ 2012-08-18 8:01 UTC (permalink / raw) To: Lee Jones Cc: linus.walleij, arnd, linux-kernel, linux-i2c, STEricsson_nomadik_linux, linux-arm-kernel [-- Attachment #1.1: Type: text/plain, Size: 1219 bytes --] On Wed, Aug 08, 2012 at 02:11:59PM +0100, Lee Jones wrote: > From: Lee Jones <lee.jones@linaro.org> > 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@vger.kernel.org > Acked-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com> > Acked-by: Linus Walleij <linus.walleij@linaro.org> > Signed-off-by: Lee Jones <lee.jones@linaro.org> 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/ | [-- Attachment #1.2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-08-18 8:01 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-08-06 15:17 [PATCH 1/1] i2c: Add default configuration into the Nomadik I2C driver Lee Jones [not found] ` <1344266253-14050-1-git-send-email-lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2012-08-06 15:35 ` [PATCH 1/1 v2] " Lee Jones 2012-08-07 9:47 ` Linus Walleij 2012-08-07 11:41 ` Lee Jones 2012-08-07 15:31 ` Lee Jones [not found] ` <20120807153112.GF10719-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2012-08-08 12:38 ` Linus Walleij [not found] ` <CACRpkdZj2LqFF_i6f3M2uzUkhG6og5n2cTzUgqRZA1_NmhWBNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2012-08-08 13:09 ` Lee Jones 2012-08-08 13:11 ` [PATCH 1/1 v4] " Lee Jones [not found] ` <20120808131158.GD8227-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2012-08-17 15:02 ` Linus Walleij [not found] ` <CACRpkdb+6S5yYvVjrr2f+wubE43dzD3i=OVfWtM_U+HW_XZX1A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2012-08-17 19:05 ` Wolfram Sang 2012-08-18 8:01 ` 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).