Commit Graph

239 Commits (59153f7d7effdb5b3c81eb6d03914a866157b319)

Author SHA1 Message Date
Alessandro Zummo 6fc7f10cee [PATCH] RTC subsystem: I2C cleanup
This patch, completely optional, removes from drivers/i2c/chips all the
drivers that are implemented in the new RTC subsystem.

It should be noted that none of the current driver is actually integrated,
i.e.  usable without further patches.

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-27 08:44:51 -08:00
Alexey Dobriyan 53b3531bbb [PATCH] s/;;/;/g
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-24 07:33:24 -08:00
Alessandro Zummo 7cd30b26eb [PATCH] I2C: i2c-ixp4xx: Add hwmon class
This patch adds I2C_CLASS_HWMON to the ixp4xx bus driver.

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:55 -08:00
Martin Devera 5f7ea3c58c [PATCH] I2C: i2c-piix4: Add Broadcom HT-1000 support
Add Broadcom HT-1000 south bridge's PCI ID to i2c-piix driver. Note
that at least on Supermicro H8SSL it uses non-standard SMBHSTCFG = 3
and standard values like 0 or 9 causes hangup.

Signed-off-by: Martin Devera <devik@cdi.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:55 -08:00
Jean Delvare d7d2fe3847 [PATCH] I2C: i2c-amd756-s4882: Improve static mutex initialization
Static mutexes can be initialized at declaration time.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-03-23 14:21:54 -08:00
Jean Delvare 0cbcb4d39a [PATCH] I2C: i2c-ali1535: Drop redundant mutex
Drop a redundant mutex in driver i2c-ali1535. The struct i2c_adapter
includes a mutex for the same purpose, operated by i2c-core.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:54 -08:00
Jean Delvare c006705e0f [PATCH] i2c: Cleanup isp1301_omap
Drop unused rogue i2c driver ID and nonsensical i2c class.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:54 -08:00
Jean Delvare f8d6d9f52b [PATCH] i2c: Fix i2c-ite name initialization
Properly set the name member of the i2c_adapter structure of the ite
i2c adapter driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:54 -08:00
Jean Delvare 2f27f46c49 [PATCH] i2c: Drop the i2c-frodo bus driver
Drop the i2c-frodo bus driver. It isn't referenced by the build
system, and depends on code which was never included in 2.6 kernels.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:54 -08:00
Jean Delvare 7eebcb7c0f [PATCH] i2c: Optimize core_lists mutex usage
Stop holding the core_lists mutex when we don't actually need it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:53 -08:00
Jean Delvare 3fb9a65529 [PATCH] i2c: Semaphore to mutex conversions, part 3
Cleanup after the semaphores to mutexes conversions in the i2c
subsystem.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:51 -08:00
Ingo Molnar 5c085d369c [PATCH] i2c: Semaphore to mutex conversions, part 2
semaphore to mutex conversion.

the conversion was generated via scripts, and the result was validated
automatically via a script as well.

build tested.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:51 -08:00
Jean Delvare 7656032b90 [PATCH] i2c: Speed up block transfers
Speed up i2c_smbus_write_block_data and i2c_smbus_read_i2c_block_data
a bit by using memcpy instead of an explicit loop.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:51 -08:00
Jean Delvare cdf263f1c5 [PATCH] I2C: fix sx200_acb build on other arches
scx200_acb is only useful on a few Geode-based systems, and won't
compile on non-x86 systems due to the lack of asm/msr.h, as reported
by Andrew Morton. Thus, we should make that driver depend on X86.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-03-23 14:21:50 -08:00
Ben Gardner a417bbd33b [PATCH] i2c: scx200_acb minimal documentation update
scx200_acb: Minimal documentation update

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:50 -08:00
Ben Gardner f933ff504f [PATCH] i2c: scx200_acb fix and speed up the poll loop
scx200_acb: Fix and speed up the poll loop

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:50 -08:00
Ben Gardner 16ffc5c995 [PATCH] i2c: scx200_acb add support for the CS5535/CS5536
scx200_acb: Add support for the CS5535/CS5536

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-03-23 14:21:50 -08:00
Ben Gardner 8a05940d74 [PATCH] i2c: scx200_acb remove use of lock_kernel
scx200_acb: remove use of lock_kernel()

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:49 -08:00
Ben Gardner 9b7b6d3b2b [PATCH] i2c: scx200_acb refactor/simplify code
scx200_acb: refactor/simplify code (no functional changes)

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:49 -08:00
Ben Gardner ef4d9275e2 [PATCH] i2c: scx200_acb debug log cleanup
scx200_acb: debug log cleanup

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:49 -08:00
Ben Gardner 99c3adb4d5 [PATCH] i2c: scx200_acb whitespace and comment cleanup
scx200_acb: Whitespace and comment cleanup

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:49 -08:00
Arjan van de Ven b3585e4f5b [PATCH] I2C: Convert i2c to mutexes
The patch below converts a few i2c semaphores to mutexes

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:49 -08:00
David Vrabel 489447380a [PATCH] handle errors returned by platform_get_irq*()
platform_get_irq*() now returns on -ENXIO when the resource cannot be
found.  Ensure all users of platform_get_irq*() handle this error
appropriately.

Signed-off-by: David Vrabel <dvrabel@arcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 13:42:57 -08:00
Jean Delvare 41d9c98fe7 [PATCH] i2c: Drop outdated probe/remove code in i2c-isa
Probe and remove methods are now defined at bus level. No more need to
redefine them at driver level in i2c-isa.

This lets us get rid of these annoying messages:
Driver 'it87-isa' needs updating - please use bus_type methods

Thanks to Nicolas Mailhot for reporting the problem and testing the fix.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-13 22:30:10 -08:00
Tobias Klauser 7e3d7db524 [PATCH] i2c: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]). Some trailing
whitespaces are also removed.

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-06 12:02:15 -08:00
Eric Sesterhenn 8104a9a9c9 [PATCH] i2c: Use module_param in i2c-algo-sibyte
this patch changes MODULE_PARM usage
to module_param in i2c-algo-sibyte.c

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-06 12:02:15 -08:00
Jean Delvare 21bbd69182 [PATCH] I2C: Resurrect i2c_smbus_write_i2c_block_data.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-02-06 12:02:14 -08:00
Jason Gaston 8254fc4afc [PATCH] i2c-i801: I2C patch for Intel ICH8
This patch adds the Intel ICH8 DID to the i2c-i801.c and Kconfig files for I2C
support.

Signed-off-by: Jason Gaston <Jason.d.gaston@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-06 12:02:14 -08:00
Russell King b864c7d5d1 [PATCH] Add i2c_bus_type probe and remove methods
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-13 11:26:07 -08:00
Richard Purdie ece5f7b3c4 [ARM] 3237/1: PXA I2C driver updates
Patch from Richard Purdie

This patch adds a check to see if the pxa i2c interface is enabled
before allowing it to be used and resets it if found to be disabled.
This automatically restores the interface if the device has been
suspended and resumed without causing any suspend/resume call ordering
issues.

The patch also fixes a build warning and adds an appropriate module
licence (the module is gpl according to the header).

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-12 16:30:23 +00:00
Linus Torvalds 6150c32589 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge 2006-01-09 10:03:44 -08:00
Benjamin Herrenschmidt a28d3af2a2 [PATCH] 2/5 powerpc: Rework PowerMac i2c part 2
This is the continuation of the previous patch. This one removes the old
PowerMac i2c drivers (i2c-keywest and i2c-pmac-smu) and replaces them
both with a single stub driver that uses the new PowerMac low i2c layer.

Now that i2c-keywest is gone, the low-i2c code is extended to support
interrupt driver transfers. All i2c busses now appear as platform
devices. Compatibility with existing drivers should be maintained as the
i2c bus names have been kept identical, except for the SMU bus but in
that later case, all users has been fixed.

With that patch added, matching a device node to an i2c_adapter becomes
trivial.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09 15:47:17 +11:00
Benjamin Herrenschmidt 730745a5c4 [PATCH] 1/5 powerpc: Rework PowerMac i2c part 1
This is the first part of a rework of the PowerMac i2c code. It
completely reworks the "low_i2c" layer. It is now more flexible,
supports KeyWest, SMU and PMU i2c busses, and provides functions to
match device nodes to i2c busses and adapters.

This patch also extends & fix some bugs in the SMU driver related to i2c
support and removes the clock spreading hacks from the pmac feature code
rather than adapting them to the new API since they'll be replaced by
the platform function code completely in patch 3/5

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09 15:47:16 +11:00
Russell King 9ded96f24c [PATCH] IRQ type flags
Some ARM platforms have the ability to program the interrupt controller to
detect various interrupt edges and/or levels.  For some platforms, this is
critical to setup correctly, particularly those which the setting is dependent
on the device.

Currently, ARM drivers do (eg) the following:

	err = request_irq(irq, ...);

	set_irq_type(irq, IRQT_RISING);

However, if the interrupt has previously been programmed to be level sensitive
(for whatever reason) then this will cause an interrupt storm.

Hence, if we combine set_irq_type() with request_irq(), we can then safely set
the type prior to unmasking the interrupt.  The unfortunate problem is that in
order to support this, these flags need to be visible outside of the ARM
architecture - drivers such as smc91x need these flags and they're
cross-architecture.

Finally, the SA_TRIGGER_* flag passed to request_irq() should reflect the
property that the device would like.  The IRQ controller code should do its
best to select the most appropriate supported mode.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:13:46 -08:00
Benjamin Herrenschmidt 51d3082fe6 [PATCH] powerpc: Unify udbg (#2)
This patch unifies udbg for both ppc32 and ppc64 when building the
merged achitecture. xmon now has a single "back end". The powermac udbg
stuff gets enriched with some ADB capabilities and btext output. In
addition, the early_init callback is now called on ppc32 as well,
approx. in the same order as ppc64 regarding device-tree manipulations.
The init sequences of ppc32 and ppc64 are getting closer, I'll unify
them in a later patch.

For now, you can force udbg to the scc using "sccdbg" or to btext using
"btextdbg" on powermacs. I'll implement a cleaner way of forcing udbg
output to something else than the autodetected OF output device in a
later patch.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09 14:49:54 +11:00
Russell King f8ce25476d [ARM] Move asm/hardware/clock.h to linux/clk.h
This is needs to be visible to other architectures using the AMBA
bus and peripherals.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-07 16:15:52 +00:00
Russell King 123656d4cc Merge with Linus' kernel. 2006-01-07 14:40:05 +00:00
Mark A. Greer e91c021c48 [PATCH] i2c: i2c-mv64xxx fix transaction abortion
When the i2c-mv64xxx i2c driver is signalled to abort a transaction,
it aborts it immediately by issuing a stop condition on the bus.
This violates the i2c protocol and can cause what appears to be an i2c
bus hang.  This patch delays issuing the stop condition until the i2c
device can reasonably expect a stop condition.

Also includes a minor fixup.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-01-05 22:16:27 -08:00
Jean Delvare 7c72ccf09b [PATCH] i2c: i2c-nforce2 add nforce4 MCP-04 device ID
One more supported PCI ID for the i2c-nforce2 driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:27 -08:00
Martin Hicks a4787c0d23 [PATCH] i2c: i2c-ibm_iic add I2C_CLASS_HWMON
Add the ibm_iic driver to the HWMON class so it will scan the
bus for connected hardware monitor sensors.

Signed-off-by: Martin Hicks <mort@bork.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:27 -08:00
Jean Delvare 3fb81a3df6 [PATCH] i2c: I2C_DF_NOTIFY removal comment cleanups
The removal of I2C_DF_NOTIFY left some out of date comments in the
code. Drop them.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:27 -08:00
Laurent Riffard d564baee29 [PATCH] i2c: drop empty i2c_driver.command implementations
Given that implementing i2c_driver.command is optional, there is no
point in an empty implementation thereof.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Michael Geng <linux@MichaelGeng.de>
Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:26 -08:00
Greg Kroah-Hartman 79472132f5 [PATCH] I2C: move i2c-dev to use dynamic class devices
i2c-dev doesn't use the reference counting logic of struct class_device so move
it to the dynamic method.  This makes the code paths simpler and the driver
smaller.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Jean Delvare <khali@linux-fr.org>
2006-01-05 22:16:25 -08:00
Greg Kroah-Hartman 2b48716d1d [PATCH] I2C: Remove .owner setting from i2c_driver as it's no longer needed
Now that i2c_add_driver() doesn't need the module owner to be set by
hand, we can delete it from the drivers.  This patch catches all of the
drivers that I found in the current tree (if a driver sets the .owner by
hand, it's not a problem, just not needed.)

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Jean Delvare <khali@linux-fr.org>
2006-01-05 22:16:25 -08:00
Greg Kroah-Hartman de59cf9ed4 [PATCH] I2C: Make i2c_add_driver automatically set the proper module owner
This prevents i2c drivers from messing up and forgetting to set the
module owner of their driver.  It also reduces the size of their drivers
by one line :)

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Jean Delvare <khali@linux-fr.org>
2006-01-05 22:16:24 -08:00
Greg Kroah-Hartman e1c489b0e4 [PATCH] I2C: Fix up debug build error for previous i2c structure changes
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-01-05 22:16:24 -08:00
Laurent Riffard a9718b0c11 [PATCH] i2c: Drop i2c_driver.{owner,name}, 2 of 11
We should use the i2c_driver.driver's .name and .owner fields
instead of the i2c_driver's ones.

This patch updates the miscellaneaous i2c chip drivers.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:23 -08:00
Laurent Riffard 35d8b2e6b8 [PATCH] i2c: Drop i2c_driver.{owner,name}, 1 of 11
We should use the i2c_driver.driver's .name and .owner fields
instead of the i2c_driver's ones.

This patch updates the core of the i2c drivers: it removes .name and
.owner fields from the struct i2c_device and modify various
functions to use struct device fields instead.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:22 -08:00
Jean Delvare cf02df7702 [PATCH] i2c: Rework client usage count, 3 of 3
Do not limit the usage count of i2c clients to 1. In other words,
change the client usage count behavior from the old I2C_CLIENT_ALLOW_USE
to the old I2C_CLIENT_ALLOW_MULTIPLE_USE. The rationale is that no
driver actually needs the limiting behavior, and the unlimiting
behavior is slightly easier to implement.

Update the documentation to reflect this change.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:22 -08:00
Jean Delvare cde7859bda [PATCH] i2c: Rework client usage count, 2 of 3
Make I2C_CLIENT_ALLOW_USE the default for all i2c clients. It doesn't
hurt if the usage count is actually never used for any given driver,
and allows for nice code simplifications in i2c-core.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:22 -08:00