summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* i2c: Support i2c_transfer in atomic contextsMike Rapoport2008-01-271-1/+11
| | | | | | | | | Allow i2c_transfer to be called in contexts where sleeping is not allowed. It is the reponsability of the caller to ensure that the underlying i2c bus driver will not sleep either. Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-sibyte: Remove the bus scan module parameterJean Delvare2008-01-271-28/+1
| | | | | | | | | | The implementation is unsafe, and anyway one can achieve the same from userspace using i2c-dev + i2cdetect. Also tag i2c_sibyte_add_bus __init. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Ralf Baechle <ralf@linux-mips.org>
* i2c-i801: Implement I2C block read supportJean Delvare2008-01-271-25/+54
| | | | | | | | | | | | I2C block read is supported since the ICH5. I couldn't get it to work using the block buffer, so it's using the old-style byte-by-byte mode for now. Note: I'm also updating the driver author... The i2c-i801 driver was really written by Mark Studebaker, even though he based his work on the i2c-piix4 driver which was written by Philip Edelbrock. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-i801: Clear special mode bits as neededJean Delvare2008-01-271-1/+6
| | | | | | | | | | Clear special mode bits (PEC, block buffer) at driver load time, you never know in which state the device was left by its last user. Also make sure that we reset the block buffer mode at the end of every transaction, not only when PEC was used. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-i801: More explicit names for chip featuresJean Delvare2008-01-271-9/+15
| | | | | | | Use separate flags with explicit names to describe the features of the ICH chip. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-i801: Document which chip support what featureJean Delvare2008-01-271-24/+33
| | | | | | | Provide a clearer documentation of which additional features each ICH chip support, and which of these the driver supports. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c/tps65010: move header to <linux/i2c/...>David Brownell2008-01-276-9/+5
| | | | | | | | | Move the tps65010 header file from the OMAP arch directory to the more generic <linux/i2c/...> directory, and remove the spurious dependency of this driver on OMAP. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c: Rename main mutexJean Delvare2008-01-271-15/+15
| | | | | | | Rename the main mutex in i2c-core from core_lists to core_lock. This makes more sense now that the redundant lists are gone. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c: Drop redundant i2c_driver.listJean Delvare2008-01-271-23/+35
| | | | | | | | i2c_driver.list is superfluous, this list duplicates the one maintained by the driver core. Drop it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: David Brownell <dbrownell@users.sourceforge.net>
* i2c: Drop redundant i2c_adapter.listJean Delvare2008-01-271-14/+10
| | | | | | | | i2c_adapter.list is superfluous, this list duplicates the one maintained by the driver core. Drop it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: David Brownell <dbrownell@users.sourceforge.net>
* i2c: Change prototypes of refcounting functionsJean Delvare2008-01-272-22/+24
| | | | | | | | | | Use more standard prototypes for i2c_use_client() and i2c_release_client(). The former now returns a pointer to the client, and the latter no longer returns anything. This matches what all other subsystems do. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <david-b@pacbell.net>
* i2c: Use the driver model reference countingJean Delvare2008-01-272-45/+2
| | | | | | | | Don't implement our own reference counting mechanism for i2c clients when the driver model already has one. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <david-b@pacbell.net>
* i2c: Deprecate drivers for I2C buses on video adaptersJean Delvare2008-01-271-4/+13
| | | | | | | The framebuffer drivers for these pieces of hardware include support for the DDC/I2C buses, so there is no need for separate drivers. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c: Don't uselessly set i2c_adapter.retriesJean Delvare2008-01-275-6/+0
| | | | | | | | | | I2C adapter drivers are supposed to handle retries on nack by themselves if they do, so there's no point in setting .retries if they don't. As this retry mechanism is going away (at least in its current form), clean this up now so that we don't get build failures later. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c: Kill rogue driver IDsJean Delvare2008-01-272-4/+0
| | | | | | I2C driver IDs are optional, so if you don't need one, just omit it. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c: normal_i2c can be made const (remaining drivers)Jean Delvare2008-01-279-12/+14
| | | | Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c: normal_i2c can be made const (rtc drivers)Jean Delvare2008-01-276-6/+6
| | | | | Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Alessandro Zummo <alessandro.zummo@towertech.it>
* i2c: Constify client address dataMark M. Hoffman2008-01-271-2/+2
| | | | | | | | This patch allows much of the I2C client address data to move from initdata into text. Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-algo-pcf: Delete broken 10-bit address supportJean Delvare2008-01-271-72/+13
| | | | | | | | The 10-bit address support in i2c-algo-pcf is so heavily broken that it can't have ever been used. Nobody ever complained, so I'll take it that nobody needs it. Let's just delete it. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-algo-bit: Fix NAK/ARB commentsDavid Brownell2008-01-271-4/+20
| | | | | | | | | | | | | Update comments and logging on return path for byte writes. NAK is an error, to be reported or optionally ignored. Timeouts are always errors. Lost arbitration is not currently handled, so don't even list it as an option in the error message. Don't return bogus EFAULT code for inappropriate NAK; EIO is better, there is no bad userspace address in question. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-algo-bit: Whitespace fixes (+ NAK/ARB comments)David Brownell2008-01-271-97/+105
| | | | | | | | Fix *LOTS* of whitespace goofs and checkpatch.pl warnings, strangely parenthesized ternary expressions, and other CodingStyle glitches. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-pxa: Remove hardcoded #ifdef and use cpu_is_pxa27xeric miao2008-01-271-29/+29
| | | | | | | | remove #ifdef CONFIG_PXA27x .. #endif and use cpu_is_pxaXXXX() macros so that a single binary can support PXA25x/PXA27x/PXA3xx at run-time. Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c: some overdue driver removalAdrian Bunk2008-01-273-193/+0
| | | | | | | | | | This patch contains the overdue removal of three I2C drivers. [JD: In fact only i2c-ixp4xx can be removed at the moment, the other two platforms don't implement the generic GPIO layer yet.] Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c: the scheduled I2C RTC driver removalAdrian Bunk2008-01-275-1131/+0
| | | | | | | | This patch contains the scheduled removal of legacy I2C RTC drivers with replacement drivers. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-stub: Use a single array for byte and word operationsJean Delvare2008-01-271-7/+8
| | | | | | | This mimics the behavior of actual SMBus chips better. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Mark M. Hoffman <mhoffman@lightlink.com>
* i2c/tsl2550: Add power management addedRodolfo Giometti2008-01-271-0/+21
| | | | | Signed-off-by: Rodolfo Giometti <giometti@linux.it> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c: Add support for the PCF8575 chipBart Van Assche2008-01-273-1/+230
| | | | | Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-ibm_iic: Whitespace cleanupStefan Roese2008-01-272-99/+99
| | | | | Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-pasemi: use i2c_add_numbered_adapter()Olof Johansson2008-01-271-1/+2
| | | | | | | | | | | | | Use numbered adapter registration to always have the same hardware bus show up at the same number. PWRficient 1682M has three buses, they are all on the same PCI device but different functions. So do the simple thing and register them based on function number. Future products, if having a different number of busses, are expected to have similar behaviour w.r.t. device/function layout. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-nforce2: The nForce2 can do block transactionsJean Delvare2008-01-271-0/+1
| | | | | | | | | My guess is that all the chips supported by this driver support block transactions and reset, but for now we play it safe and only list the ones for which this was actually tested. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Oleg Ryjkov <olegr@olegr.ca>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6Linus Torvalds2008-01-2662-1410/+960
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (63 commits) ide: remove REQ_TYPE_ATA_CMD ide: switch ide_cmd_ioctl() to use REQ_TYPE_ATA_TASKFILE requests ide: switch set_xfer_rate() to use REQ_TYPE_ATA_TASKFILE requests ide: fix final status check in drive_cmd_intr() ide: check BUSY and ERROR status bits before reading data in drive_cmd_intr() ide: don't enable local IRQs for PIO-in in driver_cmd_intr() (take 2) ide: convert "empty" REQ_TYPE_ATA_CMD requests to use REQ_TYPE_ATA_TASKFILE ide: initialize rq->cmd_type in ide_init_drive_cmd() callers ide: use wait_drive_not_busy() in drive_cmd_intr() (take 2) ide: kill DATA_READY define ide: task_end_request() fix ide: use rq->nr_sectors in task_end_request() ide: remove needless ->cursg clearing from task_end_request() ide: set IDE_TFLAG_IN_* flags before queuing/executing command ide-tape: fix handling of non-special requests in ->end_request method ide: fix final status check in task_in_intr() ide: clear HOB bit for REQ_TYPE_ATA_CMD requests in ide_end_drive_cmd() ide: fix ->io_32bit race in ide_taskfile_ioctl() cmd64x: remove /proc/ide/cmd64x ide: remove broken disk byte-swapping support ...
| * ide: remove REQ_TYPE_ATA_CMDBartlomiej Zolnierkiewicz2008-01-262-112/+11
| | | | | | | | | | | | | | | | | | Based on the earlier work by Tejun Heo. All users are gone so we can finally remove it. Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: switch ide_cmd_ioctl() to use REQ_TYPE_ATA_TASKFILE requestsBartlomiej Zolnierkiewicz2008-01-262-34/+33
| | | | | | | | | | | | | | | | | | Based on the earlier work by Tejun Heo. There should be no functionality changes caused by this patch. Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: switch set_xfer_rate() to use REQ_TYPE_ATA_TASKFILE requestsBartlomiej Zolnierkiewicz2008-01-262-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | Based on the earlier work by Tejun Heo. Switch set_xfer_rate() to use REQ_TYPE_ATA_TASKFILE requests and make ide_wait_cmd() static. There should be no functionality changes caused by this patch. Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: fix final status check in drive_cmd_intr()Bartlomiej Zolnierkiewicz2008-01-261-2/+2
| | | | | | | | | | | | | | | | | | | | Don't check for READY_STAT bit being set for PIO-in protocol (makes the final status check in drive_cmd_intr() match the one in task_in_intr()). Also fix function name reported by ide_error() call while at it. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: check BUSY and ERROR status bits before reading data in drive_cmd_intr()Bartlomiej Zolnierkiewicz2008-01-261-3/+8
| | | | | | | | | | Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: don't enable local IRQs for PIO-in in driver_cmd_intr() (take 2)Bartlomiej Zolnierkiewicz2008-01-261-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't enable local IRQs for PIO-in protocol in driver_cmd_intr(). While at it: * Remove redundant rq->cmd_type check. * Read status register after enabling local IRQs for no-data protocol. v2: * Re-add DRQ=1 check lost in v1 (noticed by Sergei). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: convert "empty" REQ_TYPE_ATA_CMD requests to use REQ_TYPE_ATA_TASKFILEBartlomiej Zolnierkiewicz2008-01-263-3/+5
| | | | | | | | | | | | | | | | | | Based on the previous work by Tejun Heo. There should be no functionality changes caused by this patch. Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: initialize rq->cmd_type in ide_init_drive_cmd() callersBartlomiej Zolnierkiewicz2008-01-263-1/+7
| | | | | | | | | | | | | | | | | | | | * Initialize rq->cmd_type in ide_wait_cmd(), ide_cmd_ioctl() and set_pio_mode() (other callers were aleady over-riding rq->cmd_type). * Remove no longer needed rq->cmd_type setup from ide_init_drive_cmd(). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: use wait_drive_not_busy() in drive_cmd_intr() (take 2)Bartlomiej Zolnierkiewicz2008-01-262-6/+3
| | | | | | | | | | | | | | | | | | | | Use wait_drive_not_busy() in drive_cmd_intr(). v2: * Fix wait_drive_not_busy() comment (noticed by Sergei). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: kill DATA_READY defineBartlomiej Zolnierkiewicz2008-01-261-2/+2
| | | | | | | | | | Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: task_end_request() fixTejun Heo2008-01-262-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | task_end_request() modified to always call ide_end_drive_cmd() for taskfile requests. Previously, ide_end_drive_cmd() was called only when IDE_TFLAG_FLAGGED was set. Also, ide_dma_intr() is modified to use task_end_request(). Enables TASKFILE ioctls to get valid register outputs on successful completion. Bart: - ported it over recent IDE changes Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: use rq->nr_sectors in task_end_request()Bartlomiej Zolnierkiewicz2008-01-261-2/+2
| | | | | | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: remove needless ->cursg clearing from task_end_request()Bartlomiej Zolnierkiewicz2008-01-261-2/+0
| | | | | | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: set IDE_TFLAG_IN_* flags before queuing/executing commandBartlomiej Zolnierkiewicz2008-01-264-23/+20
| | | | | | | | | | | | | | | | | | | | | | | | * Add IDE_TFLAG_{HOB,TF,DEVICE} defines. * Set IDE_TFLAG_IN_* flags in {do_rw,ide_no_data,ide_raw}_taskfile() users. * Remove no longer needed ->tf_flags setup from ide_end_drive_cmd(). There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide-tape: fix handling of non-special requests in ->end_request methodBartlomiej Zolnierkiewicz2008-01-261-0/+5
| | | | | | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: fix final status check in task_in_intr()Bartlomiej Zolnierkiewicz2008-01-261-1/+1
| | | | | | | | | | | | | | Check for DRQ bit being cleared on the final status check. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: clear HOB bit for REQ_TYPE_ATA_CMD requests in ide_end_drive_cmd()Bartlomiej Zolnierkiewicz2008-01-261-0/+2
| | | | | | | | | | | | | | ide_dump_status() may set HOB bit before ide_end_drive_cmd() is called. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: fix ->io_32bit race in ide_taskfile_ioctl()Tejun Heo2008-01-261-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In ide_taskfile_ioctl(), there was a race condition involving drive->io_32bit. It was cleared and restored during ioctl requests but there was no synchronization with other requests. So, other requests could execute with the altered ->io_32bit setting or updated drive->io_32bit could be overwritten by ide_taskfile_ioctl(). This patch adds IDE_TFLAG_IO_16BIT flag to indicate to ide_pio_datablock() that 16-bit I/O is needed regardless of drive->io_32bit settting. Bart: - ported it over recent IDE changes Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * cmd64x: remove /proc/ide/cmd64xBartlomiej Zolnierkiewicz2008-01-261-113/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This belongs to user-space (and only if really needed). text data bss dec hex filename 3874 180 28 4082 ff2 drivers/ide/pci/cmd64x.o.before 2231 180 0 2411 96b drivers/ide/pci/cmd64x.o.after Additionaly to being bloat the code reported incorrect UDMA modes for the reserved values of UDIDETCR0/1 registers. Also while at it remove unused CNTRL_DIS_RA0/1 defines. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
OpenPOWER on IntegriCloud