History log of /drivers/i2c/busses/i2c-sh_mobile.c
Revision Date Author Comments
ca1f8da9ac5ce6e63d8f6933f83fabc1f3f961f4 04-Nov-2014 Wolfram Sang <wsa+renesas@sang-engineering.com> i2c: remove FSF address

We have a central copy of the GPL for that. Some addresses were already
outdated.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
90104d06372e41b2a844950f6648322b09f9b8b9 27-May-2014 Wolfram Sang <wsa@sang-engineering.com> i2c: sh_mobile: add compatibles for additional SoC

Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
67240dfcb8dcf756cc00fb37f5cb7e3ee2fa6190 02-May-2014 Wolfram Sang <wsa+renesas@sang-engineering.com> i2c: sh_mobile: fix clock calculation for newer SoCs

Newer SoCs have so fast input clocks that the ICCL/H registers only
count every second clock to have a meaningful 9-bit range. The driver
was already prepared for that happening, but didn't use it so far.
Add the proper DT configuration for SoCs that need it.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
7663ebefca8079ef0fd2fff1047d3d10af654c78 02-May-2014 Wolfram Sang <wsa+renesas@sang-engineering.com> i2c: sh_mobile: check timing parameters for valid range

Due to misconfiguration, it can happen that the calculated timing
parameters are out of range. Bail out if that happens. We can also
simplify some logic later because of the verified value. Also, make the
printouts of the values more precise by adding the hex-prefixes.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
6ed7053c2255c34886297b995c6a18607b36d668 02-May-2014 Wolfram Sang <wsa+renesas@sang-engineering.com> i2c: sh_mobile: bail out on errors when initializing

sh_mobile_i2c_init() could detect wrong settings, but didn't bail out,
so it would continue unconfigured. Fix this.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
ed4121e129ae46615ab570318b5b8f31494ced98 02-May-2014 Wolfram Sang <wsa+renesas@sang-engineering.com> i2c: sh_mobile: remove superfluous offset parameter

Following the KISS principle, remove unneeded stuff.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
7fe8a9993337e4d1957737b4468fc574af8fb957 02-May-2014 Wolfram Sang <wsa+renesas@sang-engineering.com> i2c: sh_mobile: devm conversion, irq setup

This is what devm was made for. No rollback mechanism needed, remove the
hook parameter from the irq setup function and simplify it. While we are
here change some variables to proper types.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
4fd31c2eb7bf19927524bca1c5c17e6bb0f4f6eb 02-May-2014 Wolfram Sang <wsa+renesas@sang-engineering.com> i2c: sh_mobile: devm conversion, low hanging fruits

Convert the easy parts to devm. irqs will be converted in a seperate
patch to keep diffs readable.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
88c289ec28dfb0f383dcdbadd2c759f910585815 02-May-2014 Wolfram Sang <wsa+renesas@sang-engineering.com> i2c: sh_mobile: honor DT bus speed settings

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
5a72b25e7896e6358b62b590ce5b3a457516ae40 02-May-2014 Wolfram Sang <wsa+renesas@sang-engineering.com> i2c: sh_mobile: improve error handling

Use standard i2c error codes for i2c failures. Also, don't print
something on timeout since it happens regularly with i2c. Simplify some,
logic, too.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
a78f6a4140f95cbedc0b28c4c883e8aa9ba044f1 02-May-2014 Wolfram Sang <wsa+renesas@sang-engineering.com> i2c: sh_mobile: replace magic hex values with constants

No functional change, binaries are identical.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
f887605d25c1514b06b1a0e0477f85f27f23664d 28-Oct-2013 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> i2c: sh_mobile: Convert to clk_prepare/unprepare

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and
clk_disable_unprepare() to get ready for the migration to the common
clock framework.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
687b81d083c082bc1e853032e3a2a54f8c251d27 11-Jul-2013 Wolfram Sang <wsa@the-dreams.de> i2c: move OF helpers into the core

I2C of helpers used to live in of_i2c.c but experience (from SPI) shows
that it is much cleaner to have this in the core. This also removes a
circular dependency between the helpers and the core, and so we can
finally register child nodes in the core instead of doing this manually
in each driver. So, fix the drivers and documentation, too.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
6d4028c644edc0a2e4a8c948ebf81e8f2f09726e 30-Jul-2013 Jingoo Han <jg1.han@samsung.com> i2c: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
e789029761503f0cce03e8767a56ae099b88e1bd 17-Jan-2013 Guennadi Liakhovetski <g.liakhovetski@gmx.de> i2c: sh_mobile: don't send a stop condition by default inside transfers

By default there should be no stop bit on I2C between single messages
within transfers. Fix the driver to comply and only send a stop bit at
the end of transfers or if I2C_M_STOP is set.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
4b3823184f80c1d3950e5e63e2303653f2decdf8 17-Jan-2013 Guennadi Liakhovetski <g.liakhovetski@gmx.de> i2c: sh_mobile: eliminate an open-coded "goto" loop

Eliminate an open-coded "goto" loop by introducing a function.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
5687265b3127024089dc0b25956772405b9f53d3 17-Jan-2013 Guennadi Liakhovetski <g.liakhovetski@gmx.de> i2c: sh_mobile: fix timeout error handling

In a timeout case return an error immediately from the driver's
.master_xfer() method, instead of continuing and letting higher layers
fail.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
05cf936846ca6aef1b34ba26054728fdbc154558 17-Jan-2013 Guennadi Liakhovetski <g.liakhovetski@gmx.de> i2c: sh_mobile: cosmetic: trivially simplify 2 functions

Reduce 2 boolean functions from "if (condition) return 1; return 0;" to
"return condition;"

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
0b255e927d47b550620dfd3475ee74b0f52e09c8 27-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> i2c: remove __dev* attributes from subsystem

CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.

Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Peter Korsgaard <peter.korsgaard@barco.com> (for ocores and mux-gpio)
Acked-by: Havard Skinnemoen <hskinnemoen@gmail.com> (for i2c-gpio)
Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> (for puf3)
Acked-by: Barry Song <baohua.song@csr.com> (for sirf)
Reviewed-by: Jean Delvare <khali@linux-fr.org>
[wsa: Fixed "foo* bar" flaws while we are here]
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
29fb08c300b5cb626b8a803440aab25d0983cab7 24-Oct-2012 Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> i2c: i2c-sh_mobile: fix spurious transfer request timed out

Ensure that any of preceding register write operations to the I2C
hardware block reached the module, and the write data is reflected
in the registers, before leaving the interrupt handler.

Otherwise, we'll suffer from spurious WAIT interrupts that lead to
'Transfer request timed out' message, and the transaction failed.

Reported-by: Teppei Kamijou <teppei.kamijou.yb@renesas.com>
Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
ebd5ac165f2aaefb767c53112c2010b0ff3df688 24-Oct-2012 Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> i2c: i2c-sh_mobile: support I2C hardware block with a faster operating clock

On newer SH-/R-Mobile SoCs, a clock supply to the I2C hardware block,
which is used to generate the SCL clock output, is getting faster than
before, while on the other hand, the SCL clock control registers, ICCH
and ICCL, stay unchanged in 9-bit-wide (8+1).

On such silicons, the internal SCL clock counter gets incremented every
2 clocks of the operating clock.

This patch makes it configurable through platform data.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
23a612916a51cc3772ff46c9dc34a86c9c50840e 24-Oct-2012 Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> i2c: i2c-sh_mobile: optimize ICCH/ICCL values according to I2C bus speed

ICCH/ICCL values is supposed to be calculated/optimized to strictly meet
the timing specs required by the I2C standard. The resulting I2C bus
speed does not matter at all, if it's less than 100 or 400 kHz.

With this change, sh_mobile_i2c_icch() is virtually identical to
sh_mobile_i2c_iccl(), but they're providing good descriptions of
SH-/R-Mobile I2C hardware spec, and I'd leave them as separated.

Also fix a typo in the comment, print icch/iccl values at probe, etc.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>

[wsa: squashed two patches for bisectability]

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
7b0e62920ac314eb819e68b7d2c51994b98b19ca 24-Oct-2012 Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> i2c: i2c-sh_mobile: calculate clock parameters at driver probing time

Currently SCL clock parameters (ICCH/ICCL) are calculated in
activate_ch(), which gets called every time sh_mobile_i2c_xfer() is
processed, while each I2C bus speed is system-defined and in general
those parameters do not have to be updated over I2C transactions.

The only reason I could see having it transaction-time is to adjust
ICCH/ICCL values according to the operating frequency of the I2C
hardware block, in the face of DFS (Dynamic Frequency Scaling).

However, this won't be necessary.

The operating frequency of the I2C hardware block can change _even_
in the middle of I2C transactions. There is no way to prevent it
from happening, and I2C hardware block can work with such dynamic
frequency change, of course.

Another is that ICCH/ICCL clock parameters optimized for the faster
operating frequency, can also be applied to the slower operating
frequency, as long as slave devices work. However, the converse is
not true. It would violate SCL timing specs of the I2C standard.

What we can do now is to calculate the ICCH/ICCL clock parameters
according to the fastest operating clock of the I2C hardware block.
And if that's the case, that calculation should be done just once
at driver-module-init time.

This patch moves ICCH/ICCL calculating part from activate_ch() into
sh_mobile_i2c_init(), and call it from sh_mobile_i2c_probe().

Note that sh_mobile_i2c_init() just prepares clock parameters using
the clock rate and platform data provided, but does _not_ make any
hardware I/O accesses. We don't have to care about run-time PM
maintenance here.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
ad33707417e4fa3dd4b12f9ed912e2349a984026 30-Mar-2012 Magnus Damm <damm@opensource.se> i2c: sh_mobile: add device tree support

This patch enables DT support for the IIC driver
used on SH-based SoCs such as sh7722 and sh7724
among others as well as SH-Mobile SoCs such as
sh7367, sh7377, sh7372, sh73a0 and r8a7740.

Tested with out-of-tree DT support code on the
sh7372 Mackerel board.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
4311051c358ad0e66b68934e7a33cf10ba533466 21-Sep-2011 Yong Zhang <yong.zhang0@gmail.com> i2c: irq: Remove IRQF_DISABLED

Since commit [c58543c8: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).

So now this flag is a NOOP and can be removed.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
81f8115305f821335cf9e16110bf0806f7b93283 28-Apr-2011 Magnus Damm <damm@opensource.se> i2c: i2c-sh_mobile bus speed platform data V2

Add support to the i2c-sh_mobile driver for setting
the I2C bus speed using platform data.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
1082d5d29d9a71f43b969b89ce613374602a6946 21-Apr-2011 Magnus Damm <damm@opensource.se> i2c: i2c-sh_mobile clock string removal

Remove the clock string magic from the i2c-sh_mobile driver
now when all platforms support clkdev properly.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
7ef0c12a280c059f4624d311bb1a7d946cbac7b7 15-Apr-2011 Guennadi Liakhovetski <g.liakhovetski@gmx.de> i2c: add a module alias to the sh-mobile driver

This patch enables I2C driver autoloading on sh-mobile systems.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Reviewed-by: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
82b20d8bae03406e954d8b7d0f6f734967088b17 02-Aug-2010 Magnus Damm <damm@opensource.se> i2c: i2c-sh_mobile irq rollback fix

Update the i2c-sh_mobile driver to properly free
interrupts. The function sh_mobile_i2c_hook_irqs()
is fixed so module both unload and load are working
as expected.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
962b6032c889ed9a5f0bdb7052d9318067a75bda 11-Mar-2010 Magnus Damm <damm@opensource.se> i2c: i2c-sh_mobile support for new ICIC bits

Add support for a new version of the IIC block
found in the SH-Mobile ARM line of processors.

Prototype patch written by Nishimoto-san.
Tested on sh7377 and sh7372.

Signed-off-by: NISHIMOTO Hiroki <nishimoto.hiroki@renesas.com>
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12a55f2db71e0a1474ba56ab1c93287600b915be 11-Mar-2010 Magnus Damm <damm@opensource.se> i2c: i2c-sh_mobile register access code break out

Break out register access functions in the
i2c-sh_mobile driver. This update should not
change any driver logic.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
471452104b8520337ae2fb48c4e61cd4896e025d 15-Dec-2009 Alexey Dobriyan <adobriyan@gmail.com> const: constify remaining dev_pm_ops

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
f1a3b994f9dfd12111dc034402aed256fac66dfe 14-Aug-2009 Magnus Damm <damm@igel.co.jp> i2c: Runtime PM for SuperH Mobile I2C

This patch modifies the SuperH Mobile I2C driver to support
Runtime PM. These changes is all that is needed for proper
Runtime PM support in this driver. Driver callbacks for
Runtime PM are empty because the device registers are always
re-initialized after pm_runtime_get_sync().

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
ccb3bc16b4891a82649d4bccbeefe60b1d9a62e2 22-Jul-2009 Magnus Damm <damm@igel.co.jp> i2c-sh_mobile: change module_init() to subsys_initcall()

Convert the i2c-sh_mobile i2c bus driver to use
subsys_initcall() instead of module_init().

This change makes the driver register a bit earlier which
together with earlier platform data moves the time for probe().
The earlier probe() makes it possible to use i2c_get_adapter()
and i2c_transfer() from device_initcall().

The same strategy is used by other i2c bus drivers such as
i2c-pxa.c and i2c-s3c2410.c.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
[ben-linux@fluff.org: minor subject updaye]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
c690be1cb48cf5a95c34c879841cc6e2c4fbc425 22-Jul-2009 Magnus Damm <damm@igel.co.jp> i2c: change i2c-sh_mobile.c module_init() to subsys_initcall()

Convert the i2c-sh_mobile i2c bus driver to use
subsys_initcall() instead of module_init().

This change makes the driver register a bit earlier which
together with earlier platform data moves the time for probe().
The earlier probe() makes it possible to use i2c_get_adapter()
and i2c_transfer() from device_initcall().

The same strategy is used by other i2c bus drivers such as
i2c-pxa.c and i2c-s3c2410.c.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
593308259bbd335eda9c5280cdd1f7883c746211 05-Jul-2009 Julia Lawall <julia@diku.dk> i2c: Use resource_size

Use the function resource_size, which reduces the chance of introducing
off-by-one errors in calculating the resource size.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
struct resource *res;
@@

- (res->end - res->start) + 1
+ resource_size(res)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
22e965c2aeb3e636831c8b28f9d7d8e25199891e 07-Jan-2009 Jean Delvare <khali@linux-fr.org> i2c: Get rid of remaining bus_id access

Use dev_name(dev) instead of accessing dev.bus_id directly, as the
latter is going away soon.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Kay Sievers <kay.sievers@vrfy.org>
a5616bd0f19730a780c354110454ce37209f1ded 31-Oct-2008 Magnus Damm <damm@igel.co.jp> sh: sh_mobile i2c clock framework support

Add clock framework support to the sh_mobile i2c driver and
adjust the processor specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
bff4056c8b868a4311d5ebd6cbbf09a2c10f4551 13-Nov-2008 Magnus Damm <damm@igel.co.jp> i2c: fix i2c-sh_mobile rx underrun

Fix receive path underrun in i2c-sh_mobile driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
4eb00c9f92202a759aadbce73ea4a947b639b5e6 27-Aug-2008 Magnus Damm <damm@igel.co.jp> i2c: fix i2c-sh_mobile timing issues

This patch teaches the i2c-sh_mobile driver to make use of wait irqs.
Without this patch only dte irqs are used which may lead to overruns
and cases of missing stop and extra bytes being read on the i2c bus.

Use of wait irqs forces the hardware to pause and wait until the cpu
is ready. Polling is also reworked in this patch to fix ms delay issues.

Verified with bus analyzer and tested on MigoR and AP325RXA boards.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
da672773d8f8169938ebf53449c99afc09938f66 22-Apr-2008 Magnus Damm <magnus.damm@gmail.com> i2c: New driver for the SuperH Mobile I2C bus controller

This is V5 of the SuperH Mobile I2C Controller Driver. A simple Master
only driver for the I2C block included in processors such as sh7343,
sh7722 and sh7723. Tested on a sh7722 MigoR using a rs5c732b rtc.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>