1
0
Fork 0
Commit Graph

324 Commits (5ac24697699b394cdebac0a2329ce3af247d6a3b)

Author SHA1 Message Date
Alexey Dobriyan c53421b18f [PATCH] proper flags type of spin_lock_irqsave()
Convert various spin_lock_irqsave() callers to correctly use `unsigned long'.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
Cc: "Luck, Tony" <tony.luck@intel.com>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:21 -07:00
Jean Delvare 77ed74da26 [PATCH] i2c: Prevent deadlock on i2c client registration
Delay the call to adapter->client_register() until after we are
certain that the client registration is a success. At this point the
client is fully initialized and we no longer hold the adapter->clist
mutex, so this should prevent the deadlocks if the client_register()
callback needs to take that mutex too, as is the case for the bttv
driver.

This fixes bug #7234.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-30 10:58:47 -07:00
Yoichi Yuasa ae1390d8c3 [PATCH] i2c-sibyte: Fix modular build breakage
Fix undefined reference in i2c_sibyte_exit().

   drivers/built-in.o: In function `i2c_sibyte_exit':
   i2c-sibyte.c:(.exit.text+0x368): undefined reference to `i2c_del_bus'
   i2c-sibyte.c:(.exit.text+0x368): relocation truncated to fit: R_MIPS_26 against `i2c_del_bus'
   i2c-sibyte.c:(.exit.text+0x38c): undefined reference to `i2c_del_bus'
   i2c-sibyte.c:(.exit.text+0x38c): relocation truncated to fit: R_MIPS_26 against `i2c_del_bus'

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:34:17 -07:00
Linus Torvalds ebdea46fec Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (130 commits)
  [ARM] 3856/1: Add clocksource for Intel IXP4xx platforms
  [ARM] 3855/1: Add generic time support
  [ARM] 3873/1: S3C24XX: Add irq_chip names
  [ARM] 3872/1: S3C24XX: Apply consistant tabbing to irq_chips
  [ARM] 3871/1: S3C24XX: Fix ordering of EINT4..23
  [ARM] nommu: confirms the CR_V bit in nommu mode
  [ARM] nommu: abort handler fixup for !CPU_CP15_MMU cores.
  [ARM] 3870/1: AT91: Start removing static memory mappings
  [ARM] 3869/1: AT91: NAND support for DK and KB9202 boards
  [ARM] 3868/1: AT91 hardware header update
  [ARM] 3867/1: AT91 GPIO update
  [ARM] 3866/1: AT91 clock update
  [ARM] 3865/1: AT91RM9200 header updates
  [ARM] 3862/2: S3C2410 - add basic power management support for AML M5900 series
  [ARM] kthread: switch arch/arm/kernel/apm.c
  [ARM] Off-by-one in arch/arm/common/icst*
  [ARM] 3864/1: Refactore sharpsl_pm
  [ARM] 3863/1: Add Locomo SPI Device
  [ARM] 3847/2:  Convert LOMOMO to use struct device for GPIOs
  [ARM] Use CPU_CACHE_* where possible in asm/cacheflush.h
  ...
2006-09-28 14:40:39 -07:00
David Brownell 3a16f7b4a7 USB: move <linux/usb_otg.h> to <linux/usb/otg.h>
Move <linux/usb_otg.h> to <linux/usb/otg.h>.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:48 -07:00
Russell King 2dc94310bd Merge master.kernel.org:/pub/scm/linux/kernel/git/tmlind/linux-omap-upstream into devel 2006-09-27 19:57:54 +01:00
Theodore Ts'o 8e18e2941c [PATCH] inode_diet: Replace inode.u.generic_ip with inode.i_private
The following patches reduce the size of the VFS inode structure by 28 bytes
on a UP x86.  (It would be more on an x86_64 system).  This is a 10% reduction
in the inode size on a UP kernel that is configured in a production mode
(i.e., with no spinlock or other debugging functions enabled; if you want to
save memory taken up by in-core inodes, the first thing you should do is
disable the debugging options; they are responsible for a huge amount of bloat
in the VFS inode structure).

This patch:

The filesystem or device-specific pointer in the inode is inside a union,
which is pretty pointless given that all 30+ users of this field have been
using the void pointer.  Get rid of the union and rename it to i_private, with
a comment to explain who is allowed to use the void pointer.  This is just a
cleanup, but it allows us to reuse the union 'u' for something something where
the union will actually be used.

[judith@osdl.org: powerpc build fix]
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Judith Lebzelter <judith@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-27 08:26:17 -07:00
Jean Delvare 8f9082c5ce i2c: Constify i2c_algorithm declarations, part 2
i2c: Constify i2c_algorithm declarations, part 2

Make struct i2c_algorithm declarations const in all i2c bus drivers
where it is possible.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:52 -07:00
Jean Delvare 9e11a9fbfe i2c: Constify i2c_algorithm declarations, part 1
i2c: Constify i2c_algorithm declarations, part 1

Make struct i2c_algorithm declarations const in all i2c algorithm
drivers.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:52 -07:00
Rudolf Marek c243353a90 i2c-viapro: Add support for the VT8237A and VT8251
i2c-viapro: Add support for the VT8237A and VT8251

Documentation update included. Compile tested.

Signed-off-by: Rudolf Marek <r.marek@sh.cvut.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:52 -07:00
Jean Delvare 114fd18397 i2c: Warn on i2c client creation failure
i2c: Warn on i2c client creation failure

Warn when an i2c client creation fails. If we don't, the user will
never know something wrong happened, as i2c client creation is
typically called through an attach_adapter callback, those return value
we currently ignore for technical reasons.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:52 -07:00
Jean Delvare 7eff82c8b1 i2c-core: Drop useless bitmaskings
i2c-core: Drop useless bitmaskings

The code generated is exactly the same.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:52 -07:00
Adrian Bunk 9b4ccb86b4 i2c-algo-pcf: Discard the mdelay data struct member
i2c-algo-pcf: Discard the mdelay data struct member

Just as i2c-algo-bit, i2c-algo-pcf has an unused mdelay struct member,
which we can get rid of to spare some code and memory.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:52 -07:00
Jean Delvare 7b288a018a i2c-algo-bit: Cleanups
i2c-algo-bit: Cleanups

* Uninline long functions (saves around 1 kB or 15%)
* Refactor code in sclhi()
* Drop redundant udelay on repeated start

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:51 -07:00
David Hubbard 8202632647 i2c-isa: Fail adding driver on attach_adapter error
i2c-isa: Fail adding driver on attach_adapter error

Signed-off-by: David Hubbard <david.c.hubbard@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:51 -07:00
Jean Delvare 7d9db67feb i2c: __must_check fixes (chip drivers)
i2c: __must_check fixes (chip drivers)

Check for error on sysfs file creation.
Delete sysfs files on device removal.

The approach taken for the most complex case (pcf8591) is similar to
what Mark M. Hoffman proposed for hardware monitoring chip drivers.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Ben Gardner <bgardner@wabtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:51 -07:00
Jean Delvare b32d20dc8b i2c-dev: attach/detach_adapter cleanups
i2c-dev: attach/detach_adapter cleanups

* Only print that an adapter was attached when it succeeds.
* i2c_dev == NULL on detach simply means that the attach failed
  before, this isn't an error per se.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:51 -07:00
Jean Delvare 7a8d29cec7 i2c-stub: Chip address as a module parameter
i2c-stub: Chip address as a module parameter

Add a mandatory chip_addr parameter to i2c-stub. This parameter
defines to which chip address the driver will respond, instead of
reponding to all addresses as before. The idea is to prevent the
users from loading i2c-stub at random and being then confused by
the results of sensors-detect or other user-space tools.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:51 -07:00
Komal Shah 010d442c4a i2c: New bus driver for TI OMAP boards
i2c: New bus driver for TI OMAP boards

This patch adds I2C bus driver for various Texas
Instruments (TI) OMAP1/2 (http://www.ti.com/omap) series
based boards like OMAP1510/1610/1710/242x.

Signed-off-by: Komal Shah <komal_shah802003@yahoo.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:51 -07:00
Jean Delvare a0d9c63d36 i2c-algo-bit: Discard the mdelay data struct member
i2c-algo-bit: Discard the mdelay data struct member

The i2c_algo_bit_data structure has an mdelay member, which is not
used by the algorithm code (the code has always been ifdef'd out.)
Let's discard it to save some code and memory.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:51 -07:00
Arthur Othieno be53f9b2a0 i2c: Fix copy-n-paste in subsystem Kconfig
i2c: Fix copy-n-paste in subsystem Kconfig

We have:
  drivers/i2c/Kconfig:2:# Character device configuration
Which is obviously not true..

Signed-off-by: Arthur Othieno <apgo@patchbomb.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:51 -07:00
Domen Puncer a294de4e97 i2c-au1550: Add I2C support for Au1200
i2c-au1550: Add I2C support for Au1200

Signed-off-by: Domen Puncer <domen.puncer@ultra.si>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:50 -07:00
Domen Puncer 6ed0713479 i2c-au1550: Add SMBus functionality flag
i2c-au1550: Add SMBus functionality flag

Add SMBus functionality flag, so we can use eeprom and similar
drivers.

Signed-off-by: Domen Puncer <domen.puncer@ultra.si>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:50 -07:00
Domen Puncer 8859942ede i2c-au1550: Fix timeout problem
i2c-au1550: Fix timeout problem

Fix from Jordan Crouse:
If the transmit and recieve FIFOS are not empty, forceably flush them
rather then waiting for them to drain on their own.

This solves at least a problem reported by Clem Taylor:
http://www.linux-mips.org/archives/linux-mips/2006-05/msg00240.html
(1% of I2C transactions would timeout)

Signed-off-by: Domen Puncer <domen.puncer@ultra.si>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:50 -07:00
Jean Delvare 643bd3fbd9 i2c-sibyte: Kip Walker is gone
i2c-sibyte: Kip Walker is gone

Kip Walker no longer works at Broadcom, and his e-mail address there
bounces back, so let's drop it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:50 -07:00
Jean Delvare 51c3711704 i2c-algo-sibyte: Merge into i2c-sibyte
i2c-algo-sibyte: Merge into i2c-sibyte

Merge i2c-algo-sibyte into i2c-sibyte, as this is a complete,
hardware-dependent SMBus implementation and not a reusable algorithm.

Perform some basic coding style cleanups while we're here (mainly
space-based indentation replaced by tabulations.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:50 -07:00
Jean Delvare 3fd3968754 i2c-algo-sibyte: Cleanups
i2c-algo-sibyte: Cleanups

* Delete empty algo_control implementation.
* Simplify i2c_sibyte_del_bus.
* Delete empty module init and cleanup functions.
* Drop out-of-date #ifdef MODULE construct.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:50 -07:00
Jean Delvare defcb46ed4 i2c: __must_check fixes, i2c-dev
i2c: __must_check fixes (i2c-dev)

Check for error on sysfs file creation.
Check for error on device creation.
Delete sysfs file on device destruction.

I couldn't test this one beyond compilation, as it applies on top of
another patch in Greg's tree [1] which breaks all my systems when I
apply it (my udev isn't recent enough.) Anyone with bleeding edge udev
is welcome to test and report.

[1] http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/i2c/i2c-dev-device.patch

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:50 -07:00
Jean Delvare b119c6c952 i2c: __must_check fixes (core drivers)
i2c: __must_check fixes (core drivers)

Check for error on sysfs file creation.
Check for error on device registration.
Check for error on class device registration.

Greg, I am not familiar with completion, can you please tell me if I
need to take care of it in the error paths (as I did in this patch,
see /* Needed? */ comments), or if it isn't needed?

These patches were tested, including forced errors, so they should work
fine. But of course more testing can't hurt.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:50 -07:00
Jean Delvare 22f76e744d i2c-dev: Drop the client template
i2c-dev: Drop the client template

Drop the i2c-dev client template. This saves about 360 bytes of
memory. I got the idea from a similar cleanup Hans-Frieder Vogt
made to i2c-nforce2 recently.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:50 -07:00
Jean Delvare f3b3aadbbd i2c-dev: Use a list for data storage
i2c-dev: Use a list for data storage

Use a list instead of a static array for storing the i2c-dev data.
Given that most systems have less than 10 i2c busses, most of the
space was wasted, so this saves around 1 kB of memory (2 kB on 64-bit
archs.)

The drawback is that lookup was in O(1) and is now in O(N), but given
that the values of N are always small, I don't think this is a problem.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:50 -07:00
Jean Delvare 9455e4c9ab i2c-dev: Cleanups
i2c-dev: Cleanups

* We no more need to include platform_device.h.
* Delete the to_i2c_dev macro, which is no more used (and no more valid
  either.) 
* Drop i2c_dev.minor. Now that the minor number always matches the i2c
  adapter number, this field is redundant with i2c_dev.adap->nr.
* Delete i2c_dev_get_by_adapter() which is now redundant with
  i2c_dev_get_by_minor() for the same reason.
* Drop the local variable dev in i2cdev_attach_adapter(), we can
  easily do without it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:50 -07:00
Lennert Buytenhek 72edd84a6b [ARM] 3827/1: iop3xx: add common gpio module
Implement the gpio_line_{config,get,set} API for iop3xx.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-09-25 10:25:47 +01:00
Lennert Buytenhek 3f7e5815f4 [ARM] 3817/1: iop3xx: split the iop3xx mach into iop32x and iop33x
Split the iop3xx mach type into iop32x and iop33x -- split the config
symbols, and move the code in the mach-iop3xx directory to the mach-iop32x
and mach-iop33x directories.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-09-25 10:25:36 +01:00
Lennert Buytenhek 98954df691 [ARM] 3816/1: iop3xx: rename config symbols
Rename CONFIG_ARCH_IOP321 to CONFIG_ARCH_IOP32X and
CONFIG_ARCH_IOP331 to CONFIG_ARCH_IOP33X.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-09-25 10:25:34 +01:00
Paul Mackerras aa43f77939 Merge branch 'merge' 2006-08-31 15:45:48 +10:00
David Brownell 4801bc25f3 [PATCH] i2c: tps65010 build fixes
The tps65010.c driver in the main tree never got updated with
build fixes since the last batch of I2C driver changes; and the
genirq trigger flags were updated wierdly too.

This also includes a minor tweak to reduce the frequency used to
poll for unplug-the-AC-power on the TPS chips that don't provide
relevant IRQs.  It _would_ be nice to sense whether there's even
a battery, but that'd normally be an HDQ/1-wire interface to a
smart battery, and such APIs aren't standardized.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-26 13:05:12 -07:00
Paul Mackerras 32bc6e095d Merge branch 'merge' 2006-08-08 17:09:11 +10:00
David Woodhouse 3e3183bab0 [PATCH] SCX200_ACB: eliminate spurious timeout errors
While busy-waiting for completion, check the hardware after scheduling;
don't schedule and then immediately check the _timeout_.  If the yield()
took a long time (as it does on my OLPC prototype board when it's busy),
we'd report a timeout even though the hardware was now ready.

This fixes it, and also switches the yield() for a cond_resched() because
we don't actually want to be _that_ nice about it.  I see nice
tightly-packed SMBus transactions now, rather than waiting for milliseconds
between successive phases.

Actually, we shouldn't be busy-waiting here at all.  We should be using
interrupts.  That's an exercise for another day though.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Cc: Christer Weinigel <wingel@nano-system.com>
Cc: <Jordan.Crouse@amd.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-08-06 08:57:49 -07:00
Paul Mackerras 57cad8084e Merge branch 'merge' 2006-08-01 10:37:25 +10:00
Jeremy Kerr 018a3d1db7 [POWERPC] powermac: Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its
return value. Also, treat the return value as const, so we can
constify get_property later.

powermac platform & macintosh driver changes.

Built for pmac32_defconfig, g5_defconfig

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-07-31 15:55:05 +10:00
Ben Gardner 50436a47c6 [PATCH] pca9539: Honor the force parameter
The pca9539 driver doesn't honor the force parameter; it always does
detection. This patch will skip detection if forced.

Signed-off-by: Ben Gardner <gardner.ben@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 15:43:07 -07:00
Uwe Bugla 5313775f18 [PATCH] i2c-algo-bit: Wipe out dead code
i2c-algo-bit: Wipe out dead code

Signed-off-by: Uwe Bugla <uwe.bugla@gmx.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 15:43:07 -07:00
Mark M. Hoffman b39ad0cf7c [PATCH] i2c: Handle i2c_add_adapter failure in i2c algorithm drivers
Content-Disposition: inline; filename=i2c-algo-error-handling-fix.patch

It is possible for i2c_add_adapter() to fail.  Several I2C algorithm
drivers ignore that fact.  This (compile-tested only) patch fixes them.

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 15:43:07 -07:00
Jean Delvare 8ced8eee85 [PATCH] i2c-powermac: Fix master_xfer return value
Fix the value returned by the i2c-powermac's master_xfer method.
It should return the number of messages processed successfully, but
instead returns the number of data bytes in the first (and only)
processed message.

Also explicitly mention the master_xfer convention so that future
implementations get it right directly.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 15:43:07 -07:00
Jean Delvare c3efacaa68 [PATCH] scx200_acb: Fix the block transactions
The scx200_acb i2c bus driver pretends to support SMBus block
transactions, but in fact it implements the more simple I2C block
transactions. Additionally, it lacks sanity checks on the length
of the block transactions, which could lead to a buffer overrun.

This fixes an oops reported by Alexander Atanasov:
http://marc.theaimsgroup.com/?l=linux-kernel&m=114970382125094

Thanks to Ben Gardner for fixing my bugs :)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 15:43:06 -07:00
Thomas Andrews fd627a0147 [PATCH] scx200_acb: Fix the state machine
Fix the scx200_acb state machine:

* Nack was sent one byte too late on reads >= 2 bytes.
* Stop bit was set one byte too late on reads.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 15:43:06 -07:00
Peter Milne 39288e1ac1 [PATCH] i2c-iop3xx: Avoid addressing self
Avoid addressing self when sending a slave address. Follows instruction
in Intel 80331/80321 manuals.
Ignoring this worked previously on 80321, but causes a hang on i2cdetect
on 80331.

Signed-off-by: Peter Milne <peter.milne@d-tacq.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 15:43:06 -07:00
Mark M. Hoffman 2369df933f [PATCH] i2c: Fix 'ignore' module parameter handling in i2c-core
This patch fixes a bug in the handling of 'ignore' module parameters of I2C
client drivers.

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 15:43:06 -07:00
Thomas Gleixner dace145374 [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-02 13:58:50 -07:00