dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

329 Commits

Author SHA1 Message Date
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
Jean Delvare cb748fb201 [PATCH] i2c: Rework client usage count, 1 of 3
No i2c client uses the I2C_CLIENT_ALLOW_MULTIPLE_USE flag, drop it.

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 8a9947552d [PATCH] i2c: Drop i2c_driver.flags, 2 of 3
Just about every i2c chip driver sets the I2C_DF_NOTIFY flag, so we
can simply make it the default and drop the flag. If any driver really
doesn't want to be notified when i2c adapters are added, that driver
can simply omit to set .attach_adapter. This approach is also more
robust as it prevents accidental NULL pointer dereferences.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:21 -08:00
Peter Korsgaard 1d26f455eb [PATCH] i2c: Add support for Barco LPT->DVI to i2c-parport
The following patch adds support for the Barco LPT->DVI I2C adapter to
the i2c-parport driver.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:21 -08:00
Nicolas Kaiser 7e94436942 [PATCH] i2c: Remove duplicate rtc8564 BCD macros
Remove duplicate of BCD macros.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:21 -08:00
Michael Burian f9e8957937 [PATCH] i2c: Extend ds1337 initialization
Add code to handle case where board firmware does not start the
RTC.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
CC: James Chapman <jchapman@katalix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:20 -08:00
Mark M. Hoffman 2e3e13f8e9 [PATCH] i2c: i2c-i801 explicitly enables/disables PEC
This patch tweaks i2c-i801.c so that the driver always sets the SMBAUXCTL
register (which enables/disables PEC) explicitly before each transaction.

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-01-05 22:16:20 -08:00
Russell King a8d3584a2d [ARM] Remove clk_use()/clk_unuse()
It seems that clk_use() and clk_unuse() are additional complexity
which isn't required anymore.  Remove them from the clock framework
to avoid the additional confusion which they cause, and update all
ARM machine types except for OMAP.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-03 18:41:37 +00:00
Mark A. Greer dfded4ae71 [PATCH] i2c: Fix i2c-mv64xxx compilation error
The busses/i2c-mv64xxx.c driver doesn't currently compile because of an
incorrect argument to dev_err().  This patch fixes that.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-16 11:25:25 -08:00
Russell King 7d78c887a9 [DRIVER MODEL] Fix merge clashes with ARM ixp2000 / ixp4xx platforms
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-17 15:47:30 +00:00
Linus Torvalds 5643f000c1 Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-11-11 09:24:26 -08:00
Greg Kroah-Hartman 249bb070f5 [PATCH] PCI: removed unneeded .owner field from struct pci_driver
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-10 16:09:17 -08:00
Russell King 3ae5eaec1d [DRIVER MODEL] Convert platform drivers to use struct platform_driver
This allows us to eliminate the casts in the drivers, and eventually
remove the use of the device_driver function pointer methods for
platform device drivers.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-09 22:32:44 +00:00
Jean Delvare 8750197f0e [PATCH] i2c-viapro: Some adjustments
The big i2c-viapro SMBus driver update which went into 2.6.14-git1
introduced a few minor issues. Nothing critical, but I would like a
few adjustments to be merged in to fix the following problems:

* VIA should not be spelled Via.
* Frodo Looijaard and Philip Edelbrock did not write the i2c-viapro
  driver.
* When debugging is disabled, half of messages would be logged.
* Drop an unneeded masking.
* Some port reads can be avoided now that the transaction size is
  passed as a parameter to vt596_transaction().
* SMBus Receive Byte transactions are used for probing too (for
  EEPROMs), so hide errors on these too.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-07 21:46:38 -08:00
James Chapman ef96274644 [PATCH] i2c: ds1337 BCD conversion fix
Fix BCD value errors when month=9, moving the increment inside the
BIN2BCD macro.
Fix similar code for the weekday value, just for consistency.

This bug was reported by Michael Burian <dynmail1@gassner-waagen.at>.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-07 21:46:37 -08:00
Jesper Juhl 6044ec8882 [PATCH] kfree cleanup: misc remaining drivers
This is the remaining misc drivers/ part of the big kfree cleanup patch.

Remove pointless checks for NULL prior to calling kfree() in misc files in
drivers/.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
Acked-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Pierre Ossman <drzeus@drzeus.cx>
Acked-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Len Brown <len.brown@intel.com>
Acked-by: "Antonino A. Daplas" <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:54:05 -08:00
Linus Torvalds 7f36b1e958 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-11-01 21:32:14 -08:00
Dan Williams fbd9a6d7a9 [ARM] 3079/1: Fix typo in i2c-iop3xx.c (invalid pointer passed to release_mem_region)
Patch from Dan Williams

* If request_irq fails then a call to release_mem_region will be made with an invalid pointer.
* Two formatting fixes

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-01 22:31:12 +00:00
Russell King e32e28edc3 [DRIVER MODEL] Add missing driver_unregister in i2c-s3c2410 failure path.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-30 16:32:27 +00:00
Russell King d052d1beff Create platform_device.h to contain all the platform device details.
Convert everyone who uses platform_bus_type to include
linux/platform_device.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-29 19:07:23 +01:00
Greg Kroah-Hartman 0dc9a32d9a [PATCH] I2C: remove devfs support from i2c-dev driver
as devfs is gone, this isn't needed anymore.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:14 -07:00
Jean Delvare e8aac4a9b4 [PATCH] i2c: i2c-i801 PEC code cleanups
The tests leading to the use of hardware PEC in the i2c-i801 driver
can be simplified.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:14 -07:00
Jean Delvare 585b3160f8 [PATCH] i2c: SMBus PEC support rewrite, 3 of 3
The new SMBus PEC implementation doesn't support PEC emulation on
non-PEC non-I2C SMBus masters, so we can drop all related code.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:14 -07:00
Jean Delvare 421ef47be2 [PATCH] i2c: SMBus PEC support rewrite, 2 of 3
This is my rewrite of the SMBus PEC support. The original
implementation was known to have bugs (credits go to Hideki Iwamoto
for reporting many of them recently), and was incomplete due to a
conceptual limitation.

The rewrite affects only software PEC. Hardware PEC needs very little
code and is mostly untouched.

Technically, both implementations differ in that the original one
was emulating PEC in software by modifying the contents of an
i2c_smbus_data union (changing the transaction to a different type),
while the new one works one level lower, on i2c_msg structures (working
on message contents). Due to the definition of the i2c_smbus_data union,
not all SMBus transactions could be handled (at least not without
changing the definition of this union, which would break user-space
compatibility), and those which could had to be implemented
individually. At the opposite, adding PEC to an i2c_msg structure
can be done on any SMBus transaction with common code.

Advantages of the new implementation:

* It's about twice as small (from ~136 lines before to ~70 now, only
  counting i2c-core, including blank and comment lines). The memory
  used by i2c-core is down by ~640 bytes (~3.5%).

* Easier to validate, less tricky code. The code being common to all
  transactions by design, the risk that a bug can stay uncovered is
  lower.

* All SMBus transactions have PEC support in I2C emulation mode
  (providing the non-PEC transaction is also implemented). Transactions
  which have no emulation code right now will get PEC support for free
  when they finally get implemented.

* Allows for code simplifications in header files and bus drivers
  (patch follows).

Drawbacks (I guess there had to be at least one):

* PEC emulation for non-PEC capable non-I2C SMBus masters was dropped.
  It was based on SMBus tricks and doesn't quite fit in the new design.
  I don't think it's really a problem, as the benefit was certainly
  not worth the additional complexity, but it's only fair that I at
  least mention it.

Lastly, let's note that the new implementation does slightly affect
compatibility (both in kernel and user-space), but doesn't actually
break it. Some defines will be dropped, but the code can always be
changed in a way that will work with both the old and the new
implementations. It shouldn't be a problem as there doesn't seem to be
many users of SMBus PEC to date anyway.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:14 -07:00
Jean Delvare b8095544bc [PATCH] i2c: SMBus PEC support rewrite, 1 of 3
Discard I2C_FUNC_SMBUS_*_PEC defines. i2c clients are not supposed to
check for PEC support of i2c bus drivers on individual SMBus
transactions, and i2c bus drivers are not supposed to advertise them.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:13 -07:00
Jean Delvare 142078f6f0 [PATCH] i2c: i2c-i810 documentation update
Update the documented list of devices supported by the i2c-i810
driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:13 -07:00
Jean Delvare cd19cc4732 [PATCH] i2c: ID redefinition cleanups
Fix several redefinitions of i2c IDs. i2c IDs must not be defined
outside of i2c-id.h.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Henk Vergonet <henk@god.dyndns.org>
Acked-by: Mark McClelland <mark@alpha.dyndns.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:13 -07:00
Ben Dooks 6344a8ece0 [PATCH] i2c: Static function fixes, 4 of 4
Fix functions declared static and then implemented
without the static in drivers/i2c/chips.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:13 -07:00
Ben Dooks 6536c49a1e [PATCH] i2c: Static function fixes, 1 of 4
eeprom_detect is first declared static and then when
the function is actually implemented, there is no static.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:12 -07:00
Jean Delvare deb875c7ff [PATCH] i2c: kzalloc cleanups, 2 of 2
Use kzalloc instead of kmalloc in the S4882 SMBus multiplexing driver.
I guess it's safer that way.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:12 -07:00
Jean Delvare 078d9fe4fe [PATCH] i2c: kzalloc cleanups, 1 of 2
Drop useless casts on kzalloc returned values, as suggested by
Jiri Slaby.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:12 -07:00
Deepak Saxena 5263ebb51e [PATCH] i2c: kzalloc conversion, other drivers
Use kzalloc instead of kmalloc+memset in all remaining i2c bus and
chip drivers.

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:12 -07:00
Deepak Saxena 2286066faf [PATCH] i2c: kzalloc conversion, ixp bus drivers
Use kzalloc instead of kmalloc+memzero in the ixp2000 and ixp4xx
I2C bus drivers.

Signed-off-by: Deepak Saxena <dsaxena@mvista.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:12 -07:00
Alessandro Zummo 4d4e5ce864 [PATCH] i2c: New Xicor X1205 RTC driver
New driver for the Xicor X1205 RTC chip.

Signed-off-by: Alessandro Zummo <alessandro.zummo@towertech.it>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:12 -07:00
Laurent Riffard 1747ef1b8c [PATCH] Owner field additions to many i2c drivers, 5 of 5
In function i2c_isa_add_driver, copied driver should inherit the owner
field as well as the name field.

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>
2005-10-28 14:02:11 -07:00
Laurent Riffard 6586bcd7b2 [PATCH] Owner field additions to many i2c drivers, 4 of 5
This patch updates the .owner field for the i2c core struct xxxx_driver
variables.

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>
2005-10-28 14:02:11 -07:00
Laurent Riffard e78f857cc5 [PATCH] Owner field additions to many i2c drivers, 3 of 5
This patch updates the .owner field for various struct xxxx_driver
variables which are available on PPC_MAC arch.

This one was _not_ even compile-tested...

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>
2005-10-28 14:02:11 -07:00
Laurent Riffard 0cf3628181 [PATCH] Owner field additions to many i2c drivers, 2 of 5
This patch updates the .owner field for various struct xxxx_driver variables,
other than pci_driver.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jean Delvare <khali@linux-fr>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Deepak Saxena <dsaxena@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:11 -07:00
Laurent Riffard ccd7aa0cc9 [PATCH] Owner field additions to many i2c drivers, 1 of 5
This patch updates .owner field for various struct pci_driver variables.

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>
2005-10-28 14:02:11 -07:00
Stig Telfer fe3d6a9978 [PATCH] i2c: Big i2c-elektor cleanup
Cleanups to the i2c-elektor driver:

* Set the i2c_adapter name field to "i2c-elektor" and use this string
  in all resource requests and printks.
* Change space-padding for tab indentation, kill trailing white space,
  remove space before comma.
* Use dev_info, pr_info and pr_debug instead of printk.
* Lines chopped to 80 columns.

Signed-off-by: Stig Telfer <stig@lizardlogic.co.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:10 -07:00
Stig Telfer 3634ff6a32 [PATCH] i2c: Fix i2c-elektor on Alpha
This patch updates the i2c-elektor driver, enabling it to compile
cleanly, load and run.  The key change is that it uses the new
__iomem/iowrite8/ioread8 functions to abstract the direct or
memory-mapped variants of register access.  Also, the original driver
would crash on module load on the Alpha because the PCI memory region
was not remapped into kernel memory.

I have managed the following testing:

* compiled and tested it on my Alpha UP2000+ system.
* compiles cleanly for x86 but I don't have the hardware to test.

Signed-off-by: Stig Telfer <stig@lizardlogic.co.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:10 -07:00
Jean Delvare 00bffb6e29 [PATCH] i2c: Drop meaningless use of I2C_DF_NOTIFY in i2c_client structures
I2C_DF_NOTIFY is an i2c_driver flag, using it as an i2c_client flag
doesn't make any sense.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Acked-by: Randy Vinson <rvinson@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:10 -07:00
Jean Delvare 6c129be8c7 [PATCH] i2c: Rename i2c-parport variable to avoid confusion
It's a bit confusing to name a variable the same as an unrelated
structure. The compiler doesn't complain, but it certainly makes the
code harder to understand, and could confuse grep and LXR among
others.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:10 -07:00
Jean Delvare 30dac74697 [PATCH] i2c: Drop I2C_SMBUS_I2C_BLOCK_MAX
Drop I2C_SMBUS_I2C_BLOCK_MAX, use I2C_SMBUS_BLOCK_MAX instead.

I2C_SMBUS_I2C_BLOCK_MAX has always been defined to the same value as
I2C_SMBUS_BLOCK_MAX, and this will never change: setting it to a lower
value would make no sense, setting it to a higher value would break
i2c_smbus_data compatibility. There is no point in changing
i2c_smbus_data to support larger block transactions in SMBus mode, as
no SMBus hardware supports more than 32 byte blocks. Thus, for larger
transactions, direct I2C transfers are the way to go.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:10 -07:00
Jean Delvare 47b8b103f7 [PATCH] i2c: Cleanup i2c-i801 ifdefs
No more need to check for PEC support being available now that both
the i2c-core and the i2c-i801 drivers are part of the Linux kernel
source tree. It's just there.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:09 -07:00
Jean Delvare e8aafcb2bb [PATCH] i2c: Cleanup i2c-dev ioctl debug message
Cleanup the ioctl debug message in i2c-dev. In particular, the minor
number is redundant now that the minor number and the adapter number
are kept in sync.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:08 -07:00
Jean Delvare 8a1b028bca [PATCH] i2c: Add missing i2c-ixp2000/4xx adapter name
The ixp4xx and ixp2000 i2c bus drivers omit to fill the required
i2c_adapter name field. Copy the device driver name field there.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 14:02:08 -07:00
Greg KH ca68f1193e [PATCH] i2c-viapro: Cleanup ifdef usage
It's not nice to put #ifdef in the middle of functions.

CC: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/i2c/busses/i2c-viapro.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
2005-10-28 14:02:08 -07:00
Jean Delvare ed5453e54f [PATCH] i2c-viapro: Improve register dump
Improve the register dump used to debug the i2c-viapro driver. The
original dump was missing the HSTSTS register and the block data
buffer.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/i2c/busses/i2c-viapro.c |   38 ++++++++++++++++++++++++++++++--------
 1 file changed, 30 insertions(+), 8 deletions(-)
2005-10-28 14:02:08 -07:00
Jean Delvare 50c1cc339c [PATCH] i2c-viapro: Refactor control outb
By slightly shifting the interface between vt596_access and
vt596_transaction, we can save two I/O accesses per SMBus transaction.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/i2c/busses/i2c-viapro.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
2005-10-28 14:02:08 -07:00
Jean Delvare aaf7f14776 [PATCH] i2c-viapro: Update supported devices list
Make it clearer which chips are supported by the i2c-viapro driver,
and which support I2C block transactions.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 Documentation/i2c/busses/i2c-viapro |   12 ++++++------
 drivers/i2c/busses/i2c-viapro.c     |   22 +++++++++++++---------
 2 files changed, 19 insertions(+), 15 deletions(-)
2005-10-28 14:02:08 -07:00
Jean Delvare c2f559d5df [PATCH] i2c-viapro: Code cleanups
Cleanups to the i2c-viapro driver:
* Kill unused defines.
* Kill interrupt-related code, as the driver doesn't use interrupts.
* Fix broken comments (some copied from i2c-piix4.)
* Centralize the unsupported command error case in vt596_access.
  That way we'll catch all unsupported commands, not only
  I2C_SMBUS_PROC_CALL.
* Refactor some code.
* Convert some dev_dbg into dev_err. Errors better be reported even in
  non-debug mode.
* Do not verify that the final reset succeeded. It'll be checked at
  the beginning of the next transaction anyway.
* Use the driver name to reserve the I/O region.
* Do not print the contents of the SMBREV register, it reads 0 on all
  chips I've seen so far.
* Some other minor fixes all over the place.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/i2c/busses/i2c-viapro.c |  122 +++++++++++++---------------------------
 1 file changed, 41 insertions(+), 81 deletions(-)
2005-10-28 14:02:08 -07:00
Jean Delvare f118301416 [PATCH] i2c-viapro: Implement I2C Block transactions
Implement the I2C block transactions on VIA chips which support them:
VT82C686B, VT8233, VT8233A, VT8235 and VT8237R. This speeds up EEPROM
accesses by a factor 10 or so.

I would like to thank Antonino A. Daplas, Hinko Kocevar, Salah Coronya
and Andreas Henriksson for their help in testing this new feature.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 Documentation/i2c/busses/i2c-viapro |    7 +++++-
 drivers/i2c/busses/i2c-viapro.c     |   39 +++++++++++++++++++++++++++++++++---
 2 files changed, 42 insertions(+), 4 deletions(-)
2005-10-28 14:02:08 -07:00
Jean Delvare 5f49ef8e8c [PATCH] i2c-viapro: Coding style fixes
Before I go on cleaning up and improving the i2c-viapro driver, let's
fix all the coding style issues: mostly trailing white space, and
spaces used where tabs should be.

Signed-off-by: Jean Delvare <khali@linux-fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 Documentation/i2c/busses/i2c-viapro |   12 ++---
 drivers/i2c/busses/i2c-viapro.c     |   76 ++++++++++++++++++------------------
 2 files changed, 43 insertions(+), 45 deletions(-)
2005-10-28 14:02:07 -07:00
Hideki Iwamoto 5c50d18859 [PATCH] i2c: Several PEC-related fixes in software SMBus emulation
Fix several errors in I2C SMBus emulation when PEC is used:
* Weird logic error in SMBus Write Word transactions.
* Wrong buffer size, affecting SMBus Block Write transactions.
* Potential buffer overrun in SMBus Block Write transactions.

From: Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/i2c/i2c-core.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
2005-10-28 14:02:07 -07:00
Jean Delvare 0f69a612f9 [PATCH] i2c: Minor i2c-amd8111 cleanup
I noticed a useless instruction in the i2c-amd8111 driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
CC: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/i2c/busses/i2c-amd8111.c |    1 -
 1 file changed, 1 deletion(-)
2005-10-28 14:02:07 -07:00
Jean Delvare 4366dc946c [PATCH] i2c: Adjust i2c_probe() for busses without SMBUS_QUICK
Move the check for SMBUS_QUICK in i2c_probe() after the forced
addresses have been handled. This makes it possible for a driver to
leave the probed address lists empty, only providing forced addresses,
and get i2c_probe to work even if the bus doesn't support SMBUS_QUICK.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/i2c/i2c-core.c |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
2005-10-28 14:02:07 -07:00
Jean Delvare d6072f842a [PATCH] i2c: Reuse name strings in i2c bus drivers
Clean up name string usage in 12 i2c bus drivers:
* Use the i2c_adapter name for requesting the I/O region rather than
  redefining a new string.
* Do not initialize the i2c_adapter name to "unset".
This should save a few data bytes here and there.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/i2c/busses/i2c-ali1535.c |    6 +++---
 drivers/i2c/busses/i2c-ali1563.c |    6 ++++--
 drivers/i2c/busses/i2c-ali15x3.c |    5 +++--
 drivers/i2c/busses/i2c-amd756.c  |    5 ++---
 drivers/i2c/busses/i2c-amd8111.c |    4 +++-
 drivers/i2c/busses/i2c-i801.c    |    4 ++--
 drivers/i2c/busses/i2c-nforce2.c |    4 ++--
 drivers/i2c/busses/i2c-piix4.c   |    4 ++--
 drivers/i2c/busses/i2c-sis5595.c |    5 +++--
 drivers/i2c/busses/i2c-sis630.c  |    6 ++++--
 drivers/i2c/busses/i2c-sis96x.c  |    5 +++--
 drivers/i2c/busses/i2c-via.c     |    4 ++--
 12 files changed, 33 insertions(+), 25 deletions(-)
2005-10-28 14:02:06 -07:00
Jean Delvare 605070952f [PATCH] i2c: Discard explicit static initializations to 0
Kill explicit static initializations to 0 in 10 i2c drivers.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/i2c/algos/i2c-algo-pca.c    |    2 +-
 drivers/i2c/algos/i2c-algo-sibyte.c |    2 +-
 drivers/i2c/busses/i2c-ali15x3.c    |    4 ++--
 drivers/i2c/busses/i2c-amd756.c     |    2 +-
 drivers/i2c/busses/i2c-iop3xx.c     |    2 +-
 drivers/i2c/busses/i2c-piix4.c      |    8 ++++----
 drivers/i2c/busses/i2c-sis5595.c    |    4 ++--
 drivers/i2c/busses/i2c-sis630.c     |    2 +-
 drivers/i2c/busses/i2c-sis96x.c     |    2 +-
 drivers/i2c/busses/i2c-via.c        |    2 +-
 10 files changed, 15 insertions(+), 15 deletions(-)
2005-10-28 14:02:06 -07:00
Russell King 9480e307cd [PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks
In PM v1, all devices were called at SUSPEND_DISABLE level.  Then
all devices were called at SUSPEND_SAVE_STATE level, and finally
SUSPEND_POWER_DOWN level.  However, with PM v2, to maintain
compatibility for platform devices, I arranged for the PM v2
suspend/resume callbacks to call the old PM v1 suspend/resume
callbacks three times with each level in order so that existing
drivers continued to work.

Since this is obsolete infrastructure which is no longer necessary,
we can remove it.  Here's an (untested) patch to do exactly that.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 09:52:56 -07:00
Benjamin Herrenschmidt 0365ba7fb1 [PATCH] ppc64: SMU driver update & i2c support
The SMU is the "system controller" chip used by Apple recent G5 machines
including the iMac G5.  It drives things like fans, i2c busses, real time
clock, etc...

The current kernel contains a very crude driver that doesn't do much more
than reading the real time clock synchronously.  This is a completely
rewritten driver that provides interrupt based command queuing, a userland
interface, and an i2c/smbus driver for accessing the devices hanging off
the SMU i2c busses like temperature sensors.  This driver is a basic block
for upcoming work on thermal control for those machines, among others.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-22 22:17:35 -07:00
Russell King da16e3245a [I2C] Add a functionality method, and remove algorithm ids
This allows i2c-pxa to finally build.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-14 22:54:45 +01:00
Andrew Morton 7979aca38b [PATCH] i2c-keywest warning fix
Unused variable.

Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-13 08:22:28 -07:00
Jean Delvare 6b78390070 [PATCH] I2C: i2c-nforce2: drop unused define
One more cleanup in i2c-nforce2.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-09 14:34:21 -07:00
Linus Torvalds c0d6f9663b Merge master.kernel.org:/home/rmk/linux-2.6-i2c manually
Old tree, so the automatic merge had some problems.
2005-09-08 15:43:09 -07:00
Russell King 6fd60fa97b [I2C] Clean up i2c-pxa debugging/printks
Fix up comments made by review by gregkh.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-08 21:04:58 +01:00
Pekka Enberg 82ca76b6b1 [PATCH] drivers: convert kcalloc to kzalloc
This patch converts kcalloc(1, ...) calls to use the new kzalloc() function.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07 16:57:46 -07:00
Jean Delvare a89923fff7 [PATCH] I2C: Fix sgi_xfer return value
The sgi_xfer function returns 0 on success instead of the number of
transfered messages as it is supposed to. This patch fixes that.

Let's just hope that no client chip driver was relying on this
misbehavior.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:26:54 -07:00
Jean Delvare d1b2f0a975 [PATCH] i2c: bug fix for busses/i2c-mv64xxx.c
When an i2c transfer is successful, an incorrect value is returned.
This patch fixes that.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:26:53 -07:00
Mark A. Greer 8e14d6c173 [PATCH] i2c: chips/ds1374.c fixup
The 'new_time' variable should be static.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:26:53 -07:00
Mark A. Greer a44e40b4d8 [PATCH] i2c: chips/m41t00.c fixup
The 'new_time' variable should be static.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:26:53 -07:00
Jean Delvare b280dab6d6 [PATCH] I2C: Drop probe parameter of i2c-keywest
The i2c-keywest driver has a "probe" module parameter which enables bus
scanning at load time. This can be done in userspace with the i2cdetect
tool (part of the lm_sensors package) instead. What's more, i2cdetect
gives more control on the way the bus is scanned, and is safer
(i2c-keywest currently scans reserved addresses and doesn't properly
handle the famous 24RF08 corruption case.)

Thus, I would propose that this module parameter be simply dropped.

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>
2005-09-05 09:26:52 -07:00
Jean Delvare 1684a98430 [PATCH] I2C: Kill i2c_algorithm.id (6/7)
In theory, there should be no more users of I2C_ALGO_* at this point.
However, it happens that several drivers were using I2C_ALGO_* for
adapter ids, so we need to correct these before we can get rid of all
the I2C_ALGO_* definitions.

Note that this also fixes a bug in media/video/tvaudio.c:

	/* don't attach on saa7146 based cards,
	   because dedicated drivers are used */
	if ((adap->id & I2C_ALGO_SAA7146))
		return 0;

This test was plain broken, as it would succeed for many more adapters
than just the saa7146: any those id would share at least one bit with
the saa7146 id. We are really lucky that the few other adapters we want
this driver to work with did not fulfill that condition.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:32 -07:00
Jean Delvare c7a46533ff [PATCH] I2C: Kill i2c_algorithm.id (5/7)
Merge the algorithm id part (16 upper bits) of the i2c adapters ids
into the definition of the adapters ids directly. After that, we don't
need to OR both ids together for each i2c_adapter structure.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:31 -07:00
Jean Delvare 1d8b9e1bad [PATCH] I2C: Kill i2c_algorithm.id (4/7)
There are no more users of i2c_algorithm.id, so we can finally drop
this structure member.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:29 -07:00
Jean Delvare 87c3d7a8bc [PATCH] I2C: Kill i2c_algorithm.id (3/7)
Don't rely on i2c_algorithm.id to alter the i2c adapter's id, use the
I2C_ALGO_* value directly instead, because i2c_algorithm will soon
have no id member no more.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:29 -07:00
Jean Delvare e51cc6b3a3 [PATCH] I2C: Kill i2c_algorithm.id (2/7)
Use the adapter id rather than the algorithm id to detect the i2c-isa
pseudo-adapter. This saves one level of dereferencing, and the
algorithm ids will soon be gone anyway.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:28 -07:00
Jean Delvare 975185880d [PATCH] I2C: Kill i2c_algorithm.name (1/7)
The name member of the i2c_algorithm is never used, although all
drivers conscientiously fill it. We can drop it completely, this
structure doesn't need to have a name.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:27 -07:00
Jean Delvare 4c9337da37 [PATCH] I2C: Centralize 24RF08 corruption prevention
The 24RF08 corruption would better be prevented at i2c-core level than
at chip driver level, for several reasons:
* The second quick write should happen as soon as possible after the
  first one, so as to limit the risk that another command is issued on
  the bus inbetween, causing the corruption.
* As a matter of fact, the protection code at driver level was reworked
  at least three times already, which proves how hard it is to get it
  right there, while it's straightforward at i2c-core level.
* It's easy to add a new driver that would need the protection, and
  forget to add it. This did happen already.
* As additional probing addresses can be passed to most i2c chip drivers
  as module parameters, virtually every i2c chip driver would need the
  protection if we want to be really safe.
* Why duplicate code when we can easily avoid it?

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:25 -07:00
Jean Delvare a89ba0bc02 [PATCH] I2C: Rewrite i2c_probe
i2c_probe was quite complex and slow, so I rewrote it in a more
efficient and hopefully clearer way.

Note that this slightly changes the way the module parameters are
handled. This shouldn't change anything for the most common cases
though.

For one thing, the function now respects the order of the parameters
for address probing. It used to always do lower addresses first. The
new approach gives the user more control.

For another, ignore addresses don't overrule probe addresses anymore.
This could have been restored the way it was at the cost of a few more
lines of code, but I don't think it's worth it. Both lists are given
as module parameters, so a user would be quite silly to specify the
same addresses in both lists. The normal addresses list is the only
one that isn't controlled by a module parameter, thus is the only one
the user may reasonably want to remove an address from.

Another significant change is the fact that i2c_probe() will no more
stop when a detection function returns -ENODEV. Just because a driver
found a chip it doesn't support isn't a valid reason to stop all
probings for this one driver. This closes the long standing lm_sensors
ticket #1807.

  http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket=1807

I updated the documentation accordingly.

In terms of algorithmic complexity, the new code is way better. If
I is the ignore address count, P the probe address count, N the
normal address count and F the force address count, the old code
was doing 128 * (F + I + P + N) iterations max, while the new code
does F + P + ((I+1) * N) iterations max. For the most common case
where F, I and P are empty, this is down from 128 * N to N.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:25 -07:00
Jean Delvare 303760b44a [PATCH] hwmon: hwmon vs i2c, second round (07/11)
The only part left in i2c-sensor is the VRM/VRD/VID handling code.
This is in no way related to i2c, so it doesn't belong there. Move
the code to hwmon, where it belongs.

Note that not all hardware monitoring drivers do VRM/VRD/VID
operations, so less drivers depend on hwmon-vid than there were
depending on i2c-sensor.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:22 -07:00
Jean Delvare f4b5026120 [PATCH] hwmon: hwmon vs i2c, second round (06/11)
The only thing left in i2c-sensor.h are module parameter definition
macros. It's only an extension of what i2c.h offers, and this extension
is not sensors-specific. As a matter of fact, a few non-sensors drivers
use them. So we better merge them in i2c.h, and get rid of i2c-sensor.h
altogether.

Signed-off-by: Jean Delvare <khali@linux-fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:21 -07:00
Jean Delvare 96478ef3f3 [PATCH] hwmon: hwmon vs i2c, second round (05/11)
The i2c_detect function has no more user, delete it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:20 -07:00
Jean Delvare 2ed2dc3c11 [PATCH] hwmon: hwmon vs i2c, second round (04/11)
i2c_probe and i2c_detect now do the exact same thing and operate on
the same data structure, so we can have everyone call i2c_probe.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:20 -07:00
Jean Delvare b78ec31582 [PATCH] hwmon: hwmon vs i2c, second round (03/11)
We now have two identical structures, i2c_address_data in i2c-sensor.h
and i2c_client_address_data in i2c.h. We can kill one of them, I choose
to keep the one in i2c.h as it makes more sense (this structure is not
specific to sensors.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:19 -07:00
Jean Delvare ef8dec5d8b [PATCH] hwmon: hwmon vs i2c, second round (02/11)
The way i2c-sensor handles forced addresses could be optimized. It
defines a structure (i2c_force_data) to associate a module parameter
with a given kind value, but in fact this kind value is always the
index of the structure in each array it is used in. So this additional
value can be omitted, and still be deduced in the code handling these
arrays.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:18 -07:00
Jean Delvare 9fc6adfa9a [PATCH] hwmon: hwmon vs i2c, second round (01/11)
Add support for kind-forced addresses to i2c_probe, like i2c_detect
has for (essentially) hardware monitoring drivers.

Note that this change will slightly increase the size of the drivers
using I2C_CLIENT_INSMOD, with no immediate benefit. This is a
requirement if we want to merge i2c_probe and i2c_detect though, and
seems a reasonable price to pay in comparison with the previous
cleanups which saved much more than that (such as the i2c-isa cleanup
or the i2c address ranges removal.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:18 -07:00
Jean Delvare b6d7b3d1b5 [PATCH] I2C: Improve core debugging messages
The debugging messages in i2c-core are more confusing than helpful. Some
lack their trailing newline, some lack a prefix, some are redundant,
some lack precious information. Here is my attempt to introduce some
standardization in there.

I also changed two messages in i2c-dev to make it clear they come from
i2c-dev.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:16 -07:00
Ian Campbell 48edcb65dd [PATCH] I2C: i2c-algo-pca -- gracefully handle a busy bus
I've been running with this patch for a while now, and while I've never
seen it trigger except with buggy hardware I think it is a cleaner way
to handle a busy bus. I had -EBUSY until about 10 minutes ago but -EIO
seems to be what most of the existing algo drivers will return in the
same circumstances.

Signed-off-by: Ian Campbell <icampbell@arcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:15 -07:00
Jean Delvare cdcb192197 [PATCH] I2C: inline i2c_adapter_id
We could inline i2c_adapter_id, as it is really, really short. Doing
so saves a few bytes both in i2c-core and in the drivers using this
function.

                                            before     after      diff
drivers/hwmon/adm1026.ko                     41344     41305       -39
drivers/hwmon/asb100.ko                      27325     27246       -79
drivers/hwmon/gl518sm.ko                     20824     20785       -39
drivers/hwmon/it87.ko                        26419     26380       -39
drivers/hwmon/lm78.ko                        21424     21385       -39
drivers/hwmon/lm85.ko                        41034     40939       -95
drivers/hwmon/w83781d.ko                     39561     39514       -47
drivers/hwmon/w83792d.ko                     32979     32932       -47
drivers/i2c/i2c-core.ko                      24708     24531      -177

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:15 -07:00
Jean Delvare 7bef559455 [PATCH] I2C: refactor message in i2c_detach_client
We could refactor the error message 34 different i2c drivers print if
i2c_detach_client() fails in this function itself. Saves quite a few
lines of code. Documentation is updated to reflect that change.

Note that this patch should be applied after Rudolf Marek's w83792d
patches.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:14 -07:00
Jean Delvare 5071860aba [PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (7/9)
Kill normal_isa in header files, documentation and all chip drivers, as
it is no more used.

normal_i2c could be renamed to normal, but I decided not to do so at the
moment, so as to limit the number of changes. This might be done later
as part of the i2c_probe/i2c_detect merge.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:12 -07:00
Jean Delvare 4926c0d4de [PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (6/9)
Kill all isa-related stuff from i2c_detect, it's not used anymore.

This is one major step in the directiom of merging i2c_probe and
i2c_detect. The last obstacle I can think of is the different way forced
addresses work between sensors and non-sensors i2c drivers. I'll deal
with that in a later patchset.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:11 -07:00
Jean Delvare 5042c7d752 [PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (4/9)
All ISA hardware monitoring drivers (including hybrid drivers) now have
a hard dependency on i2c-isa, so they must select I2C_ISA. As a result,
CONFIG_I2C_ISA doesn't need to be left visible to the user. The good
thing here is that users will stop complaining that some driver doesn't
work just because they forgot to compile or load i2c-isa.

At this point, all drivers are working again and the cleanup phase can
begin.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:10 -07:00
Jean Delvare 400c455eaa [PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (2/9)
Convert i2c-isa from a dumb i2c_adapter into a pseudo i2c-core for ISA
hardware monitoring drivers. The isa i2c_adapter is no more registered
with i2c-core, drivers have to explicitely connect to it using the new
i2c_isa_{add,del}_driver interface.

At this point, all ISA chip drivers are useless, because they still
register with i2c-core in the hope i2c-isa is registered there as well,
but it isn't anymore.

The fake bus will be named i2c-9191 in sysfs. This is the number it
already had internally in various places, so it's not exactly new,
except that now the number is seen in userspace as well. This shouldn't
be a problem until someone really has 9192 I2C busses in a given system
;)

The fake bus will no more show in "i2cdetect -l", as it won't be seen by
i2c-dev anymore (not being registered with i2c-core), which is a good
thing, as i2cdetect/i2cdump/i2cset cannot operate on this fake bus
anyway.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:09 -07:00
Jean Delvare efde723fda [PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (1/9)
Temporarily export a few structures and functions from i2c-core, because we
will soon need them in i2c-isa.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:09 -07:00
bgardner@wabtec.com 17f990c87a [PATCH] I2C: max6875 code cleanup
Remove an unused local variable and change the subclient name.

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:06 -07:00
bgardner@wabtec.com a61fc683ae [PATCH] I2C: add kobj_to_i2c_client
Move the inline function kobj_to_i2c_client() from max6875.c to i2c.h.

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:05 -07:00
Hans-Frieder Vogt 5033017c26 [PATCH] I2C: cleanup of i2c-nforce2
attached is a small patch that removes unused code from i2c-nforce2 and
adds a single debug message. The patch is against 2.6.13-rc3-mm1.
I have tested the patch with 2.6.13-rc3: compiles cleanly and works as
without the patch (as expected).

Signed-off-by: Hans-Frieder Vogt <hfvogt@arcor.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:04 -07:00
Greg Kroah-Hartman a8decc658a [PATCH] I2C: fix max6875 build error
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:04 -07:00
bgardner@wabtec.com bc769ff8f5 [PATCH] I2C: simplify max6875 driver
This is an update to the max6875 driver.
It no longer does any detection, so the address must be forced on module load.
It only makes available the user EEPROM (read-only).

This patch is based off 2.6.13-rc2-mm2.

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:03 -07:00
Ralf Baechle a242b44da6 [PATCH] Build fix for the Sibyte I2C driver
Compile fix for the BCM1250 I2C driver.

Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-09 12:08:21 -07:00
Andrew Morton de5b31101f [PATCH] i2c-mpc.c: revert duplicate patch
Seems that both Greg and I submitted the same patch and it just kept on
applying...

Cc: Greg KH <greg@kroah.com>
Cc: Kumar Gala <galak@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-01 19:13:59 -07:00
Jean Delvare 0d73adc14e [PATCH] I2C: 24RF08 corruption prevention (again)
The 24RF08 corruption prevention in the eeprom and max6875 drivers wasn't
complete. For one thing, the additional quick write should happen as soon
as possible and unconditionally, while both drivers had error paths before.
For another, when a given chip is forced, the core does not emit a quick
write, so a second quick write would cause the corruption rather than
prevent it.

I plan to move the corruption prevention in the core in the long run, so
that individual drivers don't have to care anymore. But I need to merge
i2c_probe and i2c_detect before I do (work in progress).

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-29 13:12:51 -07:00
Jean Delvare 86749e8512 [PATCH] I2C: missing new lines in i2c-core messages
Two log messages lack their trailing new line in i2c-core. I'd swear I had
fixed them already, but it seems not. Bonus: improved coding style.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-29 13:12:51 -07:00
Jean Delvare 368609c5a8 [PATCH] I2C: Missing space in split strings
A few split string in i2c (and now hwmon) drivers lack a joining space,
causing them to display incorrectly. This trivial patch fixes that up.
Please apply, thanks.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-29 13:12:50 -07:00
Ladislav Michl d91e16943f [PATCH] I2C: ds1337 - fix 12/24 hour mode bug
DS1339 manual, page 6, chapter Date and time operation:
  The DS1339 can be run in either 12-hour or 24-hour mode. Bit 6 of the
  hours register is defined as the 12-hour or 24-hour mode-select bit.
  When high, the 12-hour mode is selected.

Patch below makes ds1337 driver work as documented in manual.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-29 13:12:50 -07:00
Kumar Gala cb14c3a13c [PATCH] I2C-MPC: Restore code removed
I2C-MPC: Restore code removed

A previous patch to remove support for the OCP device model was way
to generious and moved some of the platform device model code, oops.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-29 13:12:50 -07:00
Kumar Gala 8c86cb127b [PATCH] I2C-MPC: Restore code removed
A previous patch to remove support for the OCP device model was way to
generious and moved some of the platform device model code, oops.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27 16:25:47 -07:00
Jean Delvare 8d5d45fb14 [PATCH] I2C: Move hwmon drivers (2/3)
Part 2: Move the driver files themselves.

Note that the patch "adds trailing whitespace", because it does move the
files as-is, and some files happen to have trailing whitespace.

From: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-07-11 14:42:50 -07:00
Jean Delvare ad2f931dcb [PATCH] I2C: Move hwmon drivers (1/3)
Part 1: Configuration files and Makefiles.

From: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-07-11 14:14:31 -07:00