]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
14 years agomd: simplify updating of event count to sometimes avoid updating spares.
NeilBrown [Mon, 17 May 2010 23:28:43 +0000 (09:28 +1000)]
md: simplify updating of event count to sometimes avoid updating spares.

When updating the event count for a simple clean <-> dirty transition,
we try to avoid updating the spares so they can safely spin-down.
As the event_counts across an array must be +/- 1, this means
decrementing the event_count on a dirty->clean transition.
This is not always safe and we have to avoid the unsafe time.
We current do this with a misguided idea about it being safe or
not depending on whether the event_count is odd or even.  This
approach only works reliably in a few common instances, but easily
falls down.

So instead, simply keep internal state concerning whether it is safe
or not, and always assume it is not safe when an array is first
assembled.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd/raid6: Fix raid-6 read-error correction in degraded state
Gabriele A. Trombetti [Wed, 28 Apr 2010 01:51:17 +0000 (11:51 +1000)]
md/raid6: Fix raid-6 read-error correction in degraded state

Fix: Raid-6 was not trying to correct a read-error when in
singly-degraded state and was instead dropping one more device, going to
doubly-degraded state. This patch fixes this behaviour.

Tested-by: Janos Haar <janos.haar@netcenter.hu>
Signed-off-by: Gabriele A. Trombetti <g.trombetti.lkrnl1213@logicschema.com>
Reported-by: Janos Haar <janos.haar@netcenter.hu>
Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@kernel.org
14 years agomd: restore ability of spare drives to spin down.
NeilBrown [Fri, 7 May 2010 09:44:26 +0000 (19:44 +1000)]
md: restore ability of spare drives to spin down.

Some time ago we stopped the clean/active metadata updates
from being written to a 'spare' device in most cases so that
it could spin down and say spun down.  Device failure/removal
etc are still recorded on spares.

However commit 51d5668cb2e3fd1827a55 broke this 50% of the time,
depending on whether the event count is even or odd.
The change log entry said:

   This means that the alignment between 'odd/even' and
    'clean/dirty' might take a little longer to attain,

how ever the code makes no attempt to create that alignment, so it
could take arbitrarily long.

So when we find that clean/dirty is not aligned with odd/even,
force a second metadata-update immediately.  There are already cases
where a second metadata-update is needed immediately (e.g. when a
device fails during the metadata update).  We just piggy-back on that.

Reported-by: Joe Bryant <tenminjoe@yahoo.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@kernel.org
14 years agomd: Fix read balancing in RAID1 and RAID10 on drives > 2TB
NeilBrown [Fri, 7 May 2010 22:20:17 +0000 (08:20 +1000)]
md: Fix read balancing in RAID1 and RAID10 on drives > 2TB

read_balance uses a "unsigned long" for a sector number which
will get truncated beyond 2TB.
This will cause read-balancing to be non-optimal, and can cause
data to be read from the 'wrong' branch during a resync.  This has a
very small chance of returning wrong data.

Reported-by: Jordan Russell <jr-list-2010@quo.to>
Cc: stable@kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd/linear: standardise all printk messages
NeilBrown [Mon, 3 May 2010 05:12:04 +0000 (15:12 +1000)]
md/linear: standardise all printk messages

  md/linear:mdname:

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd/raid0: tidy up printk messages.
NeilBrown [Mon, 3 May 2010 05:06:27 +0000 (15:06 +1000)]
md/raid0: tidy up printk messages.

All messages now start
   md/raid0:md-device-name:

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd/raid10: tidy up printk messages.
NeilBrown [Mon, 3 May 2010 04:47:14 +0000 (14:47 +1000)]
md/raid10: tidy up printk messages.

All raid10 printk messages now start
   md/raid10:md-device-name:

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd/raid1: improve printk messages
NeilBrown [Mon, 3 May 2010 04:30:35 +0000 (14:30 +1000)]
md/raid1: improve printk messages

Make sure the array name is included in a uniform way in all printk
messages.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd/raid5: improve consistency of error messages.
NeilBrown [Mon, 3 May 2010 04:09:02 +0000 (14:09 +1000)]
md/raid5: improve consistency of error messages.

Many 'printk' messages from the raid456 module mention 'raid5' even
though it may be a 'raid6' or even 'raid4' array.  This can cause
confusion.
Also the actual array name is not always reported and when it is
it is not reported consistently.

So change all the messages to start:
    md/raid:%s:
where '%s' becomes e.g. md3 to identify the particular array.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: remove EXPERIMENTAL designation from RAID10
NeilBrown [Mon, 3 May 2010 03:16:56 +0000 (13:16 +1000)]
md: remove EXPERIMENTAL designation from RAID10

RAID10 has been available for quite a while now and is quite well
tested, so we can remove the EXPERIMENTAL designation.

Reported-by: Eric MSP Veith <eveith@wwweb-library.net>
Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: allow integers to be passed to md/level
Dan Williams [Sun, 2 May 2010 17:04:16 +0000 (10:04 -0700)]
md: allow integers to be passed to md/level

e.g. allow md to interpret 'echo 4 > md/level' as a request for raid4.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
14 years agomd: notify mdstat waiters of level change
Dan Williams [Sun, 2 May 2010 01:14:57 +0000 (18:14 -0700)]
md: notify mdstat waiters of level change

Level modifications change the output of mdstat.  The mdmon manager
thread is interested in these events for external metadata management.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
14 years agomd/raid4: permit raid0 takeover
Dan Williams [Sun, 2 May 2010 01:09:05 +0000 (18:09 -0700)]
md/raid4: permit raid0 takeover

For consistency allow raid4 to takeover raid0 in addition to raid5 (with a
raid4 layout).

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
14 years agomd/raid1: delay reads that could overtake behind-writes.
NeilBrown [Wed, 31 Mar 2010 00:21:44 +0000 (11:21 +1100)]
md/raid1: delay reads that could overtake behind-writes.

When a raid1 array is configured to support write-behind
on some devices, it normally only reads from other devices.
If all devices are write-behind (because the rest have failed)
it is possible for a read request to be serviced before a
behind-write request, which would appear as data corruption.

So when forced to read from a WriteMostly device, wait for any
write-behind to complete, and don't start any more behind-writes.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd/raid1: fix confusing 'redirect sector' message.
NeilBrown [Wed, 7 Apr 2010 02:14:43 +0000 (12:14 +1000)]
md/raid1: fix confusing 'redirect sector' message.

This message seems to suggest the named device is the one on which a
read failed, however it is actually the device that the read will be
redirected to.
So make the message a little clearer.

Reported-by: Tim Burgess <ozburgess@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: don't unregister the thread in mddev_suspend
NeilBrown [Tue, 6 Apr 2010 04:23:02 +0000 (14:23 +1000)]
md: don't unregister the thread in mddev_suspend

This is
 - unnecessary because mddev_suspend is always followed by a call to
   ->stop, and each ->stop unregisters the thread, and
 - a problem as it makes it awkwards to suspend and then resume a
   device as we will want later.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: factor out init code for an mddev
NeilBrown [Thu, 1 Apr 2010 04:55:30 +0000 (15:55 +1100)]
md: factor out init code for an mddev

This is a simple factorisation that makes mddev_find easier to read.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: pass mddev to make_request functions rather than request_queue
NeilBrown [Thu, 1 Apr 2010 04:02:13 +0000 (15:02 +1100)]
md: pass mddev to make_request functions rather than request_queue

We used to pass the personality make_request function direct
to the block layer so the first argument had to be a queue.
But now we have the intermediary md_make_request so it makes
at lot more sense to pass a struct mddev_s.
It makes it possible to have an mddev without its own queue too.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: call md_stop_writes from md_stop
NeilBrown [Thu, 1 Apr 2010 01:08:16 +0000 (12:08 +1100)]
md: call md_stop_writes from md_stop

This moves the call to the other side of set_readonly, but that should
not be an issue.
This encapsulates in 'md_stop' all of the functionality for internally
stopping the array, leaving all the interactions with externalities
(sysfs, request_queue, gendisk) in do_md_stop.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: split md_set_readonly out of do_md_stop
NeilBrown [Mon, 29 Mar 2010 02:23:10 +0000 (13:23 +1100)]
md: split md_set_readonly out of do_md_stop

Using do_md_stop to set an array to read-only is a little confusing.
Now most of the common code has been factored out, split
md_set_readonly off in to a separate function.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: factor md_stop_writes out of do_md_stop.
NeilBrown [Mon, 29 Mar 2010 01:07:53 +0000 (12:07 +1100)]
md: factor md_stop_writes out of do_md_stop.

Further refactoring of do_md_stop.
This one requires some explanation as it takes code from different
places in do_md_stop, so some re-ordering happens.

We only get into this part of do_md_stop if there are no active opens
of the device, so no writes can be happening and the device must have
been flushed.  In md_stop_writes we want to stop any internal sources
of writes - i.e. resync - and flush out the metadata.

The only code that was previously before some of this code is
code to clean up the queue, the mddev, the gendisk, or sysfs, all
of which is probably better after code that makes active changes (i.e.
triggers writes).

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: start to refactor do_md_stop
NeilBrown [Mon, 29 Mar 2010 00:37:13 +0000 (11:37 +1100)]
md: start to refactor do_md_stop

do_md_stop is large and clunky, so hard to understand.

This is a first step of refactoring, pulling two simple
sub-functions out.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: factor do_md_run to separate accesses to ->gendisk
NeilBrown [Mon, 29 Mar 2010 00:10:42 +0000 (11:10 +1100)]
md: factor do_md_run to separate accesses to ->gendisk

As part of relaxing the binding between an mddev and gendisk,
we separate do_md_run into two functions.
  md_run does all the work internal to md
  do_md_run calls md_run and makes and changes to gendisk
     that are required.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: remove ->changed and related code.
NeilBrown [Mon, 29 Mar 2010 00:18:15 +0000 (11:18 +1100)]
md: remove ->changed and related code.

We set ->changed to 1 and call check_disk_change at the end
of md_open so that bd_invalidated would be set and thus
partition rescan would happen appropriately.

Now that we call revalidate_disk directly, which sets bd_invalidates,
that indirection is no longer needed and can be removed.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: don't reference gendisk in getgeo
NeilBrown [Sun, 28 Mar 2010 23:51:42 +0000 (10:51 +1100)]
md: don't reference gendisk in getgeo

Using ->array_sectors rather than get_capacity() is more
direct and is a step towards relaxing the tight connection
between mddev and gendisk.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: move io accounting out of personalities into md_make_request
NeilBrown [Thu, 25 Mar 2010 05:20:56 +0000 (16:20 +1100)]
md: move io accounting out of personalities into md_make_request

While I generally prefer letting personalities do as much as possible,
given that we have a central md_make_request anyway we may as well use
it to simplify code.
Also this centralises knowledge of ->gendisk which will help later.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd/raid5: small tidyup in raid5_align_endio
NeilBrown [Thu, 25 Mar 2010 05:06:03 +0000 (16:06 +1100)]
md/raid5: small tidyup in raid5_align_endio

Diving through ->queue to find mddev is unnecessarily complex - there
is an easier path to finding mddev, so use that.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: add support for raid5 to raid4 conversion
NeilBrown [Mon, 22 Mar 2010 05:53:49 +0000 (16:53 +1100)]
md: add support for raid5 to raid4 conversion

This is unlikely to be wanted, but we may as well provide it
for completeness.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: notify level changes through sysfs.
Maciej Trela [Wed, 14 Apr 2010 07:17:39 +0000 (17:17 +1000)]
md: notify level changes through sysfs.

Level changes can be very significant, so make sure
to notify them via sysfs.

Signed-off-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: Relax checks on ->max_disks when external metadata handling is used.
NeilBrown [Wed, 14 Apr 2010 07:02:09 +0000 (17:02 +1000)]
md: Relax checks on ->max_disks when external metadata handling is used.

When metadata is being managed by user-space, md doesn't know
what the maximum number of devices allowed in an array is
so ->max_disks is 0.  In this case we should allow any (+ve)
number of disks.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: Correctly handle device removal via sysfs
Maciej Trela [Wed, 14 Apr 2010 06:58:16 +0000 (16:58 +1000)]
md: Correctly handle device removal via sysfs

Writing "none" to "../md/dev-xx/slot" removes that device
from being an active part of the array, but it didn't
set ->raid_disk to -1 to record this fact.

Signed-off-by: Maciej Trela <Maciej.Trela@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: Add support for Raid0->Raid10 takeover
Trela, Maciej [Mon, 8 Mar 2010 05:02:45 +0000 (16:02 +1100)]
md: Add support for Raid0->Raid10 takeover

Signed-off-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: Add support for Raid5->Raid0 and Raid10->Raid0 takeover
Trela, Maciej [Mon, 8 Mar 2010 05:02:44 +0000 (16:02 +1100)]
md: Add support for Raid5->Raid0 and Raid10->Raid0 takeover

Signed-off-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd:Add support for Raid0->Raid5 takeover
Trela Maciej [Mon, 8 Mar 2010 05:02:42 +0000 (16:02 +1100)]
md:Add support for Raid0->Raid5 takeover

Signed-off-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: don't use mddev->raid_disks in raid0 or raid10 while array is active.
NeilBrown [Tue, 16 Mar 2010 06:23:35 +0000 (17:23 +1100)]
md: don't use mddev->raid_disks in raid0 or raid10 while array is active.

In a subsequent patch we will make it possible to change
mddev->raid_disks while a RAID0 or RAID10 array is active.  This is
part of the process of reshaping such an array.

This means that we cannot use this value while processes requests
(it is OK to use it during initialisation as we are locked against
changes then).
Both RAID0 and RAID10 have the same value stored in the private data
structure, so use that value instead.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: discard StateChanged device flag.
NeilBrown [Sun, 21 Mar 2010 23:28:51 +0000 (10:28 +1100)]
md: discard StateChanged device flag.

This was needed when sysfs files could only be 'notified'
from process context.  Now that we have sys_notify_direct,
we can call it directly from an interrupt.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agodrivers/md: Remove unnecessary casts of void *
H Hartley Sweeten [Mon, 8 Mar 2010 05:02:40 +0000 (16:02 +1100)]
drivers/md: Remove unnecessary casts of void *

void pointers do not need to be cast to other pointer types.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: expose max value of behind writes counter
Paul Clements [Mon, 8 Mar 2010 05:02:37 +0000 (16:02 +1100)]
md: expose max value of behind writes counter

Keep track of the maximum number of concurrent write-behind requests
for an md array and exposed this number in sysfs at
   md/bitmap/max_backlog_used

Writing any value to this file will clear it.

This allows userspace to be involved in tuning bitmap/backlog.

Signed-off-by: Paul Clements <paul.clements@steeleye.com>
Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: remove some dead fields from mddev_s
NeilBrown [Mon, 8 Mar 2010 05:02:36 +0000 (16:02 +1100)]
md: remove some dead fields from mddev_s

These fields have never been used.
commit 4b6d287f627b5fb6a49f78f9e81649ff98c62bb7
added them, but also added identical files to bitmap_super_s,
and only used the latter.

So remove these unused fields.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd/raid1: fix counting of write targets.
NeilBrown [Tue, 18 May 2010 05:27:13 +0000 (15:27 +1000)]
md/raid1: fix counting of write targets.

There is a very small race window when writing to a
RAID1 such that if a device is marked faulty at exactly the wrong
time, the write-in-progress will not be sent to the device,
but the bitmap (if present) will be updated to say that
the write was sent.

Then if the device turned out to still be usable as was re-added
to the array, the bitmap-based-resync would skip resyncing that
block, possibly leading to corruption.  This would only be a problem
if no further writes were issued to that area of the device (i.e.
that bitmap chunk).

Suitable for any pending -stable kernel.

Cc: stable@kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: manage redundancy group in sysfs when changing level.
NeilBrown [Wed, 14 Apr 2010 07:15:37 +0000 (17:15 +1000)]
md: manage redundancy group in sysfs when changing level.

Some levels expect the 'redundancy group' to be present,
others don't.
So when we change level of an array we might need to
add or remove this group.

This requires fixing up the current practice of overloading ->private
to indicate (when ->pers == NULL) that something needs to be removed.
So create a new ->to_remove to fill that role.

When changing levels, we may need to add or remove attributes.  When
changing RAID5 -> RAID6, we both add and remove the same thing.  It is
important to catch this and optimise it out as the removal is delayed
until a lock is released, so trying to add immediately would cause
problems.

Cc: stable@kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: remove unneeded sysfs files more promptly
NeilBrown [Thu, 15 Apr 2010 00:13:47 +0000 (10:13 +1000)]
md: remove unneeded sysfs files more promptly

When an array is stopped we need to remove some
sysfs files which are dependent on the type of array.

We need to delay that deletion as deleting them while holding
reconfig_mutex can lead to deadlocks.

We currently delay them until the array is completely destroyed.
However it is possible to deactivate and then reactivate the array.
It is also possible to need to remove sysfs files when changing level,
which can potentially happen several times before an array is
destroyed.

So we need to delete these files more promptly: as soon as
reconfig_mutex is dropped.

We need to ensure this happens before do_md_run can restart the array,
so we use open_mutex for some extra locking.  This is not deadlock
prone.

Cc: stable@kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd/linear: avoid possible oops and array stop
NeilBrown [Mon, 17 May 2010 01:27:00 +0000 (11:27 +1000)]
md/linear: avoid possible oops and array stop

Since commit ef286f6fa673cd7fb367e1b145069d8dbfcc6081
it has been important that each personality clears
->private in the ->stop() function, or sets it to a
attribute group to be removed.
linear.c doesn't.  This can sometimes lead to an oops,
though it doesn't always.

Suitable for 2.6.33-stable and 2.6.34.

Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@kernel.org
14 years agomd: set mddev readonly flag on blkdev BLKROSET ioctl
Dan Williams [Tue, 11 May 2010 22:25:37 +0000 (08:25 +1000)]
md: set mddev readonly flag on blkdev BLKROSET ioctl

When the user sets the block device to readwrite then the mddev should
follow suit.  Otherwise, the BUG_ON in md_write_start() will be set to
trigger.

The reverse direction, setting mddev->ro to match a set readonly
request, can be ignored because the blkdev level readonly flag precludes
the need to have mddev->ro set correctly.  Nevermind the fact that
setting mddev->ro to 1 may fail if the array is in use.

Cc: <stable@kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
14 years agomd: deal with merge_bvec_fn in component devices better.
NeilBrown [Mon, 8 Mar 2010 05:44:38 +0000 (16:44 +1100)]
md: deal with merge_bvec_fn in component devices better.

If a component device has a merge_bvec_fn then as we never call it
we must ensure we never need to.  Currently this is done by setting
max_sector to 1 PAGE, however this does not stop a bio being created
with several sub-page iovecs that would violate the merge_bvec_fn.

So instead set max_segments to 1 and set the segment boundary to the
same as a page boundary to ensure there is only ever one single-page
segment of IO requested at a time.

This can particularly be an issue when 'xen' is used as it is
known to submit multiple small buffers in a single bio.

Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@kernel.org
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/amit/virtio-console
Linus Torvalds [Mon, 8 Mar 2010 00:04:03 +0000 (16:04 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/amit/virtio-console

* git://git.kernel.org/pub/scm/linux/kernel/git/amit/virtio-console:
  virtio: console: Use better variable names for fill_queue operation
  virtio: console: Fix type of 'len' as unsigned int

14 years agoMerge branch 'x86-mrst-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 7 Mar 2010 23:59:39 +0000 (15:59 -0800)]
Merge branch 'x86-mrst-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-mrst-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (30 commits)
  x86, mrst: Fix whitespace breakage in apb_timer.c
  x86, mrst: Fix APB timer per cpu clockevent
  x86, mrst: Remove X86_MRST dependency on PCI_IOAPIC
  x86, olpc: Use pci subarch init for OLPC
  x86, pci: Add arch_init to x86_init abstraction
  x86, mrst: Add Kconfig dependencies for Moorestown
  x86, pci: Exclude Moorestown PCI code if CONFIG_X86_MRST=n
  x86, numaq: Make CONFIG_X86_NUMAQ depend on CONFIG_PCI
  x86, pci: Add sanity check for PCI fixed bar probing
  x86, legacy_irq: Remove duplicate vector assigment
  x86, legacy_irq: Remove left over nr_legacy_irqs
  x86, mrst: Platform clock setup code
  x86, apbt: Moorestown APB system timer driver
  x86, mrst: Add vrtc platform data setup code
  x86, mrst: Add platform timer info parsing code
  x86, mrst: Fill in PCI functions in x86_init layer
  x86, mrst: Add dummy legacy pic to platform setup
  x86/PCI: Moorestown PCI support
  x86, ioapic: Add dummy ioapic functions
  x86, ioapic: Early enable ioapic for timer irq
  ...

Fixed up semantic conflict of new clocksources due to commit
17622339af25 ("clocksource: add argument to resume callback").

14 years agoMerge branch 'for-linus/i2c' of git://git.fluff.org/bjdooks/linux
Linus Torvalds [Sun, 7 Mar 2010 23:56:25 +0000 (15:56 -0800)]
Merge branch 'for-linus/i2c' of git://git.fluff.org/bjdooks/linux

* 'for-linus/i2c' of git://git.fluff.org/bjdooks/linux:
  i2c: Add support for Xilinx XPS IIC Bus Interface
  i2c: omap: Add support for 16-bit registers
  i2c-pnx: fix setting start/stop condition
  powerpc: doc/dts-bindings: update doc of FSL I2C bindings
  i2c-mpc: add support for the MPC512x processors from Freescale
  i2c-mpc: rename "setclock" initialization functions to "setup"
  i2c-mpc: use __devinit[data] for initialization functions and data
  i2c/imx: don't add probe function to the driver struct
  i2c: Add support for Ux500/Nomadik I2C controller

14 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
Linus Torvalds [Sun, 7 Mar 2010 23:56:04 +0000 (15:56 -0800)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (66 commits)
  mfd: Fix ucb1x00 build failure for collie_defconfig
  mfd: Fix lpc_sch related depends/selects, fix build error
  gpio: Fix sch_gpio warning
  gpio: add Intel SCH GPIO controller driver
  i2c: convert i2c-isch to platform_device
  mfd: Use completion interrupt for WM831x AUXADC
  mfd: Use completion interrupt for WM835x AUXADC
  mfd: Introduce remove_script function for twl4030
  mfd/mmc: SDHI Kconfig update
  mfd: sh_mobile_sdhi MMC_CAP_MMC_HIGHSPEED support
  gpiolib: Force wm831x GPIOs into GPIO mode when requested
  mfd: Add WM831x revision B support
  gpiolib: Correct debugfs display of WM831x GPIO inversion
  gpiolib: Actually set output state in wm831x_gpio_direction_output()
  tmio_mmc: Balance cell enable()/disable() calls
  tmio_mmc: Remove const from platform data V3
  tmio_mmc: Use 100ms mmc_detect_change() delay
  tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2
  tmio_mmc: Keep card-detect interrupts enabled
  mfd: Add twl6030 base addr for ID0, ID1, ID2
  ...

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Linus Torvalds [Sun, 7 Mar 2010 23:49:12 +0000 (15:49 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (368 commits)
  Staging: winbond: fix up wireless api errors
  Staging: dream: camera: sk5k3e2fx: fix code style issues
  Staging: dream: camera: msm_camera: fix code style issues
  Staging: wlan-ng: More checkpatch.pl error cleanups
  Staging: wlan-ng - checkpatch.pl fixups
  Staging: comedi: comedi_fops.c: Checkpatch cleanup
  Staging: comedi: fix suspect code indent in ni_labpc.c
  Staging: comedi: fix yet another brace coding style issue in ni_labpc.c
  Staging: comedi: fix another brace coding style issues in ni_labpc.c
  Staging: comedi: fix brace coding style issue in ni_labpc.c
  Staging: comedi: poc: Adding some KERN_ facility level
  Staging: dream: camera: msm_camera: fix some code style issues
  Staging: wlan-ng: fix most of the style issues in hfa384x.h
  Staging: dream: camera: msm_camera: fix coding style issues
  Staging: comedi: fix bracing coding style and 80 character issues in ni_660x.c
  Staging: comedi: fix bracing coding style issue in ni_65xx.c
  Staging: comedi: pcmad: Checkpatch cleanups
  Staging: comedi: poc: fix coding style issues
  staging: dt3155: revert u_long to u64 usage
  Staging: comedi: drivers.c: Checkpatch cleanup
  ...

14 years agoseq_file: fix new kernel-doc warnings
Randy Dunlap [Thu, 4 Mar 2010 17:37:12 +0000 (09:37 -0800)]
seq_file: fix new kernel-doc warnings

Fix kernel-doc notation in new seq-file functions and
correct spelling.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Sun, 7 Mar 2010 23:47:19 +0000 (15:47 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (26 commits)
  sh: Convert sh to use read/update_persistent_clock
  sh: Move PMB debugfs entry initialization to later stage
  sh: Fix up flush_cache_vmap() on SMP.
  sh: fix up MMU reset with variable PMB mapping sizes.
  sh: establish PMB mappings for NUMA nodes.
  sh: check for existing mappings for bolted PMB entries.
  sh: fixed virt/phys mapping helpers for PMB.
  sh: make pmb iomapping configurable.
  sh: reworked dynamic PMB mapping.
  sh: Fix up cpumask_of_pcibus() for the NUMA build.
  serial: sh-sci: Tidy up build warnings.
  sh: Fix up ctrl_read/write stragglers in migor setup.
  serial: sh-sci: Add DMA support.
  dmaengine: shdma: extend .device_terminate_all() to record partial transfer
  sh: merge sh7722 and sh7724 DMA register definitions
  sh: activate runtime PM for dmaengine on sh7722 and sh7724
  dmaengine: shdma: add runtime PM support.
  dmaengine: shdma: separate DMA headers.
  dmaengine: shdma: convert to platform device resources
  dmaengine: shdma: fix DMA error handling.
  ...

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
Linus Torvalds [Sun, 7 Mar 2010 23:45:53 +0000 (15:45 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
  parisc: use __ratelimit in unaligned.c
  parisc: Convert to read/update_persistent_clock
  parisc: Simplify param.h by including <asm-generic/param.h>
  parisc: drop unnecessary cast in __ldcw_align() macro
  parisc: add strict copy size checks (v2)
  parisc: remove trailing space in messages
  parisc: ditto sys_accept4
  parisc: wire up sys_recvmmsg

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Sun, 7 Mar 2010 23:45:35 +0000 (15:45 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  PM: Provide generic subsystem-level callbacks
  PM / Runtime: Document power.runtime_auto and related functions

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Linus Torvalds [Sun, 7 Mar 2010 23:38:23 +0000 (15:38 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  virtio: set pci bus master enable bit

14 years agoMerge branch 'next-i2c-xilinx' into next-i2c
Ben Dooks [Sun, 7 Mar 2010 22:29:28 +0000 (22:29 +0000)]
Merge branch 'next-i2c-xilinx' into next-i2c

14 years agoMerge branch 'next-i2c-omap' into next-i2c
Ben Dooks [Sun, 7 Mar 2010 22:29:21 +0000 (22:29 +0000)]
Merge branch 'next-i2c-omap' into next-i2c

14 years agoMerge branch 'next-i2c-mpc-v8' into next-i2c
Ben Dooks [Sun, 7 Mar 2010 22:29:13 +0000 (22:29 +0000)]
Merge branch 'next-i2c-mpc-v8' into next-i2c

14 years agoi2c: Add support for Xilinx XPS IIC Bus Interface
Richard Röjfors [Thu, 11 Feb 2010 09:42:00 +0000 (10:42 +0100)]
i2c: Add support for Xilinx XPS IIC Bus Interface

This patch adds support for the Xilinx XPS IIC Bus Interface.

The driver uses the dynamic mode, supporting to put several
I2C messages in the FIFO to reduce the number of interrupts.

It has the same feature as ocores, it can be passed a list
of devices that will be added when the bus is probed.

Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c: omap: Add support for 16-bit registers
Cory Maccarrone [Sun, 13 Dec 2009 01:54:02 +0000 (17:54 -0800)]
i2c: omap: Add support for 16-bit registers

The current i2c-omap driver is set up for 32-bit registers, which
corresponds to most OMAP devices.  However, OMAP730/850 based
devices use a 16-bit register size.

This change modifies the driver to perform a runtime CPU type check
to determine the register sizes, and uses a bit shift of either 1
or 2 bits to compute the proper register sizes for all registers.

Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-pnx: fix setting start/stop condition
Luotao Fu [Mon, 1 Mar 2010 12:24:24 +0000 (13:24 +0100)]
i2c-pnx: fix setting start/stop condition

The start/stop condtions are set in different places repetedly in the i2c-pnx
driver.  Beside in i2c_pnx_start and i2c_pnx_stop the start/stop bit are also
set during the transfer of a i2c message in the master_xmit/rcv calls. This is
wrong since we can't set the start/stop condition during the transaction of a
single message any way. As a matter of fact, the driver will sometimes set both
the start and the stop bits at one time. This can be easily reproduced by
sending a simple read request like e.g
struct i2c_msg msgs[] = {
{ addr, 0, 1, buf },
{ addr, I2C_M_RD, offset, buf }
};
While processing the first message the i2c_pnx_master_xmit will set both the
start_bit and the stop_bit, which will eventually confuse the slave.

Fixed by remove setting start/stop condition from the transmit routines.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agopowerpc: doc/dts-bindings: update doc of FSL I2C bindings
Wolfgang Grandegger [Wed, 17 Feb 2010 10:19:20 +0000 (11:19 +0100)]
powerpc: doc/dts-bindings: update doc of FSL I2C bindings

This patch adds the MPC5121 to the list of supported devices,
enhances the doc of the "clock-frequency" property and removes
the obsolete "cell-index", "device_type" and "fsl-i2c" property.
Furthermore an example for the MPC5121 has been added.

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-mpc: add support for the MPC512x processors from Freescale
Wolfgang Grandegger [Wed, 17 Feb 2010 10:19:19 +0000 (11:19 +0100)]
i2c-mpc: add support for the MPC512x processors from Freescale

As I2C interrupts must  be enabled for the MPC512x by the setup function
as well, "fsl,preserve-clocking" is handled in a slighly different way.
Also, the old settings are now reported calling dev_dbg(). For the
MPC512x the clock setup function of the MPC52xx can be re-used.
Furthermore, the Kconfig help has been updated and corrected.

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-mpc: rename "setclock" initialization functions to "setup"
Wolfgang Grandegger [Wed, 17 Feb 2010 10:19:18 +0000 (11:19 +0100)]
i2c-mpc: rename "setclock" initialization functions to "setup"

To prepare  support for the MPC512x processors from Freescale the
"setclock" initialization functions have been renamed to "setup"
because I2C interrupts must be enabled for the MPC512x by this
function as well.

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-mpc: use __devinit[data] for initialization functions and data
Wolfgang Grandegger [Wed, 17 Feb 2010 10:19:17 +0000 (11:19 +0100)]
i2c-mpc: use __devinit[data] for initialization functions and data

"__devinit[data]" has not yet been used for all initialization functions
and data. To avoid truncating lines, the struct "mpc_i2c_match_data" has
been renamed to "mpc_i2c_data", which is even the better name.

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c/imx: don't add probe function to the driver struct
Uwe Kleine-König [Mon, 1 Feb 2010 14:57:25 +0000 (15:57 +0100)]
i2c/imx: don't add probe function to the driver struct

Having a pointer to the probe function is unnecessary when using
platform_driver_probe and yields a section mismatch warning after
removing the white list entry "*driver" for
{ .data$, .data.rel$ } -> { .init.* } mismatches in modpost.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c: Add support for Ux500/Nomadik I2C controller
srinidhi kasagar [Mon, 1 Feb 2010 14:14:54 +0000 (19:44 +0530)]
i2c: Add support for Ux500/Nomadik I2C controller

This adds support for ST-Ericsson's I2C block found
in Ux500 and Nomadik 8815 platforms.

Signed-off-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>
Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Reviewed-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agomfd: Fix ucb1x00 build failure for collie_defconfig
Peter Huewe [Sat, 6 Mar 2010 13:36:38 +0000 (14:36 +0100)]
mfd: Fix ucb1x00 build failure for collie_defconfig

This patch fixes a build failure[1], by adding the missing semaphore.h include

References:
[1] http://kisskb.ellerman.id.au/kisskb/buildresult/2234322/

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Fix lpc_sch related depends/selects, fix build error
Randy Dunlap [Fri, 5 Mar 2010 17:43:06 +0000 (09:43 -0800)]
mfd: Fix lpc_sch related depends/selects, fix build error

LPC_SCH is selected by GPI_SCH and I2C_ISCH, even when PCI is not
enabled, but LPC_SCH depends on PCI, so make GPI_SCH and I2C_ISCH
also depend on PCI.

Those 2 selects also need to select what LPC_SCH selects,
since kconfig does not follow selects.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Denis Turischev <denis@compulab.co.il>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agogpio: Fix sch_gpio warning
Samuel Ortiz [Fri, 5 Mar 2010 16:14:01 +0000 (17:14 +0100)]
gpio: Fix sch_gpio warning

We need to check for gpiochip_remove() errors.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agogpio: add Intel SCH GPIO controller driver
Denis Turischev [Tue, 2 Mar 2010 09:48:55 +0000 (10:48 +0100)]
gpio: add Intel SCH GPIO controller driver

Signed-off-by: Denis Turischev <denis@compulab.co.il>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoi2c: convert i2c-isch to platform_device
Denis Turischev [Mon, 1 Mar 2010 16:59:55 +0000 (18:59 +0200)]
i2c: convert i2c-isch to platform_device

Convert i2c-isch to platform_device for the lpc mfd core to add it at probe
time.

Signed-off-by: Denis Turischev <denis@compulab.co.il>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Use completion interrupt for WM831x AUXADC
Mark Brown [Tue, 23 Feb 2010 11:08:06 +0000 (11:08 +0000)]
mfd: Use completion interrupt for WM831x AUXADC

Use the completion interrupt generated by the device rather than
polling for conversions to complete. As a backup we still check
the status of the AUXADC if we don't get a completion, mostly for
systems that don't have the WM831x interrupt infrastructure hooked
up.

Also reduce the timeout for completion of conversions to 5ms from
the previous 10ms, the lower timeout should be sufficient.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Use completion interrupt for WM835x AUXADC
Mark Brown [Tue, 23 Feb 2010 11:08:05 +0000 (11:08 +0000)]
mfd: Use completion interrupt for WM835x AUXADC

Use the completion interrupt generated by the device rather than
polling for conversions to complete. As a backup we still check
the state of the AUXADC if we don't get a completion, mostly for
systems that don't have the WM8350 interrupt infrastructure hooked
up.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Introduce remove_script function for twl4030
Mike Turquette [Mon, 22 Feb 2010 17:16:30 +0000 (11:16 -0600)]
mfd: Introduce remove_script function for twl4030

New function twl4030_remove_script(u8 flags) takes a script type as
defined in twl.h and prevents any script already loaded in that position
from running.  This is accomplished by programming SEQ_ADD_* to 0x3f,
the END_OF_SCRIPT value, where SEQ_ADD_* is determined by flags.

(Future) users of this function include OMAP board files for machines
facing a race condition between sleep and warm reset.

Signed-off-by: Mike Turquette <mturquette@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd/mmc: SDHI Kconfig update
Magnus Damm [Mon, 22 Feb 2010 04:40:59 +0000 (13:40 +0900)]
mfd/mmc: SDHI Kconfig update

Enable the sh_mobile_sdhi mfd driver on SH-Mobile ARM
processors. While at it, make CONFIG_TMIO_MMC depend on
CONFIG_MFD_SH_MOBILE_SDHI.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: sh_mobile_sdhi MMC_CAP_MMC_HIGHSPEED support
Magnus Damm [Mon, 22 Feb 2010 04:37:09 +0000 (13:37 +0900)]
mfd: sh_mobile_sdhi MMC_CAP_MMC_HIGHSPEED support

Add MMC_CAP_MMC_HIGHSPEED support to the sh_mobile_sdhi
driver. Also, remove type cast and FIXME comment.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agogpiolib: Force wm831x GPIOs into GPIO mode when requested
Mark Brown [Wed, 17 Feb 2010 18:45:26 +0000 (18:45 +0000)]
gpiolib: Force wm831x GPIOs into GPIO mode when requested

This is the chip default but it's possible the bootloader or OTP
will have been configured to a different mode (eg, to provide
feedback during startup).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Add WM831x revision B support
Mark Brown [Wed, 17 Feb 2010 18:45:25 +0000 (18:45 +0000)]
mfd: Add WM831x revision B support

Revision B of the WM831x devices changes the sense of the tristate
bit for GPIO configuration, inverting it to become an enable instead.
Take account of this in the gpiolib driver.

A current sink regulation status bit has also been added in revision B,
add a flag indicating if it's present but don't use it yet.

This revision also adds an interrupt on key up for the ON pin event
which the existing code is able to take advantage of.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agogpiolib: Correct debugfs display of WM831x GPIO inversion
Mark Brown [Wed, 17 Feb 2010 18:45:24 +0000 (18:45 +0000)]
gpiolib: Correct debugfs display of WM831x GPIO inversion

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agogpiolib: Actually set output state in wm831x_gpio_direction_output()
Mark Brown [Wed, 17 Feb 2010 18:04:35 +0000 (18:04 +0000)]
gpiolib: Actually set output state in wm831x_gpio_direction_output()

wm831x_gpio_direction_output() ignored the state passed into it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agotmio_mmc: Balance cell enable()/disable() calls
Magnus Damm [Wed, 17 Feb 2010 07:38:23 +0000 (16:38 +0900)]
tmio_mmc: Balance cell enable()/disable() calls

This patch adds cell->disable() calls to the tmio-mmc
probe() error handling and the remove() function.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agotmio_mmc: Remove const from platform data V3
Magnus Damm [Wed, 17 Feb 2010 07:38:14 +0000 (16:38 +0900)]
tmio_mmc: Remove const from platform data V3

Remove const from the tmio-mmc platform data hclk V3.
This change makes it possible to remove the type cast
from the sh_mobile_sdhi driver which is using the clock
framework to get the clock rate.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agotmio_mmc: Use 100ms mmc_detect_change() delay
Magnus Damm [Wed, 17 Feb 2010 07:38:04 +0000 (16:38 +0900)]
tmio_mmc: Use 100ms mmc_detect_change() delay

This patch changes the tmio_mmc driver to wait 100ms
before checking the card detect status. This type of
delay is quite common among mmc drivers, it seems that
most hardware platforms need to give the hardware some
time to settle before checking card availabilty.

Hotplug is half-broken without this patch on the sh7724
Ecovec board. Hot insertion seems ok but eject is never
detected without this patch.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agotmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2
Yusuke Goda [Wed, 17 Feb 2010 07:37:55 +0000 (16:37 +0900)]
tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2

Enable MMC_CAP_XX support in the tmio_mmc driver if
pdata->capabilities is set.

Signed-off-by: Yusuke Goda <goda.yusuke@renesas.com>
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agotmio_mmc: Keep card-detect interrupts enabled
Guennadi Liakhovetski [Wed, 17 Feb 2010 07:37:45 +0000 (16:37 +0900)]
tmio_mmc: Keep card-detect interrupts enabled

On SuperH platforms the SDHI controller does not produce any command IRQs after
a completed IO. This leads to card-detect interrupts staying disabled. Do not
disable card-detect interrupts on DATA IRQs.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Add twl6030 base addr for ID0, ID1, ID2
Balaji T K [Fri, 19 Feb 2010 11:39:38 +0000 (12:39 +0100)]
mfd: Add twl6030 base addr for ID0, ID1, ID2

Add base address for generic slave ID0, ID1, ID2
and introduced one more entry to align RTC module number between
twl4030 and twl6030

Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Disable TWL4030/5030 I2C1/I2C4 internal pull-ups
Moiz Sonasath [Wed, 17 Feb 2010 00:57:21 +0000 (18:57 -0600)]
mfd: Disable TWL4030/5030 I2C1/I2C4 internal pull-ups

This patch disables TWL4030/5030 I2C1 adn I2C4(SR) internal pull-up, to
use only the external HW resistor >=470 Ohm for the assured
functionality in HS mode.

While testing the I2C in High Speed mode, it was discovered that
without a proper pull-up resistor, there is data corruption during
multi-byte transfer. RTC(time_set) test case was used for testing.

From the analysis done, it was concluded that ideally we need a
pull-up of 1.6k Ohm(recomended) or atleast 470 Ohm or greater for
assured performance in HS mode.

Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Allen Pais <allen.pais@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Introduce lpc_sch for Intel SCH LPC bridge
Denis Turischev [Fri, 19 Feb 2010 10:26:25 +0000 (11:26 +0100)]
mfd: Introduce lpc_sch for Intel SCH LPC bridge

Intel Poulsbo (SCH) chipset LPC bridge controller contains several
functions. Creating and MFD driver for the LPC bridge controller allows
simultaneous use of SMBus and GPIO interfaces on the SCH.

Signed-off-by: Denis Turischev <denis@compulab.co.il>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Check for ACPI conflicts
Samuel Ortiz [Fri, 19 Feb 2010 10:07:59 +0000 (11:07 +0100)]
mfd: Check for ACPI conflicts

For ACPI based systems, we should check for ACPI conflicts when adding the
platform devices. The test will always succeed for non ACPI platforms.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Fix twl_has_pwrbutton typo
Eduardo Valentin [Thu, 11 Feb 2010 12:47:09 +0000 (13:47 +0100)]
mfd: Fix twl_has_pwrbutton typo

Change the typo CONFIG_INPUT_TWL4030_PWBUTTON_MODULE in the
twl_has_pwrbutton definition to CONFIG_INPUT_TWL4030_PWRBUTTON_MODULE.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoinput: Support onkey in 88pm860x
Haojian Zhuang [Wed, 3 Feb 2010 20:40:59 +0000 (15:40 -0500)]
input: Support onkey in 88pm860x

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Use genirq in 88pm860x
Haojian Zhuang [Mon, 8 Feb 2010 10:02:00 +0000 (05:02 -0500)]
mfd: Use genirq in 88pm860x

Use genirq to simplify IRQ handling in 88pm860x. Remove the interface of
mask/free IRQs on 88pm860x. All these work is taken by genirq. Update the
touchscreen driver of 88pm860x since IRQ handling is changed.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Fix WM8994 error handling
Joonyoung Shim [Sun, 7 Feb 2010 01:16:14 +0000 (10:16 +0900)]
mfd: Fix WM8994 error handling

This patch fixes wrong goto statement for error handling on probe.

Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Use i2c_dummy in 88pm860x
Haojian Zhuang [Wed, 3 Feb 2010 20:38:12 +0000 (15:38 -0500)]
mfd: Use i2c_dummy in 88pm860x

Use i2c_dummy in 88pm860x driver to avoid using static in probe function.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Clean code in max8925
Haojian Zhuang [Wed, 3 Feb 2010 20:37:23 +0000 (15:37 -0500)]
mfd: Clean code in max8925

Remove unused definitions.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agopower_supply: Enable power supply of max8925
Haojian Zhuang [Mon, 25 Jan 2010 15:38:35 +0000 (10:38 -0500)]
power_supply: Enable power supply of max8925

MAX8925 is a PMIC that contains charger component

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agortc: Enable rtc in max8925
Haojian Zhuang [Mon, 25 Jan 2010 11:30:29 +0000 (06:30 -0500)]
rtc: Enable rtc in max8925

MAX8925 is a PMIC that contains RTC component.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Update irq handler in max8925
Haojian Zhuang [Fri, 5 Feb 2010 15:07:54 +0000 (16:07 +0100)]
mfd: Update irq handler in max8925

Update thread irq handler. Simply the interface of using thread irq.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Update i2c driver for max8925
Haojian Zhuang [Mon, 25 Jan 2010 11:26:34 +0000 (06:26 -0500)]
mfd: Update i2c driver for max8925

Update I2C driver in order to fit all of three I2C components in max8925.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>