summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* do_wait() optimization: do not place sub-threads on task_struct->children listOleg Nesterov2009-12-183-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to Roland who pointed out de_thread() issues. Currently we add sub-threads to ->real_parent->children list. This buys nothing but slows down do_wait(). With this patch ->children contains only main threads (group leaders). The only complication is that forget_original_parent() should iterate over sub-threads by hand, and de_thread() needs another list_replace() when it changes ->group_leader. Henceforth do_wait_thread() can never see task_detached() && !EXIT_DEAD tasks, we can remove this check (and we can unify do_wait_thread() and ptrace_do_wait()). This change can confuse the optimistic search in mm_update_next_owner(), but this is fixable and minor. Perhaps badness() and oom_kill_process() should be updated, but they should be fixed in any case. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Roland McGrath <roland@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Ratan Nalumasu <rnalumasu@gmail.com> Cc: Vitaly Mayatskikh <vmayatsk@redhat.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* nommu: ramfs: remove unused local varMike Frysinger2009-12-181-1/+1
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: David Howells <dhowells@redhat.com> Acked-by: Greg Ungerer <gerg@snapgear.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* lib/vsprintf.c: document more vsnprintf extensionsUwe Kleine-König2009-12-181-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | These were added in 9ac6e44 (lib/vsprintf.c: add %pU to print UUID/GUIDs) c7dabef (vsprintf: use %pR, %pr instead of %pRt, %pRf) 8a27f7c (lib/vsprintf.c: Add "%pI6c" - print pointer as compressed ipv6 address) 4aa9960 (printk: add %I4, %I6, %i4, %i6 format specifiers) dd45c9c (printk: add %pM format specifier for MAC addresses) but only added comments to pointer() not vsnprintf() that is refered to by printk's comments. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Harvey Harrison <harvey.harrison@gmail.com> Cc: David S. Miller <davem@davemloft.net> Cc: Joe Perches <joe@perches.com> Cc: Jens Rosenboom <jens@mcbone.net> Cc: David S. Miller <davem@davemloft.net> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* vt: don't export vt_kmsg_redirect() to userspaceBernhard Walle2009-12-181-0/+4
| | | | | | | | | | | | | | | Fix following warning in linux-next by guarding the function definition (both the "extern" and the inline) with #ifdef __KERNEL__. usr/include/linux/vt.h:89: userspace cannot call function or variable defined in the kernel Introduced by commit 5ada918b82399eef3afd6a71e3637697d6bd719f ("vt: introduce and use vt_kmsg_redirect() function"). Signed-off-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers/video/via/viafbdev.c: correct code taking the size of a pointerJulia Lawall2009-12-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | sizeof(viafb_gamma_table) is just the size of the pointer. This is changed to the size used when calling kmalloc to initialize the pointer. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression *x; expression f; type T; @@ *f(...,(T)x,...) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw> Cc: Scott Fang <ScottFang@viatech.com.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* hwmon: I2C bus support for lis3lv02d and variant accelerometer chipsSamu Onkalo2009-12-183-0/+201
| | | | | | | | | Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Cc: Éric Piel <eric.piel@tremplin-utc.net> Cc: Kalhan Trisal <kalhan.trisal@intel.com> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* reiserfs: truncate blocks not used by a writeJan Kara2009-12-181-4/+14
| | | | | | | | | | | | It can happen that write does not use all the blocks allocated in write_begin either because of some filesystem error (like ENOSPC) or because page with data to write has been removed from memory. We truncate these blocks so that we don't have dangling blocks beyond i_size. Cc: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cs5535: CS5535_MFGPT_DEFAULT_IRQ should depend on CS5535_MFGPTGeert Uytterhoeven2009-12-181-0/+1
| | | | | | | | | | It doesn't make much sense to have CS5535_MFGPT_DEFAULT_IRQ show up in configs that cannot have CS5535_MFGPT. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Andres Salomon <dilinger@collabora.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* kernel/sysctl.c: fix the incomplete part of ↵WANG Cong2009-12-181-1/+1
| | | | | | | | | | | sysctl_max_map_count-should-be-non-negative.patch It is a mistake that we used 'proc_dointvec', it should be 'proc_dointvec_minmax', as in the original patch. Signed-off-by: WANG Cong <amwang@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Revert "task_struct: make journal_info conditional"Linus Torvalds2009-12-1710-20/+1Star
| | | | | | | | | | | | | | | | | | This reverts commit e4c570c4cb7a95dbfafa3d016d2739bf3fdfe319, as requested by Alexey: "I think I gave a good enough arguments to not merge it. To iterate: * patch makes impossible to start using ext3 on EXT3_FS=n kernels without reboot. * this is done only for one pointer on task_struct" None of config options which define task_struct are tristate directly or effectively." Requested-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Revert "fix mismerge with Trond's stuff (create_mnt_ns() export is gone now)"Linus Torvalds2009-12-173-1/+11
| | | | | | | | | | | | | | | | | | | | | This reverts commit e9496ff46a20a8592fdc7bdaaf41b45eb808d310. Quoth Al: "it's dependent on a lot of other stuff not currently in mainline and badly broken with current fs/namespace.c. Sorry, badly out-of-order cherry-pick from old queue. PS: there's a large pending series reworking the refcounting and lifetime rules for vfsmounts that will, among other things, allow to rip a subtree away _without_ dissolving connections in it, to be garbage-collected when all active references are gone. It's considerably saner wrt "is the subtree busy" logics, but it's nowhere near being ready for merge at the moment; this changeset is one of the things becoming possible with that sucker, but it certainly shouldn't have been picked during this cycle. My apologies..." Noticed-by: Eric Paris <eparis@redhat.com> Requested-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'master' of ↵Linus Torvalds2009-12-1724-163/+136Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: kill I_LOCK fold do_sync_file_range into sys_sync_file_range fix up O_SYNC comments VFS/fsstack: handle 32-bit smp + preempt + large files in fsstack_copy_inode_size fsstack/ecryptfs: remove unused get_nlinks param to fsstack_copy_attr_all vfs: remove extraneous NULL d_inode check from do_filp_open fs: no games with DCACHE_UNHASHED fs: anon_inodes implement dname dio: fix use-after-free
| * kill I_LOCKChristoph Hellwig2009-12-179-44/+39Star
| | | | | | | | | | | | | | | | After I_SYNC was split from I_LOCK the leftover is always used together with I_NEW and thus superflous. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * fold do_sync_file_range into sys_sync_file_rangeChristoph Hellwig2009-12-172-40/+23Star
| | | | | | | | | | | | | | | | | | | | | | | | We recently go rid of all callers of do_sync_file_range as they're better served with vfs_fsync or the filemap_write_and_wait. Now that do_sync_file_range is down to a single caller fold it into it so that people don't start using it again accidentally. While at it also switch it from using __filemap_fdatawrite_range(..., WB_SYNC_ALL) to the more clear filemap_fdatawrite_range(). Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * fix up O_SYNC commentsChristoph Hellwig2009-12-174-4/+4
| | | | | | | | | | | | | | Proper Posix O_SYNC handling only made it into 2.6.33, not 2.6.32. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * VFS/fsstack: handle 32-bit smp + preempt + large files in ↵Erez Zadok2009-12-172-4/+52
| | | | | | | | | | | | | | | | | | | | | | | | fsstack_copy_inode_size Copy the inode size and blocks from one inode to another correctly on 32-bit systems with CONFIG_SMP, CONFIG_PREEMPT, or CONFIG_LBDAF. Use proper inode spinlocks only when i_size/i_blocks cannot fit in one 32-bit word. Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * fsstack/ecryptfs: remove unused get_nlinks param to fsstack_copy_attr_allErez Zadok2009-12-175-22/+9Star
| | | | | | | | | | | | | | | | | | | | This get_nlinks parameter was never used by the only mainline user, ecryptfs; and it has never been used by unionfs or wrapfs either. Acked-by: Dustin Kirkland <kirkland@canonical.com> Acked-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com> Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: remove extraneous NULL d_inode check from do_filp_openJeff Layton2009-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | We can't get to this point unless it's a valid pointer. Signed-off-by: Jeff Layton <jlayton@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * fs: no games with DCACHE_UNHASHEDNick Piggin2009-12-173-50/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Filesystems outside the regular namespace do not have to clear DCACHE_UNHASHED in order to have a working /proc/$pid/fd/XXX. Nothing in proc prevents the fd link from being used if its dentry is not in the hash. Also, it does not get put into the dcache hash if DCACHE_UNHASHED is clear; that depends on the filesystem calling d_add or d_rehash. So delete the misleading comments and needless code. Acked-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * fs: anon_inodes implement dnameNick Piggin2009-12-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a d_dname method for anon_inodes filesystem, the same way pipefs and sockfs pseudo filesystems. This allows us to remove the DCACHE_UNHASHED hack from anon_inodes.c (see next patch). [AV: inumber is useless here, dropped from anon_inodefs_dname()] Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: Miklos Szeredi <mszeredi@suse.cz> Cc: Davide Libenzi <davidel@xmailserver.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * dio: fix use-after-freeAl Viro2009-12-171-1/+1
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | Merge branch 'for-linus' of git://gitserver.sunplusct.com/linux-2.6-scoreLinus Torvalds2009-12-176-9/+31
|\ \ | | | | | | | | | | | | | | | | | | * 'for-linus' of git://gitserver.sunplusct.com/linux-2.6-score: score: include asm-generic/param.h in asm/delay.h. score: fixed pfn_valid define. score: add flush_dcahce_page and PG_dcache_dirty define
| * | score: include asm-generic/param.h in asm/delay.h.Chen Liqin2009-12-171-0/+2
| | | | | | | | | | | | | | | Signed-off-by: Cui Bixiong <bixiong@sunnorth.com.cn> Signed-off-by: Chen Liqin <liqin.chen@sunplusct.com>
| * | score: fixed pfn_valid define.Chen Liqin2009-12-173-6/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Cui Bixiong <bixiong@sunnorth.com.cn> Signed-off-by: Chen Liqin <liqin.chen@sunplusct.com> modified: arch/score/include/asm/page.h modified: arch/score/kernel/setup.c modified: arch/score/mm/init.c
| * | score: add flush_dcahce_page and PG_dcache_dirty defineChen Liqin2009-12-172-3/+27
| |/ | | | | | | | | | | | | | | Signed-off-by: Cui Bixiong <bixiong@sunnorth.com.cn> Signed-off-by: Chen Liqin <liqin.chen@sunplusct.com> modified: arch/score/include/asm/cacheflush.h modified: arch/score/mm/cache.c
* | Merge branch 'for-linus' of ↵Linus Torvalds2009-12-1717-611/+1981
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: (27 commits) regulator: wm831x_reg_read() failure unnoticed in wm831x_aldo_get_mode() twl-regulator: Fix reg_disable functionality for 4030 and 6030 twl-regulator: Add turnon delay to reg_enable twl-regulator: Restore REMAP configuration in regulator probe twl-regulator: Add turnon-delay and REMAP config to twlreg_info struct twl-regulator: Define critical regulators as always_on twl-regulator: Add all twl4030 regulators to twlreg_info regulator: mc13783-regulator: correct the probing time. regulator: Fix unbalanced disables/enables in regulator_bulk_{enable,disable} error path regulator: core.c: Small coding style cleanup (indentation fixup) drivers/regulator: use PTR_ERR to get error code regulator: consumer.h - fix build when consumer.h is #included first. regulator/mc13783: various cleanups regulator/mc13783: rename source file to match other drivers Fix some AB3100 regulator issues regulator: keep index within bounds in da9034_get_ldo12_voltage() regulator: Ensure val is initialised in 88pm8607 choose_voltage() regulator: Remove duplicate consts from ab3100 regulator: Handle regulators without suspend mode configuration regulator: Factor out regulator name pretty printing ...
| * | regulator: wm831x_reg_read() failure unnoticed in wm831x_aldo_get_mode()Roel Kluin2009-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | ret should be signed to notice a failure in wm831x_reg_read(). Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | twl-regulator: Fix reg_disable functionality for 4030 and 6030Juha Keski-Saari2009-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes sure all regulator group assignments are cleared on disable call Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | twl-regulator: Add turnon delay to reg_enableJuha Keski-Saari2009-12-171-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change implements a basic turnon delay in the regulator enable function to make it less probable that reg_enable returns before the regulator output is at target level Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | twl-regulator: Restore REMAP configuration in regulator probeJuha Keski-Saari2009-12-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change ensures the regulator REMAP register configuration is in a known state so state transitions will function as intended regardless of possible bootloader effects on it Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | twl-regulator: Add turnon-delay and REMAP config to twlreg_info structJuha Keski-Saari2009-12-171-41/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change includes regulator turnon delay values and the REMAP reset configuration to the twlreg_info struct, since they are basic attributes of every TWL regulator Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | twl-regulator: Define critical regulators as always_onJuha Keski-Saari2009-12-171-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Defines VIO, VDD1, VDD2, VPLL1 and VINT* regulators as always_on by default since they are critical to TWL and its master's functionality and should be on in all cases where RegFW is used Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | twl-regulator: Add all twl4030 regulators to twlreg_infoJuha Keski-Saari2009-12-171-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Define all twl4030 regulators in the twlreg_info table, along with appropriate VSEL tables for adjustable regulators Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: mc13783-regulator: correct the probing time.Alberto Panizzo2009-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the mc13783-regulator driver is built in kernel, probing it during the regulator subsystem initialisation result in a fault. That is because regulator subsystem is planned to be initialised very early in the boot process, before the mfd subsystem initialisation. The mc12783-regulator probing process need to access to the mc13783-core functionality to read/write mc13783 registers and so must be called after the mc13783-core driver initialisation. The way to do this is to let the kernel probe the mc13783-regulator driver when mc13783-core register his regulator subdevice. Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: Fix unbalanced disables/enables in ↵Lars-Peter Clausen2009-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | regulator_bulk_{enable,disable} error path Currently it is possible for regulator_bulk_{enable,disable} operations to generate unbalanced regulator_{disable,enable} calls in its error path. In case of an error only those regulators of the bulk operation which actually had been enabled/disabled should get their original state restored. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: core.c: Small coding style cleanup (indentation fixup)Stefan Roese2009-12-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Stefan Roese <sr@denx.de> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | drivers/regulator: use PTR_ERR to get error codeJulia Lawall2009-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IS_ERR returns only 1 or 0. The callsite of setup_regulators expects a negative integer in an error case. Thus, PTR_ERR has to be used to extract it. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression E,E1; @@ *E = IS_ERR(...) ... when != E = E1 *return E; // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: consumer.h - fix build when consumer.h is #included first.Liam Girdwood2009-12-171-0/+2
| | | | | | | | | | | | | | | | | | consumer.h requires device.h for stand alone build. Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator/mc13783: various cleanupsUwe Kleine-König2009-12-171-277/+112Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - define needed registers and bits in the driver - properly namespace functions and structs - fix locking as required by patch "mfd/mc13783: near complete rewrite" - use platform_data as provided by "mfd/mc13783: near complete rewrite" instead of accessing struct mc13783 - struct mc13783_regulator_priv.desc is (and was) unused and so can go away - use cpp magic to initialize mc13783_regulators - bring MODULE_LICENSE in sync with actual copyright - minor style fixes This allows not including mc13783-private.h which I intend to remove soon. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Mark Brown <broonie@opensoruce.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator/mc13783: rename source file to match other driversUwe Kleine-König2009-12-172-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One annoying thing about the old name was that the module was just called mc13783 which caused wrong expectations (at least for me). Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Mark Brown <broonie@opensoruce.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | Fix some AB3100 regulator issuesLinus Walleij2009-12-171-21/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch will remove surplus register writes on shut down of LDO D (this magic was not needed), remove an unnecessary (!) error check and really unregister the regulators when the module is unloaded. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: keep index within bounds in da9034_get_ldo12_voltage()Roel Kluin2009-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | If selector equals ARRAY_SIZE(da9034_ldo12_data), that is one too large already. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: Ensure val is initialised in 88pm8607 choose_voltage()Mark Brown2009-12-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | If we fall through it means that we hit an unknown regulator/chip combination so set -ENOENT as an explicit flag (the return code is only used internally). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: Remove duplicate consts from ab3100Mark Brown2009-12-171-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | 'static const int const' means the same thing as 'static const int' and sparse complains about this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: Handle regulators without suspend mode configurationMark Brown2009-12-172-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since some regulators in the system may not support suspend mode configuration we need to allow some regulators to have a missing suspend mode configuration. Do this by requiring that disabled regulators are explicitly flagged and then skip over regulators that have no state specified. Try to avoid surprises by warning the if we could set the state but no configuration is provided. This also ensures that an all zeros configuration generates a warning rather than silently disabling the regulator. Reported-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: Factor out regulator name pretty printingMark Brown2009-12-171-45/+38Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the regulator API functions have code to allow the machine constraints to override the device supplied name for the regulator in the constraints in order to help tie logging to supplies on the board and disambiguate when there is more than one regulator chip in the system. Factor this code out into a new rdev_get_name() function and use it throughout the regulator API so that we always use the same name. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: Display actual settings with constraintsMark Brown2009-12-171-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | When voltage or current constraints are either missing or specify a range display the actual setting along with the constraints if we can. This can aid debugging of configuration problems. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: Also lift apply_uV into machine_constraints_voltage()Mark Brown2009-12-171-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | It makes sense to do all the voltage configuration in the one split out function. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: Factor out voltage constraint setupMark Brown2009-12-171-27/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | This allows constraints to take effect on regulators that support voltage setting but for which the board does not specify a voltage range (for example, because it is fixed correctly at system startup). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: Report error codes for bulk operationsMark Brown2009-12-171-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | If we're going to log an error we may as well log what the error code that we're failing on is. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>