Commit Graph

434 Commits

Author SHA1 Message Date
Linus Torvalds e9b62693ae Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/juhl/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/juhl/trivial: (24 commits)
  DOC:  A couple corrections and clarifications in USB doc.
  Generate a slightly more informative error msg for bad HZ
  fix typo "is" -> "if" in Makefile
  ext*: spelling fix prefered -> preferred
  DOCUMENTATION:  Use newer DEFINE_SPINLOCK macro in docs.
  KEYS:  Fix the comment to match the file name in rxrpc-type.h.
  RAID: remove trailing space from printk line
  DMA engine: typo fixes
  Remove unused MAX_NODES_SHIFT
  MAINTAINERS: Clarify access to OCFS2 development mailing list.
  V4L: Storage class should be before const qualifier (sn9c102)
  V4L: Storage class should be before const qualifier
  sonypi: Storage class should be before const qualifier
  intel_menlow: Storage class should be before const qualifier
  DVB: Storage class should be before const qualifier
  arm: Storage class should be before const qualifier
  ALSA: Storage class should be before const qualifier
  acpi: Storage class should be before const qualifier
  firmware_sample_driver.c: fix coding style
  MAINTAINERS: Add ati_remote2 driver
  ...

Fixed up trivial conflicts in firmware_sample_driver.c
2008-04-21 16:36:46 -07:00
Linus Torvalds e80ab411e5 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits)
  SCSI: convert struct class_device to struct device
  DRM: remove unused dev_class
  IB: rename "dev" to "srp_dev" in srp_host structure
  IB: convert struct class_device to struct device
  memstick: convert struct class_device to struct device
  driver core: replace remaining __FUNCTION__ occurrences
  sysfs: refill attribute buffer when reading from offset 0
  PM: Remove destroy_suspended_device()
  Firmware: add iSCSI iBFT Support
  PM: Remove legacy PM (fix)
  Kobject: Replace list_for_each() with list_for_each_entry().
  SYSFS: Explicitly include required header file slab.h.
  Driver core: make device_is_registered() work for class devices
  PM: Convert wakeup flag accessors to inline functions
  PM: Make wakeup flags available whenever CONFIG_PM is set
  PM: Fix misuse of wakeup flag accessors in serial core
  Driver core: Call device_pm_add() after bus_add_device() in device_add()
  PM: Handle device registrations during suspend/resume
  block: send disk "change" event for rescan_partitions()
  sysdev: detect multiple driver registrations
  ...

Fixed trivial conflict in include/linux/memory.h due to semaphore header
file change (made irrelevant by the change to mutex).
2008-04-21 15:49:58 -07:00
Tobias Klauser f7e8dd5071 intel_menlow: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the
beginning of the declaration specifiers in a declaration is an
obsolescent feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
2008-04-21 22:28:49 +00:00
Tony Jones ee959b00c3 SCSI: convert struct class_device to struct device
It's big, but there doesn't seem to be a way to split it up smaller...

Signed-off-by: Tony Jones <tonyj@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-19 19:10:33 -07:00
Haavard Skinnemoen 03414e57ad Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/tclib into base 2008-04-19 20:38:13 -04:00
Jason Wessel 974460c5bf kgdb: allow static kgdbts boot configuration
This patch adds in the ability to compile the kgdb internal test
string into the kernel so as to run the tests at boot without changing
the kernel boot arguments.  This patch also changes all the error
paths to invoke WARN_ON(1) which will emit the line number of the file
and dump the kernel stack when an error occurs.

You can disable the tests in a kernel that is built this way
using "kgdbts="

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 20:05:43 +02:00
Jason Wessel e8d31c204e kgdb: add kgdb internal test suite
This patch adds regression tests for testing the kgdb core and arch
specific implementation.

The kgdb test suite is designed to be built into the kernel and not as
a module because it uses a number of low level kernel and kgdb
primitives which should not be exported externally.

The kgdb test suite is designed as a KGDB I/O module which
simulates the communications that a debugger would have with kgdb.
The tests are broken up in to a line by line and referenced here as
a "get" which is kgdb requesting input and "put" which is kgdb
sending a response.

The kgdb suite can be invoked from the kernel command line
arguments system or executed dynamically at run time.  The test
suite uses the variable "kgdbts" to obtain the information about
which tests to run and to configure the verbosity level.  The
following are the various characters you can use with the kgdbts=
line:

When using the "kgdbts=" you only choose one of the following core
test types:
A = Run all the core tests silently
V1 = Run all the core tests with minimal output
V2 = Run all the core tests in debug mode

You can also specify optional tests:
N## = Go to sleep with interrupts of for ## seconds
      to test the HW NMI watchdog
F## = Break at do_fork for ## iterations
S## = Break at sys_open for ## iterations

NOTE: that the do_fork and sys_open tests are mutually exclusive.

To invoke the kgdb test suite from boot you use a kernel start
argument as follows:
	kgdbts=V1 kgdbwait
Or if you wanted to perform the NMI test for 6 seconds and do_fork
test for 100 forks, you could use:
	kgdbts=V1N6F100 kgdbwait

The test suite can also be invoked at run time with:
echo kgdbts=V1N6F100 > /sys/module/kgdbts/parameters/kgdbts
Or as another example:
echo kgdbts=V2 > /sys/module/kgdbts/parameters/kgdbts

When developing a new kgdb arch specific implementation or
using these tests for the purpose of regression testing,
several invocations are required.

1) Boot with the test suite enabled by using the kernel arguments
      "kgdbts=V1F100 kgdbwait"
   ## If kgdb arch specific implementation has NMI use
      "kgdbts=V1N6F100

2) After the system boot run the basic test.
echo kgdbts=V1 > /sys/module/kgdbts/parameters/kgdbts

3) Run the concurrency tests.  It is best to use n+1
   while loops where n is the number of cpus you have
   in your system.  The example below uses only two
   loops.

## This tests break points on sys_open
while [ 1 ] ; do find / > /dev/null 2>&1 ; done &
while [ 1 ] ; do find / > /dev/null 2>&1 ; done &
echo kgdbts=V1S10000 > /sys/module/kgdbts/parameters/kgdbts
fg # and hit control-c
fg # and hit control-c
## This tests break points on do_fork
while [ 1 ] ; do date > /dev/null ; done &
while [ 1 ] ; do date > /dev/null ; done &
echo kgdbts=V1F1000 > /sys/module/kgdbts/parameters/kgdbts
fg # and hit control-c

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 20:05:42 +02:00
Kay Sievers d6c238503e misc: fix platform driver hotplug/coldplug
Since 43cc71eed1, the platform modalias is
prefixed with "platform:".  Add MODULE_ALIAS() to the hotpluggable 'misc'
platform drivers, to re-enable auto loading.

[dbrownell@users.sourceforge.net:  bugfix, registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-15 19:35:40 -07:00
Al Viro 5cf83b9b12 NULL noise: drivers/misc
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-30 14:18:41 -07:00
Len Brown b4de123a0b Merge branches 'release', 'ejd', 'sony' and 'wmi' into release 2008-03-13 01:59:52 -04:00
Len Brown c523aef0f7 Merge branches 'release', 'button-sysfs', 'misc', 'mismatch', 'randconfig' and 'toshiba' into release 2008-03-13 01:59:49 -04:00
Jiri Kosina 07d31ee559 acer-wmi: build depends on i8042
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-13 00:23:48 -04:00
Carlos Corbacho ed9cfe9805 acer-wmi: Add DMI quirk for mail LED support on Acer Aspire 3610/ 5610
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-12 16:25:02 -04:00
Carlos Corbacho 8d039bc7f3 acer-wmi: Make device detection error messages more descriptive
The current device detection error messages are all copy & pasted - make
them more descriptive so it's easier to see where in the code a problem
occurs.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-12 16:24:12 -04:00
Carlos Corbacho 9b963c4030 acer-wmi: Don't warn if mail LED cannot be detected
This warning confuses users, who think it is an error. Not detecting the
mail LED simply means it isn't there, so let's not unduly panic users.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-11 17:58:22 -04:00
Carlos Corbacho 343c00422d acer-wmi: Rename mail LED correctly & remove hardcoded colour
The mail LED name for acer-wmi currently hardcodes in the colour as green.
This is wrong, since many of the newer laptops now come with an orange
LED, and we have no way of telling what colour is used on a given system.

Also, rename the mail LED to be inline with the current recommendations of
the LED class documentation.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-11 17:53:24 -04:00
Alex Dubov e4c70e8521 tifm: clear interrupt mask bits before setting them on adapter init
This should improve reliability of detection of cards already in socket on
driver load.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-10 18:01:18 -07:00
Henrique de Moraes Holschuh cee47f5a32 ACPI: thinkpad-acpi: fix hotkey_get_tablet_mode
I used the wrong return convention on hotkey_get_tablet_mode(), breaking a lot
of stuff.  Bad Henrique!

Fix it to return the status in the parameter-by-reference, and IO status on
the function return value.  Duh.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Zdenek Kabelac <zdenek.kabelac@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Lukas Hejtmanek <xhejtman@ics.muni.cz>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-04 16:35:16 -08:00
David Brownell 4d243f92e4 atmel_tc clocksource/clockevent code
Clocksource and clockevent device based on the Atmel TC blocks.

The clockevent device handles both periodic and oneshot modes, so this
enables NO_HZ and high res timers on some platforms that previously
couldn't use those mechanisms.

This works on both AVR32 and AT91 chips, given relevant patches for
tclib support (always) and clockevents (or else this will only look
like a higher precision clocksource).  It's an updated and modularized
version of an AT91-only patch that has circulated for some time now.

Changes relative to the original patch:
  * Update to use new tclib API
  * Replace open-coded do-while loop using goto with a real do-while loop
  * Minor irq handler optimization: Load register base address from
    dev_id instead of a global variable.
  * Aggressively turn off clocks when the clockevent isn't being used
  * Include the clockevent code on AT91RM9200 as well. The rating is
    lower than the System Timer, so the clock will usually stay off.
  * Don't assume that the number of clocks is always equal to the
    number of irqs.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-03-04 13:42:24 +01:00
David Brownell 2a341f5cf5 atmel_tc library
Create <linux/atmel_tc.h> based on <asm-arm/arch-at91/at91-tc.h> and the
at91sam9263 and at32ap7000 datasheets.  Most AT91 and AT32 SOCs have one
or two of these TC blocks, which include three 16-bit timers that can be
interconnected in various ways.

These TC blocks can be used for external interfacing (such as PWM and
measurement), or used as somewhat quirky sixteen-bit timers.

Changes relative to the original version:
  * Drop unneeded inclusion of <linux/mutex.h>
  * Support an arbitrary number of TC blocks
  * Return a struct with information about a TC block from
    atmel_tc_alloc() instead of using a combination of return values
    and "out" parameters.
  * ioremap() the I/O registers on allocation
  * Look up clocks and irqs for all channels
  * Add "name" parameter to atmel_tc_alloc() and use this when
    requesting the iomem resource.
  * Check if the platform provided the necessary resources at probe()
    time instead of when the TCB is allocated.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-03-04 13:41:23 +01:00
Adrian Bunk d399d130c8 sony-laptop.c: fix off-by-one
This patch fixes an off-by-one spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-21 04:49:24 -05:00
Sam Ravnborg 7560e38565 acer-wmi: fix section mismatch warnings
Fix following warnings:
WARNING: vmlinux.o(.text+0x672615): Section mismatch in reference from the function acer_platform_remove() to the function .exit.text:acer_backlight_exit()
WARNING: vmlinux.o(.devinit.text+0x1e859): Section mismatch in reference from the function acer_platform_probe() to the function .init.text:acer_led_init()
WARNING: vmlinux.o(.devinit.text+0x1e878): Section mismatch in reference from the function acer_platform_probe() to the function .init.text:acer_backlight_init()

Remove __exit annotation from acer_backlight_exit(). We cannot reference
a __exit annotated function from non __exit functions.

acer_led_init() and acer_backlight_init() where both annotated __init but
used from a __devinit function. This would result in an oops should
gcc drop their inlining and the module are hot plugged.

Fix by annotating acer_led_init() and acer_backlight_init() __devinit.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-21 02:55:53 -05:00
Len Brown 1f1519ef59 Merge branches 'release', 'bugzilla-9916', 'bugzilla-9982', 'bugzilla-9989', 'misc', 'suspend', 'thermal', 'thinkpad' and 'tsc' into release 2008-02-21 02:41:58 -05:00
Carlos Corbacho 262ee35be6 acer-wmi: Add DMI match for mail LED on Acer TravelMate 4200 series
The TM4200 series use the same method as the TM2490 series to control the
mail LED, so add a DMI based quirk for these laptops.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-16 00:47:13 -05:00
Henrique de Moraes Holschuh 6c231bd5eb ACPI: thinkpad-acpi: add tablet-mode reporting
A quick study of the 0x5009/0x500A HKEY event on the X61t DSDT revealed the
existence of the EC HTAB register (EC 0x0f, bit 7), and a compare with the
X41t DSDT shows that HKEY.MHKG can be used to verify if the ThinkPad is
tablet-capable (MHKG present), and in tablet mode (bit 3 of MHKG return is
set).

Add an attribute to report this information, "hotkey_tablet_mode".  This
attribute has poll()/select() support, and can be used along with EV_SW
SW_TABLET_MODE to hook userspace to tablet events.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-16 00:34:06 -05:00
Henrique de Moraes Holschuh d147da73c9 ACPI: thinkpad-acpi: minor hotkey_radio_sw fixes
Fixes some minor points in the radio switch code and docs.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-16 00:34:04 -05:00
Henrique de Moraes Holschuh b3ec6f911a ACPI: thinkpad-acpi: issue input events for tablet swivel events
Issue EV_SW SW_TABLET_MODE events for HKEY events 0x5009 and 0x500A on the
X41t/X60t/X61t.  As usual, we suppress the HKEY events on the netlink
interface to avoid sending duplicate events to userspace.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-16 00:34:01 -05:00
Henrique de Moraes Holschuh d7c1d17dfe ACPI: thinkpad-acpi: make the video output feature optional
The video output port control feature is not very useful on many ThinkPads
(especially when a X server is running), and lately userspace is getting
better and better at it, so it makes sense to allow users to stripe out the
thinkpad-acpi video feature from their kernels and save at least 2KB.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-16 00:33:59 -05:00
Henrique de Moraes Holschuh 7526696a01 ACPI: thinkpad-acpi: synchronize input device switches
Issue EV_SW events at module init time to synchronize the input device with
the current state of the switch, otherwise we might lose the first event.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-16 00:33:57 -05:00
Henrique de Moraes Holschuh 1bc6b9cdd5 ACPI: thinkpad-acpi: always track input device open/close
The open() and close() hooks for the input device are useful even when
hotkey NVRAM polling support is not in use, so it is better to always have
them around.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-16 00:33:55 -05:00
Henrique de Moraes Holschuh cbb1484213 ACPI: thinkpad-acpi: trivial fix to module_desc typo
Thanks to Damjan <gdamjan@mail.net.mk> for noticing this one.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-16 00:33:44 -05:00
Thomas Sujith 69f6b8dd6b intel_menlo: extract return values using PTR_ERR
Need to extract errors using PTR_ERR macro and
process accordingly.thermal_cooling_device_register
returning NULL means that CONFIG_THERMAL=n and in that
case no need to create symbolic links.

Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-15 18:29:30 -05:00
Adrian Bunk 1d5a2b54f3 thinkpad_acpi: static
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-14 01:01:28 -05:00
Linus Torvalds acac103e2d Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  Merge branches 'release' and 'buildfix' into release
  acer-wmi - Add documentation
  sonypi - Move sonypi.txt to Documentation/laptops
  sony-laptop - Move sony-laptop.txt to Documentation/laptops
  thinkpad-acpi - Move thinkpad-acpi.txt to Documentation/laptops
  Documentation - Create laptops sub-directory
  ACPI: thermal: buildfix for CONFIG_THERMAL=n
  cpuidle: build fix for non-x86
  acer-wmi: Fix backlight on AMW0 (V1) laptops
  tc1100-wmi: Mark as experimental
  ACPI: SBS: Host controller must initialize before SBS.
2008-02-09 11:12:31 -08:00
Alex Dubov baf8532a14 memstick: initial commit for Sony MemoryStick support
Sony MemoryStick cards are used in many products manufactured by Sony.
They are available both as storage and as IO expansion cards.  Currently,
only MemoryStick Pro storage cards are supported via TI FlashMedia
MemoryStick interface.

[mboton@gmail.com: biuld fix]
[akpm@linux-foundation.org: build fix]
Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Miguel Boton <mboton@gmail.co>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-09 11:08:34 -08:00
Len Brown a52500c917 Merge branches 'release', 'wmi' and 'laptop-docs' into release 2008-02-09 04:32:55 -05:00
Carlos Corbacho 16111c7979 acer-wmi - Add documentation
Add some initial documentation detailing what acer-wmi is, and how to use
it. Update the Kconfig entry with a reference to the documentation.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-09 04:16:07 -05:00
Carlos Corbacho f04b7c402b sony-laptop - Move sony-laptop.txt to Documentation/laptops
Also update references to sony-laptop.txt in Kconfig.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
CC: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-09 04:15:40 -05:00
Carlos Corbacho f191dc6b55 thinkpad-acpi - Move thinkpad-acpi.txt to Documentation/laptops
Also update references to thinkpad-acpi.txt in Kconfig.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
CC: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-09 04:15:23 -05:00
Carlos Corbacho 4609d029aa acer-wmi: Fix backlight on AMW0 (V1) laptops
There is some leftover cruft from the old quirk infrastructure that causes
us to be unable to set the backlight on older laptops.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-09 03:29:33 -05:00
Carlos Corbacho b013682919 tc1100-wmi: Mark as experimental
tc1100-wmi has not undergone as much testing as acer-wmi, so it certainly
should be marked as experimental as well until we get more user feedback.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-09 03:29:04 -05:00
Linus Torvalds 7b791d4455 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  acer-wmi, tc1100-wmi: select ACPI_WMI
  ACPI: WMI: Improve Kconfig description
  ACPI: DMI: add Panasonic CF-52 and Thinpad X61
  ACPI: thermal: syntax, spelling, kernel-doc
  intel_menlo: build on X86 only
  ACPI: build WMI on X86 only
  ACPI: cpufreq: Print _PPC changes via cpufreq debug layer
  ACPI: add newline to printk
2008-02-08 09:25:58 -08:00
David Brownell 9a1e8eb1f0 Basic PWM driver for AVR32 and AT91
PWM device setup, and a simple PWM driver exposing a programming interface
giving access to each channel's full capabilities.  Note that this doesn't
support starting several channels in synch.

[hskinnemoen@atmel.com: allocate platform device dynamically]
[hskinnemoen@atmel.com: Kconfig fix]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 09:22:38 -08:00
Len Brown 2e6c4e5101 Merge branches 'release', 'dmi' and 'misc' into release 2008-02-08 01:22:26 -05:00
Len Brown 4a507d93fa acer-wmi, tc1100-wmi: select ACPI_WMI
It is safe for these Kconfig entries to use select because
they select ACPI_WMI, which already has its dependencies
satisfied.  This makes Kconfig more user friendly, since
the user selects the driver they want and the dependency
is met for them.  Otherwise, the user would have to find
and enable ACPI_WMI to make enabling these drivers possible.

Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-08 00:37:16 -05:00
James Bottomley d569d5bb3f [SCSI] enclosure: add support for enclosure services
The enclosure misc device is really just a library providing sysfs
support for physical enclosure devices and their components.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-07 18:04:10 -06:00
Len Brown 9f2eef25e0 intel_menlo: build on X86 only
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 16:19:56 -05:00
Linus Torvalds f0f1b3364a Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (112 commits)
  ACPI: fix build warning
  Revert "cpuidle: build fix for non-x86"
  ACPI: update intrd DSDT override console messages
  ACPI: update DSDT override documentation
  ACPI: Add "acpi_no_initrd_override" kernel parameter
  ACPI: its a directory not a folder....
  ACPI: misc cleanups
  ACPI: add missing prink prefix strings
  ACPI: cleanup acpi.h
  ACPICA: fix CONFIG_ACPI_DEBUG_FUNC_TRACE build
  ACPI: video: Ignore ACPI video devices that aren't present in hardware
  ACPI: video: reset brightness on resume
  ACPI: video: call ACPI notifier chain for ACPI video notifications
  ACPI: create notifier chain to get hotkey events to graphics driver
  ACPI: video: delete unused display switch on hotkey event code
  ACPI: video: create "brightness_switch_enabled" modparam
  cpuidle: Add a poll_idle method
  ACPI: cpuidle: Support C1 idle time accounting
  ACPI: enable MWAIT for C1 idle
  ACPI: idle: Fix acpi_safe_halt usages and interrupt enabling/disabling
  ...
2008-02-07 09:45:58 -08:00
Richard Purdie 6c152beefb leds: Standardise LED naming scheme
As discussed on LKML some notion of 'function' is needed in
LED naming. This patch adds this to the documentation and
standardises existing LED drivers.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2008-02-07 09:47:00 +00:00
Len Brown 060195500e Merge branches 'release' and 'wmi-2.6.25' into release 2008-02-07 03:19:43 -05:00
Len Brown 26b6f22366 Merge branches 'release' and 'menlo' into release
Conflicts:

	drivers/acpi/video.c

Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 03:18:04 -05:00
Len Brown dd07a8db72 Merge branches 'release', 'asus', 'sony-laptop' and 'thinkpad' into release 2008-02-07 03:07:35 -05:00
Roel Kluin 547266e46c ACPI: thinkpad-acpi: second TP_EC_FAN_FULLSPEED should be TP_EC_FAN_AUTO
fix bug in safety net for TPEC fan control mode
eaa7571b2d

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 01:17:21 -05:00
Roel Kluin e1af14e4b3 asus-laptop: add parentheses
'!' has a higher priority than '&': bitanding has no effect.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 00:42:08 -05:00
Corentin CHARY f8d1c94b34 asus-laptop new write_acpi_int
Just a little modification of write_acpi_int

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 00:37:37 -05:00
Jiri Slaby 82f560874e phantom: don't grab other devices
Specify also sub pci ids to not grab devices with properly set sub ids.
This devices has these set (unset) to the same as (plx 9050) ids.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Andreas Block <andreas.block@esd-electronics.com>
Cc: Oliver Thimm <oliver.thimm@esd-electronics.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06 10:41:10 -08:00
Adrian Bunk 2118116e5e drivers/misc/lkdtm.c: cleanups
- make needlessly global functions static
- make lkdtm_module_{init,exit}() as __{init,exit}

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Ankita Garg <ankita@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06 10:41:03 -08:00
Ralf Baechle 911f21501f Remove inclusions of <linux/autoconf.h>
Nothing should ever include this file.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: "Mike Frysinger" <vapier.adi@gmail.com>
Acked-by: "Bryan Wu" <cooloney.lkml@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06 10:41:00 -08:00
Carlos Corbacho dd8cd77937 tc1100-wmi: Add driver for HP Compaq TC1100 Tablets
This is based on the 2004 out-of-tree work of Jamey Hicks, to add
support via WMI for controlling the jog dial and wireless on these
tablets.

v1:

Original release

v2:

As per Joshua Wise's comments, change bluetooth to jogdial (an error from
the original driver).

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
CC: Matthew Garrett <mjg59@srcf.ucam.org>
CC: Jamey Hicks <jamey.hicks@nokia.com>
CC: Joshua Wise <joshua@joshuawise.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-05 15:07:16 -05:00
Carlos Corbacho 745a5d2126 acer-wmi: Add driver for newer Acer laptops
This is a driver for newer Acer (and Wistron) laptops. It adds wireless
radio and bluetooth control, and on some laptops, exposes the mail LED and
LCD backlight.

v1:

* Initial release

v2:

* Replace left over ACPI references with WMI
* Add GUID based autoloading (depends on future work to WMI)
* Add DMI based autoloading (backup solution until WMI sysfs/ class
  work is available)
* Checkpatch fixes

v3:

* Add new EC quirks for Aspire 3100 & 5100, and Extensa 5220

v4:

* Simplified internal handling of WMID and AMW0 devices
* Add autodetection for bluetooth and maximum brightness on AMW0 V2 and
  WMID laptops.

v5:

* Add EC quirk for Medion MD 98000
* Add autodetection for AMW0, and mail LED on AMW0 and AMW0 V2.
* Improve error handling
* Fix AMW0 V2 bluetooth and wireless, by using both WMID and AMW0 methods
  to ensure that the correct value is always set.

v6:

* Fix 'use before initialisation' bug with quirks.

v7

* Fix bug on AMW0 where acer-wmi would exit if a mail LED was not
  detected.
* Add Acer Aspire 9110 mail LED support
* Fix section mismatch warnings

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
CC: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-05 15:07:00 -05:00
Thomas Sujith cc0573b325 intel_menlo: introduce new platform specific driver
Intel menlow platform specific driver for thermal management extension.

Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 23:20:57 -05:00
Henrique de Moraes Holschuh 1cee5cce97 ACPI: thinkpad-acpi: bump up version to 0.19
The major code reorganization and cleanups, and new HKEY events, plus
poll()/select() support are good reasons to checkpoint a new version...

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:08 -05:00
Henrique de Moraes Holschuh 6a2e293c34 ACPI: thinkpad-acpi: update copyright dates to 2008
Update the copyright headers to include 2008.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:08 -05:00
Henrique de Moraes Holschuh 50ebec09f1 ACPI: thinkpad-acpi: add poll() support to some sysfs attributes
Implement poll()/select() support through sysfs_notify() for some key
attributes which userspace might want to poll() or select() on.

In order to let userspace know poll()/select() support is available for an
attribute, the thinkpad-acpi sysfs interface version is also bumped up.
Further changes that add poll()/select() capabilities to any pre-existing
attributes will also increment the sysfs interface version.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:08 -05:00
Henrique de Moraes Holschuh 013c40e457 ACPI: thinkpad-acpi: silence _sta warning
When both CONFIG_THINKPAD_ACPI_DOCK and CONFIG_THINKPAD_ACPI_BAY are
undefined, _sta is not used and that causes a gcc warning.  Fix it
(and I think this is a regression, I am pretty sure I fixed this once
before, sorry about that).

Issue reported by: Pritt Laes.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Pritt Laes <plaes@plaes.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:08 -05:00
Henrique de Moraes Holschuh d1edb2b5f1 ACPI: thinkpad-acpi: add X61t HKEY events
Tomas Carnecky reports that events 0x5009 and 0x500a are swivel events, and
that 0x500b/0x500c are tablet pen storage bay events.

Document these events, and avoid nasty messages when they happen.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:08 -05:00
Henrique de Moraes Holschuh a713b4d7bc ACPI: thinkpad-acpi: wakeup on hotunplug reporting
Handle some HKEY events that the firmware uses to report the reason for a
wake up, and to also notify that the system could go back to sleep (if it
woke up just to eject something from the bay, or to undock).

The driver will report the reason of the last wake up in the sysfs
attribute "wakeup_reason": 0 for "none, unknown, or standard ACPI wake up
event", 1 for "bay ejection request" and 2 for "undock request".

The firmware will also report if the operation that triggered the wake up
has been completed, by issuing an HKEY 0x3003 or 0x4003 event.  If the
operation fails, no event is sent.  When such a hotunplug sucessfull
notification is issued, the driver sets the attribute
"wakeup_hotunplug_complete" to 1.

While the firmware does tell us whether we are waking from a suspend or
hibernation scenario, the Linux way of hibernating makes this information
not reliable, and therefore it is not reported.

The idea is that if any of these attributes are non-zero, userspace might
want to do something at the end of the "wake up from sleep" procedures,
such as offering to send the machine back into sleep as soon as it is safe
to do so.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:08 -05:00
Henrique de Moraes Holschuh 3b64b51d20 ACPI: thinkpad-acpi: cleanup hotkey_notify and HKEY log messages
Use a generic message on hotkey_notify to log unknown and unhandled events,
and cleanup hotkey_notify a little.

Also, document event 0x5010 (brightness changed notification) and do not
log it as an unknown event (even if we do not use it for anything right
now).

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:08 -05:00
Henrique de Moraes Holschuh 083f17606f ACPI: thinkpad-acpi: add suspend handler
Add a handler for suspend events.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:07 -05:00
Henrique de Moraes Holschuh 35ff8b9fa9 ACPI: thinkpad-acpi: some checkpatch.pl fluff
Fix some of the crap reported by checkpatch.pl.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:07 -05:00
Henrique de Moraes Holschuh e0c7dfe701 ACPI: thinkpad-acpi: rename IBM in defines
Rename defines with IBM in their name that are related to the older
driver name (ibm-acpi) to TPACPI, unless they are specific to IBM
ThinkPads.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:07 -05:00
Henrique de Moraes Holschuh f68080f86d ACPI: thinkpad-acpi: module glue cleanups
General cleanup of module glue: Do some code reordering, and add
missing parameter help text.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:07 -05:00
Henrique de Moraes Holschuh 4b45cc076b ACPI: thinkpad-acpi: spring cleanup part 4
Remove dead code, and anything in the old changelog that is not a thank
you credit, or a key point to track down history.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:07 -05:00
Henrique de Moraes Holschuh b21a15f6d0 ACPI: thinkpad-acpi: spring cleanup part 3
Reorder code in the file to get rid of more of the forward declarations,
and to make things cleaner and more organized.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:07 -05:00
Henrique de Moraes Holschuh f74a27d4bd ACPI: thinkpad-acpi: spring cleanup part 2
Move most subdriver-related stuff imported from the header file closer to
their subdriver code.  Also, delete unneeded forward declarations.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:07 -05:00
Henrique de Moraes Holschuh 0c78039fcd ACPI: thinkpad-acpi: spring cleanup part 1
Remove the header file.  Private header files used by a single .c file are
in bad taste, and I know better now.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:06 -05:00
Henrique de Moraes Holschuh 50efd8310f ACPI: thinkpad-acpi: bump up version to 0.18
The NVRAM polling support for hot keys is reason enough to
bump up the version string.  Do it.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:06 -05:00
Henrique de Moraes Holschuh 01e88f2598 ACPI: thinkpad-acpi: add CMOS NVRAM polling for hot keys (v9)
Older ThinkPad models do not export some of the hot keys over the
event-based ACPI hot key interface.  For these models, one has to poll
the CMOS NVRAM to check the key state at a rate faster than the expected
rate at which the user might repeatedly press the same hot key.

This patch implements this functionality for many of the hotkeys in a
transparent way: hot keys will now Just Work, and the driver knows the
best approach (events or NVRAM polling) to employ, based on the
HKEY.MHKA ACPI method.

Also, the driver can turn off the polling when there are no users for
the hot keys that need such polling.

The NVRAM-based hot keys of the A3x series that have never been
implemented by later models are not supported, to avoid changes in the
keymap of the input devices that could cause headaches in the future.

There is a Kconfig option to avoid compiling the NVRAM polling code, as
it is not very small, and unlikely to be useful on any ThinkPad newer
than a T40, X31 or R52.

This feature is based on a previous effort by Richard Hughes.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Richard Hughes <hughsient@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:06 -05:00
Henrique de Moraes Holschuh b7c8c200bf ACPI: thinkpad-acpi: prepare for NVRAM polling support
Make some small internal thinkpad-acpi changes to the hotkey subdriver code
that will make it easier to add NVRAM polling support.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:06 -05:00
Henrique de Moraes Holschuh b2c985e7eb ACPI: thinkpad-acpi: refactor hotkey_get and hotkey_set (v2)
Refactor and organize the code a bit for the NVRAM polling support:

1. Split hotkey_get/set into hotkey_status_get/set and hotkey_mask_get/set;
2. Cache the status of hot key mask for later driver use;
3. Make sure the cache of hot key mask is refreshed when needed;
4. log a printk notice when the firmware doesn't set the hot key
   mask to exactly what we asked it to;
5. Add proper locking to the data structures.

Only (4) should be user-noticeable, but there is a chance (5) fixes
some unknown/unreported race conditions.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:06 -05:00
Henrique de Moraes Holschuh 0f089147e6 ACPI: thinkpad-acpi: document keymap gotcha's (v2)
Publish the requirements for keymap changes.  This is a documentation
change, only.

Currently, people look at the thinkpad-acpi default keymaps, and think:
"modifying this is a trivial thing, it can't break systems, and there are
keys defined for foo and bar, but the driver has them as KEY_RESERVED.
Must have been an oversight, let me change it."

And since they never get to see the bug reports, because they are not
really a part of the Linux ThinkPad users community (linux-thinkpad
mailinglist, thinkwiki wiki, thinkpad forums) and laptop users are slow
to complain to distros about any breakages...

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:26:06 -05:00
Greg Kroah-Hartman a045171f87 kobject: convert ibmasm to use kref, not kobject
The IBM asm driver is using a kobject only for reference counting,
nothing else.  So switch it to use a kref instead, which is all that is
needed, and is much smaller.

Cc: Max Asböck <amax@us.ibm.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:08 -08:00
Tony Jones 7dd817d083 tifm: Convert from class_device to device for TI flash media
Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:06 -08:00
Mattia Dongili fccd5d00ba sony-laptop: fix scancode decode
compare against the sony_laptop specific event list index
to decode the input scancode to send.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-24 00:47:29 -05:00
Mattia Dongili 3eb8749a37 sony-laptop: add Type4 model
Recent Vaio models (UX, SZ and presumably TZ and others) add more
events and a slightly different handling of Fn key events for
additional hotkeys (s1, s2, zoom-in/out, etc.).

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-24 00:47:27 -05:00
Mattia Dongili 425ef5d75d sony-laptop: bump version to 0.6
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-24 00:47:26 -05:00
Mattia Dongili de92043001 sony-laptop: refactor model types
Create mini drivers and allow callbacks for each model
to be specified.
Following patches will make use of this feature to handle
specific cases instead of just executing code and hope
not to break other models.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-24 00:47:19 -05:00
Mattia Dongili 88877c2a2e sony-laptop: Add Vaio N series to the special init sequence to enable Fn keys
Also the recent Vaio N series need some more calls into the DSDT
to enable reporting of FN key events to be delivered to the SNC device.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-24 00:47:18 -05:00
Mattia Dongili 75a1f9ce8f sony-laptop: printk more info in sony_pic_call[123]
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-24 00:47:16 -05:00
Henrique de Moraes Holschuh 56a185b43b ACPI: thinkpad-acpi: fix lenovo keymap for brightness
Starting in 2.6.23...

Several reports from X60 users complained that the default Lenovo keymap
issuing EV_KEY KEY_BRIGHTNESS_UP/DOWN input events caused major issues when
the proper brightness support through ACPI video.c was loaded.

Therefore, remove the generation of these events by default, which is the
right thing for T60, X60, R60, T61, X61 and R61 with their latest BIOSes.

Distros that want to misuse these events into OSD reporting (which requires
an ugly hack from hell in HAL) are welcome to set up the key map they need
through HAL.  That way, we don't break everyone else's systems.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-13 21:59:59 -05:00
Linus Torvalds febb187761 Merge branch 'for-linus' of 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: adds the context menu key (HUT GenDesc 0x84)
  Input: add definitions for frame forward and frame back keys
  Input: bf54x-keys - keypad does not exist on BF544 parts
  Input: gpio-keys - request and configure GPIOs
  Input: i8042 - add i8042.noloop quirk for MS Virtual Machine
  Sonypi: use synchronize_irq instead of sycnronize_sched
  sonypi: fit input devices into sysfs tree
  sony-laptop: fit input devices into sysfs tree
2007-11-27 14:20:35 -08:00
Dmitry Torokhov 2e4d242ce7 sony-laptop: fit input devices into sysfs tree
Properly set up parent on input devices registered by sony-laptop.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Mattia Dongili <malattia@linux.it>
2007-11-21 14:15:53 -05:00
Len Brown d12dbbfe94 Pull thinkpad-2.6.24 into release branch 2007-11-20 01:20:42 -05:00
Henrique de Moraes Holschuh 59f91ff11e ACPI: thinkpad-acpi: fix oops when a module parameter has no value
set_ibm_param() could OOPS with a NULL pointer derreference if one did not give
any values for a module parameter it handles.  This would, of course, cause all
sort of trouble for future modprobing and require a reboot to clean up
properly.

Fix it by returning -EINVAL if no values are given for the parameter, and also
avoid any nastyness from BUG_ON while at it.

How to reproduce: modprobe thinkpad-acpi brightness

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Tested-by: Mike Kershaw <dragorn@kismetwireless.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-19 16:10:04 -05:00
Julia Lawall 90d8dabf74 drivers/misc: Move misplaced pci_dev_put's
Move pci_dev_put outside the loops in which it occurs.  Within the loop,
pci_dev_put is done implicitly by pci_get_device.

The problem was detected using the following semantic patch, and corrected
by hand.

@@
expression dev;
expression E;
@@

- pci_dev_put(dev)
   ... when != dev = E
- pci_get_device(...,dev)

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:39 -08:00
Henrique de Moraes Holschuh 4273af8d08 ACPI: thinkpad-acpi: fix brightness_set error paths
The code calling brightness_set() can't handle EINTR/ERESTARTSYS well, nor
is it checking brightness_set() return status properly.

Fix it.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-05 13:07:11 -05:00
Henrique de Moraes Holschuh fc589a3ce5 ACPI: thinkpad-acpi: allow for syscall restart in sysfs handlers
Map an mutex_lock_interruptible() error return into ERESTARTSYS, as the
only possible error from mutex_lock_interruptible is EINTR, and that will
only happen if signal_pending() causes the mutex lock attempt to abort.

This still allows signals to be delivered ASAP, which is much nicer than
just doing mutex_lock, and still shadows userspace from EINTR when
SA_RESTART is active.

Problem reported by Peter Jordan.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Peter Jordan <usernetwork@gmx.info>
Cc: Richard Neill <rn214@hermes.cam.ac.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-05 13:07:11 -05:00
Henrique de Moraes Holschuh b856f5b8c0 ACPI: thinkpad-acpi: bump up version to 0.17
The lm-sensors 3.0.0/libsensors4 compatibility changes are reason enough to
bump up the version string.  Do it.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-05 13:07:11 -05:00
Henrique de Moraes Holschuh e11e211a0b ACPI: thinkpad-acpi: prefer standard ACPI backlight level control
Newer Lenovo BIOSes support the standard ACPI backlight brightness
interface (_BCM, _BQC, _BCL).  It should be used instead of the native
thinkpad backlight brightness control interface when possible.

This patch disables the native brightness support in the driver by default
when we detect that the standard ACPI interface is available.  The local
admin can still enable it using the module parameter "brightness_enable".

Note that we need to detect the standard ACPI backlight interface only in
boxes for which we would load the native backlight interface in the first
place, and that no ThinkPad BIOS has _BCL but misses the other methods, so
the detection routines can be really simple.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-05 13:07:11 -05:00
Henrique de Moraes Holschuh 87cc537a54 ACPI: thinkpad-acpi: add brightness_force parameter
Add a "brightness_enable" module parameter that allows the local admin to
force the backlight support to not be enabled.

It can also be used to force the backlight support to be enabled, but that
is currently a no-op as the backlight support is enabled by default when
available.  This will be changed by a different patch.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-05 13:07:11 -05:00