Corentin Chary [Sat, 26 Feb 2011 09:20:31 +0000 (10:20 +0100)]
eeepc-wmi: asus generic asus-wmi.ko module
New Asus notebooks are using a WMI device similar to
the one used in Eee PCs. Since we don't want to load
eeepc-wmi module on Asus notebooks, and we want to
keep the eeepc-wmi module for backward compatibility,
this patch introduce a new module, named asus-wmi, that
will be used by eeepc-wmi and the new Asus Notebook WMI
Driver.
eeepc-wmi's input device strings (device name and phys)
are kept, but rfkill and led names are changed (s/eeepc/asus/).
This should not break anything since rfkill are used by type or
index, not by name, and the eeepc::touchpad led wasn't working
correctly before 2.6.39 anyway.
Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Corentin Chary [Sat, 26 Feb 2011 09:20:30 +0000 (10:20 +0100)]
asus-wmi: move generic code to asus-wmi
New Asus notebooks are using a WMI device similar to
the one used in Eee PCs. Since we don't want to load
a module named eeepc-laptop on Asus Notebooks, start by
copying all the code to asus-wmi.c.
Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Durgadoss R [Sun, 20 Feb 2011 17:35:43 +0000 (23:05 +0530)]
medfield: Add Thermal Driver
This is the basic thermal sensor driver for Intel MID platform using the
Medfield chipset. It plugs in via the thermal drivers and provides sensor
readings for the device sensors.
Signed-off-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Anssi Hannula [Sun, 20 Feb 2011 18:07:24 +0000 (20:07 +0200)]
hp-wmi: clear rfkill device pointers when appropriate
NULLify rfkill pointers during initialization. This prevents dereference
of invalid pointer in case the driver is rebound and some rfkill device
isn't detected anymore. Clear them also in hp_wmi_rfkill_setup failure
path so that an rfkill initialization failure doesn't need to be fatal
for the whole driver.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Anssi Hannula [Sun, 20 Feb 2011 18:07:23 +0000 (20:07 +0200)]
hp-wmi: split rfkill initialization out of hp_wmi_bios_setup
Split initialization of rfkill devices from hp_wmi_bios_setup() to
hp_wmi_rfkill_setup(). This makes the code somewhat cleaner, especially
with the future command 0x1b rfkill support.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Anssi Hannula [Sun, 20 Feb 2011 18:07:22 +0000 (20:07 +0200)]
hp-wmi: allow setting input and output buffer sizes separately
Split buffersize parameter of hp_wmi_perform_query to insize and
outsize. Existing callers are changed to use the same value for insize
and outsize to avoid any regressions, with the exception of
hp_wmi_set_block where the output buffer is unused and therefore outsize
is set to 0 (this change is not seen by BIOS code).
The maximum input buffer size is kept at 4 bytes as per struct
bios_args. Some commands exist that take longer buffers, but they
haven't been implemented. The data portion of bios_args can be trivially
made dynamically allocated later when such larger buffers become needed.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Anssi Hannula [Sun, 20 Feb 2011 18:07:21 +0000 (20:07 +0200)]
hp-wmi: remove a variable that is never read
Remove the status variable from hp_wmi_perform_query which holds the
return value from wmi_evaluate_method(). It is never checked as the
function bails out if the output buffer hasn't been allocated which
indicates the call failed.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Anssi Hannula [Sun, 20 Feb 2011 18:07:20 +0000 (20:07 +0200)]
hp-wmi: check query return value in hp_wmi_perform_query
Check BIOS provided return value code in hp_wmi_perform_query and print
a warning on error. Printing is suppressed for HPWMI_RET_UNKNOWN_CMDTYPE
which is returned when the command type is unsupported.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Mattia Dongili [Sat, 19 Feb 2011 02:52:32 +0000 (11:52 +0900)]
sony-laptop: implement new backlight control method
Reasonably recent Vaios have a 0x12f or 0x137 handler that exposes a
fine lid backlight regulation with values ranging from 0 to 255.
The patch is based on findings and code from Javier Achirica
<achirica@gmail.com> and Marco Chiappero <marco@absence.it>
Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Mattia Dongili [Sat, 19 Feb 2011 02:52:31 +0000 (11:52 +0900)]
sony-laptop: implement keyboard backlight support
Recent Vaios have the opportunity to control the keyboard backlight via
ACPI calls to the SNC device.
Introduce two module parameters to control how keyboard backlight should
be set at module loading (default to on and with 10 seconds timeout).
Tested-by: Marco Chiappero <marco@absence.it> Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Mattia Dongili [Sat, 19 Feb 2011 02:52:30 +0000 (11:52 +0900)]
sony-laptop: cache handles and report them via sysfs
Avoid calling into acpi each time we need to lookup a method handle
and report the available handles to ease collection of information when
debugging issues. Also move initialization of the platform driver
earlier to allow adding files from other setup functions.
Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Mattia Dongili [Sat, 19 Feb 2011 02:52:27 +0000 (11:52 +0900)]
sony-laptop: ignore hard switch rfkill events (SPIC)
There is not much use for these events in userspace and handling the
events themselves seems to get in the way of the actual activation of
the rf devices. The SNC device doesn't expose them already.
https://bugzilla.kernel.org/show_bug.cgi?id=15303
Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Randy Dunlap [Wed, 16 Feb 2011 22:31:02 +0000 (14:31 -0800)]
platform/x86: intel_mid_powerbutton needs INPUT
intel_mid_powerbtn.c uses input interfaces, so it should depend
on INPUT to fix build errors when CONFIG_INPUT is not enabled:
intel_mid_powerbtn.c:(.text+0x56ca8f): undefined reference to `input_event'
intel_mid_powerbtn.c:(.devinit.text+0x2e7b4): undefined reference to `input_allocate_device'
intel_mid_powerbtn.c:(.devinit.text+0x2e7ff): undefined reference to `input_set_capability'
intel_mid_powerbtn.c:(.devinit.text+0x2e84a): undefined reference to `input_register_device'
intel_mid_powerbtn.c:(.devinit.text+0x2e88b): undefined reference to `input_free_device'
intel_mid_powerbtn.c:(.devexit.text+0x42f0): undefined reference to `input_unregister_device'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Hong Liu <hong.liu@intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Also works around a firmware bug where the _WED method
should return an integer containing the key code and in fact
the method returns the key code in element zero of a buffer.
Hong Liu [Mon, 7 Feb 2011 19:45:55 +0000 (14:45 -0500)]
intel_mid_powerbtn: add power button driver for Medfield platform (#3)
The power button is connected to MSIC on Medfield, we will get two
interrupts from IOAPIC when pressing or releasing the power button.
Signed-off-by: Hong Liu <hong.liu@intel.com>
[Minor fixes as noted by Dmitry] Signed-off-by: Alan Cox <alan@linux.intel.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Corentin Chary [Sun, 6 Feb 2011 12:30:47 +0000 (13:30 +0100)]
eeepc-wmi: add camera keys
These keys are supposed to be handled by any software
using the camera (like webKam or cheese...). They can
also be used to actually move the camera when possible.
Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Corentin Chary [Sun, 6 Feb 2011 12:27:31 +0000 (13:27 +0100)]
asus-laptop: remove deprecated interfaces (lcd_switch and display_get)
I should have done that one year ago, so it's more than
time to do it.
These two features use non-standard interfaces. There are the
only features that really need multiple path to guess what's
the right method name on a specific laptop.
Removing them allow to remove a lot of code an significantly
clean the driver.
This will affect the backlight code which won't be able to know
if the backlight is on or off.
The platform display file will also be write only (like the one
in eeepc-laptop).
Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Corentin Chary [Sun, 6 Feb 2011 12:27:30 +0000 (13:27 +0100)]
asus-laptop: let WLED alone on L1400B
Asus took the DSDT from another model (L84F), made some change
to make it work, but forgot to remove WLED method (the laptop
doesn't have a wireless card). They even didn't change the model
name.
Corentin Chary [Sun, 6 Feb 2011 12:28:35 +0000 (13:28 +0100)]
eeepc-wmi: use the presence bit correctly
I checked some more DSDT, and it seems that I wasn't
totally right about the meaning of DSTS return value.
Bit 0 is clearly the status of the device, and I discovered
that bit 16 is set when the device is present.
Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Corentin Chary [Sun, 6 Feb 2011 12:28:31 +0000 (13:28 +0100)]
eeepc-wmi: add an helper using simple return codes
eeepc_wmi_get_devstate returns an acpi_status, so each
call need extra logic to handle the return code. This
patch add a simple getter, returning a boolean (or a
negative error code).
Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Corentin Chary [Sun, 6 Feb 2011 12:28:29 +0000 (13:28 +0100)]
eeepc-wmi: serialize access to wmi method
\AMW0.WMBC, which is the main method that we use,
is not reentrant. When wireless hotpluging is enabled,
toggling the status of the wireless device using WMBC will
trigger a notification and the notification handler need to
call WMBC again to get the new status of the device, this
will trigger the following error:
ACPI Error (dswload-0802): [_T_0] Namespace lookup failure, AE_ALREADY_EXISTS
ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog (20100428/psloop-231)
ACPI Error (psparse-0537): Method parse/execution failed [\AMW0.WMBC] (Node f7023b88), AE_ALREADY_EXISTS
ACPI: Marking method WMBC as Serialized because of AE_ALREADY_EXISTS error
Since there is currently no way to tell the acpi subsystem to mark
a method as serialized, we do it in eeepc-wmi.
Of course, we could let the first call fail, and then it would work,
but it doesn't seems really clean, and it will make the first
WMBC call return a random value.
This patch was tested on EeePc 1000H with a RaLink RT2860
wireless card using the rt2800pci driver. rt2860sta driver
seems to deadlock when we remove the pci device...
Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Corentin Chary [Sun, 6 Feb 2011 12:28:28 +0000 (13:28 +0100)]
eeepc-wmi: add hotplug code for Eeepc 1000H
Implement wireless like hotplug handling (code stolen from eeepc-laptop).
Reminder: on some models rfkill is implemented by logically unplugging the
wireless card from the PCI bus. Despite sending ACPI notifications, this does
not appear to be implemented using standard ACPI hotplug - nor does the
firmware provide the _OSC method required to support native PCIe hotplug.
The only sensible choice appears to be to handle the hotplugging directly in
the platform driver.
Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Linus Torvalds [Mon, 28 Mar 2011 03:37:50 +0000 (20:37 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
regulator: Add MODULE_DEVICE_TABLE to max8997 and max8998
regulator: fix tps6524x section mismatch
regulator: Remove more wm831x-specific IRQ operations
regulator: add ab8500 enable and raise time delays
regulator: provide consumer interface for fall/rise time
regulator: add set_voltage_time_sel infrastructure
regulator: initialization for ab8500 regulators
regulator: add support for USB voltage regulator
regulator: switch the ab3100 to use enable_time()
Regulator: add suspend-finish API for regulator core.
regulator: fix typo in Kconfig
regulator: Convert WM831x regulators to genirq
regulator: If we fail when setting up a supply say which supply
Linus Torvalds [Mon, 28 Mar 2011 03:35:07 +0000 (20:35 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: Fix yet another race in disconnection
ALSA: asihpi - Update verbose debug print macros
ALSA: asihpi - Improve non-busmaster adapter operation
ALSA: asihpi - Support single-rate no-SRC cards
ALSA: HDA: New AD1984A model for Dell Precision R5500
ALSA: vmalloc buffers should use normal mmap
ALSA: hda - Fix SPDIF out regression on ALC889
ALSA: usb-audio - Support for Boss JS-8 Jam Station
ALSA: usb-audio: add Cakewalk UM-1G support
sound/oss/opl3: validate voice and channel indexes
sound/oss: remove offset from load_patch callbacks
Linus Torvalds [Mon, 28 Mar 2011 03:02:45 +0000 (20:02 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
staging: Fix bdops->check_events() misconversion in cyasblkdev_block.c
ide: ensure that we re-run the queue handler
Linus Torvalds [Mon, 28 Mar 2011 03:02:07 +0000 (20:02 -0700)]
Merge branch 'for-2.6.39/drivers' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.39/drivers' of git://git.kernel.dk/linux-2.6-block: (122 commits)
cciss: fix lost command issue
drbd: need include for bitops functions declarations
Revert "cciss: Add missing allocation in scsi_cmd_stack_setup and corresponding deallocation"
cciss: fix missed command status value CMD_UNABORTABLE
cciss: remove unnecessary casts
cciss: Mask off error bits of c->busaddr in cmd_special_free when calling pci_free_consistent
cciss: Inform controller we are using 32-bit tags.
cciss: hoist tag masking out of loop
cciss: Add missing allocation in scsi_cmd_stack_setup and corresponding deallocation
cciss: export resettable host attribute
drbd: drop code present under #ifdef which is relevant to 2.6.28 and below
drbd: Fixed handling of read errors on a 'VerifyS' node
drbd: Fixed handling of read errors on a 'VerifyT' node
drbd: Implemented real timeout checking for request processing time
drbd: Remove unused function atodb_endio()
drbd: improve log message if received sector offset exceeds local capacity
drbd: kill dead code
drbd: don't BUG_ON, if bio_add_page of a single page to an empty bio fails
drbd: Removed left over, now wrong comments
drbd: serialize admin requests for new verify run with pending bitmap io
...
Linus Torvalds [Mon, 28 Mar 2011 02:42:12 +0000 (19:42 -0700)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
hwmon: (f71882fg) Add support for the F71889A
hwmon: (f71882fg) Add support for the F81865F
hwmon: (f71882fg) Document all supported devices
hwmon: (f71882fg) Per-chip fan/temperature input count tables
hwmon: (f71882fg) Secure chip property definition arrays
Stephen Rothwell [Sat, 26 Mar 2011 06:22:04 +0000 (17:22 +1100)]
apm: orphan the driver
I no longer have access to any hardware that uses APM and have not
provided real maintenance for several years. Hopefully someone with the
hardware or energy will step forward if the driver is to be kept.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Sat, 26 Mar 2011 20:27:41 +0000 (13:27 -0700)]
ipc: fix util.c kernel-doc warnings
Fix ipc/util.c kernel-doc warnings:
Warning(ipc/util.c:336): No description found for parameter 'ns'
Warning(ipc/util.c:620): No description found for parameter 'ns'
Warning(ipc/util.c:790): No description found for parameter 'ns'
Linus Torvalds [Mon, 28 Mar 2011 02:09:29 +0000 (19:09 -0700)]
proc: fix oops on invalid /proc/<pid>/maps access
When m_start returns an error, the seq_file logic will still call m_stop
with that error entry, so we'd better make sure that we check it before
using it as a vma.
Introduced by commit ec6fd8a4355c ("report errors in /proc/*/*map*
sanely"), which replaced NULL with various ERR_PTR() cases.
(On ia64, you happen to get a unaligned fault instead of a page fault,
since the address used is generally some random error code like -EPERM)
Axel Lin [Sat, 26 Mar 2011 15:28:42 +0000 (23:28 +0800)]
regulator: Add MODULE_DEVICE_TABLE to max8997 and max8998
The device table is required to load modules based on modaliases.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: MyungJoo Ham <myungjoo.ham@smasung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Thomas Gleixner [Fri, 25 Mar 2011 11:12:32 +0000 (11:12 +0000)]
mfd: Cleanup irq namespace
Converted with coccinelle.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Thomas Gleixner [Fri, 25 Mar 2011 11:12:31 +0000 (11:12 +0000)]
mfd: twl4030: Cleanup interrupt handling
irq_desc checking in a function which is called with that irq
descriptor locked, is pointless. Equally pointless as the irq desc
check in the interrupt service routine. The driver sets those lines
up, so that cant go away magically.
Remove the open coded handler magic and use the proper accessor.
No need to fiddle with irq_desc in the type setting function. The
original value is in irq_data and the core code stores the new setting
when the return value is 0.
This driver needs to be converted to threaded interrupts and buslock.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Thomas Gleixner [Fri, 25 Mar 2011 11:12:29 +0000 (11:12 +0000)]
mfd: htc-i2cpld: Cleanup interrupt handling
Remove the pointless irq_desc check in set_type. This function is
called with that irq descriptor locked. Also remove the write back of
the flow type as the core code does this already when the return value
is 0.
Also store the flow type in the chip data structure, so there is no
need to fiddle in the irq descriptor.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Thomas Gleixner [Fri, 25 Mar 2011 11:12:28 +0000 (11:12 +0000)]
mfd: htc-egpio: Cleanup interrupt handling
Replace the open coded handler call with the prober accessor. Retrieve
the handler data from desc. That avoids a redundant lookup in the
sparse irq case.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Guenter Roeck [Thu, 24 Mar 2011 19:12:47 +0000 (12:12 -0700)]
mfd: Select MFD_CORE if TPS6105X driver is configured
The TPS61050/61052 driver uses MFD core code, yet does not specify the
dependency in Kconfig. If it is the only MFD driver configured, compilation
fails with
Axel Lin [Thu, 24 Mar 2011 07:04:53 +0000 (15:04 +0800)]
mfd: Add MODULE_DEVICE_TABLE to rdc321x-southbridge
The device table is required to load modules based on modaliases.
After adding MODULE_DEVICE_TABLE, below entry will be added to modules.pcimap:
rdc321x-southbridge 0x000017f3 0x00006030 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
MyungJoo Ham [Thu, 24 Mar 2011 06:54:45 +0000 (15:54 +0900)]
mfd: Add MAX8997/8966 IRQ control
This patch enables IRQ handling for MAX8997/8966 chips.
Please note that Fuel-Gauge-related IRQs are not implemented in this
initial release. The fuel gauge module in MAX8997 is identical to
MAX17042, which is already in Linux kernel. In order to use the
already-existing MAX17042 driver for fuel gauge module in MAX8997, the
main interrupt handler of MAX8997 should relay related interrupts to
MAX17042 driver. However, in order to do this, we need to modify
MAX17042 driver as well because MAX17042 driver does not have any
interrupt handlers for now. We are not going to implement this in this
initial release as it is not crucial in basic operations of MAX8997.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Axel Lin [Wed, 23 Mar 2011 12:54:17 +0000 (20:54 +0800)]
mfd: Constify i2c_device_id tables
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Harald Welte <laforge@gnumonks.org> Cc: Matti Aaltonen <matti.j.aaltonen@nokia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Daniel Drake [Tue, 22 Mar 2011 20:50:39 +0000 (13:50 -0700)]
mfd: OLPC: Clean up names to match what OLPC actually uses
The cs5535-pms cell doesn't actually need to be cloned, so we can drop that
and simply have the olpc-xo1.c driver use "cs5535-pms" directly.
Also, rename the cs5535-acpi clones to what we actually use for the (currently
out-of-tree) SCI driver. In the process, that fixes a subtle bug in
olpc-xo1.c which broke powerdown on XO-1s.. olpc-xo1-ac-acpi was a typo, not
something that actually existed.
Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Andres Salomon [Tue, 22 Mar 2011 02:19:35 +0000 (19:19 -0700)]
mfd: Add mfd_clone_cell(), convert cs5535-mfd/olpc-xo1 to it
Replace mfd_shared_platform_driver_register with mfd_clone_cell. The
former was called by an mfd client, and registered both a platform driver
and device. The latter is called by an mfd driver, and registers only a
platform device.
The downside of this is that mfd drivers need to be modified whenever
new clients are added that share a cell; the upside is that it fits
Linux's driver model better. It's also simpler.
This also converts cs5535-mfd/olpc-xo1 from the old API. cs5535-mfd
now creates the olpc-xo1-{acpi,pms} devices, while olpc-xo1 binds to
them via platform drivers.
Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Jens Axboe [Sat, 26 Mar 2011 18:49:54 +0000 (19:49 +0100)]
ide: ensure that we re-run the queue handler
The conversion to blk_delay_queue() missed parts of IDE.
Add a blk_delay_queue() to ensure that the request handler
gets reinvoked when it needs to.
Note that in all but one place the old plug re-run delay of
3 msecs is used, even though it probably could be shorter
for performance reasons in some of those cases.
Guenter Roeck [Tue, 22 Mar 2011 04:31:00 +0000 (21:31 -0700)]
hwmon: (pmbus) Fix temperature limit register access
Commit 8677011 added auto-update to temperature limit registers.
Unfortunately, the update flag is also used to determine if an attribute
is writable, which results in read-only temperature limit registers.
To fix the problem, pass 'readonly' as separate flag to the function used
to add sensor attributes.
Randy Dunlap [Thu, 24 Mar 2011 20:30:59 +0000 (13:30 -0700)]
regulator: fix tps6524x section mismatch
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Fix section mismatch that is caused by init code calling exit code:
pmic_remove() cannot be marked as __devexit.
WARNING: drivers/regulator/tps6524x-regulator.o(.devinit.text+0x205): Section mismatch in reference from the function pmic_probe() to the function .devexit.text:pmic_remove()
The function __devinit pmic_probe() references
a function __devexit pmic_remove().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
pmic_remove() so it may be used outside an exit section.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Cyril Chemparathy <cyril@ti.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
This makes it possible to set the stabilization time for voltage
regulators in the same manner as enable_time(). The interface
only supports regulators that implements fixed selectors.
Cc: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Bengt Jonsson [Fri, 11 Mar 2011 10:54:46 +0000 (11:54 +0100)]
regulator: initialization for ab8500 regulators
The regulators on the AB8500 have a lot of custom
hardware control settings pertaining to 8 external
signals, settings which are board-specific and need
be provided from the platform at startup.
Linus Walleij [Fri, 11 Mar 2011 15:26:18 +0000 (16:26 +0100)]
regulator: switch the ab3100 to use enable_time()
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This switches the ab3100 core to use the enable_time()
infrastructure from the regulator core.
MyungJoo Ham [Fri, 11 Mar 2011 01:13:59 +0000 (10:13 +0900)]
Regulator: add suspend-finish API for regulator core.
The regulator core had suspend-prepare that turns off the regulators
when entering a system-wide suspend. However, it did not have
suspend-finish that pairs with suspend-prepare and the regulator core
has assumed that the regulator devices and their drivers support
autonomous recover at resume.
This patch adds regulator_suspend_finish that pairs with the
previously-existed regulator_suspend_prepare. The function
regulator_suspend_finish turns on the regulators that have always_on set
or positive use_count so that we can reset the regulator states
appropriately at resume.
In regulator_suspend_finish, if has_full_constraints, it disables
unnecessary regulators.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
--
Updates
v3
comments corrected (Thanks to Igor)
v2
disable unnecessary regulators (Thanks to Mark) Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Igor Grinberg [Tue, 1 Mar 2011 09:54:44 +0000 (11:54 +0200)]
regulator: fix typo in Kconfig
Fix typo: s/TPS695x0/TPS659x0/
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Add support for the Fintek F81865F. It's essentially compatible with
the F71882FG, but has fewer inputs: 7 voltage, 2 temperature and 2 fan
inputs only.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Sat, 26 Mar 2011 09:45:02 +0000 (10:45 +0100)]
hwmon: (f71882fg) Document all supported devices
The list of supported devices was not always well documented in all
places. Clarify and list all devices in documentation, Kconfig and
the driver itself.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>