android_kernel_motorola_sm6225/drivers
Lennart Poettering d7a76e4cb3 ACPI: consolidate functions in acpi ec driver
Unify the following functions:

    acpi_ec_poll_read()
    acpi_ec_poll_write()
    acpi_ec_poll_query()
    acpi_ec_intr_read()
    acpi_ec_intr_write()
    acpi_ec_intr_query()

into:

    acpi_ec_poll_transaction()
    acpi_ec_intr_transaction()

These new functions take as arguments an ACPI EC command, a few bytes
to write to the EC data register and a buffer for a few bytes to read
from the EC data register. The old _read(), _write(), _query() are
just special cases of these functions.

Then unified the code in acpi_ec_poll_transaction() and
acpi_ec_intr_transaction() a little more. Both functions are now just
wrappers around the new acpi_ec_transaction_unlocked() function. The
latter contains the EC access logic, the two original
function now just do their special way of locking and call the the
new function for the actual work.

This saves a lot of very similar code. The primary reason for doing
this, however, is that my driver for MSI 270 laptops needs to issue
some non-standard EC commands in a safe way. Due to this I added a new
exported function similar to ec_write()/ec_write() which is called
ec_transaction() and is essentially just a wrapper around
acpi_ec_{poll,intr}_transaction().

Signed-off-by: Lennart Poettering <mzxreary@0pointer.de>
Acked-by: Luming Yu <luming.yu@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-10-14 00:49:52 -04:00
..
acorn IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
acpi ACPI: consolidate functions in acpi ec driver 2006-10-14 00:49:52 -04:00
amba
ata Merge branch 'master' into upstream-fixes 2006-10-11 04:59:46 -04:00
atm Various drivers' irq handlers: kill dead code, needless casts 2006-10-06 15:00:58 -04:00
base [PATCH] hot-add-mem x86_64: use CONFIG_MEMORY_HOTPLUG_SPARSE 2006-10-01 00:39:18 -07:00
block [PATCH] z2_init() in non-modular case 2006-10-11 11:17:07 -07:00
bluetooth IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
cdrom [PATCH] cdrom: add endianness annotations 2006-10-10 16:15:33 -07:00
char Include proper header file for PFN_DOWN() 2006-10-13 08:42:10 -07:00
clocksource [PATCH] scx200_hrt: fix precedence bug manifesting as 27x clock in 1 MHz mode 2006-10-04 07:55:14 -07:00
connector
cpufreq [PATCH] cpufreq: make the transition_notifier chain use SRCU 2006-10-04 07:55:30 -07:00
crypto
dio
dma [PATCH] drivers/dma trivial annotations 2006-10-10 15:37:21 -07:00
edac
eisa [PATCH] EISA: handle sysfs errors 2006-10-11 11:14:25 -07:00
fc4 IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
firmware [PATCH] firmware/efivars: handle error 2006-10-11 11:14:25 -07:00
hwmon Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
i2c [POWERPC] Fix i2c-powermac platform device usage 2006-10-10 13:56:13 +10:00
ide [PATCH] ide-cd: one more missing REQ_TYPE_CMD_ATA check 2006-10-12 17:24:52 +02:00
ieee1394 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2006-10-08 12:28:41 -07:00
infiniband IB/mthca: Fix off-by-one in mthca SRQ creation 2006-10-10 12:50:38 -07:00
input [PATCH] Use linux/io.h instead of asm/io.h 2006-10-11 11:14:23 -07:00
isdn [PATCH] ISDN: several minor fixes 2006-10-11 11:14:25 -07:00
leds Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
macintosh [POWERPC] Fix windfarm platform device usage 2006-10-10 13:56:13 +10:00
mca [PATCH] drivers/mca: handle sysfs errors 2006-10-11 11:14:25 -07:00
md [PATCH] md: use BUILD_BUG_ON 2006-10-11 11:14:26 -07:00
media [PATCH] em28xx NULL noise removal 2006-10-10 15:37:23 -07:00
message IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
mfd IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
misc [PATCH] tifm __iomem annotations, NULL noise removal 2006-10-09 14:19:08 -07:00
mmc [PATCH] passing pointer to setup_timer() should be via unsigned long 2006-10-10 15:37:22 -07:00
mtd [PATCH] mtd: remove several bogus casts to void * in iounmap() argument 2006-10-10 15:37:22 -07:00
net Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2006-10-11 11:19:30 -07:00
nubus
oprofile [PATCH] inode-diet: Eliminate i_blksize from the inode structure 2006-09-27 08:26:18 -07:00
parisc Build fixes for struct pt_regs removal 2006-10-06 20:47:23 -06:00
parport [PATCH] sparc32 pt_regs fixes 2006-10-08 12:32:35 -07:00
pci [PATCH] HT_IRQ must depend on PCI 2006-10-11 11:14:23 -07:00
pcmcia Merge branch 'irqclean-submit1' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6 2006-10-09 14:21:45 -07:00
pnp IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
rapidio Fix several typos in drivers/ 2006-10-03 22:31:37 +02:00
rtc sh: Updates for IRQ handler changes. 2006-10-06 15:31:16 +09:00
s390 [S390] cio: remove casts from/to (void *). 2006-10-11 15:31:47 +02:00
sbus [PATCH] more kernel_execve() fallout (sbus) 2006-10-12 12:36:55 -07:00
scsi [PATCH] Use linux/io.h instead of asm/io.h 2006-10-11 11:14:23 -07:00
serial Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6 2006-10-12 08:33:23 -07:00
sh
sn Various drivers' irq handlers: kill dead code, needless casts 2006-10-06 15:00:58 -04:00
spi Various drivers' irq handlers: kill dead code, needless casts 2006-10-06 15:00:58 -04:00
tc [MIPS] Fix DECserial build error by IRQ hander change 2006-10-08 02:38:28 +01:00
telephony
usb [PATCH] devio __user annotations 2006-10-10 15:37:21 -07:00
video [PATCH] revert "nvidiafb: use generic ddc reading" 2006-10-11 11:14:14 -07:00
w1 Fix several typos in drivers/ 2006-10-03 22:31:37 +02:00
zorro
Kconfig
Makefile