Commit Graph

26 Commits

Author SHA1 Message Date
Jiri Slaby 7b19ada2ed get rid of input BIT* duplicate defines
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>
2007-10-19 11:53:42 -07:00
Dmitry Torokhov aefca8ba5f HWMON: hdaps - switch to using input-polldev
Switch to using input-polldev skeleton instead of implementing polling loop
by itself.  This also fixes problem with trylock on a mutex in atomic
context.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-10-12 21:30:36 -04:00
Jeff Garzik 1855256c49 drivers/firmware: const-ify DMI API and internals
Three main sets of changes:

1) dmi_get_system_info() return value should have been marked const,
   since callers should not be changing that data.

2) const-ify DMI internals, since DMI firmware tables should,
   whenever possible, be marked const to ensure we never ever write to
   that data area.

3) const-ify DMI API, to enable marking tables const where possible
   in low-level drivers.

And if we're really lucky, this might enable some additional
optimizations on the part of the compiler.

The bulk of the changes are #2 and #3, which are interrelated.  #1 could
have been a separate patch, but it was so small compared to the others,
it was easier to roll it into this changeset.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-09 20:22:20 -04:00
Dmitry Torokhov c5ddb547e8 drivers/hwmon: switch to using input_dev->dev.parent
In preparation for struct class_device -> struct device input core
conversion, switch to using input_dev->dev.parent when specifying device
position in sysfs tree.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-10 09:26:53 -07:00
Matthias Kaehlcke 6acc369a43 use mutex instead of semaphore in hdaps driver
The hdaps driver uses a semaphore as mutex.  Use the mutex API instead of the
(binary) semaphore.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Cc: Robert Love <rlove@rlove.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:15 -07:00
Stephan Berberig 0f23e50aa5 hwmon/hdaps: Update the list of supported devices
Remove the strange DMI for the R52 (1846AQG)
and add a note to update to latest BIOS in the Kconfig
and source code.

Signed-off-by: Stephan Berberig <s.berberig@arcor.de>
Signed-off-by: Robert Love <rlove@rlove.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:28 +01:00
Jean Delvare 509a5e85c3 hwmon/hdaps: Move the DMI detection data to .data
Move the DMI detection data from .text to .data. We really don't want
that amount of data on the stack.

Also refactor the macros used to generate the detection data, the
vendor becomes a parameter.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Robert Love <rlove@rlove.org>
2006-12-12 18:18:28 +01:00
Al Viro 914e26379d [PATCH] severing fs.h, radix-tree.h -> sched.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-12-04 02:00:24 -05:00
Soos Peter 710b8b5f43 [PATCH] hdaps: support Lenovo ThinkPad T60
Support hdaps on Lenovo ThinkPad T60.  It was tested with pivot utility
from http://www.kernel.org/pub/linux/kernel/people/rml/hdaps and it seems
to be OK.

Cc: Jean Delvare <khali@linux-fr.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Robert Love <rml@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:24 -07:00
Dmitry Torokhov b25a10631a hdaps: Handle errors from input_register_device
HDAPS: handle errors from input_register_device()

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:12 -07:00
Jean Delvare 0a704681f3 [PATCH] hwmon: Fix a typo in the hdaps driver
Fix a typo in the hdaps driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Robert Love <rml@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-22 11:10:34 -07:00
Jean Delvare 4f507ea156 [PATCH] HWMON: hdaps: Update the list of supported systems
Update the list of systems supported by the hdaps driver:
* Add the "ThinkPad Z60m" entry, reported by Arkadiusz Miskiewicz.
* Add the "ThinkPad H" entry, reported by Frank Gevaerts for some
  ThinkPad R52 models (1846AQG).
* Drop the "ThinkPad X41 Tablet" entry, which looks redundant to me.
And a comment update for good measure.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Arkadiusz Miskiewicz <arekm@maven.pl>
Cc: Frank Gevaerts <frank@gevaerts.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-22 11:10:33 -07:00
Andrew Morton b3f28a9a26 [PATCH] hdaps: use ENODEV
Use ENODEV when the hdaps hardware isn't there, not ENXIO.

Cc: Jean Delvare <khali@linux-fr.org>
Cc: Robert Love <rml@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:45 -07:00
Robert Love 0f6c840d77 [PATCH] hdaps: support new Lenovo machines
Add support for forthcoming Lenovo-branded machines to the HDAPS driver.

Signed-off-by: Robert Love <rml@novell.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:42 -07:00
Frank Gevaerts 653edba1a8 [PATCH] hdaps: add support for Thinkpad R52
This adds support for my Thinkpad R52, which for some reason is not matched
by the "ThinkPad R52" line.

Signed-off-by: Frank Gevaerts <frank@gevaerts.be>
Cc: Robert Love <rml@novell.com>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:39 -07:00
Arjan van de Ven 597a7679dd [PATCH] revert incorrect mutex conversion in hdaps driver
This reverts the mutex conversion that was recently done to the hdaps
driver; this coversion was buggy because the hdaps driver started using
this semaphore in IRQ context, which mutexes do not allow.  Easiest
solution for now is to just revert the patch (the patch was part of a
bigger GIT commit, 9a61bf6300 but this
only reverts this one file)

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-02 13:02:05 -07:00
Ingo Molnar 9a61bf6300 [PATCH] hwmon: Semaphore to mutex conversions
convert drivers/hwmon/*.c semaphore use to mutexes.

the conversion was generated via scripts, and the result was validated
automatically via a script as well.

all affected hwmon drivers were build-tested.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:21:52 -08:00
Eugeniy Meshcheryakov 657a19ebb7 [PATCH] hwmon: hdaps missing an axis
Trivial patch to report both hdaps axises to the joystick device, not
just the X axis.

Signed-off-by: Robert Love <rml@novell.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23 23:04:27 -08:00
Linus Torvalds 5643f000c1 Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-11-11 09:24:26 -08:00
Dmitry Torokhov d12eb7e11c [PATCH] Input: convert hdaps to dynamic input_dev allocation.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-11 08:25:07 -08:00
Russell King 3ae5eaec1d [DRIVER MODEL] Convert platform drivers to use struct platform_driver
This allows us to eliminate the casts in the drivers, and eventually
remove the use of the device_driver function pointer methods for
platform device drivers.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-09 22:32:44 +00:00
Russell King d052d1beff Create platform_device.h to contain all the platform device details.
Convert everyone who uses platform_bus_type to include
linux/platform_device.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-29 19:07:23 +01:00
Russell King 9480e307cd [PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks
In PM v1, all devices were called at SUSPEND_DISABLE level.  Then
all devices were called at SUSPEND_SAVE_STATE level, and finally
SUSPEND_POWER_DOWN level.  However, with PM v2, to maintain
compatibility for platform devices, I arranged for the PM v2
suspend/resume callbacks to call the old PM v1 suspend/resume
callbacks three times with each level in order so that existing
drivers continued to work.

Since this is obsolete infrastructure which is no longer necessary,
we can remove it.  Here's an (untested) patch to do exactly that.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 09:52:56 -07:00
Robert Love 4c87b74c72 [PATCH] hdaps: small update.
- Handle dmi_system_check() elegantly, now that my bugfix is upstream.

- Add support for the X41 and R52.

- Cleanup some comments do I do not have to keep updating them with each
  new whitelisted laptop.

Signed-off-by: Robert Love <rml@novell.com>

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-22 22:17:34 -07:00
Robert Love 393ad29965 [PATCH] hdaps driver update
- Remove the relative input device
- Add an absolute input device
- Misc. cleanup and bug fixing

The patch is sizable due to the cleanup from removing the relative input
device (net -112 lines).

Signed-off-by: Robert Love <rml@novell.com>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-17 11:50:02 -07:00
Robert Love 860e1d6b46 [PATCH] updated hdaps driver.
Driver for the IBM Hard Drive Active Protection System (HDAPS), an
accelerometer found in most modern ThinkPads.

Signed-off-by: Robert Love <rml@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-09 14:23:07 -07:00