sfrench/cifs-2.6.git
14 years agoMIPS: Loongson: Update the default config file for fuloong2e
Wu Zhangjin [Thu, 2 Jul 2009 15:28:04 +0000 (23:28 +0800)]
MIPS: Loongson: Update the default config file for fuloong2e

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson: Add GCC 4.4 support for Loongson2E
Wu Zhangjin [Thu, 2 Jul 2009 15:27:41 +0000 (23:27 +0800)]
MIPS: Loongson: Add GCC 4.4 support for Loongson2E

Because only gcc >=4.4 have loongson-specific support, we need to choose
the suitable -march argument for gcc <= 4.3 and gcc >= 4.4, and here, we
use -march=loongson2e for loongson2e.

Thanks goes to Arnaud Patard <apatard@mandriva.com> for suggestion of
using cc-options(Documentation/kbuild/makefiles.txt). and thanks Zhang
Le for introducing the new CPU_LOONGSON2E kernel option.

NOTE: -mtune option is not need if -march and -mtune use the same value.

Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson: Add a machtype kernel command line argument
Wu Zhangjin [Thu, 2 Jul 2009 15:27:12 +0000 (23:27 +0800)]
MIPS: Loongson: Add a machtype kernel command line argument

The difference between some loongson-based machines is very small, so, if
there is no necessary to add new kernel config options to cope with this
difference, it will be better to share the same kernel image file between
them, benefit from this, the linux distribution developers only have a need
to compile the kernel one time.

This machtype kernel command line argument will be used later to share the
same kernel image file between two different machines(menglong & yeeloong)
made by lemote.

Thanks very much to Zhang Le for cleaning up the machtype implementation.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson: Split common loongson source code out
Wu Zhangjin [Thu, 2 Jul 2009 15:26:45 +0000 (23:26 +0800)]
MIPS: Loongson: Split common loongson source code out

To share common loongson source code between all of the loongson-based
machines. there is a need to split it out of the fuloong-2e/ directory.
at the same time, other according tuning is needed. the machine-specific
parts are defined as macros in relative header file, pci.h, mem.h,
machine.h.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson: Change naming methods
Wu Zhangjin [Thu, 2 Jul 2009 15:26:08 +0000 (23:26 +0800)]
MIPS: Loongson: Change naming methods

To make source code of loongson sharable to the machines(such as gdium)
made by the other companies, we rename arch/mips/lemote to
arch/mips/loongson, asm/mach-lemote to asm/mach-loongson, and rename lm2e
to the name of the machine: fuloong-2e. accordingly, FULONG are renamed to
FULOONG2E to make it distinguishable to the future FULOONG2F.  and also,
some other relative tuning is needed.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson: Add oprofile support
Wu Zhangjin [Thu, 2 Jul 2009 15:25:46 +0000 (23:25 +0800)]
MIPS: Loongson: Add oprofile support

This kernel support is needed by the user-space tool:oprofile to profile
linux kernel or applications via loongson2 performance counters. you can
enable this driver via CONFIG_OPROFILE = y or m.

On Loongson2 there are two performance counters, each one can count 16
events respectively. when anyone of the performance counter overflows, an
interrupt will be generated and is routed to the IRQ MIPS_CPU_IRQ_BASE + 6.

Signed-off-by: Yanhua <yanh@lemote.com>
Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson: RTC: Enable legacy RTC driver on fulong
Wu Zhangjin [Thu, 2 Jul 2009 15:24:01 +0000 (23:24 +0800)]
MIPS: Loongson: RTC: Enable legacy RTC driver on fulong

RTC_LIB is selected by MIPS by default, and therefore, the legacy RTC
driver is disabled. but fortunately, RTC_LIB not works on fulong, so,
enabling the legcy RTC driver is needed, otherwise, the tools like
hwclock will not work.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson: PCI: Clean up pcimap setup
Wu Zhangjin [Thu, 2 Jul 2009 15:23:30 +0000 (23:23 +0800)]
MIPS: Loongson: PCI: Clean up pcimap setup

Fixup the wrong original comment of pcimap, and make the source code more
understandable. and also, some new extra consideration is added in.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson: clean up the coding style
Wu Zhangjin [Thu, 2 Jul 2009 15:23:03 +0000 (23:23 +0800)]
MIPS: Loongson: clean up the coding style

With the help of script/checkpatch.pl, i have cleaned up the coding
style.

1. remove un-needed header files and tune some comments.
2. remove some un-needed { }

add a new header file loongson.h:

3. move some common header files to loongson.h
4. move some common extern declartions to loongson.h

and this new header file is needed for future loongson2f support.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson: Split the implementation of prom and setup parts
Wu Zhangjin [Thu, 2 Jul 2009 15:22:36 +0000 (23:22 +0800)]
MIPS: Loongson: Split the implementation of prom and setup parts

This patch split the old initilization and setup implementation to
several file, one file one logic function.

the other main changes include:

1. as the script/checkpatch.pl suggests, use strict_strtol instead
of simple_strtol in arch/mips/lemote/lm2e/cmdline.c

2. use the existed macros in asm/mips-boards/bonito64.h as the
arguments of set_io_port_base() and remove the un-needed ones in
asm/mach-lemote/pci.h

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson: PCI: use existing mips_io_port_base
Wu Zhangjin [Thu, 2 Jul 2009 15:22:11 +0000 (23:22 +0800)]
MIPS: Loongson: PCI: use existing mips_io_port_base

mips_io_port_base is initialized via set_io_port_base() in
arch/mips/lemote/lm2e/setup.c, we can use it directly here.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson: pm: clean up the reboot support
Wu Zhangjin [Thu, 2 Jul 2009 15:21:27 +0000 (23:21 +0800)]
MIPS: Loongson: pm: clean up the reboot support

Several magic numbers have been replaced by relative macros, which will be
more readable and understandable.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson: pm: Remove redundant source code
Wu Zhangjin [Thu, 2 Jul 2009 15:20:56 +0000 (23:20 +0800)]
MIPS: Loongson: pm: Remove redundant source code

The implmentation of loongson2e_power_off and loongson2e_halt is almostly
the same, just preserve one of them.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson: Add new early_printk implmentation
Wu Zhangjin [Thu, 2 Jul 2009 15:20:20 +0000 (23:20 +0800)]
MIPS: Loongson: Add new early_printk implmentation

This patch is based on the implementation in the lm2e-fixes branch of
Philippe's git://git.linux-cisco.org/linux-mips.git and the
malta-specific early_printk implementation.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson: Remove out-of-date board-specific kgdb source code
Wu Zhangjin [Thu, 2 Jul 2009 15:19:33 +0000 (23:19 +0800)]
MIPS: Loongson: Remove out-of-date board-specific kgdb source code

Since the re-implementation of kgdb by commit
8854700115ecf8aa6f087aa915b7b6cf18090d39 the platform-specific version
has become superfluous, remove it.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson: Remove existing early_printk implementation
Wu Zhangjin [Thu, 2 Jul 2009 15:18:09 +0000 (23:18 +0800)]
MIPS: Loongson: Remove existing early_printk implementation

Removes the existing implementation of early_printk for fulong.  The old
implementation was based on the outdated board-specific dbg_io.c.

Since commit 8d60a903d986ffa26c41f0092320a3b9da20bfaf dbg_io.c is not longer
needed; it will be removed by the next patch, and a new implementation of
early_printk will be added later.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: IP22, IP28: Build with -Werror
Ralf Baechle [Tue, 15 Sep 2009 21:04:59 +0000 (23:04 +0200)]
MIPS: IP22, IP28: Build with -Werror

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: FW: Build with -Werror
Ralf Baechle [Tue, 15 Sep 2009 20:58:23 +0000 (22:58 +0200)]
MIPS: FW: Build with -Werror

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Fulong: Convert reset initialization to initcall.
Ralf Baechle [Tue, 15 Sep 2009 13:00:02 +0000 (15:00 +0200)]
MIPS: Fulong: Convert reset initialization to initcall.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Malta: Convert reset initialization to initcall.
Ralf Baechle [Tue, 15 Sep 2009 12:50:39 +0000 (14:50 +0200)]
MIPS: Malta: Convert reset initialization to initcall.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Get rid of duplicate cpu_idle() prototype.
Ralf Baechle [Tue, 15 Sep 2009 11:36:13 +0000 (13:36 +0200)]
MIPS: Get rid of duplicate cpu_idle() prototype.

Since 2.6.11-rc1 there is a prototype in <linux/smp.h>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: TXx9: Fix error handling.
Julia Lawall [Sun, 13 Sep 2009 19:15:18 +0000 (21:15 +0200)]
MIPS: TXx9: Fix error handling.

Error handling code following a kzalloc should free the allocated data.
Error handling code following an ioremap should iounmap the allocated data.

The semantic match that finds the first problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
(
x->f1 = E
|
 (x->f1 == NULL || ...)
|
 f(...,x->f1,...)
)
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: TXx9: Disable PM capability of TX493[89] internal ether
Atsushi Nemoto [Fri, 4 Sep 2009 13:09:04 +0000 (22:09 +0900)]
MIPS: TXx9: Disable PM capability of TX493[89] internal ether

Some TC35815 variants (i.e. TX493[89] internal ether) report existance of
PM registers though they are not supported.  Disable PM features by
clearing pdev->pm_cap.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: make page.h constants available to assembly.
Nelson Elhage [Fri, 31 Jul 2009 20:58:17 +0000 (16:58 -0400)]
MIPS: make page.h constants available to assembly.

page.h includes ifndef __ASSEMBLY__ guards, but PAGE_SIZE and some other
constants are defined using "1UL", which the assembler does not support.
Use the _AC macro from const.h to make them available to assembly (and
linker scripts).

Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: add gpio_request/gpio_free stubs for CONFIG_GPIOLIB=n
Manuel Lauss [Fri, 28 Aug 2009 09:26:58 +0000 (11:26 +0200)]
MIPS: Alchemy: add gpio_request/gpio_free stubs for CONFIG_GPIOLIB=n

Some drivers use gpio_request/gpio_free regardless of whether
gpiolib is actually built;  add stubs to work around the ensuing
compile failures.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Tested-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Lasat: Fix compilation
Alexey Dobriyan [Wed, 12 Aug 2009 19:59:27 +0000 (23:59 +0400)]
MIPS: Lasat: Fix compilation

Header needed for current_cpu_data which expands to smp_processor_id().
However, linux/smp.h can't be included into asm/cpu-info.h due to horrible
circular dependencies, so plug it here.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Octeon: Check all CCAs in cvmx_write_csr.
David Daney [Thu, 20 Aug 2009 19:35:53 +0000 (12:35 -0700)]
MIPS: Octeon: Check all CCAs in cvmx_write_csr.

The current code only checks CCA of 0 when deciding if a dummy read is
needed.  Since the kernel can (and does) use other CCAs we need to
mask out the CCA bits from the address.  Since the address constant
now fits in 16 bits, there is an added benefit that smaller code is
generated.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Octeon: False positive timeout
Roel Kluin [Wed, 26 Aug 2009 12:48:35 +0000 (14:48 +0200)]
MIPS: Octeon: False positive timeout

If we reach the test just below the loop with a `timeout' value of 0,
this does not mean that the timeout caused the loop to end, but rather
the `smi_rd.s.pending', in the last iteration. If timeout caused the
loop to end, then `timeout' is -1, not 0.

Since this can occur only in the last iteration, it is not very likely
to be a problem. By changing the post- to prefix decrement we ensure
that a timeout of 0 does mean it timed out.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Fix potencial build error in <asm/delay.h>
Ralf Baechle [Fri, 28 Aug 2009 11:29:58 +0000 (12:29 +0100)]
MIPS: Fix potencial build error in <asm/delay.h>

<asm/delay.h> will break if HZ isn't defined.  In 2.6.26 and later we're
usually lucky ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agobe2net: fix some cmds to use mccq instead of mbox
Sathya Perla [Thu, 17 Sep 2009 17:30:13 +0000 (10:30 -0700)]
be2net: fix some cmds to use mccq instead of mbox

All cmds issued to BE after the creation of mccq must now use the mcc-q
(and not mbox) to avoid a hw issue that results in mbox poll timeout.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoatl1e: fix 2.6.31-git4 -- ATL1E 0000:03:00.0: DMA-API: device driver frees DMA
Jie Yang [Thu, 17 Sep 2009 17:27:28 +0000 (10:27 -0700)]
atl1e: fix 2.6.31-git4 -- ATL1E 0000:03:00.0: DMA-API: device driver frees DMA

use the wrong API when free dma. So when map dma use a flag to
demostrate whether it is 'pci_map_single' or 'pci_map_page'. When free
the dma, check the flags to select the right APIs('pci_unmap_single'
or 'pci_unmap_page').

set the flags type to u16  instead of unsigned long  on David's comments.

Signed-off-by: Jie Yang <jie.yang@atheros.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopkt_sched: Fix qstats.qlen updating in dump_stats
Jarek Poplawski [Thu, 17 Sep 2009 17:26:07 +0000 (10:26 -0700)]
pkt_sched: Fix qstats.qlen updating in dump_stats

Some classful qdiscs miss qstats.qlen updating with q.qlen of their
child qdiscs in dump_stats methods.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: Log the affected address when DAD failure occurs
Jens Rosenboom [Thu, 17 Sep 2009 17:24:24 +0000 (10:24 -0700)]
ipv6: Log the affected address when DAD failure occurs

If an interface has multiple addresses, the current message for DAD
failure isn't really helpful, so this patch adds the address itself to
the printk.

Signed-off-by: Jens Rosenboom <me@jayr.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agowl12xx: Fix print_mac() conversion.
David S. Miller [Thu, 17 Sep 2009 17:18:30 +0000 (10:18 -0700)]
wl12xx: Fix print_mac() conversion.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
Linus Torvalds [Thu, 17 Sep 2009 16:55:52 +0000 (09:55 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/bp/bp

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  amd64_edac: check NB MCE bank enable on the current node properly
  amd64_edac: Rewrite unganged mode code of f10_early_channel_count
  amd64_edac: cleanup amd64_check_ecc_enabled
  x86, EDAC: Provide function to return NodeId of a CPU
  amd64_edac: build driver only on AMD hardware

14 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Thu, 17 Sep 2009 16:54:37 +0000 (09:54 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs: (39 commits)
  xfs: includecheck fix for fs/xfs/xfs_iops.c
  xfs: switch to seq_file
  xfs: Record new maintainer information
  xfs: use correct log reservation when handling ENOSPC in xfs_create
  xfs: xfs_showargs() reports group *and* project quotas enabled
  xfs: un-static xfs_inobt_lookup
  xfs: actually enable the swapext compat handler
  xfs: simplify xfs_trans_iget
  xfs: merge fsync and O_SYNC handling
  xfs: speed up free inode search
  xfs: rationalize xfs_inobt_lookup*
  xfs: untangle xfs_dialloc
  xfs: factor out debug checks from xfs_dialloc and xfs_difree
  xfs: improve xfs_inobt_update prototype
  xfs: improve xfs_inobt_get_rec prototype
  xfs: factor out inode initialisation
  fs/xfs: Correct redundant test
  xfs: remove XFS_INO64_OFFSET
  un-static xfs_read_agf
  xfs: add more statics & drop some unused functions
  ...

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier...
Linus Torvalds [Thu, 17 Sep 2009 16:53:04 +0000 (09:53 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/vapier/blackfin

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (75 commits)
  Blackfin: update ftrace for latest toolchain
  Blackfin: fix elf_fpregset_t definition
  Blackfin: unify cache init functions
  Blackfin: swap clocksource ratings for gptimer/cycles
  Blackfin: update ftrace_push_return_trace() breakage
  Blackfin: update cm board resources
  Blackfin: cm-bf537u: split board from cm-bf537e
  Blackfin: bf538-ezkit: add SPI IRQ resources
  Blackfin: increase default async timings for parallel flashes
  Blackfin: add ICPLB coverage for async banks
  Blackfin: use KERN_ALERT in all kgdb_test output
  Blackfin: fix BF54x SPI CS resources
  Blackfin: fix typo in isram_write()
  Blackfin: bf537-stamp: add adp5588 gpio resources
  Blackfin: add some isram-driver self tests
  Blackfin: workaround anomaly 05000283
  Blackfin: fix spelling in a few comments
  Blackfin: use raw_smp_processor_id() in exception code
  Blackfin: remove useless duplicated assignment in gpio code
  Blackfin: Fix link errors with binutils 2.19 and GCC 4.3
  ...

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Linus Torvalds [Thu, 17 Sep 2009 16:52:43 +0000 (09:52 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/gerg/m68knommu

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: (53 commits)
  m68knommu: Make PAGE_SIZE available to assembly files.
  m68knommu: fix ColdFire definition of CLOCK_TICK_RATE
  m68knommu: set multi-function pins for ethernet when enabled
  m68knommu: remove special interrupt handling code for ne2k support
  m68knommu: relax IO_SPACE_LIMIT setting
  m68knommu: remove ColdFire direct interrupt register access
  m68knommu: create a speciailized ColdFire 5272 interrupt controller
  m68knommu: add support for second interrupt controller of ColdFire 5249
  m68knommu: clean up old ColdFire timer irq setup
  m68knommu: map ColdFire interrupts to correct masking bits
  m68knommu: clean up ColdFire 532x CPU timer setup
  m68knommu: simplify ColdFire "timers" clock initialization
  m68knommu: support code to mask external interrupts on old ColdFire CPU's
  m68knommu: merge old ColdFire interrupt controller masking macros
  m68knommu: remove duplicate ColdFire mcf_autovector() code
  m68knommu: move ColdFire INTC definitions to new include file
  m68knommu: mask off all interrupts in ColdFire intc-simr controller
  m68knommu: remove timer device interrupt setup for ColdFire 532x
  m68knommu: remove interrupt masking from ColdFire pit timer
  m68knommu: remove unecessary interrupt level setting in ColdFire 520x setup
  ...

14 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
Linus Torvalds [Thu, 17 Sep 2009 16:47:35 +0000 (09:47 -0700)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (lm85) Don't bind to Winbond/Nuvoton WPCD377I
  hwmon: (pcf8591) Documentation clean-ups
  hwmon: Clearly mark ACPI drivers as such
  hwmon: Use resource_size
  hwmon: Include <linux/io.h> instead of <asm/io.h>
  hwmon: (tmp421) Add documentation
  hwmon: Add driver for Texas Instruments TMP421/422/423 sensor chips
  hwmon-vid: Ignore 6th VID pin of AMD family 0Fh processors
  hwmon: (asus_atk0110) Add maintainer information
  hwmon: (abituguru3) Support multiple DMI strings per chip ID

14 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
Linus Torvalds [Thu, 17 Sep 2009 16:44:09 +0000 (09:44 -0700)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/dvrabel/uwb

* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb:
  uwb: avoid radio controller reset loops
  uwb: stop uwbd thread if rc->start() fails
  uwb: handle radio controller events with out-of-range IDs correctly

14 years agoALSA: hda - Fix MSI GX620 mixer
Takashi Iwai [Thu, 17 Sep 2009 16:23:00 +0000 (18:23 +0200)]
ALSA: hda - Fix MSI GX620 mixer

The headphone and speaker mixer elements aren't properly set for
MSI GX620 with targa-8ch-dig quirk.
Also fixed the speaker volume control for other ALC883-targa quirks,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoext4: replace MAX_DEFRAG_SIZE with EXT_MAX_BLOCK
Eric Sandeen [Thu, 17 Sep 2009 15:55:58 +0000 (11:55 -0400)]
ext4: replace MAX_DEFRAG_SIZE with EXT_MAX_BLOCK

There's no reason to redefine the maximum allowable offset
in an extent-based file just for defrag;
EXT_MAX_BLOCK already does this.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoregulator: Voltage count for AB3100
Linus Walleij [Thu, 17 Sep 2009 07:17:33 +0000 (09:17 +0200)]
regulator: Voltage count for AB3100

This sets the number of voltages for the AB3100 regulators so that
they play well with the voltage listing functions and can be used
properly with the MMC regulator integration glue for example.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Convert WM8350 to use request_threaded_irq()
Mark Brown [Wed, 16 Sep 2009 18:07:32 +0000 (19:07 +0100)]
mfd: Convert WM8350 to use request_threaded_irq()

Instead of hand rolling our own variant.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Update MAINTAINERS patterns for WM831x
Mark Brown [Wed, 9 Sep 2009 13:46:43 +0000 (14:46 +0100)]
mfd: Update MAINTAINERS patterns for WM831x

The WM831x PMICs added a backlight driver and a new include directory.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoext4: Fix the alloc on close after a truncate hueristic
Theodore Ts'o [Thu, 17 Sep 2009 13:34:16 +0000 (09:34 -0400)]
ext4: Fix the alloc on close after a truncate hueristic

In an attempt to avoid doing an unneeded flush after opening a
(previously non-existent) file with O_CREAT|O_TRUNC, the code only
triggered the hueristic if ei->disksize was non-zero.  Turns out that
the VFS doesn't call ->truncate() if the file doesn't exist, and
ei->disksize is always zero even if the file previously existed.  So
remove the test, since it isn't necessary and in fact disabled the
hueristic.

Thanks to Clemens Eisserer that he was seeing problems with files
written using kwrite and eclipse after sudden crashes caused by a
buggy Intel video driver.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agosched: Fix SD_POWERSAVING_BALANCE|SD_PREFER_LOCAL vs SD_WAKE_AFFINE
Peter Zijlstra [Thu, 17 Sep 2009 07:01:14 +0000 (09:01 +0200)]
sched: Fix SD_POWERSAVING_BALANCE|SD_PREFER_LOCAL vs SD_WAKE_AFFINE

The SD_POWERSAVING_BALANCE|SD_PREFER_LOCAL code can break out of
the domain iteration early, making us miss the SD_WAKE_AFFINE bits.

Fix this by continuing iteration until there is no need for a
larger domain.

This also cleans up the cgroup stuff a bit, but not having two
update_shares() invocations.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agosched: Stop buddies from hogging the system
Peter Zijlstra [Thu, 17 Sep 2009 07:01:20 +0000 (09:01 +0200)]
sched: Stop buddies from hogging the system

Clear buddies more agressively.

The (theoretical, haven't actually observed any of this) problem is
that when we do not select either buddy in pick_next_entity()
because they are too far ahead of the left-most task, we do not
clear the buddies.

This means that as soon as we service the left-most task, these
same buddies will be tried again on the next schedule. Now if the
left-most task was a pure hog, it wouldn't have done any wakeups
and it wouldn't have set buddies of its own. That leads to the old
buddies dominating, which would lead to bad latencies.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agosched: Add new wakeup preemption mode: WAKEUP_RUNNING
Peter Zijlstra [Wed, 16 Sep 2009 10:31:31 +0000 (12:31 +0200)]
sched: Add new wakeup preemption mode: WAKEUP_RUNNING

Create a new wakeup preemption mode, preempt towards tasks that run
shorter on avg. It sets next buddy to be sure we actually run the task
we preempted for.

Test results:

 root@twins:~# while :; do :; done &
 [1] 6537
 root@twins:~# while :; do :; done &
 [2] 6538
 root@twins:~# while :; do :; done &
 [3] 6539
 root@twins:~# while :; do :; done &
 [4] 6540

 root@twins:/home/peter# ./latt -c4 sleep 4
 Entries: 48 (clients=4)

 Averages:
 ------------------------------
        Max          4750 usec
        Avg           497 usec
        Stdev         737 usec

 root@twins:/home/peter# echo WAKEUP_RUNNING > /debug/sched_features

 root@twins:/home/peter# ./latt -c4 sleep 4
 Entries: 48 (clients=4)

 Averages:
 ------------------------------
        Max            14 usec
        Avg             5 usec
        Stdev           3 usec

Disabled by default - needs more testing.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <new-submission>

14 years agosched: Fix TASK_WAKING & loadaverage breakage
Ingo Molnar [Wed, 16 Sep 2009 19:09:13 +0000 (21:09 +0200)]
sched: Fix TASK_WAKING & loadaverage breakage

Fix this:

top - 21:54:00 up  2:59,  1 user,  load average: 432512.33, 426421.74, 417432.74

Which happens because we now set TASK_WAKING before activate_task().

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agomfd: Fix twl4030-power warnings
Samuel Ortiz [Tue, 15 Sep 2009 11:06:02 +0000 (13:06 +0200)]
mfd: Fix twl4030-power warnings

KEY_1 and KEY_2 definitions conflicts with include/linux/input.h

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoregulator: AB3100 support
Linus Walleij [Wed, 9 Sep 2009 09:31:00 +0000 (11:31 +0200)]
regulator: AB3100 support

This adds support for the regulators found in the AB3100
Mixed-Signal IC.

It further also defines platform data for the ST-Ericsson
U300 platform and extends the AB3100 MFD driver so that
platform/board data with regulation constraints and an init
function can be passed down all the way from the board to
the regulators.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.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>
14 years agortc: AB3100 RTC support
Linus Walleij [Sun, 30 Aug 2009 21:49:04 +0000 (23:49 +0200)]
rtc: AB3100 RTC support

This adds support for the RTC found inside the AB3100 Mixed Signal chip.
The symbols used for communicating with the chip is found in the
mfd/ab3100-core.c driver that also provides the platform device.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Alessandro Zummo <alessandro.zummo@towertech.it>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Fix ab3100-otp build failure
Samuel Ortiz [Thu, 27 Aug 2009 18:49:08 +0000 (20:49 +0200)]
mfd: Fix ab3100-otp build failure

ab3100.h should include linux/workqueue.h for otp to build properly.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: OMAP: Board-specifc twl4030 DPS scripts for RX51 board
Amit Kucheria [Thu, 27 Aug 2009 18:27:57 +0000 (20:27 +0200)]
mfd: OMAP: Board-specifc twl4030 DPS scripts for RX51 board

Add support for Dynamic Power Switching (DPS) for the RX51 board.

These scripts are still a work-in-progress. I'll keep sending patches to
update the scripts as they are optimised.

Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Print warning for twl4030 out-of-order script loading
Amit Kucheria [Mon, 17 Aug 2009 14:01:56 +0000 (17:01 +0300)]
mfd: Print warning for twl4030 out-of-order script loading

When the sleep script is loaded before the wakeup script, there is a
chance that the system might go to sleep before the wakeup script
loading is completed. This will lead to a system that does not wakeup
and has been observed to cause non-booting boards.

Various options were considered to solve this problem, including
modification of the core twl4030 power code to be smart enough to
reorder the loading of the scripts. But it felt too over-engineered.

Hence this patch just warns the DPS script developer so that they may be
reordered in the board-code itself.

Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Add support for TWL4030/5030 dynamic power switching
Amit Kucheria [Mon, 31 Aug 2009 16:32:18 +0000 (18:32 +0200)]
mfd: Add support for TWL4030/5030 dynamic power switching

The TWL4030/5030 family of multifunction devices allows board-specific
control of the the various regulators, clock and reset lines through
'scripts' that are loaded into its memory. This allows for Dynamic Power
Switching (DPS).

Implement board-independent core support for DPS that is then used by
board-specific code to load custom DPS scripts.

Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: AB3100 OTP readout
Linus Walleij [Tue, 18 Aug 2009 20:52:26 +0000 (22:52 +0200)]
mfd: AB3100 OTP readout

This adds the ability to read out OTP (One-Time Programmable)
registers in the AB3100 MFD ASIC. It's a simple sysfs file you
can cat to prompt. The OTP registers of the AB3100 are used to
store various device-unique information such as customer ID,
product flags and the 3GPP standard IMEI (International Mobile
Equipment Indentity) number.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoregulator: Add Freescale MC13783 driver
Sascha Hauer [Tue, 18 Aug 2009 23:43:50 +0000 (01:43 +0200)]
regulator: Add Freescale MC13783 driver

This driver provides basic support for the voltage regulators
integrated into the Freescale MC13783 PMIC. It is currently
only possible to enable/disable outputs, not to actually
set the voltage.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Add Freescale MC13783 driver
Sascha Hauer [Tue, 18 Aug 2009 23:40:28 +0000 (01:40 +0200)]
mfd: Add Freescale MC13783 driver

This driver provides the core Freescale MC13783 support. It
registers the client platform_devices and provides access
to the A/D converter.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: AB3100 disable irq nosync
Linus Walleij [Thu, 13 Aug 2009 09:50:01 +0000 (11:50 +0200)]
mfd: AB3100 disable irq nosync

This will make the worker fire interrupt disable the AB3100 IRQ
without sync which resolves a race since the interrupt obviously
cannot wait for itself to complete while being handled.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: AB3100 alter default setting
Linus Walleij [Thu, 13 Aug 2009 09:49:49 +0000 (11:49 +0200)]
mfd: AB3100 alter default setting

This alters the default setting for AB3100_IMRB1 from 0xff to
0xbf. These registers are used for the yet unimplemented ADC
and this new setting will deactivate ADC Trigger 1.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: AB3100 propagate error
Linus Walleij [Thu, 13 Aug 2009 09:49:38 +0000 (11:49 +0200)]
mfd: AB3100 propagate error

This makes ab3100_set_register_interruptible() propagate the error
code from suboperations properly so it can be handles properly.
(A special case comes from signal interruption.)

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: AB3100 accessor function cleanups
Linus Walleij [Thu, 13 Aug 2009 09:49:23 +0000 (11:49 +0200)]
mfd: AB3100 accessor function cleanups

This adds the _interruptible suffix to the AB3100 accessor
functions on par with mutex_lock_interruptible() that's used
for blocking simultaneous calls to the AB3100 acessor functions.
Since these accesses are slow on a 100kHz I2C bus and may line
up waiting for the mutex, we need to handle interruption by
system shutdown or kill signals and may just as well denote that
in the function names.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agortc: Add support for RTCs on Wolfson WM831x devices
Mark Brown [Thu, 27 Aug 2009 17:59:05 +0000 (19:59 +0200)]
rtc: Add support for RTCs on Wolfson WM831x devices

The WM831x series of PMICs contain RTC functionality. The hardware
provides a 32 bit counter incrementing at 1Hz together with a per
tick interrupt and an alarm value. For simplicity the driver chooses
to define the epoch for the counter as the Unix epoch - if required
platform data can be used in future to customise this.

When powered on from a completely cold state the RTC reports that it
has not been configured - when this happens an error is returned
when attempting to read the RTC in order to avoid use of values we
know to be invalid.

The hardware also provides security features which mean that it can
ignore attempts to set the RTC time in certain circumstances, most
notably if the RTC is written to too often. These errors are detected
by verifying the written RTC value.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoregulator: get pcap data from the parent device
Antonio Ospite [Fri, 7 Aug 2009 21:18:41 +0000 (23:18 +0200)]
regulator: get pcap data from the parent device

Right now the pcap core driver passes a reference to its pcap data abusing the
subdrivers platform drvdata, this is not good.

Get the reference directly from the parent device.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoinput: PCAP2 misc input driver
Daniel Ribeiro [Mon, 10 Aug 2009 18:27:48 +0000 (20:27 +0200)]
input: PCAP2 misc input driver

This is a driver for misc input events for the PCAP2 PMIC, it handles
the Power key and the Headphone button.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Ilya Petrov <ilya.muromec@gmail.com>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoinput: PCAP2 based touchscreen driver
Daniel Ribeiro [Fri, 7 Aug 2009 20:54:56 +0000 (22:54 +0200)]
input: PCAP2 based touchscreen driver

Touchscreen driver for the PCAP2 multi function device used in
Motorola EZX smartphones.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoregulator: register pcap earlier
Antonio Ospite [Thu, 6 Aug 2009 23:08:52 +0000 (16:08 -0700)]
regulator: register pcap earlier

Register pcap-regulator earlier so it can be used with cpufreq

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoregulator: Add WM831x ISINK support
Mark Brown [Tue, 28 Jul 2009 14:23:46 +0000 (15:23 +0100)]
regulator: Add WM831x ISINK support

The WM831x series of PMICs provide two constant current sinks
designed to drive strings of serially connected LEDs for applications
such as backlights. This driver adds support for those regulators.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoregulator: Add WM831x DC-DC boost convertor support
Mark Brown [Tue, 28 Jul 2009 14:23:16 +0000 (15:23 +0100)]
regulator: Add WM831x DC-DC boost convertor support

The WM831x series of PMICs include a single DC-DC boost convertor.
This adds basic support for this convertor.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoregulator: Add WM831x EPE support
Mark Brown [Tue, 28 Jul 2009 14:22:23 +0000 (15:22 +0100)]
regulator: Add WM831x EPE support

The WM831x series of PMICs provide two optional outputs for
controlling external devices during power sequencing, for example
an external regulator. While in essence these are GPIOs the
hardware presents them as DCDCs with very little control so
provide support via the regulator API in that fashion.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoregulator: Add WM831x LDO support
Mark Brown [Tue, 28 Jul 2009 14:22:02 +0000 (15:22 +0100)]
regulator: Add WM831x LDO support

The WM831x series of devices provide three types of LDO:

 - General purpose LDOs supporting voltages from 0.9-3.3V
 - High performance analogue LDOs supporting voltages from 1-3.5V
 - Very low power consumption LDOs intended to support always on
   functionality.

This patch adds support for all three kinds of LDO. Each regulator
is probed as an individual platform device with resources used to
provide the register map location of the regulator. Mixed hardware
and software control of regulators is not current supported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoregulator: Add WM831x DC-DC buck convertor support
Mark Brown [Tue, 28 Jul 2009 14:21:49 +0000 (15:21 +0100)]
regulator: Add WM831x DC-DC buck convertor support

The WM831x series of devices all have 3 DC-DC buck convertors. This
driver implements software control for these regulators via the
regulator API.  Use with split hardware/software control of individual
regulators is not supported, though regulators not controlled by
software may be controlled via the hardware control interfaces.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoregulator: Provide mode to status conversion function
Mark Brown [Tue, 4 Aug 2009 18:09:52 +0000 (20:09 +0200)]
regulator: Provide mode to status conversion function

This is useful for implementing get_status() in terms of get_mode().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoinput: Add support for the WM831x ON pin
Mark Brown [Tue, 15 Sep 2009 10:07:12 +0000 (12:07 +0200)]
input: Add support for the WM831x ON pin

The WM831x series of PMICs support control of initial power on
through the ON pin on the device with soft control of the pin
at other times. Represent this to userspace as KEY_POWER.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agohwmon: WM831x PMIC hardware monitoring driver
Mark Brown [Tue, 28 Jul 2009 14:52:22 +0000 (15:52 +0100)]
hwmon: WM831x PMIC hardware monitoring driver

This driver adds support for the hardware monitoring features of
the WM831x PMICs to the hwmon API. Monitoring is provided for
the system voltages supported natively by the WM831x, the chip
temperature, the battery temperature and the auxiliary inputs
of the WM831x.

Currently no alarms are supported, though digital comparators on
the WM831x devices would allow these to be provided.

Since the auxiliary and battery temperature input scaling depends
on the system configuration the value is reported as a voltage to
userspace.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agogpio: Add WM831X GPIO driver
Mark Brown [Mon, 27 Jul 2009 13:46:00 +0000 (14:46 +0100)]
gpio: Add WM831X GPIO driver

Add support for the GPIO pins on the WM831x. No direct support is
currently supplied for configuring non-gpiolib functionality such
as pull configuration and alternate functions, soft configuration
of these will be provided in a future patch.

Currently use of these pins as interrupts is not supported due to
the ongoing issues with generic irq not support interrupt controllers
on interrupt driven buses. Users can directly request the interrupts
with the wm831x-specific APIs currently provided if required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Hook WM831x into build system
Mark Brown [Mon, 27 Jul 2009 13:45:58 +0000 (14:45 +0100)]
mfd: Hook WM831x into build system

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Export ISEL values from WM831x core
Mark Brown [Mon, 27 Jul 2009 13:45:57 +0000 (14:45 +0100)]
mfd: Export ISEL values from WM831x core

The current settings which can be used with the WM831x current sinks
can't easily be mapped between register values and currents at run
time without a lookup table since the values scale logarithmically
to match the way the human eye interprets brightness. This lookup
table is inclided in the core since several drivers need to use it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Add basic WM831x OTP support
Mark Brown [Mon, 27 Jul 2009 13:45:56 +0000 (14:45 +0100)]
mfd: Add basic WM831x OTP support

The WM831x series of devices use OTP (One Time Programmable, a type
of PROM) to store system configuration. At run time this data is
visible via registers.

Currently the only explicitly supported feature is that the unique
ID provided by every WM831x device is exported to user space via
sysfs. Other configuration data may be read by system-specific
code in the pre_init() and post_init() platform data operations.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Conditionally add WM831x backlight subdevice
Mark Brown [Mon, 27 Jul 2009 13:45:55 +0000 (14:45 +0100)]
mfd: Conditionally add WM831x backlight subdevice

The WM831x backlight driver requires at least the specification of the
current sink to use and a maximum current to allow them to function and
will actively interfere with other users of the regulators it uses if
misconfigured so only register the subdevice for it if this platform
data has been supplied.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Add WM831x AUXADC support
Mark Brown [Mon, 27 Jul 2009 13:45:54 +0000 (14:45 +0100)]
mfd: Add WM831x AUXADC support

The WM831x contains an auxiliary ADC with a number of switchable
inputs which is used to monitor some of the voltages and
temperatures in the system and has some external inputs which can be
used for machine specific purposes. Provide an API allowing drivers
to read values from the ADC.

An internal reference voltage is provided to allow callibration of
the ADC. This is used to calibrate the device at startup.

The hardware also supports continuous readings and digital comparators.
These are not yet supported by the driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Add WM831x interrupt support
Mark Brown [Mon, 27 Jul 2009 13:45:53 +0000 (14:45 +0100)]
mfd: Add WM831x interrupt support

The WM831x includes an interrupt controller managing interrupts for
the various functions on the chip. This patch adds support for the
core interrupt block on the device.

Ideally this would be supported by genirq, particularly for the
GPIOs, but currently genirq is unable to cope with controllers on
interrupt driven buses so we cut'n'paste the generic interface.
Once genirq is able to cope chips like this it should be a case
of filing the prefixes off the code and redoing wm831x-irq.c to
move over.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Initial core support for WM831x series devices
Mark Brown [Mon, 27 Jul 2009 13:45:52 +0000 (14:45 +0100)]
mfd: Initial core support for WM831x series devices

The WM831x series of devices are register compatible processor power
management subsystems, providing regulator and power path management
facilities along with other services like watchdog, RTC and touch
panel controllers.

This patch adds very basic support, providing basic single register
I2C access, handling of the security key and registration of the
devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Allow multiple MFD cells with the same name
Mark Brown [Mon, 27 Jul 2009 13:45:51 +0000 (14:45 +0100)]
mfd: Allow multiple MFD cells with the same name

Provide basic support for MFDs having multiple cells of a given
type with different IDs by adding an id to the mfd_cell structure
and then adding that to the id passed in to mfd_add_devices().

As it stands this approach requires that MFDs using this feature
deal with ensuring that there aren't any ID collisions resulting
from multiple MFDs of the same type being instantiated. This needs
to happen with the existing code too, but with this approach there
is a knock on effect on the IDs for non-duplicated devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: register ezx-pcap earlier
Antonio Ospite [Fri, 31 Jul 2009 22:55:45 +0000 (15:55 -0700)]
mfd: register ezx-pcap earlier

Register ezx-pcap earlier so it can be used with cpufreq

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Remove VIB defines from pcap header file
Daniel Ribeiro [Fri, 31 Jul 2009 10:38:02 +0000 (12:38 +0200)]
mfd: Remove VIB defines from pcap header file

Vibrator will be accessed via the pcap-regulator driver, no need to expose its
bits in the header file.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Correct ro and cd implemantion on DM355
Vipin Bhandari [Thu, 30 Jul 2009 08:19:17 +0000 (04:19 -0400)]
mfd: Correct ro and cd implemantion on DM355

This patch corrects the support for MMCSD card detection
and read only feature for SoC DM355.

EVMDM355_ECP_VA4.pdf, from Spectrum digital, suggests that
Bit 2 and 4 should be checked for card detection. However
on the EVM, bits 1 and 3 gives this status, for MMC/SD
instance 0 and 1 respectively. The pdf also suggests that
Bit 1 and 3 should be checked for write protection. However
on the EVM bits 2 and 4 gives this status.

This document can be downloaded from
http://c6000.spectrumdigital.com/evmdm355/reve/files/EVMDM355_ECP_VA4.pdf

Signed-off-by: Vipin Bhandari <vipin.bhandari@ti.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: fix wrong define for 10bit pcf50633 ADC mode
Paul Fertser [Mon, 27 Jul 2009 21:09:04 +0000 (01:09 +0400)]
mfd: fix wrong define for 10bit pcf50633 ADC mode

The 10 bits definition was the 8 bits one.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: revise locking for pcf50633 ADC
Paul Fertser [Mon, 27 Jul 2009 20:58:48 +0000 (00:58 +0400)]
mfd: revise locking for pcf50633 ADC

Current implementation is prone to races, this patch attempts to remove all
but one (in pcf50633_adc_sync_read).

The idea is that we need to guard the queue access only on inserting and
removing items. If we insert and there're no more items in the queue it
means that the last irq already happened and we need to trigger ADC
manually. If not, then the next conversion will be triggered by the irq
handler upon completion of the previous.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: use a dedicated workqueue for pcf50633 irq processing
Paul Fertser [Mon, 27 Jul 2009 20:41:15 +0000 (00:41 +0400)]
mfd: use a dedicated workqueue for pcf50633 irq processing

Using the default kernel "events" workqueue causes problems with
synchronous adc readings if initiated from some task on the same
workqueue.

I had a deadlock trying to use pcf50633_adc_sync_read from a
power_supply class driver because the reading was initiated from the
workqueue and it waited for the irq processing to complete (to get the
result) and that was put on the same workqueue.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: Add twl4030-pwrbutton as a twl4030 child
Felipe Balbi [Mon, 3 Aug 2009 16:16:38 +0000 (18:16 +0200)]
mfd: Add twl4030-pwrbutton as a twl4030 child

Make that twl4030-pwrbutton.c driver probe with current
child creation api for twl4030.

Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agohwmon: Add WM835x PMIC hardware monitoring driver
Mark Brown [Mon, 20 Jul 2009 11:43:45 +0000 (12:43 +0100)]
hwmon: Add WM835x PMIC hardware monitoring driver

This driver provides reporting of the status supply voltage rails
of the WM835x series of PMICs via the hwmon API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoregulator: add pcap driver
Daniel Ribeiro [Sat, 27 Jun 2009 03:18:02 +0000 (00:18 -0300)]
regulator: add pcap driver

Add (partial) support for the voltage regulators on the PCAP2 PMIC.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoMAINTAINERS: Add entry for Wolfson PMIC drivers
Mark Brown [Thu, 2 Jul 2009 15:43:08 +0000 (16:43 +0100)]
MAINTAINERS: Add entry for Wolfson PMIC drivers

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: remove unnecessary semicolons from twl4030
Joe Perches [Sun, 28 Jun 2009 16:26:30 +0000 (09:26 -0700)]
mfd: remove unnecessary semicolons from twl4030

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: add ezx_pcap_setbits
Daniel Ribeiro [Sat, 27 Jun 2009 03:17:20 +0000 (00:17 -0300)]
mfd: add ezx_pcap_setbits

Provides an atomic set_bits functions, as needed by the pcap-regulator
driver.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: fix pcap irq bottom handler
Daniel Ribeiro [Tue, 23 Jun 2009 15:34:13 +0000 (12:34 -0300)]
mfd: fix pcap irq bottom handler

Mask interrupts before servicing them and loop while pcap asserts the interrupt
line.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agomfd: add set_ts_bits for pcap
Daniel Ribeiro [Tue, 23 Jun 2009 15:33:10 +0000 (12:33 -0300)]
mfd: add set_ts_bits for pcap

Some TS controller bits are on the same register as the ADC control, save
TS specific bits and export a set_ts_bits function so the TS driver can set
it with the adc_mutex lock held.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>