summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
Commit message (Collapse)AuthorAgeFilesLines
* [POWERPC] Fix build of modular drivers/macintosh/apm_emu.cGuido Guenther2008-03-131-1/+1
| | | | | | | | | | | | | | | | Currently, if drivers/macintosh/apm_emu is a module and the config doesn't have CONFIG_SUSPEND we get: ERROR: "pmu_batteries" [drivers/macintosh/apm_emu.ko] undefined! ERROR: "pmu_battery_count" [drivers/macintosh/apm_emu.ko] undefined! ERROR: "pmu_power_flags" [drivers/macintosh/apm_emu.ko] undefined! on PPC32. The variables aren't wrapped in '#if defined(CONFIG_SUSPEND)' so we probably shouldn't wrap the exports either. This removes the CONFIG_SUSPEND part of the export, which fixes compilation on ppc32. Signed-off-by: Guido Guenther <agx@sigxcpu.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Fix sleep on some powerbooksBenjamin Herrenschmidt2008-03-131-2/+3
| | | | | | | | | | | | | The PMU backlight code would kick in during sleep/resume even on machines that use a different backlight method. This breaks sleep on some PowerBooks. This fixes it by adding a flag to indicate whether the backlight is controlled by the PMU, and testing that before trying to use the PMU to turn off the backlight during sleep. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* PM: Introduce PM_EVENT_HIBERNATE callback stateRafael J. Wysocki2008-02-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | During the last step of hibernation in the "platform" mode (with the help of ACPI) we use the suspend code, including the devices' ->suspend() methods, to prepare the system for entering the ACPI S4 system sleep state. But at least for some devices the operations performed by the ->suspend() callback in that case must be different from its operations during regular suspend. For this reason, introduce the new PM event type PM_EVENT_HIBERNATE and pass it to the device drivers' ->suspend() methods during the last phase of hibernation, so that they can distinguish this case and handle it as appropriate. Modify the drivers that handle PM_EVENT_SUSPEND in a special way and need to handle PM_EVENT_HIBERNATE in the same way. These changes are necessary to fix a hibernation regression related to the i915 driver (ref. http://lkml.org/lkml/2008/2/22/488). Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Tested-by: Jeff Chua <jeff.chua.linux@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Fix compile of swim3 as moduleTony Breeds2008-02-151-2/+0Star
| | | | | | | | | | | | | | | | | | | | | The current pmac32_defconfig fails to build with the following error: Building modules, stage 2. ERROR: "check_media_bay" [drivers/block/swim3.ko] undefined! WARNING: modpost: Found 23 section mismatch(es). To see full details build your kernel with: 'make CONFIG_DEBUG_SECTION_MISMATCH=y' make[2]: *** [__modpost] Error 1 This patch fixes that. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [POWERPC] Disable G5 NAP mode during SMU commands on U3Benjamin Herrenschmidt2008-02-081-1/+24
| | | | | | | | | | | | | | | | | | | It appears that with the U3 northbridge, if the processor is in NAP mode the whole time while waiting for an SMU command to complete, then the SMU will fail. It could be related to the weird backward mechanism the SMU uses to get to system memory via i2c to the northbridge that doesn't operate properly when the said bridge is in napping along with the CPU. That is on U3 at least, U4 doesn't seem to be affected. This didn't show before NO_HZ as the timer wakeup was enough to make it work it seems, but that is no longer the case. This fixes it by disabling NAP mode on those machines while an SMU command is in flight. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* ppc: fix #ifdef-s in mediabay driver (take 2)Bartlomiej Zolnierkiewicz2008-02-061-25/+21Star
| | | | | | | | | | | | | | | | | | | | | | | * Replace incorrect CONFIG_BLK_DEV_IDE #ifdef in check_media_bay() by CONFIG_MAC_FLOPPY one. * Replace incorrect CONFIG_BLK_DEV_IDE #ifdef-s by CONFIG_BLK_DEV_IDE_PMAC ones. * check_media_bay() is used only by drivers/block/swim3.c so make this function available only if CONFIG_MAC_FLOPPY is defined. * check_media_bay_by_base() and media_bay_set_ide_infos() are used only by drivers/ide/ppc/pmac.c so so make these functions available only if CONFIG_MAC_FLOPPY is defined. v2: * Remove ifdefs from function prototypes. (Andrew Morton) Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* mac68k: macii adb comment correctionFinn Thain2008-02-051-1/+1
| | | | | | | | | | Corrects a mistake I made in a comment. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds2008-02-041-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (79 commits) Jesper Juhl is the new trivial patches maintainer Documentation: mention email-clients.txt in SubmittingPatches fs/binfmt_elf.c: spello fix do_invalidatepage() comment typo fix Documentation/filesystems/porting fixes typo fixes in net/core/net_namespace.c typo fix in net/rfkill/rfkill.c typo fixes in net/sctp/sm_statefuns.c lib/: Spelling fixes kernel/: Spelling fixes include/scsi/: Spelling fixes include/linux/: Spelling fixes include/asm-m68knommu/: Spelling fixes include/asm-frv/: Spelling fixes fs/: Spelling fixes drivers/watchdog/: Spelling fixes drivers/video/: Spelling fixes drivers/ssb/: Spelling fixes drivers/serial/: Spelling fixes drivers/scsi/: Spelling fixes ...
| * drivers/macintosh/: Spelling fixesJoe Perches2008-02-031-1/+1
| | | | | | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
| * Spelling fixes: lenght->lengthPaulius Zaleckas2008-02-031-1/+1
| | | | | | | | | | Signed-off-by: Paulius Zaleckas <pauliusz@yahoo.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
* | ADB: Add missing #include <linux/platform_device.h>Geert Uytterhoeven2008-02-041-0/+1
|/ | | | | | | | | | Commit c9f6d3d5c6d4f4cd3a53549a69c92951180e2a76 ("[POWERPC] adb: Replace sleep notifier with platform driver suspend/resume hooks") introduced compile errors on m68k because <linux/platform_device.h> is not explicitly included. On powerpc, it's pulled in through <asm/prom.h>. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ide: add 'init_default' and 'restore' arguments to ide_unregister()Bartlomiej Zolnierkiewicz2008-02-021-1/+1
| | | | | | | | | | | | | | | | * Add 'init_default' (flag for calling init_hwif_default()) and 'restore' (flag for calling ide_hwif_restore()) arguments to ide_unregister(). * Update ide_unregister() users to set 'init_default' and 'restore' flags. * No need to set 'init_default' flag in ide_register_hw() if the setup done by init_hwif_default() is going to be overridden by ide_init_port_hw(). * No need to set 'init_default' and 'restore' flags in cleanup_module(). There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Merge branch 'linux-2.6'Paul Mackerras2008-01-314-7/+5Star
|\
| * i2c: Kill rogue driver IDsJean Delvare2008-01-271-3/+0Star
| | | | | | | | | | | | 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-271-1/+1
| | | | | | | | Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * ide: drop 'initializing' argument from ide_register_hw()Bartlomiej Zolnierkiewicz2008-01-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rename init_hwif_data() to ide_init_port_data() and export it. * For all users of ide_register_hw() with 'initializing' argument set hwif->present and hwif->hold are always zero so convert these host drivers to use ide_find_port()+ide_init_port_data()+ide_init_port_hw() instead (also no need for init_hwif_default() call since the setup done by it gets over-ridden by ide_init_port_hw() call). * Drop 'initializing' argument from ide_register_hw(). Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Roman Zippel <zippel@linux-m68k.org> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * Driver core: change sysdev classes to use dynamic kobject namesKay Sievers2008-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | All kobjects require a dynamically allocated name now. We no longer need to keep track if the name is statically assigned, we can just unconditionally free() all kobject names on cleanup. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * adb: Convert from class_device to deviceTony Jones2008-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | struct class_device is going away, this converts the code to use struct device instead. Signed-off-by: Tony Jones <tonyj@suse.de> Cc: Joshua Thompson <funaho@jurai.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Merge branch 'linux-2.6'Paul Mackerras2008-01-241-1/+2
|\|
| * macintosh: fix fabrication of caplock key eventsAndy Wingo2008-01-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user has turned on the "restore_caplock_events" parameter, the code mangles the capslock events correctly, then erroneously ignores those events. Fix logic to allow correct fallthrough. Signed-off-by: Andy Wingo <wingo@pobox.com> Acked-by: Andrew McNabb <amcnabb@mcnabbs.org> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * drivers/macintosh/via-pmu.c: Added a missing iounmapJulia Lawall2007-12-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error handling code should undo the ioremap as well. The problem was detected using the following semantic match (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ type T,T1,T2; identifier E; statement S; expression x1,x2; constant C; int ret; @@ T E; ... * E = ioremap(...); if (E == NULL) S ... when != iounmap(E) when != if (E != NULL) { ... iounmap(E); ...} when != x1 = (T1)E if (...) { ... when != iounmap(E) when != if (E != NULL) { ... iounmap(E); ...} when != x2 = (T2)E ( * return; | * return C; | * return ret; ) } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Olaf Hering <olaf@aepfle.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | [POWERPC] therm_adt746x: Eliminate some build warningsStephen Rothwell2008-01-171-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't care if the device_create_file calls fail, the driver will work just as well without them, so just issue a runtime warning. drivers/macintosh/therm_adt746x.c: In function 'thermostat_init': drivers/macintosh/therm_adt746x.c:615: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:616: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:617: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:618: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:619: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:620: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:621: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:622: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:623: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:625: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] therm_windtunnel: Eliminate some build warningsStephen Rothwell2008-01-171-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | We don't care if the device_create_file calls fail, the driver will work just as well without them, so just issue a runtime warning. drivers/macintosh/therm_windtunnel.c: In function 'setup_hardware': drivers/macintosh/therm_windtunnel.c:268: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_windtunnel.c:269: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] therm_pm72: Suppress some compile warningsStephen Rothwell2008-01-171-17/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't really care if any of these calls to device_create_file fails, so just issue warnings in that case. drivers/macintosh/therm_pm72.c: In function 'init_cpu_state': drivers/macintosh/therm_pm72.c:1185: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_pm72.c:1186: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_pm72.c:1187: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_pm72.c:1188: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_pm72.c:1189: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_pm72.c:1191: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_pm72.c:1192: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_pm72.c:1193: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_pm72.c:1194: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_pm72.c:1195: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_pm72.c: In function 'init_backside_state': drivers/macintosh/therm_pm72.c:1383: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_pm72.c:1384: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_pm72.c: In function 'init_drives_state': drivers/macintosh/therm_pm72.c:1503: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_pm72.c:1504: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_pm72.c: In function 'init_dimms_state': drivers/macintosh/therm_pm72.c:1625: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_pm72.c: In function 'init_slots_state': drivers/macintosh/therm_pm72.c:1743: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_pm72.c:1744: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Fix for via-pmu based backlight controlBenjamin Herrenschmidt2007-12-212-34/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a few issues with via-pmu based backlight control. First, it fixes a sign problem with the setup of the backlight curve since the `range' value there -can- (and will) go negative. Then, it reworks the interaction between this and the via-pmu sleep code to properly restore backlight on wakeup from sleep. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Implement arch disable/enable irq hooks.Scott Wood2007-12-211-42/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These hooks ensure that a decrementer interrupt is not pending when suspending; otherwise, problems may occur on 6xx/7xx/7xxx-based systems (except for powermacs, which use a separate suspend path). For example, with deep sleep on the 831x, a pending decrementer will cause a system freeze because the SoC thinks the decrementer interrupt would have woken the system, but the core must have interrupts disabled due to the setup required for deep sleep. Changed via-pmu.c to use the new ppc_md hooks, and made the arch_* functions call the generic_* functions unconditionally. -- paulus Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] powermac: Use generic suspend codeJohannes Berg2007-12-191-232/+173Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds platform_suspend_ops for PMU based machines, directly in the PMU driver. This allows suspending via /sys/power/state on powerbooks. The patch also replaces the PMU ioctl with a simple call to pm_suspend(PM_SUSPEND_MEM). Additionally, it cleans up some debug code. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Fix sleep on powerbook 3400Paul Mackerras2007-12-191-136/+36Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sleep on the powerbook 3400 has been broken since the change that made powerbook_sleep_3400 call pmac_suspend_devices(), which disables interrupts. There are a couple of loops in powerbook_sleep_3400 that depend on interrupts being enabled, and in fact it has to have interrupts enabled at the point of going to sleep since it is an interrupt from the PMU that wakes it up. This fixes it by using pmu_wait_complete() instead of a spinloop, and by explicitly enabling interrupts before putting the CPU into sleep mode (which is OK since all interrupts except the PMU interrupt have been disabled at the interrupt controller by this stage). This changes the logic so that it keeps putting the CPU into sleep mode until the completion of the interrupt transaction from the PMU that signals the end of sleep. Also, we now call pmu_unlock() before sleep so that the via_pmu_interrupt() code can process the interrupt event from the PMU properly. Now that generic code saves and restores PCI state, it is no longer necessary to do that here. Thus pbook_pci_save/restore and related functions are no longer necessary, so this removes them. Lastly, this moves the ioremap of the memory controller to init code rather than doing it on every sleep/wakeup cycle. Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Convert therm_windtunnel.c to use the kthread APIPaul Mackerras2007-12-191-17/+17
| | | | | | | | | | | | | | This is fairly straightforward, and lets us get rid of x.completion as well. Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Convert therm_pm72.c to use the kthread APIPaul Mackerras2007-12-191-5/+4Star
| | | | | | | | | | | | | | | | | | This converts the therm_pm72.c driver to use the kthread API. I thought about making it use kthread_stop() instead of the `state' variable and the `ctrl_complete' completion, but that isn't simple and will require changing the way that `state' is used. Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Convert adb.c to use kthread API and not spin on ADB requestsPaul Mackerras2007-12-191-57/+21Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts adb.c to use the kthread API. It also changes adb_request so that if the ADBREQ_SYNC flag is specified, we now sleep waiting for the request to finish using an on-stack completion rather than spinning. To implement this, we now require that if the ADBREQ_SYNC flag is set, the `done' parameter must be NULL. All of the existing callers of adb_request that pass ADBREQ_SYNC appear to be in process context and have done == NULL. Doing this allows us to get rid of an awful hack in adb_request() where we used to test whether the request was coming from the adb probe task and use a completion if it was, and otherwise spin. This also gets rid of a static request block that was used if the req parameter to adb_request was NULL. None of the callers do that any more, so the static request block is no longer necessary. Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Convert media-bay.c to use the kthread APIPaul Mackerras2007-12-191-10/+4Star
| | | | | | | | | | | | | | We aren't supposed to use kernel_thread directly in drivers any more, and in fact using kthread_run is a bit simpler. Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] via-pmu: Kill sleep notifiers completelyJohannes Berg2007-12-191-71/+0Star
| | | | | | | | | | | | | | | | | | This kills off the remnants of the old sleep notifiers now that they are no longer used. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] adb: Replace sleep notifier with platform driver suspend/resume hooksJohannes Berg2007-12-191-39/+57
| | | | | | | | | | | | | | | | | | This replaces the pmu sleep notifier that adb had with suspend/resume hooks in a new platform driver/device. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] PMU: Remove dead codeJohannes Berg2007-12-031-41/+1Star
| | | | | | | | | | | | | | | | | | Some code in via-pmu.c is never compiled because of "compile options" within the file. Remove the code completely. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] PMU: Don't lock_kernel()Johannes Berg2007-12-031-3/+0Star
|/ | | | | | | | | I see nothing that this lock_kernel() actually protects against, so remove it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] windfarm: Fix windfarm thread freezer interactionJohannes Berg2007-11-081-7/+3Star
| | | | | | | | | | | | | | | | | When I fixed the windfarm freezer interaction first in commit 1ed2ddf380e19dafeec2150ca709ef7f4a67cd21, an earlier patch than the one I came up with after comments was committed. This has come back to haunt us now because commit d5d8c5976d6adeddb8208c240460411e2198b393 changed the freezer to no long send signals. Fix it by removing the windfarm thread's signal logic and restoring the original try_to_freeze(). We could simply revert 1ed2ddf380e19dafeec2150ca709ef7f4a67cd21 now but I feel that the assertion that no signal is delivered to the windfarm thread needs not be there. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Paul Mackerras <paulus@samba.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds2007-10-201-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (74 commits) fix do_sys_open() prototype sysfs: trivial: fix sysfs_create_file kerneldoc spelling mistake Documentation: Fix typo in SubmitChecklist. Typo: depricated -> deprecated Add missing profile=kvm option to Documentation/kernel-parameters.txt fix typo about TBI in e1000 comment proc.txt: Add /proc/stat field small documentation fixes Fix compiler warning in smount example program from sharedsubtree.txt docs/sysfs: add missing word to sysfs attribute explanation documentation/ext3: grammar fixes Documentation/java.txt: typo and grammar fixes Documentation/filesystems/vfs.txt: typo fix include/asm-*/system.h: remove unused set_rmb(), set_wmb() macros trivial copy_data_pages() tidy up Fix typo in arch/x86/kernel/tsc_32.c file link fix for Pegasus USB net driver help remove unused return within void return function Typo fixes retrun -> return x86 hpet.h: remove broken links ...
| * Spelling fix: explicitlyJean Delvare2007-10-191-1/+1
| | | | | | | | | | | | | | From: Jean Delvare <khali@linux-fr.org> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Adrian Bunk <bunk@kernel.org>
* | ide: add ->fixup method to ide_hwif_tBartlomiej Zolnierkiewicz2007-10-201-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | * Add ->fixup method to ide_hwif_t. * Set hwif->fixup in ide_pci_setup_ports() to d->fixup. * Use hwif->fixup in probe_hwif(). * Use probe_hwif_init() instead of probe_hwif_init_with_fixup() in ide_setup_pci_device(). * Add 'fixup' argument to ide_register_hw() and use it to set hwif->fixup, update all ide_register_hw() users accordingly. * Convert ide-cs/delkin_cb host drivers to use ide_register_hw(). * Restore hwif->fixup in ide_hwif_restore(). * Remove ide_register_hw_with_fixup(), probe_hwif_init_with_fixup() and 'fixup' argument from probe_hwif(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* get rid of input BIT* duplicate definesJiri Slaby2007-10-192-10/+16
| | | | | | | | | | | | | | | | | | | | | | get rid of input BIT* duplicate defines use newly global defined macros for input layer. Also remove includes of input.h from non-input sources only for BIT macro definiton. Define the macro temporarily in local manner, all those local definitons will be removed further in this patchset (to not break bisecting). BIT macro will be globally defined (1<<x) Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: <dtor@mail.ru> Acked-by: Jiri Kosina <jkosina@suse.cz> Cc: <lenb@kernel.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Cc: <perex@suse.cz> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: <vernux@us.ibm.com> Cc: <malattia@linux.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* fix adbhid mismergeAl Viro2007-10-171-1/+1
| | | | | | | | This fixes a lost 'key' variable declaration that went missing in a mismerge (commit b981d8b3f5e008ff10d993be633ad00564fc22cd) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6Dmitry Torokhov2007-10-1318-290/+61Star
|\ | | | | | | | | | | Conflicts: drivers/macintosh/adbhid.c
| * [POWERPC] adbhid: Enable KEY_FN key reportingAristeu Rozanski2007-09-221-11/+10Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a Fn key is used in combination with another key in ADB keyboards it will generate a Fn event and then a second event that can be a different key than pressed (Fn + F1 for instance can generate Fn + brightness down if it's configured like that). This enables the reporting of the Fn key to the input system. As Fn is a dead key for most purposes, it's useful to report it so applications can make use of it. One example is apple_mouse (https://jake.ruivo.org/uinputd/trunk/apple_mouse/) that emulates the second and third keys using a combination of keyboard keys and the mouse button. Other applications may use the KEY_FN as a modifier as well. I've been updating and using this patch for months without problems. Signed-off-by: Aristeu Rozanski <aris@ruivo.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * Merge branch 'linux-2.6' into for-2.6.24Paul Mackerras2007-08-285-259/+25Star
| |\
| | * [POWERPC] Fix undefined reference to device_power_up/resumeOlaf Hering2007-08-252-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current Linus tree fails to link on pmac32: drivers/built-in.o: In function `pmac_wakeup_devices': via-pmu.c:(.text+0x5bab4): undefined reference to `device_power_up' via-pmu.c:(.text+0x5bb08): undefined reference to `device_resume' drivers/built-in.o: In function `pmac_suspend_devices': via-pmu.c:(.text+0x5c260): undefined reference to `device_power_down' via-pmu.c:(.text+0x5c27c): undefined reference to `device_resume' make[1]: *** [.tmp_vmlinux1] Error 1 changing CONFIG_PM > CONFIG_PM_SLEEP leads to: drivers/built-in.o: In function `pmu_led_set': via-pmu-led.c:(.text+0x5cdca): undefined reference to `pmu_sys_suspended' via-pmu-led.c:(.text+0x5cdce): undefined reference to `pmu_sys_suspended' drivers/built-in.o: In function `pmu_req_done': via-pmu-led.c:(.text+0x5ce3e): undefined reference to `pmu_sys_suspended' via-pmu-led.c:(.text+0x5ce42): undefined reference to `pmu_sys_suspended' drivers/built-in.o: In function `adb_init': (.init.text+0x4c5c): undefined reference to `pmu_register_sleep_notifier' make[1]: *** [.tmp_vmlinux1] Error 1 So change even more places from PM to PM_SLEEP to allow linking. Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
| | * m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visibleGeert Uytterhoeven2007-08-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible drivers/char/keyboard.c: In function 'kbd_keycode': drivers/char/keyboard.c:1142: error: implicit declaration of function 'mac_hid_mouse_emulate_buttons' The forward declaration of mac_hid_mouse_emulate_buttons() is not visible on m68k because it's hidden in the middle of a big #ifdef block. Move it to <linux/kbd_kern.h>, correct the type of the second parameter, and include <linux/kbd_kern.h> where needed. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| | * remove dead code in via-pmu68kJohannes Berg2007-08-231-240/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When suspend is ever implemented for pmu68k it really should follow the generic pm_ops concept and not mirror the platform-specific /dev/pmu device with ioctls on it. Hence, this patch removes the unused code there; should the implementers need it they can look at via-pmu.c and/or the history of the file. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| | * Add some help texts to recently-introduced kconfig itemsJan Engelhardt2007-08-181-0/+5
| | | | | | | | | | | | | | | | | | Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (edited MACINTOSH_DRIVERS per Geert Uytterhoeven's remark) Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | [POWERPC] Copy over headers from arch/ppc to arch/powerpc that we needKumar Gala2007-08-232-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To build arch/powerpc without including asm-ppc/ we need these files in asm-powerpc/ Moved some headers under arch/powerpc/platforms if they were only used by platform or driver files and fixed up the source file includes to match the new locations Signed-off-by: Kumar Gala <galak@kernel.crashing.org>