aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2007-05-01i2c: i2c stack can remove()David Brownell
More update for new style driver support: add a remove() method, and use it in the relevant code paths. Again, nothing will use this yet since there's nothing to create devices feeding this infrastructure. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c: i2c stack can probe()David Brownell
One of a series of I2C infrastructure updates to support enumeration using the standard Linux driver model. This patch updates probe() and associated hotplug/coldplug support, but not remove(). Nothing yet _uses_ it to create I2C devices, so those hotplug/coldplug mechanisms will be the only externally visible change. This patch will be an overall NOP since the I2C stack doesn't yet create clients/devices except as part of binding them to legacy drivers. Some code is moved earlier in the source code, helping group more of the per-device infrastructure in one place and simplifying handling per-device attributes. Terminology being adopted: "legacy drivers" create devices (i2c_client) themselves, while "new style" ones follow the driver model (the i2c_client is handed to the probe routine). It's an either/or thing; the two models don't mix, and drivers that try mixing them won't even be registered. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c-pca-isa: Port to the new device driver modelJean Delvare
Port the i2c-pca-isa driver to the new device driver model. I'm using Rene Herman's new isa bus type, as it fits the needs nicely. One benefit is that we can now give a proper parent to our i2c adapter. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c-elektor: Port to the new device driver modelJean Delvare
Port the i2c-elektor driver to the new device driver model. I'm using Rene Herman's new isa bus type, as it fits the needs nicely. One benefit is that we can now give a proper parent to our i2c adapter. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c-parport-light: Port to the new device driver modelJean Delvare
Also fix a small race on driver unload: we need to unregister the i2c adapter before we power it off. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c-parport: Fix a minor race on driver unloadJean Delvare
When unloading the driver, we really want to unregister the i2c adapter before we power it off, rather than the other way around. Also speed up the bus a bit when we can sense SCL. The slaves will stretch the line as needed. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01scx200_acb: Fix PCI device reference countJean Delvare
The scx200_acb driver supports two kind of devices, PCI ones and ISA ones. Even ISA ones are detected using the presence of a given PCI device, and we get a reference to it, but never put it back, so we have a leak. Fix it. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c: Cleanup the includes of <linux/i2c.h>Jean Delvare
Clean up the includes of <linux/i2c.h>. Only include this header file when we actually need it. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c-nforce2: Add support for the MCP61 and MCP65Jean Delvare
Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Hans-Frieder Vogt <hfvogt@gmx.net>
2007-05-01i2c-parport: Optimize binary sizeJean Delvare
Initialize the fields of the i2c_adapter structure individually, rather than copying a whole static template structure. This shaves off 474 bytes or 14% (on i386) from the binary size. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c-algo-bit: Emulate SMBus block readJean Delvare
Now that i2c-core lets the i2c bus drivers emulate the SMBus block read and SMBus block process call transaction types, let's implement that in the popular i2c bit-banging driver. This will also act as a reference implementation for other bus drivers which want to do the same. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c: Emulate SMBus block read over I2CJean Delvare
Let the I2C bus drivers emulate the SMBus Block Read and Block Process Call transactions if they wish. This requires to define a new message flag, which i2c-core will use to let the underlying I2C bus driver know that the first received byte will specify the length of the read message. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c-algo-bit: Always send a stop condition before leavingJean Delvare
The i2c-algo-bit driver doesn't behave well on read errors: it'll bail out without even sending a stop condition on the bus, so the bus will be stuck. So make sure that we always send a stop condition on the bus before we leave. The best way to make sure is to always send it at the end of function bit_xfer. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c: Rename dev_to_i2c_adapter()David Brownell
Rename dev_to_i2c_adapter() as to_i2c_adapter(), since the previous syntax was a surprising and needless difference from normal naming conventions in Linux. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c: Class attribute cleanupDavid Brownell
This patch is a minor cleanup/code shrink, using class infrastructure in i2c-core to manage the i2c_adapter attribute. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c: Shrink struct i2c_clientDavid Brownell
This shrinks the size of "struct i2c_client" by 40 bytes: - Substantially shrinks the string used to identify the chip type - The "flags" don't need to be so big - Removes some internal padding It also adds kerneldoc for that struct, explaining how "name" is really a chip type identifier; it's otherwise potentially confusing. Because the I2C_NAME_SIZE symbol was abused for both i2c_client.name and for i2c_adapter.name, this needed to affect i2c_adapter too. The adapters which used that symbol now use the more-obviously-correct idiom of taking the size of that field. JD: Shorten i2c_adapter.name from 50 to 48 bytes while we're here, to avoid wasting space in padding. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c: i2c_register_driver() cleanupDavid Brownell
Minor cleanup in i2c_register_driver(): use list_for_each_entry(). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c: i2c_adapter devices need no driverJean Delvare
Kill i2c_adapter_driver as it doesn't make sense and it prevents further i2c-core cleanups. i2c_adapter devices are virtual devices (ex-class devices) and as such they don't need a driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c: Kill i2c_adapter.class_devJean Delvare
Kill i2c_adapter.class_dev. Instead, set the class of i2c_adapter.dev to i2c_adapter_class, so that a symlink will be created for every i2c_adapter in /sys/class/i2c-adapter. The same change must be mirrored to i2c-isa as it duplicates some of the i2c-core functionalities. User-space tools and libraries might need some adjustments. In particular, libsensors from lm_sensors 2.10.3 or later is required for proper discovery of i2c adapter names after this change. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-04-30libata: honour host controllers that want just one hostLinus Torvalds
The Marvell IDE interface on my machine would hit a BUG_ON() in lib/iomem.c because it was calling ata_pci_init_one() specifying just a single port on the host, but that would actually end up trying to initialize two ports, the second one with bogus information. This fixes "ata_pci_init_one()" so that it actually passes down the n_ports variable that it got from the low-level driver to the host allocation routine ("ata_host_alloc_pinfo()"), which results in the ATA layer actually having the correct port number information. And in order to make it all work, I also needed to fix a few places that had incorrectly hard-coded the fact that a host always had exactly two ports (both ata_pci_init_bmdma() and ata_request_legacy_irqs() would just always iterate over both ports). Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-30power management: implement pm_ops.valid for everybodyJohannes Berg
Almost all users of pm_ops only support mem sleep, don't check in .valid and don't reject any others in .prepare so users can be confused if they check /sys/power/state, especially when new states are added (these would then result in s-t-r although they're supposed to be something different). This patch implements a generic pm_valid_only_mem function that is then exported for users and puts it to use in almost all existing pm_ops. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: David Brownell <david-b@pacbell.net> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: linux-pm@lists.linux-foundation.org Cc: Len Brown <lenb@kernel.org> Acked-by: Russell King <rmk@arm.linux.org.uk> Cc: Greg KH <greg@kroah.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-30Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: (56 commits) ieee1394: remove garbage from Kconfig ieee1394: more help in Kconfig ieee1394: ohci1394: Fix mistake in printk message. ieee1394: ohci1394: remove unnecessary rcvPhyPkt bit flipping in LinkControl register ieee1394: ohci1394: fix cosmetic problem in error logging ieee1394: eth1394: send async streams at S100 on 1394b buses ieee1394: eth1394: fix error path in module_init ieee1394: eth1394: correct return codes in hard_start_xmit ieee1394: eth1394: hard_start_xmit is called in atomic context ieee1394: eth1394: some conditions are unlikely ieee1394: eth1394: clean up fragment_overlap ieee1394: eth1394: don't use alloc_etherdev ieee1394: eth1394: omit useless set_mac_address callback ieee1394: eth1394: CONFIG_INET is always defined ieee1394: eth1394: allow MTU bigger than 1500 ieee1394: unexport highlevel_host_reset ieee1394: eth1394: contain host reset ieee1394: eth1394: shorter error messages ieee1394: eth1394: correct a memset argument ieee1394: eth1394: refactor .probe and .update ...
2007-04-30Merge branch 'for-linus' of ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid: (21 commits) USB HID: don't warn on idVendor == 0 USB HID: add 'quirks' module parameter USB HID: add support for dynamically-created quirks USB HID: clarify static quirk handling as squirks USB HID: encapsulate quirk handling into hid-quirks.c USB HID: EMS USBII device needs HID_QUIRK_MULTI_INPUT HID: update copyright and authorship macro HID: introduce proper zeroing of unused bits in output reports USB HID: add support for WiseGroup MP-8800 Quad Joypad USB HID: add FF support for Logitech Force 3D Pro Joystick USB HID: numlock quirk for dell W7658 keyboard USB HID: Logitech MX3000 keyboard needs report descriptor quirk USB HID: extend quirk for Logitech S510 keyboard USB HID: usbkbd/usbmouse - handle errors when registering devices USB HID: add QUIRK_HIDDEV for Belkin Flip KVM HID: enable dead keys on a belkin wireless keyboard USB HID: Thustmaster firestorm dual power v1 support USB HID: specify explicit size for hid_blacklist.quirks USB HID: fix retry & reset logic USB HID: consolidate vendor/product ids ...
2007-04-30Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits) [IPV4] SNMP: Support OutMcastPkts and OutBcastPkts [IPV4] SNMP: Support InMcastPkts and InBcastPkts [IPV4] SNMP: Support InTruncatedPkts [IPV4] SNMP: Support InNoRoutes [SNMP]: Add definitions for {In,Out}BcastPkts [TCP] FRTO: RFC4138 allows Nagle override when new data must be sent [TCP] FRTO: Delay skb available check until it's mandatory [XFRM]: Restrict upper layer information by bundle. [TCP]: Catch skb with S+L bugs earlier [PATCH] INET : IPV4 UDP lookups converted to a 2 pass algo [L2TP]: Add the ability to autoload a pppox protocol module. [SKB]: Introduce skb_queue_walk_safe() [AF_IUCV/IUCV]: smp_call_function deadlock [IPV6]: Fix slab corruption running ip6sic [TCP]: Update references in two old comments [XFRM]: Export SPD info [IPV6]: Track device renames in snmp6. [SCTP]: Fix sctp_getsockopt_local_addrs_old() to use local storage. [NET]: Remove NETIF_F_INTERNAL_STATS, default to internal stats. [NETPOLL]: Remove CONFIG_NETPOLL_RX ...
2007-04-30Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-blockLinus Torvalds
* 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block: [PATCH] elevator: elv_list_lock does not need irq disabling [BLOCK] Don't pin lots of memory in mempools cfq-iosched: speedup cic rb lookup ll_rw_blk: add io_context private pointer cfq-iosched: get rid of cfqq hash cfq-iosched: tighten queue request overlap condition cfq-iosched: improve sync vs async workloads cfq-iosched: never allow an async queue idling cfq-iosched: get rid of ->dispatch_slice cfq-iosched: don't pass unused preemption variable around cfq-iosched: get rid of ->cur_rr and ->cfq_list cfq-iosched: slice offset should take ioprio into account [PATCH] cfq-iosched: style cleanups and comments cfq-iosched: sort IDLE queues into the rbtree cfq-iosched: sort RT queues into the rbtree [PATCH] cfq-iosched: speed up rbtree handling cfq-iosched: rework the whole round-robin list concept cfq-iosched: minor updates cfq-iosched: development update cfq-iosched: improve preemption for cooperating tasks
2007-04-30Merge branch 'for-2.6.22' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc * 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (255 commits) [POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c [POWERPC] remove kernel module option for booke wdt [POWERPC] Avoid putting cpu node twice [POWERPC] Spinlock initializer cleanup [POWERPC] ppc4xx_sgdma needs dma-mapping.h [POWERPC] arch/powerpc/sysdev/timer.c build fix [POWERPC] get_property cleanups [POWERPC] Remove the unused HTDMSOUND driver [POWERPC] cell: cbe_cpufreq cleanup and crash fix [POWERPC] Declare enable_kernel_spe in a header [POWERPC] Add dt_xlate_addr() to bootwrapper [POWERPC] bootwrapper: CONFIG_ -> CONFIG_DEVICE_TREE [POWERPC] Don't define a custom bd_t for Xilixn Virtex based boards. [POWERPC] Add sane defaults for Xilinx EDK generated xparameters files [POWERPC] Add uartlite boot console driver for the zImage wrapper [POWERPC] Stop using ppc_sys for Xilinx Virtex boards [POWERPC] New registration for common Xilinx Virtex ppc405 platform devices [POWERPC] Merge common virtex header files [POWERPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform [POWERPC] Clean up cpufreq Kconfig dependencies ...
2007-04-30[L2TP]: Add the ability to autoload a pppox protocol module.James Chapman
This patch allows a name "pppox-proto-nnn" to be used in modprobe.conf to autoload a PPPoX protocol nnn. Signed-off-by: James Chapman <jchapman@katalix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-30[BLOCK] Don't pin lots of memory in mempoolsJens Axboe
Currently we scale the mempool sizes depending on memory installed in the machine, except for the bio pool itself which sits at a fixed 256 entry pre-allocation. There's really no point in "optimizing" this OOM path, we just need enough preallocated to make progress. A single unit is enough, lets scale it down to 2 just to be on the safe side. This patch saves ~150kb of pinned kernel memory on a 32-bit box. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-04-30[POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.cPaul Mackerras
Commit 404d5b185b4eb56d6fa2f7bd27833f8df1c38ce4 changed the definition of dev_dbg in the !DEBUG case from being a #define to being a static inline. There was code in drivers/ps3/vuart.c to do exactly that, which fails to compile now. This fixes it by removing the redefinition, as the redefinition is now superfluous. Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-30Merge branch 'linux-2.6' into for-2.6.22Paul Mackerras
2007-04-30[POWERPC] remove kernel module option for booke wdtDave Jiang
Remove option of making booke_wdt into a kernel module. This watchdog cannot be disabled. No point being a kernel module. Signed-off-by: Dave Jiang <djiang@mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-30ieee1394: remove garbage from KconfigStefan Richter
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: more help in KconfigStefan Richter
- s/Device Drivers/Controllers/ - clarify who needs pcilynx - don't recommend Y for raw1394; M is typically used Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: ohci1394: Fix mistake in printk message.Simon Arlott
Fix the "attempting to setting" message in ohci1394. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: ohci1394: remove unnecessary rcvPhyPkt bit flipping in LinkControl ↵Bernhard Kauer
register Remove the unneeded code that clears, sets and again clears the rcvPhyPkt bit in the ohci1394 LinkControl register in ohci_initialize(). Signed-off-by: Bernhard Kauer <kauer@os.inf.tu-dresden.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: ohci1394: fix cosmetic problem in error loggingStefan Richter
If posted write failed, an "Unhandled interrupt(s) 0x00000100" message was logged by mistake. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: eth1394: send async streams at S100 on 1394b busesStefan Richter
eth1394 did not work on buses consisting of S100B...S400B hardware because it attempted to send GASP packets at S800. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: eth1394: fix error path in module_initAkinobu Mita
This patch fixes some error handlings in eth1394: - check return value of kmem_cache_create() - cleanup resources if hpsb_register_protocol() fails Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (whitespace)
2007-04-30ieee1394: eth1394: correct return codes in hard_start_xmitStefan Richter
This patch actually doesn't change anything because there was always 0 == NETDEV_TX_OK returned before. TODO: Return NETDEV_TX_BUSY in error case and test in different error conditions. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: eth1394: hard_start_xmit is called in atomic contextStefan Richter
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: eth1394: some conditions are unlikelyStefan Richter
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: eth1394: clean up fragment_overlapStefan Richter
offset > fi->offset + fi->len - 1 == !(offset < fi->offset + fi->len) offset + len - 1 < fi->offset == !(offset + len > fi->offset) !(A || B) == (!A && !B) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: eth1394: don't use alloc_etherdevStefan Richter
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: eth1394: omit useless set_mac_address callbackStefan Richter
We can't reconfigure the MAC address, hence we don't need the callback. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: eth1394: CONFIG_INET is always definedStefan Richter
because CONFIG_IEEE1394_ETH1394 depends on it. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: eth1394: allow MTU bigger than 1500Stefan Richter
RFC 2734 says: "IP-capable nodes may operate with an MTU size larger than the default [1500 octets], but the means by which a larger MTU is configured are beyond the scope of this document." Allow users to set an MTU bigger than 1500. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: unexport highlevel_host_resetAdrian Bunk
highlevel_host_reset no longer has any modular users. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: eth1394: contain host resetStefan Richter
Call only eth1394's own host reset handler from .tx_timeout, not the reset hooks of all other IEEE 1394 drivers. A minor drawback of this patch is that ether1394_host_reset by timeout is not serialized against ether1394_host_reset by bus reset. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: eth1394: shorter error messagesStefan Richter
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: eth1394: correct a memset argumentStefan Richter
The old argument calculated the correct value in a wrong way. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>