aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2007-07-19hwmon/smsc47b397: Don't report missing fans as spinning at 82 RPMJean Delvare
Also protects ourselves against a possible division by zero. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-07-19hwmon: Add support for newer uGuru'sHans de Goede
This patch adds a new driver for the hardware monitoring features of the third revision of the Abit uGuru chip, found on recent Abit motherboards. This is an entirely different beast then the first and second revision (its again a winbond microcontroller, but the "protocol" to talk to it and the bank addresses are very different. Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-07-19hwmon/f71805f: Add temperature-tracking fan control modePhil Endecott
Add support for the "temperature mode" fan speed control. In this mode, the user can define 3 temperature/speed trip points, and the chip will set the speed automatically according to the temperature changes. Signed-off-by: Phil Endecott <kernel@chezphil.org> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-07-19hwmon/w83627ehf: Preserve speed reading when changing fan minJean Delvare
The w83627ehf driver changes the fan clock divider automatically when a new min fan speed is set. It is supposed to preserve the fan speed reading while doing so, bug doesn't really. Fix it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-07-19hwmon: fix detection of abituguru volt inputsHans de Goede
This patch fixes the detection of volt inputs with a reading of more then 240 units. Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-07-19hwmon: add SCH5317 to smsc47b397 driverJuerg Haefliger
This patch adds the SMSC SCH5317 chip (device ID 0x85) as a supported device to the smsc47b397 driver. Signed-off-by: Juerg Haefliger <juergh at gmail.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-07-19hwmon: convert it87 to platform drivercorentin.labbe
This is the patch for converting it87 to a platform driver (and remove i2c-isa). Signed-off-by: Corentin LABBE <corentin.labbe@geomatys.fr> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-07-19hwmon: Fix a potential race condition on unloadJean Delvare
Fix a potential race condition when some hardware monitoring platform drivers are being unloaded. I believe that the driver data pointer shouldn't be cleared before all the sysfs files are removed, otherwise a sysfs callback might attempt to dereference a NULL pointer. I'm not sure exactly what the driver core protects drivers against, so let's play it safe. While we're here, clear the driver data pointer when probe fails, so as to not leave an invalid pointer behind us. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-07-19hwmon: Convert vt8231 to a platform driverRoger Lucas
Convert the vt8231 driver from the nonsensical i2c-isa hack to a regular platform driver. Signed-off-by: Roger Lucas <roger@planbit.co.uk> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-07-19hwmon/sis5595: Use PCI_REVISION_IDJean Delvare
Use PCI_REVISION_ID instead of our own define. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-19hwmon/sis5595: Use dynamic sysfs callbacksJean Delvare
This lets us get rid of macro-generated functions and shrinks the driver size by about 7%. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-19hwmon/sis5595: Convert to a platform driverJean Delvare
Convert the sis5595 driver from the nonsensical i2c-isa hack to a regular platform driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-19hwmon/via686a: Use dynamic sysfs callbacksJean Delvare
This lets us get rid of macro-generated functions and shrinks the driver size by about 9%. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-19hwmon/via686a: Convert to a platform driverJean Delvare
Convert the via686a driver from the nonsensical i2c-isa hack to a regular platform driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-19hwmon/via686a: Temperature interrupt configuration fixJean Delvare
Fix the writing of the temperature interrupt configuration. The old code was working only by accident. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-19hwmon/w83627hf: Add PWM frequency selection supportCarlos Olalla Martinez
Signed-off-by: Carlos Olalla <com.ea@tinet.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-19hwmon/it87: Add IT8726F supportRudolf Marek
Add support for IT8726F chip driver, which is just same as IT8716F with additional glue logic for AMD power sequencing. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-19hwmon: Fault files naming conventionJean Delvare
We have the following naming convention documented in Documentation/hwmon/sysfs-interface for fault files: in[0-*]_input_fault fan[1-*]_input_fault temp[1-*]_input_fault Some drivers follow this convention (lm63, lm83, lm90, smsc47m192). However some drivers omit the "input" part and create files named fan1_fault (pc87427) or temp1_fault (dme1737). And the new "generic" libsensors follows this second (non-standard) convention, so it fails to report fault conditions for drivers which follow the standard. We want a single naming scheme, and everyone seems to prefer the shorter variant, so let's go for it. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-19hwmon/lm90: Add support for the Maxim MAX6680/MAX6681Rainer Birkenmaier
Signed-off-by: Rainer Birkenmaier <rainer.birkenmaier@siemens.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-19hwmon: Use platform_device_add_data()Jean Delvare
Use platform_device_add_data() in hardware monitoring drivers. This makes the code nicer and smaller too. Reported by David Hubbard. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Hubbard <david.c.hubbard@gmail.com>
2007-07-19hwmon/pc87360: Convert to a platform driverJean Delvare
Convert the pc87360 driver from the nonsensical i2c-isa hack to a regular platform driver. This is a direct conversion, other cleanups could happen on top of that. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Jim Cromie <jim.cromie@gmail.com>
2007-07-19hwmon: New SMSC DME1737 driverJuerg Haefliger
Add support for the hardware monitoring and fan control capabilities of the SMSC DME1737 and Asus A8000 Super-I/O chips. The hardware monitoring logic of this chip is similar to the LM85 but has some additional features that this driver supports. Even though it's a Super-I/O chip, the hardware monitoring logic can only be accessed via SMBus. Signed-off-by: Juerg Haefliger <juergh at gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-19hwmon/ds1621: Create individual alarm filesJean Delvare
Future versions of libsensors will need this. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Aurelien Jarno <aurelien@aurel32.net>
2007-07-19hwmon/ds1621: Use dynamic sysfs callbacksJean Delvare
This lets us get rid of macro-generated functions and shrinks the driver size by about 8%. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Aurelien Jarno <aurelien@aurel32.net>
2007-07-19hwmon/ds1621: Minor cleanupsJean Delvare
* Discard comments which do not apply or are redundant. * Remove a few useless instructions. * Rename new_client to just client. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Aurelien Jarno <aurelien@aurel32.net>
2007-07-19hwmon/smsc47m192: Semaphore to mutex conversionJean Delvare
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-19hwmon/lm90: Spelling fix: explicitlyJean Delvare
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-08qd65xx: fix PIO mode selectionBartlomiej Zolnierkiewicz
PIO4 is a maximum PIO mode supported by a driver. Using "255" as a max_mode argument to ide_get_best_pio_mode() could result in wrong timings being used by a driver (for "pio" equal to 5) or OOPS (for "pio" values > 5 && < 255). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Reviewed-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
2007-07-08sis5513: adding PCI-IDUwe Koziolek
The SiS966 has one additional PCI-ID 1180. If the chipset is using this PCI-ID, the primary channel is connected to the first PATA-port. The secondary channel is connected to SATA-ports in IDE emulation mode. The legacy IO-ports are used. The including of the PCI-ID into pata_sis is not sufficient, because the legacy driver in drivers/ide is initialized before pata_sis. Signed-off-by: Uwe Koziolek <uwe.koziolek@gmx.net> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-06potential compiler error, irqfunc caller sites updateYoann Padioleau
In 7d12e780e003f93433d49ce78cfedf4b4c52adc5 David Howells performed this evolution: "IRQ: Maintain regs pointer globally rather than passing to IRQ handlers" He correctly updated many of the function definitions that were using this extra regs pointer parameter but forgot to update some caller sites of those functions. The reason the modifications was not properly done on all drivers is that some drivers were rarely compiled because they are for AMIGA, or that some code sites were inside #ifdefs where the option is not set or inside #if 0. Here is the semantic patch that found the occurences and fixed the problem. @ rule1 @ identifier fn; identifier irq, dev_id; typedef irqreturn_t; @@ static irqreturn_t fn(int irq, void *dev_id) { ... } @@ identifier rule1.fn; expression E1, E2, E3; @@ fn(E1, E2 - ,E3 ) Signed-off-by: Yoann Padioleau <padator@wanadoo.fr> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Garzik <jeff@garzik.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-06PNP SMCf010 quirk: work around Toshiba Portege 4000 ACPI issuesBjorn Helgaas
When we enable the SMCf010 IR device, the Toshiba Portege 4000 BIOS claims the device is working, but it really isn't configured correctly. The BIOS *will* configure it, but only if we call _SRS after (1) reversing the order of the SIR and FIR I/O port regions and (2) changing the IRQ from active-high to active-low. This patch addresses the 2.6.22 regression: "no irda0 interface (2.6.21 was OK), smsc does not find chip" I tested this on a Portege 4000. The smsc-ircc2 driver correctly detects the device, and "irattach irda0 -s && irdadump" shows transmitted and received packets. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Andrey Borzenkov <arvidjaar@mail.ru> Cc: Samuel Ortiz <samuel@sortiz.org> Cc: "Linus Walleij (LD/EAB)" <linus.walleij@ericsson.com> Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-05Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: document some of keycodes Input: add a new EV_SW SW_RADIO event, for radio switches on laptops Input: serio - take drv_mutex in serio_cleanup() Input: atkbd - use printk_ratelimit for spurious ACK messages Input: atkbd - throttle LED switching Input: i8042 - add HP Pavilion ZT1000 to the MUX blacklist
2007-07-05Merge branch 'merge' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] Update defconfigs [POWERPC] Uninline and export virq_to_hw() for the pasemi_mac driver [POWERPC] Fix PMI breakage in cbe_cbufreq driver [POWERPC] Disable old EMAC driver in arch/powerpc
2007-07-04Remove the blink driverLinus Torvalds
Yeah, we could have just disabled it, but there's work on a new one that isn't as fundamentally broken, so there really doesn't seem to be any point in keeping it around. The recent timer cleanup broke the only valid use, and when I say "valid", I obviously mean "totally broken". So it's not like it works, or really even can work in the current format that uses the unsafe "panic" LED blinking routines.. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-03Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6Linus Torvalds
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: ide: ide_scan_pcibus(): check __pci_register_driver return value ide: pdc202xx_new PLL input clock fix it821x: fix incorrect SWDMA mask amd74xx: resume fix hpt366: use correct enablebits for HPT36x hpt366: blacklist MAXTOR STM3320620A for UltraDMA/66 ide: Fix a theoretical Ooops case ide: never called printk statement in ide-taskfile.c::wait_drive_not_busy
2007-07-03ide: ide_scan_pcibus(): check __pci_register_driver return valueAndrew Morton
drivers/ide/setup-pci.c: In function 'ide_scan_pcibus': drivers/ide/setup-pci.c:879: warning: ignoring return value of '__pci_register_driver', declared with attribute warn_unused_result Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-03ide: pdc202xx_new PLL input clock fixAlbert Lee
Recently the PLL input clock of Promise 2027x is sometimes detected higher than expected (e.g. 20.027 MHz compared to 16.714 MHz). It seems sometimes the mdelay() function is not as precise as it used to be. Per Alan's advice, HT or power management might affect the precision of mdelay(). This patch calls gettimeofday() to measure the time elapsed and calculate the PLL input clock accordingly. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Bahadir Balban <bahadir.balban@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-03it821x: fix incorrect SWDMA maskBartlomiej Zolnierkiewicz
SWDMA modes are unsupported by it821x. Attempts to tune SWDMA modes always fail (due to sanity check in ->speedproc) and result in PIO being tuned. * Fix incorrect SWDMA mask so core code won't try these modes and will just tune PIO if no other DMA modes are available. * Bump driver version. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
2007-07-03amd74xx: resume fixBartlomiej Zolnierkiewicz
* Driver can't skip programming transfer mode on the device in amd_set_drive() (similar fix has been applied to via82cxxx driver ages ago). * While at it remove redundant warning (ide_config_drive_speed() already produces more valuable one). * Bump driver version. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-03hpt366: use correct enablebits for HPT36xSergei Shtylyov
The HPT36x chips finally turned out to have the channel enable bits -- however, badly implemented. Make use of them despite it's probably only going to burden the driver's code -- assuming both channels are always enabled by the HighPoint BIOS anyway... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Acked-by: Linas Vepstas <linas@austin.ibm.com> Cc: michal.kepien@poczta.onet.pl Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-03hpt366: blacklist MAXTOR STM3320620A for UltraDMA/66Sergei Shtylyov
Add the MAXTOR STM3320620A drive into the UltraDMA/66 mode blacklist for the HPT36x chips. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Acked-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-03ide: Fix a theoretical Ooops caseAlan Cox
Found by a static analyser. It is in theory possible we dereference dev->id when it has become invalid. Re-order to avoid this. Not needed for new-ide as we no longer support the crazy exabyte nest stuff Signed-off-by: Alan Cox <alan@redhat.com> Cc: Andrew Morton <akpm@osdl.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-03ide: never called printk statement in ide-taskfile.c::wait_drive_not_busyMasatake YAMATO
Look at wait_drive_not_busy in drivers/ide/ide-taskfile.c: static u8 wait_drive_not_busy(ide_drive_t *drive) { ide_hwif_t *hwif = HWIF(drive); int retries = 100; u8 stat; /* * Last sector was transfered, wait until drive is ready. * This can take up to 10 usec, but we will wait max 1 ms * (drive_cmd_intr() waits that long). */ while (((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) && retries--) udelay(10); if (!retries) printk(KERN_ERR "%s: drive still BUSY!\n", drive->name); return stat; } `printk' is never called because `retries' never holds zero at the outside of `while' loop: when `retries' holds zero at the while's loop condition, `retries' will hold -1 at the if condition. Signed-off-by: Masatake YAMATO <jet@gyve.org> Cc: Chuck Ebbert <cebbert@redhat.com> Cc: joe@perches.com Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-03V4L/DVB (5822): Fix the return value in ttpci_budget_init()Hartmut Birr
if the call to budget_register() fails in ttpci_budget_int(), ttpci_budget_init() returns success. The attached patch will fix this problem. Signed-off-by: Hartmut Birr <e9hack@googlemail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-03V4L/DVB (5818): CinergyT2: fix flush_workqueue() vs work->func() deadlockOleg Nesterov
Spotted and tested by Thomas Sattler <tsattler@gmx.de>. cinergyT2.c does cancel_delayed_work() + flush_scheduled_work() while holding cinergyt2->sem. This leads to deadlock because work->func() needs the same mutex to complete. Another bug is that this code in fact can't reliably stop the re-arming delayed_work. Convert this code to use cancel_rearming_delayed_work() and move it out of ->sem. Another mutex, ->wq_sem, was added to protect against the concurrent open/resume. This patch is a horrible hack to fix the lockup which happens in practice. As Dmitry Torokhov pointed out this driver has other problems and needs further changes. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-03V4L/DVB (5816): Cx88-blackbird: fix vidioc_g_tuner never ending list of tunersJelle Foks
v4l-info and other programs would loop indefinitely while querying the tuners for cx88-blackbird cards. The cause was that vidioc_g_tuner didn't return an error value for qctrl->id != 0, making the application think there is a never ending list of tuners... This patch adds the same index check as done in vidioc_g_tuner() in cx88-video. Signed-off-by: Jelle Foks <jelle@foks.8m.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-03V4L/DVB (5808): Bttv: fix v4l1 breaking the driverTrent Piepho
If one uses a V4L *one* application, such as vlc or mplayer's v4l driver, as the first user after the driver is loaded, the driver wedges itself and will never capture properly. Even if one uses a V4L2 application later, it still won't work. If one uses a V4L *two* application first, such as tvtime or mplayer's v4l2 driver, then the driver will be ok. One can then run a V4L1 application, and it will work. It turns out the problem is with norm changing and the crop support that was added in 2.6.21. The driver defaults to PAL, and keeps the last norm it was set too across opens. If one changes the norm via V4L1, the cropping parameters are not reset like they should be, and they'll remain broken across device opens. This patch removes the direct setting of btv->tvnorm in the V4L1 ioctl VIDIOCSCHAN handler. The norm is set via the existing call to set_input(), which calls set_tvnorm(), which will reset the cropping values now that it is able to detect the norm change. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-03pata_pcmcia: Switch to ata_sff_port_startAlan Cox
PCMCIA doesn't use DMA and as this driver is used on many platforms we don't want it to fail on those that define the DMA alloc API as a NULL return Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-03pata_pdc202xx_old: Correct cable detect logicAlan Cox
We got it backwards and now the other detects are fixed it shows up Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-03ata_generic: Check the right register for the DMA enabled flagsAlan Cox
Mirrors change in IT821X Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>