pandora-kernel.git
13 years agoMerge branch 'for-2.6.38' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Fri, 14 Jan 2011 21:17:26 +0000 (13:17 -0800)]
Merge branch 'for-2.6.38' of git://linux-nfs.org/~bfields/linux

* 'for-2.6.38' of git://linux-nfs.org/~bfields/linux: (62 commits)
  nfsd4: fix callback restarting
  nfsd: break lease on unlink, link, and rename
  nfsd4: break lease on nfsd setattr
  nfsd: don't support msnfs export option
  nfsd4: initialize cb_per_client
  nfsd4: allow restarting callbacks
  nfsd4: simplify nfsd4_cb_prepare
  nfsd4: give out delegations more quickly in 4.1 case
  nfsd4: add helper function to run callbacks
  nfsd4: make sure sequence flags are set after destroy_session
  nfsd4: re-probe callback on connection loss
  nfsd4: set sequence flag when backchannel is down
  nfsd4: keep finer-grained callback status
  rpc: allow xprt_class->setup to return a preexisting xprt
  rpc: keep backchannel xprt as long as server connection
  rpc: move sk_bc_xprt to svc_xprt
  nfsd4: allow backchannel recovery
  nfsd4: support BIND_CONN_TO_SESSION
  nfsd4: modify session list under cl_lock
  Documentation: fl_mylease no longer exists
  ...

Fix up conflicts in fs/nfsd/vfs.c with the vfs-scale work.  The
vfs-scale work touched some msnfs cases, and this merge removes support
for that entirely, so the conflict was trivial to resolve.

13 years agoMerge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 14 Jan 2011 21:13:07 +0000 (13:13 -0800)]
Merge branch 'omap-fixes-for-linus' of git://git./linux/kernel/git/tmlind/linux-omap-2.6

* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (27 commits)
  omap4: Fix ULPI PHY init for ES1.0 SDP
  omap3: beaglexm: fix power on of DVI
  omap3: igep3: Add omap_reserve functionality
  omap3: beaglexm: fix DVI reset GPIO
  omap3: beaglexm: fix EHCI power up GPIO dir
  omap3: igep2: Add keypad support
  omap3: igep3: Fix IGEP module second MMC channel power supply
  omap3: igep3: Add USB EHCI support for IGEP module
  omap3: clocks: Fix build error 'CK_3430ES2' undeclared here
  arm: omap4: pandaboard: turn on PHY reference clock at init
  omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'
  omap2plus: voltage: Trivial linking fix for 'EINVAL' undeclared
  omap2plus: voltage: Trivial linking fix 'undefined reference'
  omap2plus: voltage: Trivial warning fix 'no return statement'
  omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask
  arm: omap: gpio: don't access irq_desc array directly
  omap2+: pm_bus: make functions used as pointers as static
  OMAP: GPIO: fix _set_gpio_triggering() for OMAP2+
  OMAP2+: TWL: include pm header for init protos
  OMAP2+: TWL: make conversion routines static
  ...

Fix up conflicts in arch/arm/mach-omap2/board-omap3beagle.c ("DVI reset
GPIO" vs "use generic DPI panel driver")

13 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Fri, 14 Jan 2011 21:06:44 +0000 (13:06 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] fix ia64 build failure in pmdp_get_and_clear

13 years agonfsd4: fix callback restarting
J. Bruce Fields [Fri, 14 Jan 2011 19:25:48 +0000 (14:25 -0500)]
nfsd4: fix callback restarting

Ensure a new callback is added to the client's list of callbacks at most
once.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
13 years ago[IA64] fix ia64 build failure in pmdp_get_and_clear
Andrea Arcangeli [Fri, 14 Jan 2011 18:56:38 +0000 (10:56 -0800)]
[IA64] fix ia64 build failure in pmdp_get_and_clear

Implement __pmd macro for ia64 too.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
13 years agoMerge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ickle...
Linus Torvalds [Fri, 14 Jan 2011 18:30:09 +0000 (10:30 -0800)]
Merge branch 'drm-intel-fixes' of git://git./linux/kernel/git/ickle/drm-intel

* 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel:
  drm/i915/lvds: Add AOpen i915GMm-HFS to the list of false-positive LVDS
  agp/intel: Fix device names of i845 and 845G
  drm/i915: Disable GPU semaphores on SandyBridge mobile
  drm/i915/execbuffer: Clear domains before beginning reloc processing
  drm/i915/execbuffer: Reorder relocations to match new object order
  drm/i915: Fix error handler to capture the first batch after the seqno
  drm/i915: Add a module option to override the use of SSC
  drm/i915/panel: The backlight is enabled if the current value is non-zero
  drm/i915/debugfs: Correct format after changing type of err object 'size'

13 years agoMerge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Fri, 14 Jan 2011 17:29:05 +0000 (09:29 -0800)]
Merge branch 'linux-next' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI/PM: Report wakeup events before resuming devices
  PCI/PM: Use pm_wakeup_event() directly for reporting wakeup events
  PCI: sysfs: Update ROM to include default owner write access
  x86/PCI: make Broadcom CNB20LE driver EMBEDDED and EXPERIMENTAL
  x86/PCI: don't use native Broadcom CNB20LE driver when ACPI is available
  PCI/ACPI: Request _OSC control once for each root bridge (v3)
  PCI: enable pci=bfsort by default on future Dell systems
  PCI/PCIe: Clear Root PME Status bits early during system resume
  PCI: pci-stub: ignore zero-length id parameters
  x86/PCI: irq and pci_ids patch for Intel Patsburg
  PCI: Skip id checking if no id is passed
  PCI: fix __pci_device_probe kernel-doc warning
  PCI: make pci_restore_state return void
  PCI: Disable ASPM if BIOS asks us to
  PCI: Add mask bit definition for MSI-X table
  PCI: MSI: Move MSI-X entry definition to pci_regs.h

Fix up trivial conflicts in drivers/net/{skge.c,sky2.c} that had in the
meantime been converted to not use legacy PCI power management, and thus
no longer use pci_restore_state() at all (and that caused trivial
conflicts with the "make pci_restore_state return void" patch)

13 years agoMerge git://git.infradead.org/battery-2.6
Linus Torvalds [Fri, 14 Jan 2011 17:25:59 +0000 (09:25 -0800)]
Merge git://git.infradead.org/battery-2.6

* git://git.infradead.org/battery-2.6: (21 commits)
  power_supply: Add MAX17042 Fuel Gauge Driver
  olpc_battery: Fix up XO-1.5 properties list
  olpc_battery: Add support for CURRENT_NOW and VOLTAGE_NOW
  olpc_battery: Add support for CHARGE_NOW
  olpc_battery: Add support for CHARGE_FULL_DESIGN
  olpc_battery: Ambient temperature is not available on XO-1.5
  jz4740-battery: Should include linux/io.h
  s3c_adc_battery: Add gpio_inverted field to pdata
  power_supply: Don't use flush_scheduled_work()
  power_supply: Fix use after free and memory leak
  gpio-charger: Fix potential race between irq handler and probe/remove
  gpio-charger: Provide default name for the power_supply
  gpio-charger: Check result of kzalloc
  jz4740-battery: Check if platform_data is supplied
  isp1704_charger: Detect charger after probe
  isp1704_charger: Set isp->dev before anything needs it
  isp1704_charger: Detect HUB/Host chargers
  isp1704_charger: Correct length for storing model
  power_supply: Add gpio charger driver
  jz4740-battery: Protect against concurrent battery readings
  ...

13 years agoafs: add afs_wq and use it instead of the system workqueue
Tejun Heo [Fri, 14 Jan 2011 15:56:37 +0000 (15:56 +0000)]
afs: add afs_wq and use it instead of the system workqueue

flush_scheduled_work() is going away.  afs needs to make sure all the
works it has queued have finished before being unloaded and there can
be arbitrary number of pending works.  Add afs_wq and use it as the
flush domain instead of the system workqueue.

Also, convert cancel_delayed_work() + flush_scheduled_work() to
cancel_delayed_work_sync() in afs_mntpt_kill_timer().

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: linux-afs@lists.infradead.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agorxrpc: rxrpc_workqueue isn't used during memory reclaim
Tejun Heo [Fri, 14 Jan 2011 15:56:31 +0000 (15:56 +0000)]
rxrpc: rxrpc_workqueue isn't used during memory reclaim

rxrpc_workqueue isn't depended upon while reclaiming memory.  Convert
to alloc_workqueue() without WQ_MEM_RECLAIM.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: linux-afs@lists.infradead.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoFS-Cache: Fix operation handling
Akshat Aranya [Fri, 14 Jan 2011 16:00:47 +0000 (16:00 +0000)]
FS-Cache: Fix operation handling

fscache_submit_exclusive_op() adds an operation to the pending list if
other operations are pending.  Fix the check for pending ops as n_ops
must be greater than 0 at the point it is checked as it is incremented
immediately before under lock.

Signed-off-by: Akshat Aranya <aranya@nec-labs.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'vfs-scale-working' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 14 Jan 2011 17:08:29 +0000 (09:08 -0800)]
Merge branch 'vfs-scale-working' of git://git./linux/kernel/git/npiggin/linux-npiggin

* 'vfs-scale-working' of git://git.kernel.org/pub/scm/linux/kernel/git/npiggin/linux-npiggin:
  kernel: fix hlist_bl again
  cgroups: Fix a lockdep warning at cgroup removal
  fs: namei fix ->put_link on wrong inode in do_filp_open

13 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
Linus Torvalds [Fri, 14 Jan 2011 17:08:00 +0000 (09:08 -0800)]
Merge branch 'for-next' of git://git./linux/kernel/git/sameo/mfd-2.6

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (59 commits)
  mfd: ab8500-core chip version cut 2.0 support
  mfd: Flag WM831x /IRQ as a wake source
  mfd: Convert WM831x away from legacy I2C PM operations
  regulator: Support MAX8998/LP3974 DVS-GPIO
  mfd: Support LP3974 RTC
  i2c: Convert SCx200 driver from using raw PCI to platform device
  x86: OLPC: convert olpc-xo1 driver from pci device to platform device
  mfd: MAX8998/LP3974 hibernation support
  mfd/ab8500: remove spi support
  mfd: Remove ARCH_U8500 dependency from AB8500
  misc: Make AB8500_PWM driver depend on U8500 due to PWM breakage
  mfd: Add __devexit annotation for vx855_remove
  mfd: twl6030 irq_data conversion.
  gpio: Fix cs5535 printk warnings
  misc: Fix cs5535 printk warnings
  mfd: Convert Wolfson MFD drivers to use irq_data accessor function
  mfd: Convert TWL4030 to new irq_ APIs
  mfd: Convert tps6586x driver to new irq_ API
  mfd: Convert tc6393xb driver to new irq_ APIs
  mfd: Convert t7166xb driver to new irq_ API
  ...

13 years agoPCI/PM: Report wakeup events before resuming devices
Rafael J. Wysocki [Wed, 29 Dec 2010 12:22:08 +0000 (13:22 +0100)]
PCI/PM: Report wakeup events before resuming devices

Make wakeup events be reported by the PCI subsystem before attempting to
resume devices or queuing up runtime resume requests for them, because
wakeup events should be reported as soon as they have been detected.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agoPCI/PM: Use pm_wakeup_event() directly for reporting wakeup events
Rafael J. Wysocki [Wed, 29 Dec 2010 12:21:23 +0000 (13:21 +0100)]
PCI/PM: Use pm_wakeup_event() directly for reporting wakeup events

After recent changes related to wakeup events pm_wakeup_event()
automatically checks if the given device is configured to signal wakeup,
so pci_wakeup_event() may be a static inline function calling
pm_wakeup_event() directly.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agoPCI: sysfs: Update ROM to include default owner write access
Alex Williamson [Wed, 5 Jan 2011 17:26:41 +0000 (10:26 -0700)]
PCI: sysfs: Update ROM to include default owner write access

The PCI sysfs ROM interface requires an enabling write to access the ROM
image, but the default file mode is 0400.  The original proposed patch
adding sysfs ROM support was a true read-only interface, with the
enabling bit coming in as a feature request.  I suspect it was simply an
oversight that the file mode didn't get updated to match the API.

Acked-by: Chris Wright <chrisw@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agox86/PCI: make Broadcom CNB20LE driver EMBEDDED and EXPERIMENTAL
Bjorn Helgaas [Thu, 6 Jan 2011 17:12:30 +0000 (10:12 -0700)]
x86/PCI: make Broadcom CNB20LE driver EMBEDDED and EXPERIMENTAL

This functionality is known to be incomplete, so discourage its use in
general-purpose kernels.

The only reason to use this driver is to support PCI hotplug on CNB20LE-
based machines that don't have ACPI, and there are very few such
systems.

Reference: https://bugzilla.redhat.com/show_bug.cgi?id=665109
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agox86/PCI: don't use native Broadcom CNB20LE driver when ACPI is available
Bjorn Helgaas [Thu, 6 Jan 2011 17:12:24 +0000 (10:12 -0700)]
x86/PCI: don't use native Broadcom CNB20LE driver when ACPI is available

The broadcom_bus.c quirk was written (without benefit of documentation)
to support PCI hotplug on an old system that doesn't have ACPI.  As
such, we should only use it when the system doesn't have ACPI.

If the system does have ACPI and we need the host bridge description, we
should get it from the ACPI _CRS method.  On machines older than 2008,
we currently ignore _CRS, but that doesn't mean we should use
broadcom_bus.c.  It means we should either (a) do what we've done in the
past and assume everything in the PCI gap is routed to bus 0 (so hotplug
may not work), or (b) arrange to use _CRS.  This patch does (a).

Reference: https://bugzilla.redhat.com/show_bug.cgi?id=665109
Acked-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agoPCI/ACPI: Request _OSC control once for each root bridge (v3)
Rafael J. Wysocki [Thu, 6 Jan 2011 23:55:09 +0000 (00:55 +0100)]
PCI/ACPI: Request _OSC control once for each root bridge (v3)

Move the evaluation of acpi_pci_osc_control_set() (to request control of
PCI Express native features) into acpi_pci_root_add() to avoid calling
it many times for the same root complex with the same arguments.
Additionally, check if all of the requisite _OSC support bits are set
before calling acpi_pci_osc_control_set() for a given root complex.

References: https://bugzilla.kernel.org/show_bug.cgi?id=20232
Reported-by: Ozan Caglayan <ozan@pardus.org.tr>
Tested-by: Ozan Caglayan <ozan@pardus.org.tr>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agoPCI: enable pci=bfsort by default on future Dell systems
Narendra_K@Dell.com [Tue, 14 Dec 2010 17:57:12 +0000 (09:57 -0800)]
PCI: enable pci=bfsort by default on future Dell systems

This patch enables pci=bfsort by default on future Dell systems.
It reads SMBIOS type 0xB1 vendor specific record and sets pci=bfsort
accordingly.

Offset  Name    Length  Value   Description

04      Flags0  Word    Varies  Bits 9-10
                                - 10:9 = 00  Unknown
                                - 10:9 = 01  Breadth First
                                - 10:9 = 10  Depth First
                                - 10:9 = 11  Reserved

1. Any time pci=bfsort has to be enabled on a system, we need to add the
   model number of the system to the white list. With this patch, that
   is not required.

2. Typically, model number has to be added to the white list when the
   system is under development. With this change, that is not required.

Signed-off-by: Jordan Hargrave <jordan_hargrave@dell.com>
Signed-off-by: Narendra K <narendra_k@dell.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agoMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Fri, 14 Jan 2011 16:47:26 +0000 (08:47 -0800)]
Merge branch 'for-linus' of git://git390.marist.edu/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] MAINTAINERS: Update zcrypt driver entry
  [S390] Randomize PIEs
  [S390] Randomise the brk region
  [S390] Add is_32bit_task() helper function
  [S390] Randomize lower bits of stack address
  [S390] Randomize mmap start address
  [S390] Rearrange mmap.c
  [S390] Enable flexible mmap layout for 64 bit processes
  [S390] vdso: dont map at mmap_base
  [S390] reduce miminum gap between stack and mmap_base
  [S390] mmap: consider stack address randomization
  [S390] Update default configuration
  [S390] cio: path_event overindication after resume

13 years agodrm/i915/lvds: Add AOpen i915GMm-HFS to the list of false-positive LVDS
Knut Petersen [Fri, 14 Jan 2011 15:38:10 +0000 (15:38 +0000)]
drm/i915/lvds: Add AOpen i915GMm-HFS to the list of false-positive LVDS

Signed-off-by: Knut Petersen <knut_petersen@t-online.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
13 years agoagp/intel: Fix device names of i845 and 845G
Oswald Buddenhagen [Sat, 19 Jun 2010 21:08:37 +0000 (23:08 +0200)]
agp/intel: Fix device names of i845 and 845G

They got mixed up when the switch was converted to a table in 2007.

Signed-off-by: Oswald Buddenhagen <ossi@kde.org>
[ickle: minor changes for 2.6.37+]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agogpio: timbgpio: Fix up irq_data conversion breakage.
Lennert Buytenhek [Fri, 14 Jan 2011 08:44:19 +0000 (09:44 +0100)]
gpio: timbgpio: Fix up irq_data conversion breakage.

Commit a1f5f22adc3206c47e70652c12671666c65b579f ("gpio: timbgpio:
irq_data conversion") was slightly too enthusiastic in converting
timbgpio_irq() over to take an irq_data * argument instead of an
unsigned int irq argument, as it is a flow handler, which still take
IRQ numbers for now.  (And on top of that, it was using the wrong
accessors.)

This fixes it up, and seems to build without warnings.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Richard Röjfors <richard.rojfors@mocean-labs.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agocgroup_fs: fix cgroup use of simple_lookup()
Al Viro [Fri, 14 Jan 2011 05:31:45 +0000 (05:31 +0000)]
cgroup_fs: fix cgroup use of simple_lookup()

cgroup can't use simple_lookup(), since that'd override its desired ->d_op.

Tested-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoinclude/gpio.h: remove remaining __must_check-annotiations
Wolfram Sang [Fri, 14 Jan 2011 08:34:29 +0000 (09:34 +0100)]
include/gpio.h: remove remaining __must_check-annotiations

Commit 5f829e405ec4e96f711165a4a7b55c271d4363e2 (gpiolib: add missing functions
to generic fallback) also introduced two.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Greg KH <gregkh@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoRevert update for dirty_ratio for memcg.
KAMEZAWA Hiroyuki [Fri, 14 Jan 2011 05:56:53 +0000 (14:56 +0900)]
Revert update for dirty_ratio for memcg.

The flags added by commit db16d5ec1f87f17511599bc77857dd1662b5a22f
has no user now. We believe we'll use it soon but considering
patch reviewing, the change itself should be folded into incoming
set of "dirty ratio for memcg" patches.

So, it's better to drop this change from current mainline tree.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Greg Thelen <gthelen@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agorevert documentaion update for memcg's dirty ratio.
KAMEZAWA Hiroyuki [Fri, 14 Jan 2011 06:04:21 +0000 (15:04 +0900)]
revert documentaion update for memcg's dirty ratio.

Subjct: Revert memory cgroup dirty_ratio Documentation.

The commit ece72400c2a27a3d726cb0854449f991d9fcd2da adds documentation
for memcg's dirty ratio. But the function is not implemented yet.
Remove the documentation for avoiding confusing users.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Greg Thelen <gthelen@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agopower_supply: Add MAX17042 Fuel Gauge Driver
MyungJoo Ham [Fri, 14 Jan 2011 05:46:11 +0000 (14:46 +0900)]
power_supply: Add MAX17042 Fuel Gauge Driver

The MAX17042 is a fuel gauge with an I2C interface for lithium-ion
betteries. Unlike its predecessor MAX17040, MAX17042 uses 16bit
registers. Besides, MAX17042 has much more features than MAX17040; e.g.,
a thermistor, current and current accumulation measurement, battery
internal resistance estimate, average values of measurement, and others.

This patch implements a driver for MAX17042.
In this initial release, we have implemented the most basic features of
a fuel gauge: measure the battery capacity and voltage.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
13 years agokernel: fix hlist_bl again
Russell King [Fri, 14 Jan 2011 13:12:45 +0000 (13:12 +0000)]
kernel: fix hlist_bl again

__d_rehash is dereferencing an almost-NULL pointer on my ARM926.
CONFIG_SMP=n and CONFIG_DEBUG_SPINLOCK=y.

The faulting instruction is:    strne   r3, [r2, #4]
and as can be seen from the register dump below, r2 is 0x00000001, hence
the faulting 0x00000005 address.

__d_rehash is essentially:

       spin_lock_bucket(b);
       entry->d_flags &= ~DCACHE_UNHASHED;
       hlist_bl_add_head_rcu(&entry->d_hash, &b->head);
       spin_unlock_bucket(b);

which is:

       bit_spin_lock(0, (unsigned long *)&b->head.first);
       entry->d_flags &= ~DCACHE_UNHASHED;
       hlist_bl_add_head_rcu(&entry->d_hash, &b->head);
       __bit_spin_unlock(0, (unsigned long *)&b->head.first);

bit_spin_lock(0, ptr) sets bit 0 of *ptr, in this case b->head.first if
CONFIG_SMP or CONFIG_DEBUG_SPINLOCK is set:

#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
       while (unlikely(test_and_set_bit_lock(bitnum, addr))) {
               while (test_bit(bitnum, addr)) {
                       preempt_enable();
                       cpu_relax();
                       preempt_disable();
               }
       }
#endif

So, b->head.first starts off NULL, and becomes a non-NULL (address 1).
hlist_bl_add_head_rcu() does this:

static inline void hlist_bl_add_head_rcu(struct hlist_bl_node *n,
                                       struct hlist_bl_head *h)
{
       first = hlist_bl_first(h);
       n->next = first;
       if (first)
               first->pprev = &n->next;

It is the store to first->pprev which is faulting.

hlist_bl_first():

static inline struct hlist_bl_node *hlist_bl_first(struct hlist_bl_head *h)
{
       return (struct hlist_bl_node *)
               ((unsigned long)h->first & ~LIST_BL_LOCKMASK);
}

but:
#if defined(CONFIG_SMP)
#define LIST_BL_LOCKMASK        1UL
#else
#define LIST_BL_LOCKMASK        0UL
#endif

So, we have one piece of code which sets bit 0 of addresses, and another
bit of code which doesn't clear it before dereferencing the pointer if
!CONFIG_SMP && CONFIG_DEBUG_SPINLOCK.  With the patch below, I can again
sucessfully boot the kernel on my Versatile PB/926 platform.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agomfd: ab8500-core chip version cut 2.0 support
Mattias Wallin [Tue, 7 Dec 2010 10:20:47 +0000 (11:20 +0100)]
mfd: ab8500-core chip version cut 2.0 support

This patch adds support for chip version 2.0 or cut 2.0.
One new interrupt latch register - latch 12 - is introduced.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Flag WM831x /IRQ as a wake source
Mark Brown [Wed, 5 Jan 2011 17:56:01 +0000 (17:56 +0000)]
mfd: Flag WM831x /IRQ as a wake source

The WM831x can generate wake events, some unconditionally, so flag
the primary IRQ as a wake source in order to help the CPU treat the
/IRQ signal appropriately.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert WM831x away from legacy I2C PM operations
Mark Brown [Wed, 5 Jan 2011 15:12:39 +0000 (15:12 +0000)]
mfd: Convert WM831x away from legacy I2C PM operations

Since the legacy bus PM operations are deprecated move the suspend
method over to dev_pm_ops.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agoregulator: Support MAX8998/LP3974 DVS-GPIO
MyungJoo Ham [Tue, 11 Jan 2011 11:20:05 +0000 (12:20 +0100)]
regulator: Support MAX8998/LP3974 DVS-GPIO

The previous driver did not support BUCK1-DVS3, BUCK1-DVS4, and
BUCK2-DVS2 modes. This patch adds such modes and an option to block
setting buck1/2 voltages out of the preset values.

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>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Support LP3974 RTC
MyungJoo Ham [Tue, 4 Jan 2011 05:17:39 +0000 (14:17 +0900)]
mfd: Support LP3974 RTC

The first releases of LP3974 have a large delay in RTC registers,
which requires 2 seconds of delay after writing to a rtc register
(recommended by National Semiconductor's engineers)
before reading it.

If "rtc_delay" field of the platform data is true, the rtc driver
assumes that such delays are required. Although we have not seen
LP3974s without requiring such delays, we assume that such LP3974s
will be released soon (or they have done so already) and they are
supported by "lp3974" without setting "rtc_delay" at the platform
data.

This patch adds delays with msleep when writing values to RTC registers
if the platform data has rtc_delay set.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agoi2c: Convert SCx200 driver from using raw PCI to platform device
Andres Salomon [Fri, 31 Dec 2010 04:27:33 +0000 (20:27 -0800)]
i2c: Convert SCx200 driver from using raw PCI to platform device

The SCx200 ACB driver supports ISA hardware as well as PCI.  The PCI
hardware is CS5535/CS5536 based, and the device that it grabs is handled by
the cs5535-mfd driver. This converts the SCx200 driver to use a
platform_driver rather than the previous PCI hackery.

The driver used to manually track the iface list (via linked list); now it
only does this for ISA devices.  PCI ifaces are handled through standard
driver model lists.

It's unclear what happens in case of errors in the old ISA code; rather than
pretending the code actually cares, I've dropped the (implicit) ignorance
of return values and marked it with a comment.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agox86: OLPC: convert olpc-xo1 driver from pci device to platform device
Andres Salomon [Mon, 29 Nov 2010 23:45:06 +0000 (15:45 -0800)]
x86: OLPC: convert olpc-xo1 driver from pci device to platform device

The cs5535-mfd driver now takes care of the PCI BAR handling; this
means the olpc-xo1 driver shouldn't be touching the PCI device at all.

This patch uses both cs5535-acpi and cs5535-pms platform devices rather
than a single platform device because the cs5535-mfd driver may be used
by other CS5535 platform-specific drivers; OLPC doesn't get to dictate
that ACPI and PMS will always be used together.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: MAX8998/LP3974 hibernation support
MyungJoo Ham [Thu, 23 Dec 2010 08:53:36 +0000 (17:53 +0900)]
mfd: MAX8998/LP3974 hibernation support

This patch makes the driver to save and restore register values
for hibernation.

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>
13 years agomfd/ab8500: remove spi support
Sundar Iyer [Fri, 24 Dec 2010 10:52:08 +0000 (11:52 +0100)]
mfd/ab8500: remove spi support

Since the Ab8500 v1.0, the SPI support is deprecated on the HW.

Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Remove ARCH_U8500 dependency from AB8500
Mark Brown [Sat, 11 Dec 2010 13:07:49 +0000 (13:07 +0000)]
mfd: Remove ARCH_U8500 dependency from AB8500

While it is vanishingly unlikely that the device will be deployed on other
architectures removing the dependency facilitates build testing when doing
generic work on both the MFD core for the device and the subsystem drivers.

There appears to be no actual code dependency.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomisc: Make AB8500_PWM driver depend on U8500 due to PWM breakage
Mark Brown [Mon, 20 Dec 2010 12:28:11 +0000 (12:28 +0000)]
misc: Make AB8500_PWM driver depend on U8500 due to PWM breakage

Since we don't have a PWM API every PWM driver ends up exporting its
own version and we need to limit the platforms we try to build them on
in order to avoid multiple definitions. As the AB8500 is normally a
companion chip for the U8500 CPU depend on that architecture.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Add __devexit annotation for vx855_remove
Axel Lin [Mon, 20 Dec 2010 02:02:06 +0000 (10:02 +0800)]
mfd: Add __devexit annotation for vx855_remove

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: twl6030 irq_data conversion.
Lennert Buytenhek [Mon, 13 Dec 2010 12:31:18 +0000 (13:31 +0100)]
mfd: twl6030 irq_data conversion.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agogpio: Fix cs5535 printk warnings
Joe Perches [Mon, 20 Dec 2010 10:28:40 +0000 (11:28 +0100)]
gpio: Fix cs5535 printk warnings

drivers/gpio/cs5535-gpio.c: In function 'cs5535_gpio_probe':
drivers/gpio/cs5535-gpio.c:269: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'resource_size_t'
drivers/gpio/cs5535-gpio.c:269: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'resource_size_t'

Use vsprintf extension %pR to format resource.

Original-patch-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomisc: Fix cs5535 printk warnings
Joe Perches [Mon, 20 Dec 2010 10:26:19 +0000 (11:26 +0100)]
misc: Fix cs5535 printk warnings

drivers/misc/cs5535-mfgpt.c: In function 'cs5535_mfgpt_probe':
drivers/misc/cs5535-mfgpt.c:320: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'resource_size_t'
drivers/misc/cs5535-mfgpt.c:320: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'resource_size_t'

Use vsprintf extension %pR to format resource.

Original-patch-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert Wolfson MFD drivers to use irq_data accessor function
Mark Brown [Sat, 11 Dec 2010 13:21:21 +0000 (13:21 +0000)]
mfd: Convert Wolfson MFD drivers to use irq_data accessor function

Actually makes the code larger rathe rthan smaller but does provide some
isolation against core API changes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert TWL4030 to new irq_ APIs
Mark Brown [Sun, 12 Dec 2010 12:51:39 +0000 (12:51 +0000)]
mfd: Convert TWL4030 to new irq_ APIs

The genirq core is being updated to pass struct irq_data to irq_chip
operations. Update the TWL4030 driver to the new APIs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert tps6586x driver to new irq_ API
Mark Brown [Sun, 12 Dec 2010 12:39:28 +0000 (12:39 +0000)]
mfd: Convert tps6586x driver to new irq_ API

The genirq core is being updated to supply struct irq_data to irq_chip
operations rather than an irq number. Update the tps6586x driver to the
new APIs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert tc6393xb driver to new irq_ APIs
Mark Brown [Sun, 12 Dec 2010 12:34:04 +0000 (12:34 +0000)]
mfd: Convert tc6393xb driver to new irq_ APIs

The genirq core is being update to pass struct irq_data to irq_chip rather
than an irq number to operations. Update tc6393 to the new API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert t7166xb driver to new irq_ API
Mark Brown [Sun, 12 Dec 2010 12:18:58 +0000 (12:18 +0000)]
mfd: Convert t7166xb driver to new irq_ API

The genirq core is being updated to pass struct irq_data rather than an
irq number to irq_chip operations. Update the t7166xb driver to the new
APIs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert SMTPE driver to new irq_ APIs
Mark Brown [Sun, 12 Dec 2010 12:01:08 +0000 (12:01 +0000)]
mfd: Convert SMTPE driver to new irq_ APIs

The genirq core is being updated to supply struct irq_data to irq_chip
operations rather than an irq number. Update the SMTPE driver to the new
APIs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert MAX8998 driver to irq_ API
Mark Brown [Sat, 11 Dec 2010 18:31:03 +0000 (18:31 +0000)]
mfd: Convert MAX8998 driver to irq_ API

The genirq core is being updated to pass struct irq_data to interrupt
operations, update the MAX8998 driver to the new API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert max8925 to new irq_ API
Mark Brown [Sat, 11 Dec 2010 18:20:55 +0000 (18:20 +0000)]
mfd: Convert max8925 to new irq_ API

The genirq infrastructure is being converted to pass struct irq_data rather
than an irq number to irq_chip operations, update max8925 to the new APIs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert jz4740-adc to new irq_ methods
Mark Brown [Sun, 12 Dec 2010 19:08:30 +0000 (20:08 +0100)]
mfd: Convert jz4740-adc to new irq_ methods

Convert the jz4740-adc driver to use the recently introduced IRQ API
variants which are passed struct irq_data rather than an IRQ number.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert HTC I2C CPLD driver to irq_ API
Mark Brown [Sat, 11 Dec 2010 16:44:11 +0000 (16:44 +0000)]
mfd: Convert HTC I2C CPLD driver to irq_ API

The genirq core is being converted to pass a struct irq_data to interrupt
operations rather than an IRQ number.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert HTC EGPIO driver to irq_ API
Mark Brown [Sat, 11 Dec 2010 16:43:59 +0000 (16:43 +0000)]
mfd: Convert HTC EGPIO driver to irq_ API

The genirq core is being converted to pass a struct irq_data to interrupt
operations rather than an IRQ number.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert ezx-pcap to new irq_ methods
Lennert Buytenhek [Mon, 13 Dec 2010 12:30:09 +0000 (13:30 +0100)]
mfd: Convert ezx-pcap to new irq_ methods

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert AB8500 to new irq_ methods
Mark Brown [Sat, 11 Dec 2010 13:16:08 +0000 (13:16 +0000)]
mfd: Convert AB8500 to new irq_ methods

The genirq core is being converted to supply struct irq_data to chips
rather than the interrupt number.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert AB3500 to new irq_ APIs
Mark Brown [Sat, 11 Dec 2010 13:14:12 +0000 (13:14 +0000)]
mfd: Convert AB3500 to new irq_ APIs

The genirq core is being updated to pass struct irq_data rather than irq
numbers into chip drivers. As part of the update assignments to NULL for
unused operations are removed, these are not needed and the genirq docs
should be good enough.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert ASIC3 to new irq_ APIs
Mark Brown [Sat, 11 Dec 2010 13:08:57 +0000 (13:08 +0000)]
mfd: Convert ASIC3 to new irq_ APIs

The interrupt controller APIs are being updated to pass a struct irq_data
rather than the interrupt number.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert 88PM860x driver to new irq_ APIs
Mark Brown [Sat, 11 Dec 2010 12:31:31 +0000 (12:31 +0000)]
mfd: Convert 88PM860x driver to new irq_ APIs

The interrupt controller APIs are being updated to pass a struct irq_data
rather than the interrupt number.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Staticise internal functions in HTC I2CCPLD driver
Mark Brown [Sat, 11 Dec 2010 16:44:49 +0000 (16:44 +0000)]
mfd: Staticise internal functions in HTC I2CCPLD driver

Most of these are GPIO operations, though a couple are just internal only
functions.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Use NULL to initialise NULL pointers in ab8500-debugfs
Mark Brown [Mon, 13 Dec 2010 14:06:47 +0000 (14:06 +0000)]
mfd: Use NULL to initialise NULL pointers in ab8500-debugfs

Partly for coding style reasons, but mostly because sparse warns on it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Correct ASIC3 IRQ_OWM resource setup
Mark Brown [Sat, 11 Dec 2010 13:00:34 +0000 (13:00 +0000)]
mfd: Correct ASIC3 IRQ_OWM resource setup

We should specify both a start and an end for the IRQ range rather than
initialise the start twice.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Staticise unexported symbols in ASIC3
Mark Brown [Sat, 11 Dec 2010 12:59:35 +0000 (12:59 +0000)]
mfd: Staticise unexported symbols in ASIC3

There's no use of either of these outside of the driver so they can be
declared static.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Remove tps6586x device ID check
Stephen Warren [Thu, 9 Dec 2010 17:30:11 +0000 (10:30 -0700)]
mfd: Remove tps6586x device ID check

... and convert it to a dev_info print at probe time.

There are many variants of this chip with different values of VERSIONCRC.
The set of values is large, and not useful to enumerate. All are SW
compatible. The difference lies in default settings of the various power
rails, and other similar differences. The driver, or clients of the
driver, shouldn't be affected by this, since all rails should be
programmed into the desired state in all cases for correct operation.

Derived-from-code-by: Andrew Chew <achew@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Fix twl_probe section mismatch warning in mfd/twl-core.c
Bryan Wu [Wed, 8 Dec 2010 02:42:04 +0000 (10:42 +0800)]
mfd: Fix twl_probe section mismatch warning in mfd/twl-core.c

Fix the following section mismatch warning when building
omap2plus_defconfig:

WARNING: vmlinux.o(.data+0x47d7c): Section mismatch in reference
from the variable twl_driver to the function .init.text:twl_probe()

Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: ab8500-core ioresources irq for subdrivers added
Mattias Wallin [Thu, 2 Dec 2010 14:40:31 +0000 (15:40 +0100)]
mfd: ab8500-core ioresources irq for subdrivers added

This patch adds the ioresources used by subdrivers to
retrieve their interrupt.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: ab8500-core wake up from suspend
Mattias Wallin [Thu, 2 Dec 2010 14:10:27 +0000 (15:10 +0100)]
mfd: ab8500-core wake up from suspend

This patch makes the system wake up from suspend when an
ab8500 interrupt occur. This can for example be USB cable
insert or an RTC alarm.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Export ab8500 chip id to sysfs
Mattias Wallin [Thu, 2 Dec 2010 14:09:36 +0000 (15:09 +0100)]
mfd: Export ab8500 chip id to sysfs

This patch adds a file into sysfs for reading out chip id.
It has been requested for modem silent reboot.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Ludovic Barre <ludovic.barre@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: ab8500-core improved error handling in get_chip_id
Mattias Wallin [Thu, 2 Dec 2010 14:08:32 +0000 (15:08 +0100)]
mfd: ab8500-core improved error handling in get_chip_id

We check for dev before dereferencing it.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agogpio/misc: Add MODULE_ALIAS entries for CS5535 functions
Andres Salomon [Thu, 2 Dec 2010 03:55:10 +0000 (19:55 -0800)]
gpio/misc: Add MODULE_ALIAS entries for CS5535 functions

This adds MODULE_ALIAS entries to the various cs5535 subdevice modules; this
allows the modules to automatically be loaded when cs5535-mfd loads.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomisc: Convert cs5535-mfgpt from pci device to platform device
Andres Salomon [Sat, 23 Oct 2010 07:41:14 +0000 (00:41 -0700)]
misc: Convert cs5535-mfgpt from pci device to platform device

The cs5535-mfd driver now takes care of the PCI BAR handling; this
simplifies the mfgpt driver a bunch.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agogpio: Convert cs5535 from pci device to platform device
Andres Salomon [Sat, 23 Oct 2010 07:41:09 +0000 (00:41 -0700)]
gpio: Convert cs5535 from pci device to platform device

The cs5535-mfd driver now takes care of the PCI BAR handling; this
simplifies the gpio driver a lot.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Fix cs5535 warning on x86-64
Andres Salomon [Tue, 30 Nov 2010 21:54:39 +0000 (13:54 -0800)]
mfd: Fix cs5535 warning on x86-64

ARRAY_SIZE() returns size_t; use %zu instead of %d so that we don't
get warnings on x86-64.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Implement runtime PM for WM8994 core driver
Mark Brown [Fri, 26 Nov 2010 17:19:35 +0000 (17:19 +0000)]
mfd: Implement runtime PM for WM8994 core driver

Allow the WM8994 to completely power off, including disabling the LDOs
if they are software controlled, when it goes idle. The CODEC subdevice
controls activity for the MFD as a whole.

If the GPIOs need to be used while the device is active runtime PM
should be disabled for the device by machine specific code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Provide pm_runtime_no_callbacks flag in cell data
Mark Brown [Fri, 26 Nov 2010 17:19:34 +0000 (17:19 +0000)]
mfd: Provide pm_runtime_no_callbacks flag in cell data

Allow MFD cells to have pm_runtime_no_callbacks() called on them during
registration. This causes the runtime PM framework to ignore them,
allowing use of runtime PM to suspend the device as a whole even if
not all drivers for the MFD can usefully implement runtime PM. For
example, RTCs are likely to run continuously regardless of the power
state of the system.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Fix ab8500-debug indentation errors
Mattias Wallin [Fri, 26 Nov 2010 12:06:39 +0000 (13:06 +0100)]
mfd: Fix ab8500-debug indentation errors

Replace spaces with proper tabs.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert WM8994 to new irq_ interrupt methods
Mark Brown [Wed, 24 Nov 2010 18:01:44 +0000 (18:01 +0000)]
mfd: Convert WM8994 to new irq_ interrupt methods

Kernel 2.6.37 adds new interrupt methods which take a struct irq_data
rather than an irq number. Convert over to these as they will become
mandatory in future.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert WM835x to new irq_ interrupt methods
Mark Brown [Wed, 24 Nov 2010 18:01:43 +0000 (18:01 +0000)]
mfd: Convert WM835x to new irq_ interrupt methods

Kernel 2.6.37 adds new interrupt methods which take a struct irq_data
rather than an irq number. Convert over to these as they will become
mandatory in future.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert WM831x to new irq_ interrupt methods
Mark Brown [Wed, 24 Nov 2010 18:01:42 +0000 (18:01 +0000)]
mfd: Convert WM831x to new irq_ interrupt methods

Kernel 2.6.37 adds new interrupt methods which take a struct irq_data
rather than an irq number. Convert over to these as they will become
mandatory in future.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Add WM8326 support
Mark Brown [Wed, 24 Nov 2010 18:01:41 +0000 (18:01 +0000)]
mfd: Add WM8326 support

The WM8326 is a high performance variant of the WM832x series with
no software visible differences.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Simplify WM832x subdevice instantiation
Mark Brown [Wed, 24 Nov 2010 18:01:40 +0000 (18:01 +0000)]
mfd: Simplify WM832x subdevice instantiation

All the current WM832x devices have the same set of subdevices so can
just use multiple case statements with a single body.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Use printf extension %pR for struct resource
Joe Perches [Fri, 12 Nov 2010 21:37:56 +0000 (13:37 -0800)]
mfd: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Add cs5535-mfd driver for AMD Geode's CS5535/CS5536 support
Andres Salomon [Fri, 26 Nov 2010 10:52:35 +0000 (11:52 +0100)]
mfd: Add cs5535-mfd driver for AMD Geode's CS5535/CS5536 support

Add an MFD driver to handle the ISA device on CS5535 and CS5536
southbridges. This ISA bridge is actually multiple devices: GPIOs,
MFGPTs, etc.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Don't open-code mc13xxx_unlock
Uwe Kleine-König [Thu, 11 Nov 2010 15:47:50 +0000 (16:47 +0100)]
mfd: Don't open-code mc13xxx_unlock

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Include <linux/gpio.h> instead of <asm/gpio.h>
Axel Lin [Wed, 10 Nov 2010 07:49:41 +0000 (15:49 +0800)]
mfd: Include <linux/gpio.h> instead of <asm/gpio.h>

As warned by checkpatch.pl, use #include <linux/gpio.h> instead
of <asm/gpio.h>.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Include <linux/io.h> instead of <asm/io.h>
Axel Lin [Wed, 10 Nov 2010 07:47:51 +0000 (15:47 +0800)]
mfd: Include <linux/io.h> instead of <asm/io.h>

As warned by checkpatch.pl, use #include <linux/io.h> instead of <asm/io.h>

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Update WARN uses
Joe Perches [Sat, 30 Oct 2010 21:08:32 +0000 (14:08 -0700)]
mfd: Update WARN uses

Remove KERN_<level>.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agodrm/i915: Disable GPU semaphores on SandyBridge mobile
Chris Wilson [Fri, 14 Jan 2011 09:46:38 +0000 (09:46 +0000)]
drm/i915: Disable GPU semaphores on SandyBridge mobile

Hopefully, this is a temporary measure whilst the root cause is
understood. At the moment, we experience a hard hang whilst looping
urbanterror that has been identified as a result of the use of
semaphores, but so far only on SNB mobile.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32752
Tested-by: mengmeng.meng@intel.com
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agocgroups: Fix a lockdep warning at cgroup removal
Li Zefan [Fri, 14 Jan 2011 03:34:34 +0000 (11:34 +0800)]
cgroups: Fix a lockdep warning at cgroup removal

Commit 2fd6b7f5 ("fs: dcache scale subdirs") forgot to annotate a dentry
lock, which caused a lockdep warning.

Reported-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
13 years agofs: namei fix ->put_link on wrong inode in do_filp_open
Nick Piggin [Fri, 14 Jan 2011 08:42:43 +0000 (08:42 +0000)]
fs: namei fix ->put_link on wrong inode in do_filp_open

J. R. Okajima noticed that ->put_link is being attempted on the
wrong inode, and suggested the way to fix it. I changed it a bit
according to Al's suggestion to keep an explicit link path around.

Signed-off-by: Nick Piggin <npiggin@kernel.dk>
13 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Fri, 14 Jan 2011 04:15:35 +0000 (20:15 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (59 commits)
  ACPI / PM: Fix build problems for !CONFIG_ACPI related to NVS rework
  ACPI: fix resource check message
  ACPI / Battery: Update information on info notification and resume
  ACPI: Drop device flag wake_capable
  ACPI: Always check if _PRW is present before trying to evaluate it
  ACPI / PM: Check status of power resources under mutexes
  ACPI / PM: Rename acpi_power_off_device()
  ACPI / PM: Drop acpi_power_nocheck
  ACPI / PM: Drop acpi_bus_get_power()
  Platform / x86: Make fujitsu_laptop use acpi_bus_update_power()
  ACPI / Fan: Rework the handling of power resources
  ACPI / PM: Register power resource devices as soon as they are needed
  ACPI / PM: Register acpi_power_driver early
  ACPI / PM: Add function for updating device power state consistently
  ACPI / PM: Add function for device power state initialization
  ACPI / PM: Introduce __acpi_bus_get_power()
  ACPI / PM: Introduce function for refcounting device power resources
  ACPI / PM: Add functions for manipulating lists of power resources
  ACPI / PM: Prevent acpi_power_get_inferred_state() from making changes
  ACPICA: Update version to 20101209
  ...

13 years agoMerge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb...
Linus Torvalds [Fri, 14 Jan 2011 04:15:18 +0000 (20:15 -0800)]
Merge branch 'idle-release' of git://git./linux/kernel/git/lenb/linux-idle-2.6

* 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
  cpuidle/x86/perf: fix power:cpu_idle double end events and throw cpu_idle events from the cpuidle layer
  intel_idle: open broadcast clock event
  cpuidle: CPUIDLE_FLAG_CHECK_BM is omap3_idle specific
  cpuidle: CPUIDLE_FLAG_TLB_FLUSHED is specific to intel_idle
  cpuidle: delete unused CPUIDLE_FLAG_SHALLOW, BALANCED, DEEP definitions
  SH, cpuidle: delete use of NOP CPUIDLE_FLAGS_SHALLOW
  cpuidle: delete NOP CPUIDLE_FLAG_POLL
  ACPI: processor_idle: delete use of NOP CPUIDLE_FLAGs
  cpuidle: Rename X86 specific idle poll state[0] from C0 to POLL
  ACPI, intel_idle: Cleanup idle= internal variables
  cpuidle: Make cpuidle_enable_device() call poll_idle_init()
  intel_idle: update Sandy Bridge core C-state residency targets

13 years agoMerge branch 'sfi-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb...
Linus Torvalds [Fri, 14 Jan 2011 04:15:02 +0000 (20:15 -0800)]
Merge branch 'sfi-release' of git://git./linux/kernel/git/lenb/linux-sfi-2.6

* 'sfi-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6:
  SFI: use ioremap_cache() instead of ioremap()

13 years agoMerge branch 'vfs-scale-working' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 14 Jan 2011 04:14:13 +0000 (20:14 -0800)]
Merge branch 'vfs-scale-working' of git://git./linux/kernel/git/npiggin/linux-npiggin

* 'vfs-scale-working' of git://git.kernel.org/pub/scm/linux/kernel/git/npiggin/linux-npiggin:
  fs: fix do_last error case when need_reval_dot
  nfs: add missing rcu-walk check
  fs: hlist UP debug fixup
  fs: fix dropping of rcu-walk from force_reval_path
  fs: force_reval_path drop rcu-walk before d_invalidate
  fs: small rcu-walk documentation fixes

Fixed up trivial conflicts in Documentation/filesystems/porting

13 years agofs: fix do_last error case when need_reval_dot
J. R. Okajima [Fri, 14 Jan 2011 03:56:04 +0000 (03:56 +0000)]
fs: fix do_last error case when need_reval_dot

When open(2) without O_DIRECTORY opens an existing dir, it should return
EISDIR. In do_last(), the variable 'error' is initialized EISDIR, but it
is changed by d_revalidate() which returns any positive to represent
'the target dir is valid.'

Should we keep and return the initialized 'error' in this case.

Signed-off-by: Nick Piggin <npiggin@kernel.dk>
13 years agonfs: add missing rcu-walk check
Nick Piggin [Fri, 14 Jan 2011 02:48:39 +0000 (02:48 +0000)]
nfs: add missing rcu-walk check

Signed-off-by: Nick Piggin <npiggin@kernel.dk>
13 years agoMerge branch 'stable/gntdev' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
Linus Torvalds [Fri, 14 Jan 2011 02:46:48 +0000 (18:46 -0800)]
Merge branch 'stable/gntdev' of git://git./linux/kernel/git/konrad/xen

* 'stable/gntdev' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/p2m: Fix module linking error.
  xen p2m: clear the old pte when adding a page to m2p_override
  xen gntdev: use gnttab_map_refs and gnttab_unmap_refs
  xen: introduce gnttab_map_refs and gnttab_unmap_refs
  xen p2m: transparently change the p2m mappings in the m2p override
  xen/gntdev: Fix circular locking dependency
  xen/gntdev: stop using "token" argument
  xen: gntdev: move use of GNTMAP_contains_pte next to the map_op
  xen: add m2p override mechanism
  xen: move p2m handling to separate file
  xen/gntdev: add VM_PFNMAP to vma
  xen/gntdev: allow usermode to map granted pages
  xen: define gnttab_set_map_op/unmap_op

Fix up trivial conflict in drivers/xen/Kconfig

13 years agoMerge branch 'stable/platform-pci-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 14 Jan 2011 02:44:52 +0000 (18:44 -0800)]
Merge branch 'stable/platform-pci-fixes' of git://git./linux/kernel/git/konrad/xen

* 'stable/platform-pci-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen-platform: Fix compile errors if CONFIG_PCI is not enabled.
  xen: rename platform-pci module to xen-platform-pci.
  xen-platform: use PCI interfaces to request IO and MEM resources.