[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201307031343.11647.arnd@arndb.de>
Date: Wed, 3 Jul 2013 13:43:11 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Wolfram Sang <wsa@...-dreams.de>
Cc: Christian Ruppert <christian.ruppert@...lis.com>,
Rob Herring <robherring2@...il.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
linux-i2c@...r.kernel.org,
"Ben Dooks (embedded platforms)" <ben-linux@...ff.org>,
Grant Likely <grant.likely@...retlab.ca>,
Rob Landley <rob@...dley.net>,
devicetree-discuss@...ts.ozlabs.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org,
Vineet Gupta <Vineet.Gupta1@...opsys.com>,
Pierrick Hascoet <pierrick.hascoet@...lis.com>
Subject: Re: [PATCH v10] i2c-designware: make SDA hold time configurable
On Wednesday 26 June 2013, Wolfram Sang wrote:
> On Wed, Jun 26, 2013 at 10:55:06AM +0200, Christian Ruppert wrote:
> > This patch makes the SDA hold time configurable through device tree.
> >
> > Signed-off-by: Christian Ruppert <christian.ruppert@...lis.com>
> > Signed-off-by: Pierrick Hascoet <pierrick.hascoet@...lis.com>
>
> Applied to for-next, thanks for keeping at it and providing lots of
> useful information. Much appreciated!
Sorry, but I got a regression that I didn't find reported elsewhere
so far, even though it breaks a lot of the ARM defconfig builds:
drivers/built-in.o: In function `dw_i2c_probe':
/git/arm-soc/drivers/i2c/busses/i2c-designware-platdrv.c:125: undefined reference to `__udivdi3'
I suspect you want something like the change below.
Signed-off-by: Arnd Bergmann <arnd@...db.de>
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index def79b5..57e3a07 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -119,10 +119,13 @@ static int dw_i2c_probe(struct platform_device *pdev)
if (pdev->dev.of_node) {
u32 ht = 0;
u32 ic_clk = dev->get_clk_rate_khz(dev);
+ u64 hold_time;
of_property_read_u32(pdev->dev.of_node,
"i2c-sda-hold-time-ns", &ht);
- dev->sda_hold_time = ((u64)ic_clk * ht + 500000) / 1000000;
+ hold_time = (u64)ic_clk * ht + 500000;
+ do_div(hold_time, 1000000);
+ dev->sda_hold_time = hold_time;
}
dev->functionality =
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists