safe/jmp/linux-2.6
13 years agoARM: s3c6400_defconfig: Enable USB host side
Ben Dooks [Fri, 28 May 2010 09:36:25 +0000 (18:36 +0900)]
ARM: s3c6400_defconfig: Enable USB host side

Enable the USB Host side by adding the USB OHCI and
some basic USB driver modules.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: s3c6400_defconfig: Add SPI driver
Ben Dooks [Fri, 28 May 2010 09:26:23 +0000 (18:26 +0900)]
ARM: s3c6400_defconfig: Add SPI driver

The SPI driver was added last kernel round, so enable
the core SPI and add the 64XX and bitbang driver as
modules.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: s3c6400_defconfig: Update compiled machines
Ben Dooks [Fri, 28 May 2010 10:08:45 +0000 (19:08 +0900)]
ARM: s3c6400_defconfig: Update compiled machines

Add the machines that have been added in the last round
to the list of builds.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S5P: Regoster clk_xusbxti clock for hsotg driver
Thomas Abraham [Fri, 28 May 2010 02:41:16 +0000 (11:41 +0900)]
ARM: S5P: Regoster clk_xusbxti clock for hsotg driver

The clk_xusbxti clock is added to the list of clocks to be
registred during boot time clock registration.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
[ben-linux@fluff.org: edited title]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S3C64XX: Add USB OTG HCLK to the list of clocks
Thomas Abraham [Fri, 28 May 2010 02:41:14 +0000 (11:41 +0900)]
ARM: S3C64XX: Add USB OTG HCLK to the list of clocks

Add the USB OTG HCLK clock to the list of clocks to be registered
during initialization.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: SAMSUNG: gpio-cfg.h: update documentation
Ben Dooks [Mon, 24 May 2010 03:21:40 +0000 (12:21 +0900)]
ARM: SAMSUNG: gpio-cfg.h: update documentation

Update the documentation on the gpio configuration calls to add more
references to useful information and also to document the values that
are passed.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: SAMSUNG: Documentation: add documentation on GPIO code
Ben Dooks [Mon, 24 May 2010 03:13:30 +0000 (12:13 +0900)]
ARM: SAMSUNG: Documentation: add documentation on GPIO code

Add some documentation in Documentation/arm/Samsung for the GPIO code
and where to look for the necessary functions. Update the S3C24XX case
as well.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: SAMSUNG: Fix documentation for s3c_gpio_cfgpin()
Ben Dooks [Mon, 24 May 2010 03:11:43 +0000 (12:11 +0900)]
ARM: SAMSUNG: Fix documentation for s3c_gpio_cfgpin()

Fix typo in s3c_gpio_cfgpin() documentation, the second argument is @to
not @pin again.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S3C24XX: Documentation: add section on gpiolib changes
Ben Dooks [Mon, 24 May 2010 02:23:53 +0000 (11:23 +0900)]
ARM: S3C24XX: Documentation: add section on gpiolib changes

Add section to the S3C24XX GPIO documentation on the recent changes
to move towards gpiolib integration.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S3C24XX: Documentation: update GPIO documentation
Ben Dooks [Mon, 24 May 2010 02:11:50 +0000 (11:11 +0900)]
ARM: S3C24XX: Documentation: update GPIO documentation

Upate the S3C24XX GPIO documentation after the changes for gpiolib
and show which calls are being replaced by gpiolib or the new s3c
generic calls.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S3C24XX: Documentation: update documentation overview
Ben Dooks [Mon, 24 May 2010 01:53:06 +0000 (10:53 +0900)]
ARM: S3C24XX: Documentation: update documentation overview

Add the two new SoCs added in this release cycle and update the notes
on the gpiolib conversion.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: SAMSUNG: Documentation: update directory layout
Ben Dooks [Mon, 24 May 2010 01:48:02 +0000 (10:48 +0900)]
ARM: SAMSUNG: Documentation: update directory layout

Update the directory layout in Documentation/arm/Samsung/Overview.txt
to reflect the changes that have been made in the latest kernel
updates.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: SAMSUNG: Documentation: update the list of SoCs supported
Ben Dooks [Mon, 24 May 2010 01:33:50 +0000 (10:33 +0900)]
ARM: SAMSUNG: Documentation: update the list of SoCs supported

Update the list of SoCs supported for the plat-s5p range.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agocnic: Fix context memory init. on 5709.
Michael Chan [Thu, 27 May 2010 23:31:41 +0000 (16:31 -0700)]
cnic: Fix context memory init. on 5709.

We need to zero context memory on 5709 in the function cnic_init_context().
Without this, iscsid restart on 5709 will not work because of stale data.
TX context blocks should not be initialized by cnic_init_context() because
of the special remapping on 5709.

Update version to 2.1.2.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodrivers/net: Eliminate a NULL pointer dereference
Julia Lawall [Thu, 27 May 2010 23:30:03 +0000 (16:30 -0700)]
drivers/net: Eliminate a NULL pointer dereference

At the point of the print, dev is NULL.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
expression E,E1;
identifier f;
statement S1,S2,S3;
@@

if ((E == NULL && ...) || ...)
{
  ... when != if (...) S1 else S2
      when != E = E1
* E->f
  ... when any
  return ...;
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodrivers/net/hamradio: Eliminate a NULL pointer dereference
Julia Lawall [Thu, 27 May 2010 23:29:05 +0000 (16:29 -0700)]
drivers/net/hamradio: Eliminate a NULL pointer dereference

At the point of the print, dev is NULL.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
expression E,E1;
identifier f;
statement S1,S2,S3;
@@

if ((E == NULL && ...) || ...)
{
  ... when != if (...) S1 else S2
      when != E = E1
* E->f
  ... when any
  return ...;
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Patch removes redundant while statement in loop.
Sarveshwar Bandi [Thu, 27 May 2010 23:28:15 +0000 (16:28 -0700)]
be2net: Patch removes redundant while statement in loop.

Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Add GSO support on forwarding path
Herbert Xu [Thu, 27 May 2010 23:14:30 +0000 (16:14 -0700)]
ipv6: Add GSO support on forwarding path

Currently we disallow GSO packets on the IPv6 forward path.
This patch fixes this.

Note that I discovered that our existing GSO MTU checks (e.g.,
IPv4 forwarding) are buggy in that they skip the check altogether,
when they really should be checking gso_size + header instead.

I have also been lazy here in that I haven't bothered to segment
the GSO packet by hand before generating an ICMP message.  Someone
should add that to be 100% correct.

Reported-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: fix __neigh_event_send()
Eric Dumazet [Thu, 27 May 2010 23:09:39 +0000 (16:09 -0700)]
net: fix __neigh_event_send()

commit 7fee226ad23 (net: add a noref bit on skb dst) missed one spot
where an skb is enqueued, with a possibly not refcounted dst entry.

__neigh_event_send() inserts skb into arp_queue, so we must make sure
dst entry is refcounted, or dst entry can be freed by garbage collector
after caller exits from rcu protected section.

Reported-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoALSA: hda: Add support for another Lenovo ThinkPad Edge in conexant codec
Andreas Herrmann [Fri, 28 May 2010 07:57:12 +0000 (09:57 +0200)]
ALSA: hda: Add support for another Lenovo ThinkPad Edge in conexant codec

On a Thinkpad Edge 13 "01972NG" I had the problem that speakers played
sound although headphones were plugged in. Using model=ideapad with
latest alsa-git kernel fixed this. So adding this quirk to use ideapad
for another Thinkpad Edge variant seems sensible.

Cc: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoleds: Fix leds-gpio openfirmware compile issue
Richard Purdie [Thu, 27 May 2010 13:04:36 +0000 (14:04 +0100)]
leds: Fix leds-gpio openfirmware compile issue

Fix a compile issue when openfirmware is enabled from commit
2146325df2c2640059a9e064890c30c6e259b458.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
13 years agoleds: Kconfig fixes
Richard Purdie [Thu, 27 May 2010 12:08:33 +0000 (13:08 +0100)]
leds: Kconfig fixes

Soekris net5501 is x86 only and cleanup some undeeded dependencies

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
13 years agoALSA: hda: Use LPIB for Sony VPCS11V9E
Daniel T Chen [Thu, 27 May 2010 22:32:18 +0000 (18:32 -0400)]
ALSA: hda: Use LPIB for Sony VPCS11V9E

BugLink: https://launchpad.net/bugs/586347
Symptom: On the Sony VPCS11V9E, using GStreamer-based applications with
PulseAudio in Ubuntu 10.04 LTS results in stuttering audio. It appears
to worsen with increased I/O.

Test case: use Rhythmbox under increased I/O pressure. This symptom is
reproducible in the current daily stable alsa-driver snapshots (at least
up until 21 May 2010; later snapshots fail to build from source due to
missing preprocessor directives when compiled against 2.6.32).

Resolution: add SSID for this machine to the position_fix quirk table,
explicitly specifying the LPIB method.

Reported-and-Tested-By: Lauri Kainulainen <lauri@sokkelo.net>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: usb-audio: fix feature unit parser for UAC2
Daniel Mack [Thu, 27 May 2010 18:15:14 +0000 (20:15 +0200)]
ALSA: usb-audio: fix feature unit parser for UAC2

Fix a small off-by-one bug which causes the feature unit to announce a
wrong number of channels. This leads to illegal requests sent to the
firmware eventually.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agofix fs/sysv s_dirt handling
Al Viro [Thu, 27 May 2010 13:04:07 +0000 (09:04 -0400)]
fix fs/sysv s_dirt handling

got broken on ->sync_fs() conversion a year ago, nobody noticed...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofat: convert to use the new truncate convention.
npiggin@suse.de [Wed, 26 May 2010 15:05:38 +0000 (01:05 +1000)]
fat: convert to use the new truncate convention.

Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoext2: convert to use the new truncate convention.
npiggin@suse.de [Wed, 26 May 2010 15:05:37 +0000 (01:05 +1000)]
ext2: convert to use the new truncate convention.

I also have commented a possible bug in existing ext2 code, marked with XXX.

Cc: linux-ext4@vger.kernel.org
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agotmpfs: convert to use the new truncate convention
npiggin@suse.de [Wed, 26 May 2010 15:05:36 +0000 (01:05 +1000)]
tmpfs: convert to use the new truncate convention

Cc: Christoph Hellwig <hch@lst.de>
Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs: convert simple fs to new truncate
Nick Piggin [Thu, 27 May 2010 12:42:19 +0000 (22:42 +1000)]
fs: convert simple fs to new truncate

Convert simple filesystems: ramfs, configfs, sysfs, block_dev to new truncate
sequence.

Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agokill spurious reference to vmtruncate
npiggin@suse.de [Wed, 26 May 2010 15:05:34 +0000 (01:05 +1000)]
kill spurious reference to vmtruncate

Lots of filesystems calls vmtruncate despite not implementing the old
->truncate method.  Switch them to use simple_setsize and add some
comments about the truncate code where it seems fitting.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs: introduce new truncate sequence
npiggin@suse.de [Wed, 26 May 2010 15:05:33 +0000 (01:05 +1000)]
fs: introduce new truncate sequence

Introduce a new truncate calling sequence into fs/mm subsystems. Rather than
setattr > vmtruncate > truncate, have filesystems call their truncate sequence
from ->setattr if filesystem specific operations are required. vmtruncate is
deprecated, and truncate_pagecache and inode_newsize_ok helpers introduced
previously should be used.

simple_setattr is introduced for simple in-ram filesystems to implement
the new truncate sequence. Eventually all filesystems should be converted
to implement a setattr, and the default code in notify_change should go
away.

simple_setsize is also introduced to perform just the ATTR_SIZE portion
of simple_setattr (ie. changing i_size and trimming pagecache).

To implement the new truncate sequence:
- filesystem specific manipulations (eg freeing blocks) must be done in
  the setattr method rather than ->truncate.
- vmtruncate can not be used by core code to trim blocks past i_size in
  the event of write failure after allocation, so this must be performed
  in the fs code.
- convert usage of helpers block_write_begin, nobh_write_begin,
  cont_write_begin, and *blockdev_direct_IO* to use _newtrunc postfixed
  variants. These avoid calling vmtruncate to trim blocks (see previous).
- inode_setattr should not be used. generic_setattr is a new function
  to be used to copy simple attributes into the generic inode.
- make use of the better opportunity to handle errors with the new sequence.

Big problem with the previous calling sequence: the filesystem is not called
until i_size has already changed.  This means it is not allowed to fail the
call, and also it does not know what the previous i_size was. Also, generic
code calling vmtruncate to truncate allocated blocks in case of error had
no good way to return a meaningful error (or, for example, atomically handle
block deallocation).

Cc: Christoph Hellwig <hch@lst.de>
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs/super: fix kernel-doc warning
Randy Dunlap [Tue, 25 May 2010 05:22:34 +0000 (22:22 -0700)]
fs/super: fix kernel-doc warning

Fix fs/super.c kernel-doc warning and function notation:
Warning(fs/super.c:957): No description found for parameter 'sb'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs/minix: bugfix, number of indirect block ptrs per block depends on block size
Erik van der Kouwe [Wed, 26 May 2010 10:03:23 +0000 (12:03 +0200)]
fs/minix: bugfix, number of indirect block ptrs per block depends on block size

The MINIX filesystem driver used a constant number of indirect block
pointers in an indirect block. This worked only for filesystems with 1kb
block, while the MINIX default block size is now 4kb. As a consequence,
large files were read incorrectly on such filesystems and writing a
large file would cause the filesystem to become corrupted. This patch
computes the number of indirect block pointers based on the block size,
making the driver work for each block size.

I would like to thank Feiran Zheng ('Fam') for pointing out the cause
of the corruption.

Signed-off-by: Erik van der Kouwe <vdkouwe@cs.vu.nl>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agorename the generic fsync implementations
Christoph Hellwig [Wed, 26 May 2010 15:53:41 +0000 (17:53 +0200)]
rename the generic fsync implementations

We don't name our generic fsync implementations very well currently.
The no-op implementation for in-memory filesystems currently is called
simple_sync_file which doesn't make too much sense to start with,
the the generic one for simple filesystems is called simple_fsync
which can lead to some confusion.

This patch renames the generic file fsync method to generic_file_fsync
to match the other generic_file_* routines it is supposed to be used
with, and the no-op implementation to noop_fsync to make it obvious
what to expect.  In addition add some documentation for both methods.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agodrop unused dentry argument to ->fsync
Christoph Hellwig [Wed, 26 May 2010 15:53:25 +0000 (17:53 +0200)]
drop unused dentry argument to ->fsync

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs: Add missing mutex_unlock
Julia Lawall [Wed, 26 May 2010 15:54:39 +0000 (17:54 +0200)]
fs: Add missing mutex_unlock

Add a mutex_unlock missing on the error path.  At other exists from the
function that return an error flag, the mutex is unlocked, so do the same
here.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression E1;
@@

* mutex_lock(E1,...);
  <+... when != E1
  if (...) {
    ... when != E1
*   return ...;
  }
  ...+>
* mutex_unlock(E1,...);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoFix racy use of anon_inode_getfd() in perf_event.c
Al Viro [Wed, 26 May 2010 21:40:29 +0000 (17:40 -0400)]
Fix racy use of anon_inode_getfd() in perf_event.c

once anon_inode_getfd() is called, you can't expect *anything* about
struct file that descriptor points to - another thread might be doing
whatever it likes with descriptor table at that point.

Cc: stable <stable@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoget rid of the magic around f_count in aio
Al Viro [Wed, 26 May 2010 19:13:55 +0000 (15:13 -0400)]
get rid of the magic around f_count in aio

__aio_put_req() plays sick games with file refcount.  What
it wants is fput() from atomic context; it's almost always
done with f_count > 1, so they only have to deal with delayed
work in rare cases when their reference happens to be the
last one.  Current code decrements f_count and if it hasn't
hit 0, everything is fine.  Otherwise it keeps a pointer
to struct file (with zero f_count!) around and has delayed
work do __fput() on it.

Better way to do it: use atomic_long_add_unless( , -1, 1)
instead of !atomic_long_dec_and_test().  IOW, decrement it
only if it's not the last reference, leave refcount alone
if it was.  And use normal fput() in delayed work.

I've made that atomic_long_add_unless call a new helper -
fput_atomic().  Drops a reference to file if it's safe to
do in atomic (i.e. if that's not the last one), tells if
it had been able to do that.  aio.c converted to it, __fput()
use is gone.  req->ki_file *always* contributes to refcount
now.  And __fput() became static.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoVFS: fix recent breakage of FS_REVAL_DOT
Neil Brown [Mon, 24 May 2010 06:57:56 +0000 (16:57 +1000)]
VFS: fix recent breakage of FS_REVAL_DOT

Commit 1f36f774b22a0ceb7dd33eca626746c81a97b6a5 broke FS_REVAL_DOT semantics.

In particular, before this patch, the command
   ls -l
in an NFS mounted directory would always check if the directory on the server
had changed and if so would flush and refill the pagecache for the dir.
After this patch, the same "ls -l" will repeatedly return stale date until
the cached attributes for the directory time out.

The following patch fixes this by ensuring the d_revalidate is called by
do_last when "." is being looked-up.
link_path_walk has already called d_revalidate, but in that case LOOKUP_OPEN
is not set so nfs_lookup_verify_inode chooses not to do any validation.

The following patch restores the original behaviour.

Cc: stable@kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoRevert "anon_inode: set S_IFREG on the anon_inode"
Al Viro [Thu, 27 May 2010 15:11:06 +0000 (11:11 -0400)]
Revert "anon_inode: set S_IFREG on the anon_inode"

This reverts commit a7cf4145bb86aaf85d4d4d29a69b50b688e2e49d.

13 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Fri, 28 May 2010 01:34:58 +0000 (18:34 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: implement dump_id force param
  libata: disable ATAPI AN by default
  libata-sff: make BMDMA optional
  libata-sff: kill dummy BMDMA ops from sata_qstor and pata_octeon_cf
  libata-sff: separate out BMDMA init
  libata-sff: separate out BMDMA irq handler
  libata-sff: ata_sff_irq_clear() is BMDMA specific
  sata_mv: drop unncessary EH callback resetting

13 years agoacpi_pad: uses MONITOR/MWAIT, so it doesn't need to clear TS_POLLING
Len Brown [Mon, 24 May 2010 15:41:00 +0000 (11:41 -0400)]
acpi_pad: uses MONITOR/MWAIT, so it doesn't need to clear TS_POLLING

api_pad exclusively uses MONITOR/MWAIT to sleep in idle,
so it does not need the wakeup IPI during idle sleep
that is provoked by clearing TS_POLLING.

Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Shaohua Li <shaohua.li@intel.com>
13 years agosched: clarify commment for TS_POLLING
Len Brown [Mon, 24 May 2010 15:34:36 +0000 (11:34 -0400)]
sched: clarify commment for TS_POLLING

TS_POLLING set tells the scheduler an idle_task will poll
need_resched() to look for work.

TS_POLLING clear tells resched_task() and wake_up_idle_cpu()
that the remote CPU's idle_task is now sleeping in idle,
and thus requires a reschedule interrupt notice work.

Update the description of TS_POLLING to reflect how it works.
"idle task polling need_resched, skip sending interrupt"

Wordsmithing-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
13 years agoACPI: allow a native cpuidle driver to displace ACPI
Len Brown [Sat, 22 May 2010 21:03:29 +0000 (17:03 -0400)]
ACPI: allow a native cpuidle driver to displace ACPI

The ACPI driver would fail probe when it found that
another driver had previously registered with cpuidle.

But this is a natural situation, as a native hardware
cpuidle driver should be able to bind instead of ACPI,
and the ACPI processor driver should be able to handle
yielding control of C-states while still handling
P-states and T-states.

Add a KERN_DEBUG line showing when acpi_idle
does successfully register.

Signed-off-by: Len Brown <len.brown@intel.com>
13 years agocpuidle: make cpuidle_curr_driver static
Len Brown [Sat, 22 May 2010 20:57:26 +0000 (16:57 -0400)]
cpuidle: make cpuidle_curr_driver static

cpuidle_register_driver() sets cpuidle_curr_driver
cpuidle_unregister_driver() clears cpuidle_curr_driver

We should't expose cpuidle_curr_driver to
potential modification except via these interfaces.
So make it static and create cpuidle_get_driver() to observe it.

Signed-off-by: Len Brown <len.brown@intel.com>
13 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Fri, 28 May 2010 00:46:47 +0000 (17:46 -0700)]
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 build breakage

13 years agomfd: Rename twl5031 sih modules
Ilkka Koskinen [Thu, 20 May 2010 10:04:20 +0000 (13:04 +0300)]
mfd: Rename twl5031 sih modules

Fix the names of twl5031 specific sih modules to match
the documentation.

Signed-off-by: Ilkka Koskinen <ilkka.koskinen@nokia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Storage class for timberdale should be before const qualifier
Tobias Klauser [Thu, 20 May 2010 08:39:00 +0000 (10:39 +0200)]
mfd: Storage class for timberdale should be before const qualifier

The C99 specification states in section 6.11.5:

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

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Remove unneeded and dangerous clearing of clientdata
Wolfram Sang [Thu, 20 May 2010 22:50:17 +0000 (00:50 +0200)]
mfd: Remove unneeded and dangerous clearing of clientdata

Unlike real i2c-devices which get detached from the driver, dummy-devices
get truly unregistered. So, there has never been a need to clear the
clientdata because the device will go away anyhow. For the occasions fixed
here, clearing clientdata was even dangerous as the structure was freed
already.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: New AB8500 driver
Rabin Vincent [Wed, 19 May 2010 09:39:02 +0000 (11:39 +0200)]
mfd: New AB8500 driver

Add a new driver to support the AB8500 Power Management chip, replacing
the current AB4500.  The new driver replaces the old one, instead of an
incremental modification, because this is a substantial overhaul
including:

 - Split of the driver into -core and -spi portions, to allow another
   interface layer to be added

 - Addition of interrupt support

 - Switch to MFD core API for handling subdevices

 - Simplification of the APIs to remove a redundant block parameter

 - Rename of the APIs and macros from ab4500_* to ab8500_*

 - Rename of the files from ab4500* to ab8500*

 - Change of the driver name from ab4500 to ab8500

Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agogpio: Fix inverted rdc321x gpio data out registers
Florian Fainelli [Sun, 16 May 2010 10:02:18 +0000 (12:02 +0200)]
gpio: Fix inverted rdc321x gpio data out registers

rdc_gpio_set_value_impl has the gpio data registers 1 and 2 inverted, fix this.

Signed-off-by: Bernhard Loos <bernhardloos@gmail.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Change rdc321x resources flags to IORESOURCE_IO
Florian Fainelli [Sat, 15 May 2010 20:58:27 +0000 (22:58 +0200)]
mfd: Change rdc321x resources flags to IORESOURCE_IO

The rdc321x southbridge PCI device has no MEM PCI resources that we could
pass to mfd_add_devices. Since 33254dd5, mfd_add_device checks for the
mem_base argument that we set to NULL. Changing the resources passed to
our MFD cells from IORESOURCE_MEM to IORESOURCE_IO fixes that. Since we use
those resources as offsets to the PCI configuration space base address of
the southbridge device this is also more adequate.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Move pcf50633 irq related functions to its own file.
Lars-Peter Clausen [Wed, 12 May 2010 00:10:56 +0000 (02:10 +0200)]
mfd: Move pcf50633 irq related functions to its own file.

This reduces code clutter a bit and will ease an migration to genirq.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Use threaded irq for pcf50633
Lars-Peter Clausen [Wed, 12 May 2010 00:10:55 +0000 (02:10 +0200)]
mfd: Use threaded irq for pcf50633

Use threaded oneshot irq handler instead of normal irq handler and a workqueue.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: pcf50633-adc: Fix potential race in pcf50633_adc_sync_read
Lars-Peter Clausen [Wed, 12 May 2010 00:10:54 +0000 (02:10 +0200)]
mfd: pcf50633-adc: Fix potential race in pcf50633_adc_sync_read

Currently it's not guaranteed that request struct is not already freed when
reading from it. Fix this by moving synced request related fields from the
pcf50633_adc_request struct to its own struct and store it on the functions
stack.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Fix pcf50633 bitfield logic in interrupt handler
Lars-Peter Clausen [Wed, 12 May 2010 00:10:53 +0000 (02:10 +0200)]
mfd: Fix pcf50633 bitfield logic in interrupt handler

Those constants are alreay bitfields.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agogpio: rdc321x needs to select MFD_CORE
Randy Dunlap [Tue, 11 May 2010 20:24:20 +0000 (13:24 -0700)]
gpio: rdc321x needs to select MFD_CORE

Fix rdc321x-southbridge build:  GPIO_RDC321X needs to select
MFD_CORE so that the core is built at the same (or higher)
tristate level.

rdc321x-southbridge.c:(.devinit.text+0x6103): undefined reference to `mfd_add_devices'
rdc321x-southbridge.c:(.devexit.text+0xe5f): undefined reference to `mfd_remove_devices'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Use menuconfig for quicker config editing
Randy Dunlap [Mon, 10 May 2010 23:07:34 +0000 (01:07 +0200)]
mfd: Use menuconfig for quicker config editing

Change MFD 'menu' to 'menuconfig' to facilitate easy (one-click)
disabling of all MFD drivers.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agoARM: AB3550 board configuration and irq for U300
Mattias Wallin [Sat, 1 May 2010 16:26:40 +0000 (18:26 +0200)]
ARM: AB3550 board configuration and irq for U300

This patch adds the i2c board configuration needed for the
Mixed Signal chip AB3550. It also adds the irq numbers needed
for the irq_chip implementation.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: AB3550 core driver
Mattias Wallin [Mon, 10 May 2010 22:25:29 +0000 (00:25 +0200)]
mfd: AB3550 core driver

This adds a core driver for the AB3550 mixed-signal circuit
found in the ST-Ericsson U300 platforms. This driver
is a singleton proxy for all access to the AB3550 sub
functionality drivers which can be added on top of this one:
RTC, regulators, battery and system power control, vibrator,
LEDs and an ALSA codec.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: AB3100 register access change to abx500 API
Mattias Wallin [Sat, 1 May 2010 16:26:20 +0000 (18:26 +0200)]
mfd: AB3100 register access change to abx500 API

The interface for the AB3100 is changed to make way for the
ABX500 family of chips: AB3550, AB5500 and future ST-Ericsson
Analog Baseband chips. The register access functions are moved
out to a separate struct abx500_ops. In this way the interface
is moved from the implementation and the sub functionality drivers
can keep their interface intact when chip infrastructure and
communication mechanisms changes. We also define the AB3550
device IDs and the AB3550 platform data struct and convert
the catenated 32bit event to an array of 3 x 8bits.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Renamed ab3100.h to abx500.h
Linus Walleij [Sat, 1 May 2010 16:26:07 +0000 (18:26 +0200)]
mfd: Renamed ab3100.h to abx500.h

The goal here is to make way for a more general interface for the
analog baseband chips ab3100 ab3550 ab550 and future chips.

This patch have been divided into two parts since both changing name
and content of a file is not recommended in git.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agogpio: Add TC35892 GPIO driver
Rabin Vincent [Mon, 10 May 2010 21:43:47 +0000 (23:43 +0200)]
gpio: Add TC35892 GPIO driver

Add a GPIO driver to support the GPIOs on the TC35892 I/O Expander.

Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Add Toshiba's TC35892 MFD core
Rabin Vincent [Mon, 10 May 2010 21:39:47 +0000 (23:39 +0200)]
mfd: Add Toshiba's TC35892 MFD core

The TC35892 I/O Expander provides 24 GPIOs, a keypad controller, timers,
and a rotator wheel interface.  This patch adds the MFD core.

Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Delay to mask tsc irq in max8925
Haojian Zhuang [Tue, 27 Apr 2010 18:55:28 +0000 (14:55 -0400)]
mfd: Delay to mask tsc irq in max8925

There're two IRQ pins output from MAX8925. One is PMIC interrupt, the other
is TSC interrupt. But they're sharing one irq chip.

After initializing MAX8925 interrupts, unexpected TSC interrupt may occur and
it can't be cleared if touch driver isn't loaded.

Now move the operation of masking TSC interrupt behind requesting PMIC
interrupt. If touch driver isn't loaded, this interrupt is always masked.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Remove incorrect wm8350 kfree
Rabin Vincent [Wed, 21 Apr 2010 15:36:05 +0000 (21:06 +0530)]
mfd: Remove incorrect wm8350 kfree

The i2c_client received in probe() should not be kfree()'d.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Fix error in wm8400 reg cache access check
Phil Carmody [Fri, 16 Apr 2010 12:00:09 +0000 (15:00 +0300)]
mfd: Fix error in wm8400 reg cache access check

Accessing num_reg elements in the interval [reg .. reg+num_regs)
is permitted if (reg+numregs <= array size), so barf when that
excluded upper bound is > array size. The prior -1 would give
access to one too many elements.

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agodavinci: da850 TPS6507x touch screen driver board data
Todd Fischer [Mon, 5 Apr 2010 23:53:13 +0000 (17:53 -0600)]
davinci: da850 TPS6507x touch screen driver board data

The touch screen controller in the TPS6507x chip needs values that are
dependent on the characteristics of the touch screen hardware being used
in the board design.  In addition, the board provides version information
that is exposed via the kernel input sub-system.

Signed-off-by: Todd Fischer <todd.fischer@ridgerun.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Ensure WM831x charger interrupts are acknowledged when suspending
Mark Brown [Thu, 8 Apr 2010 08:02:39 +0000 (10:02 +0200)]
mfd: Ensure WM831x charger interrupts are acknowledged when suspending

The charger interrupts on the WM831x are unconditionally a wake source
for the system. If the power driver is not able to monitor them (for
example, due to the IRQ line not having been wired up on the system)
then any charger interrupt will prevent the system suspending for any
meaningful amount of time since nothing will ack them.

Avoid this issue by manually acknowledging these interrupts when we
suspend the WM831x core device if they are masked. If software is
actually using the interrupts then they will be unmasked and this
change will have no effect.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Initialise WM831x IRQ masks on chip even if interrupts not in use
Mark Brown [Mon, 5 Apr 2010 15:14:17 +0000 (16:14 +0100)]
mfd: Initialise WM831x IRQ masks on chip even if interrupts not in use

Ensure that the hardware has interrupts masked if we are not using
the interrupt controller on the WM831x by initialising the masks
before we check for the setup data required for the IRQ line. This
avoids signalling an unused IRQ line and improves the robustness
of checks that the IRQ is in use.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agoinput: Touchscreen driver for TPS6507x
Todd Fischer [Mon, 5 Apr 2010 23:53:12 +0000 (17:53 -0600)]
input: Touchscreen driver for TPS6507x

Add touch screen input driver for TPS6507x family of multi-function
chips.  Uses the TPS6507x MFD driver.  No interrupt support due to
testing limitations of current hardware.

Signed-off-by: Todd Fischer <todd.fischer@ridgerun.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Add TPS6507x support
Todd Fischer [Thu, 8 Apr 2010 07:04:55 +0000 (09:04 +0200)]
mfd: Add TPS6507x support

TPS6507x are multi function (PM, touchscreen) chipsets from TI.
This commit also changes the corresponding regulator driver from being
standalone to an MFD subdevice.

Signed-off-by: Todd Fischer <todd.fischer@ridgerun.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agoregulator: tps6057x namespace cleanup
Todd Fischer [Tue, 6 Apr 2010 02:23:58 +0000 (20:23 -0600)]
regulator: tps6057x namespace cleanup

Move from using tps or tsp6507x to tps6057x_pmic in a consistent manner.

Signed-off-by: Todd Fischer <todd.fischer@ridgerun.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Add tps6507x board data structure
Todd Fischer [Tue, 6 Apr 2010 02:23:57 +0000 (20:23 -0600)]
mfd: Add tps6507x board data structure

Add mfd structure which refrences sub-driver initialization data. For example,
for a giving hardware implementation, the voltage regulator sub-driver
initialization data provides the mapping betten a voltage regulator and what
the output voltage is being used for.

Signed-off-by: Todd Fischer <todd.fischer@ridgerun.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Move TPS6507x register definition to header file.
Todd Fischer [Tue, 6 Apr 2010 02:23:56 +0000 (20:23 -0600)]
mfd: Move TPS6507x register definition to header file.

Other sub-drivers for the TPS6507x chip will need to use register
definition so move it out of the source file and into a header file.

Signed-off-by: Todd Fischer <todd.fischer@ridgerun.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agogpio: Update gfp/slab.h includes for rdc321x
Tejun Heo [Fri, 2 Apr 2010 16:24:20 +0000 (18:24 +0200)]
gpio: Update gfp/slab.h includes for rdc321x

Implicit slab.h inclusion via percpu.h is about to go away.  Make sure
gfp.h or slab.h is included as necessary.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
13 years agomfd: Improve WM831x AUXADC completion handling
Mark Brown [Fri, 2 Apr 2010 15:31:03 +0000 (16:31 +0100)]
mfd: Improve WM831x AUXADC completion handling

Currently completion of WM831x AUXADC conversions is monitored by
checking for convertor enable. Due to the mechanism used to ensure
data corruption is avoided when reading AUXADC data there may under
heavy I/O be a window where this bit has cleared but the conversion
results have not been updated. Data availability is only guaranteed
after the AUXADC data interrupt has been asserted.

Avoid this by always using the interrupt to detect completion. If the
chip IRQ is not set up then we poll the IRQ status register for up to
5ms. If it is set up then we rely on the data done interrupt with a
vastly increased timeout, failing the conversion if the interrupt is
not generated.

This also saves a register read when using interrupts.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agogpio: Add support for Janz VMOD-TTL Digital IO module
Ira W. Snyder [Wed, 7 Apr 2010 08:08:01 +0000 (10:08 +0200)]
gpio: Add support for Janz VMOD-TTL Digital IO module

The Janz VMOD-TTL is a MODULbus daughterboard which fits onto any MODULbus
carrier board. It essentially consists of some various logic and a Zilog
Z8536 CIO Counter/Timer and Parallel IO Unit.

The board must be physically configured with jumpers to enable a user to
drive output signals. I am only interested in outputs, so I have made this
driver as simple as possible. It only supports a very minimal subset of the
features provided by the Z8536 chip.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agocan: Add support for Janz VMOD-ICAN3 Intelligent CAN module
Ira W. Snyder [Mon, 29 Mar 2010 16:58:51 +0000 (09:58 -0700)]
can: Add support for Janz VMOD-ICAN3 Intelligent CAN module

The Janz VMOD-ICAN3 is a MODULbus daughterboard which fits onto any
MODULbus carrier board. It is an intelligent CAN controller with a
microcontroller and associated firmware.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Janz CMOD-IO PCI MODULbus Carrier Board support
Ira W. Snyder [Wed, 7 Apr 2010 07:43:00 +0000 (09:43 +0200)]
mfd: Janz CMOD-IO PCI MODULbus Carrier Board support

The Janz CMOD-IO PCI MODULbus carrier board is a PCI to MODULbus bridge,
which may host many different types of MODULbus daughterboards, including
CAN and GPIO controllers.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Reviewed-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Proper pcf50633 irq check
Dan Carpenter [Sun, 28 Mar 2010 11:28:08 +0000 (14:28 +0300)]
mfd: Proper pcf50633 irq check

"pcf->irq_handler" has PCF50633_NUM_IRQ elements.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Remove unused wm831x IRQ handler data
Mark Brown [Fri, 26 Mar 2010 14:47:04 +0000 (14:47 +0000)]
mfd: Remove unused wm831x IRQ handler data

This was used by the old, pre-genirq IRQ implementation but is no
longer required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Add timb-dma to all configurations of timberdale
Richard Röjfors [Thu, 25 Mar 2010 18:44:23 +0000 (19:44 +0100)]
mfd: Add timb-dma to all configurations of timberdale

Add platform data for timb-dma, and add it in to timb-dma
in all configurations of timberdale.

Also incremented the version number.

Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Section cleanup of 88pm860x driver
Henrik Kretzschmar [Fri, 26 Mar 2010 01:40:13 +0000 (02:40 +0100)]
mfd: Section cleanup of 88pm860x driver

This patch fixes three section mismatches.

WARNING: drivers/mfd/88pm860x.o(.text+0x12): Section mismatch in
reference from the function pm860x_device_exit() to the function
.devexit.text:device_irq_exit()
The function pm860x_device_exit() references a function in an exit
section.
Often the function device_irq_exit() has valid usage outside the exit
section
and the fix is to remove the __devexit annotation of device_irq_exit.

WARNING: drivers/mfd/88pm860x.o(.text+0xb0): Section mismatch in
reference from the function pm860x_device_init() to the function
.devinit.text:device_8606_init()
The function pm860x_device_init() references
the function __devinit device_8606_init().
This is often because pm860x_device_init lacks a __devinit
annotation or the annotation of device_8606_init is wrong.

WARNING: drivers/mfd/88pm860x.o(.text+0xbe): Section mismatch in
reference from the function pm860x_device_init() to the function
.devinit.text:device_8607_init()
The function pm860x_device_init() references
the function __devinit device_8607_init().
This is often because pm860x_device_init lacks a __devinit
annotation or the annotation of device_8607_init is wrong.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Check for mem_base when building IORESOURCE_MEM resources
Samuel Ortiz [Fri, 26 Mar 2010 00:09:04 +0000 (01:09 +0100)]
mfd: Check for mem_base when building IORESOURCE_MEM resources

If mem_base is NULL, then we fall back to the default case, just copying the
original resource.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Off by one calculating size for timberdale
Dan Carpenter [Mon, 22 Mar 2010 12:12:42 +0000 (15:12 +0300)]
mfd: Off by one calculating size for timberdale

I'm pretty sure that it should be + 1 here.  It's an off by one, because
we start counting at zero.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agox86: remove rdc321x_defs.h
Florian Fainelli [Sun, 21 Mar 2010 00:06:17 +0000 (01:06 +0100)]
x86: remove rdc321x_defs.h

This file is replaced by a cleaner version with the adding of a MFD driver for
the southbridge.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agowatchdog: Convert rdc321x_wdt to use southbridge pci device
Florian Fainelli [Tue, 23 Mar 2010 02:56:24 +0000 (22:56 -0400)]
watchdog: Convert rdc321x_wdt to use southbridge pci device

The RDC321x MFD southbridge driver will pass a reference to the
southbridge PCI device which should be used by the watchdog driver for its
operations.  This patch converts the watchdog driver to use the pci_dev
pointer and make use of the base register resource which is passed along
with the platform device.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agogpio: Add support for RDC321x GPIO controller
Florian Fainelli [Sun, 21 Mar 2010 00:06:09 +0000 (01:06 +0100)]
gpio: Add support for RDC321x GPIO controller

This patch adds a new GPIO driver for the RDC321x SoC GPIO controller.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Add support for the RDC321x southbridge
Florian Fainelli [Sun, 21 Mar 2010 00:06:05 +0000 (01:06 +0100)]
mfd: Add support for the RDC321x southbridge

This patch adds a new MFD driver for the RDC321x southbridge. This southbridge
is always present in the RDC321x System-on-a-Chip and provides access to some
GPIOs as well as a watchdog. Access to these two functions is done using the
southbridge PCI device configuration space.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Fix dangling pointers
Wolfram Sang [Sat, 20 Mar 2010 14:12:54 +0000 (15:12 +0100)]
mfd: Fix dangling pointers

Fix I2C-drivers which missed setting clientdata to NULL before freeing the
structure it points to. Also fix drivers which do this _after_ the structure
was freed already.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Add in XIIC to some configurations of timberdale
Richard Röjfors [Tue, 16 Mar 2010 09:43:28 +0000 (10:43 +0100)]
mfd: Add in XIIC to some configurations of timberdale

This patch adds in the Xilinx I2C bus driver to some of the
configurations of the timberdale MFD.

It provides the I2C devices to the XIIC via platform data in a
similar way as done to the ocores driver.

Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Check t7l66 platform_data pointer
Samuel Ortiz [Fri, 19 Mar 2010 11:46:28 +0000 (12:46 +0100)]
mfd: Check t7l66 platform_data pointer

We should check for pdata being not NULL before dereferencing it.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years ago[IA64] Fix build breakage
Tony Luck [Thu, 27 May 2010 22:35:13 +0000 (15:35 -0700)]
[IA64] Fix build breakage

In commit 0ac0c0d0f837c499afd02a802f9cf52d3027fa3b
cpusets: randomize node rotor used in cpuset_mem_spread_node()

Jack Steiner fixed a problem with too many small tasks being
assigned to node 0. Copy his code to ia64 to avoid build error.

    arch/ia64/kernel/smpboot.c:641: error: ‘cpu_to_node_map’ undeclared (first use in this function)

In commit 3bccd996276b108c138e8176793a26ecef54d573
numa: ia64: use generic percpu var numa_node_id() implementation

Lee Schermerhorn added some set_numa_node() calls - but these
only work on CONFIG_NUMA=y configurations. Surround the calls
with #ifdef CONFIG_NUMA

Signed-off-by: Tony Luck <tony.luck@intel.com>
13 years agoMerge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 27 May 2010 22:23:47 +0000 (15:23 -0700)]
Merge branch 'perf-core-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (61 commits)
  tracing: Add __used annotation to event variable
  perf, trace: Fix !x86 build bug
  perf report: Support multiple events on the TUI
  perf annotate: Fix up usage of the build id cache
  x86/mmiotrace: Remove redundant instruction prefix checks
  perf annotate: Add TUI interface
  perf tui: Remove annotate from popup menu after failure
  perf report: Don't start the TUI if -D is used
  perf: Fix getline undeclared
  perf: Optimize perf_tp_event_match()
  perf: Remove more code from the fastpath
  perf: Optimize the !vmalloc backed buffer
  perf: Optimize perf_output_copy()
  perf: Fix wakeup storm for RO mmap()s
  perf-record: Share per-cpu buffers
  perf-record: Remove -M
  perf: Ensure that IOC_OUTPUT isn't used to create multi-writer buffers
  perf, trace: Optimize tracepoints by using per-tracepoint-per-cpu hlist to track events
  perf, trace: Optimize tracepoints by removing IRQ-disable from perf/tracepoint interaction
  perf tui: Allow disabling the TUI on a per command basis in ~/.perfconfig
  ...

13 years agoDMAENGINE: DMA40 U8500 platform configuration
Linus Walleij [Thu, 27 May 2010 22:21:26 +0000 (15:21 -0700)]
DMAENGINE: DMA40 U8500 platform configuration

This completes the DMA40 support with the platform-specific
configuration for U8500/DB8500.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Reviewed-by: Alessandro Rubini <rubini@unipv.it>
Cc: STEricsson_nomadik_linux@list.st.com
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
[fixed up dma40_{tx|rx}_map declaration/initialization]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
13 years agoposix_timer: Fix error path in timer_create
Andrey Vagin [Mon, 24 May 2010 19:15:33 +0000 (12:15 -0700)]
posix_timer: Fix error path in timer_create

Move CLOCK_DISPATCH(which_clock, timer_create, (new_timer)) after all
posible EFAULT erros.

*_timer_create may allocate/get resources.
(for example posix_cpu_timer_create does get_task_struct)

[ tglx: fold the remove crappy comment patch into this ]

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: <stable@kernel.org>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86, cpufeature: Unbreak compile with gcc 3.x
H. Peter Anvin [Thu, 27 May 2010 19:02:00 +0000 (12:02 -0700)]
x86, cpufeature: Unbreak compile with gcc 3.x

gcc 3 is too braindamaged to be able to compile static_cpu_has() --
apparently it can't tell that a constant passed to an inline function
is still a constant -- so if we're using gcc 3, just use the dynamic
test.  This is bad for performance, but if you care about performance,
don't use an ancient, known-to-optimize-poorly compiler.

Reported-and-tested-by: Eric Dumazet <eric.dumazet@gmail.com>
LKML-Reference: <4BF2FF82.7090005@zytor.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
13 years agoMerge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight
Linus Torvalds [Thu, 27 May 2010 18:34:55 +0000 (11:34 -0700)]
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight

* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight:
  gta02: Use pcf50633 backlight driver instead of platform backlight driver.
  backlight: pcf50633: Register a pcf50633-backlight device in pcf50633 core driver.
  backlight: Add pcf50633 backlight driver
  backlight: 88pm860x_bl: fix error handling in pm860x_backlight_probe
  backlight: max8925_bl: Fix error handling path
  backlight: l4f00242t03: fix error handling in l4f00242t03_probe
  backlight: add S6E63M0 AMOLED LCD Panel driver
  backlight: adp8860: add support for ADP8861 & ADP8863
  backlight: mbp_nvidia_bl - Fix DMI_SYS_VENDOR for MacBook1,1
  backlight: Add Cirrus EP93xx backlight driver
  backlight: l4f00242t03: Fix regulators handling code in remove function
  backlight: fix adp8860_bl build errors
  backlight: new driver for the ADP8860 backlight parts
  backlight: 88pm860x_bl - potential memory leak
  backlight: mbp_nvidia_bl - add support for older MacBookPro and MacBook 6,1.
  backlight: Kconfig cleanup
  backlight: backlight_device_register() return ERR_PTR()

13 years agoMerge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
Linus Torvalds [Thu, 27 May 2010 18:34:20 +0000 (11:34 -0700)]
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds

* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
  leds: Add mx31moboard MC13783 led support
  leds: Add mc13783 LED support
  leds: leds-ss4200: fix led_classdev_unregister twice in error handling
  leds: leds-lp3944: properly handle lp3944_configure fail in lp3944_probe
  leds: led-class: set permissions on max_brightness file to 0444
  leds: leds-gpio: Change blink_set callback to be able to turn off blinking
  leds: Add LED driver for the Soekris net5501 board
  leds: 88pm860x - fix checking in probe function