summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'i2c-for-linus' of ↵Linus Torvalds2010-08-1222-116/+805
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: i2c: I2C bus multiplexer driver pca954x i2c: Multiplexed I2C bus core support i2c: Use a separate mutex for userspace client lists i2c: Make i2c_default_probe self-sufficient i2c: Drop dummy variable i2c: Move adapter locking helpers to i2c-core V4L/DVB: Use custom I2C probing function mechanism i2c: Add support for custom probe function i2c-dev: Use memdup_user i2c-dev: Remove unnecessary kmalloc casts
| * i2c: I2C bus multiplexer driver pca954xMichael Lawnick2010-08-116-1/+377
| | | | | | | | | | | | | | | | I2C driver for PCA954x I2C multiplexer series. Signed-off-by: Michael Lawnick <ml.lawnick@gmx.de> Acked-by: Rodolfo Giometti <giometti@linux.it> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * i2c: Multiplexed I2C bus core supportMichael Lawnick2010-08-117-8/+327
| | | | | | | | | | | | | | | | | | Add multiplexed bus core support. I2C multiplexer and switches like pca954x get instantiated as new adapters per port. Signed-off-by: Michael Lawnick <ml.lawnick@gmx.de> Acked-by: Rodolfo Giometti <giometti@linux.it> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * i2c: Use a separate mutex for userspace client listsJean Delvare2010-08-112-6/+8
| | | | | | | | | | | | | | | | | | Moving userspace-instantiated clients to separate lists wasn't nearly enough to avoid deadlocks in multiplexed bus cases. We also want to have a dedicated mutex to protect each list. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Michael Lawnick <ml.lawnick@gmx.de>
| * i2c: Make i2c_default_probe self-sufficientJean Delvare2010-08-111-22/+10
| | | | | | | | | | | | | | | | Make i2c_default_probe self-sufficient, so that callers don't have to do functionality checks themselves. This ensures everything is and will stay consistent. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * i2c: Drop dummy variableJean Delvare2010-08-111-3/+2
| | | | | | | | | | | | | | | | Now that bus_for_each_drv() is no longer __must_check, we can drop the dummy variable that was used to store the returned value. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Justin P. Mattock <justinmattock@gmail.com>
| * i2c: Move adapter locking helpers to i2c-coreJean Delvare2010-08-112-22/+37
| | | | | | | | | | | | | | | | | | | | Uninline i2c adapter locking helper functions, move them to i2c-core, and use them in i2c-core itself. The functions are still exported for external users. This makes future updates to the locking model (which will be needed for multiplexing support) possible and transparent. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Michael Lawnick <ml.lawnick@gmx.de>
| * V4L/DVB: Use custom I2C probing function mechanismJean Delvare2010-08-114-26/+18
| | | | | | | | | | | | | | | | Now that i2c-core offers the possibility to provide custom probing function for I2C devices, let's make use of it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i2c: Add support for custom probe functionJean Delvare2010-08-1111-21/+31
| | | | | | | | | | | | | | | | | | The probe method used by i2c_new_probed_device() may not be suitable for all cases. Let the caller provide its own, optional probe function. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * i2c-dev: Use memdup_userJulia Lawall2010-08-111-16/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use memdup_user when user data is immediately copied into the allocated region. Note that in the second case, the ++i is no longer necessary, as the last value is already freed if needed by the call to memdup_user. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression from,to,size,flag; position p; identifier l1,l2; @@ - to = \(kmalloc@p\|kzalloc@p\)(size,flag); + to = memdup_user(from,size); if ( - to==NULL + IS_ERR(to) || ...) { <+... when != goto l1; - -ENOMEM + PTR_ERR(to) ...+> } - if (copy_from_user(to, from, size) != 0) { - <+... when != goto l2; - -EFAULT - ...+> - } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * i2c-dev: Remove unnecessary kmalloc castsJoe Perches2010-08-111-3/+1
| | | | | | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | Merge branch 'params' of ↵Linus Torvalds2010-08-1230-253/+658
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus * 'params' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (22 commits) param: don't deref arg in __same_type() checks param: update drivers/acpi/debug.c to new scheme param: use module_param in drivers/message/fusion/mptbase.c ide: use module_param_named rather than module_param_call param: update drivers/char/ipmi/ipmi_watchdog.c to new scheme param: lock if_sdio's lbs_helper_name and lbs_fw_name against sysfs changes. param: lock myri10ge_fw_name against sysfs changes. param: simple locking for sysfs-writable charp parameters param: remove unnecessary writable charp param: add kerneldoc to moduleparam.h param: locking for kernel parameters param: make param sections const. param: use free hook for charp (fix leak of charp parameters) param: add a free hook to kernel_param_ops. param: silence .init.text references from param ops Add param ops struct for hvc_iucv driver. nfs: update for module_param_named API change AppArmor: update for module_param_named API change param: use ops in struct kernel_param, rather than get and set fns directly param: move the EXPORT_SYMBOL to after the definitions. ...
| * | param: don't deref arg in __same_type() checksRusty Russell2010-08-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc allows this when arg is a function, but sparse complains: drivers/char/ipmi/ipmi_watchdog.c:303:1: error: cannot dereference this type drivers/char/ipmi/ipmi_watchdog.c:307:1: error: cannot dereference this type drivers/char/ipmi/ipmi_watchdog.c:311:1: error: cannot dereference this type Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Tested-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | param: update drivers/acpi/debug.c to new schemeRusty Russell2010-08-111-8/+24
| | | | | | | | | | | | | | | | | | | | | The new module_param_cb() uses an ops struct, and the ops take a const struct kernel_param pointer (it's in .rodata). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | param: use module_param in drivers/message/fusion/mptbase.cRusty Russell2010-08-111-2/+1
| | | | | | | | | | | | | | | | | | | | | No need to open code this! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de>
| * | ide: use module_param_named rather than module_param_callRusty Russell2010-08-111-7/+13
| | | | | | | | | | | | | | | | | | | | | It has the additional benefit of typechecking (in this case, an unsigned int). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de>
| * | param: update drivers/char/ipmi/ipmi_watchdog.c to new schemeRusty Russell2010-08-111-15/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is one of the most interesting users of module parameters in the tree, so weaning it off the old-style non-const module_param_call scheme is a useful exercise. I was confused by set_param_int/get_param_int (vs. the normal param_set_int and param_get_int), so I renamed set_param_int to set_param_timeout, and re-used param_get_int directly instead of get_param_int. I also implemented param_check_wdog_ifnum and param_check_timeout, so now the ifnum_to_use and timeout/pretimeout parameters can just use plain module_param(). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Corey Minyard <minyard@acm.org> Cc: openipmi-developer@lists.sourceforge.net
| * | param: lock if_sdio's lbs_helper_name and lbs_fw_name against sysfs changes.Rusty Russell2010-08-111-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since it can be changed via sysfs, we need to make a copy. This most generic way of doing this is to keep a flag so we know when to free it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de> Cc: Dan Williams <dcbw@redhat.com> Cc: John W. Linville <linville@tuxdriver.com> Cc: libertas-dev@lists.infradead.org Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org
| * | param: lock myri10ge_fw_name against sysfs changes.Rusty Russell2010-08-111-13/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since it can be changed via sysfs, we need to make a copy. This most generic way of doing this is to keep a flag so we know when to free it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de> Cc: Andrew Gallatin <gallatin@myri.com> Cc: Brice Goglin <brice@myri.com> Cc: netdev@vger.kernel.org
| * | param: simple locking for sysfs-writable charp parametersRusty Russell2010-08-117-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the writing to sysfs can free the old one, we need to block that when we access the charp variables. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de> Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Cc: Jeff Dike <jdike@addtoit.com> Cc: Dan Williams <dcbw@redhat.com> Cc: John W. Linville <linville@tuxdriver.com> Cc: Jing Huang <huangj@brocade.com> Cc: James E.J. Bottomley <James.Bottomley@suse.de> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: David S. Miller <davem@davemloft.net> Cc: user-mode-linux-devel@lists.sourceforge.net Cc: libertas-dev@lists.infradead.org Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: linux-usb@vger.kernel.org
| * | param: remove unnecessary writable charpRusty Russell2010-08-114-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sysfs-writable charp arguments need to be locked against modification (since the old ones may be kfreed underneath us). String arguments are much simpler, so use them for small strings (eg. IFNAMSIZ). lkdtm only uses the parameters at module initialization time, so there's not much point making them writable. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de> Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: M. Mohan Kumar <mohan@in.ibm.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Jeff Mahoney <jeffm@suse.com> Cc: Julia Lawall <julia@diku.dk> Cc: devel@driverdev.osuosl.org
| * | param: add kerneldoc to moduleparam.hRusty Russell2010-08-111-26/+95
| | | | | | | | | | | | | | | | | | | | | | | | Also reorders the macros with the most common ones at the top. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de> Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
| * | param: locking for kernel parametersRusty Russell2010-08-112-7/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There may be cases (most obviously, sysfs-writable charp parameters) where a module needs to prevent sysfs access to parameters. Rather than express this in terms of a big lock, the functions are expressed in terms of what they protect against. This is clearer, esp. if the implementation changes to a module-level or even param-level lock. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de> Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
| * | param: make param sections const.Rusty Russell2010-08-113-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | Since this section can be read-only (they're in .rodata), they should always have been const. Minor flow-through various functions. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
| * | param: use free hook for charp (fix leak of charp parameters)Rusty Russell2010-08-111-2/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using a "I kmalloced this" flag, we keep track of the kmalloced strings and use that list to check if we need to kfree (in practice, the list is very short). This means that kparams can be const again, and plugs a leak. This is important for drivers/usb/gadget/nokia.c which gets modprobe/rmmod'ed frequently on the N9000. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de> Cc: Artem Bityutskiy <dedekind1@gmail.com> Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
| * | param: add a free hook to kernel_param_ops.Rusty Russell2010-08-112-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to generalize the KPARAM_KMALLOCED flag, by calling a function on every parameter when a module is unloaded. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de> Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
| * | param: silence .init.text references from param opsRusty Russell2010-08-111-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ideally, we'd check that it was only the "set" function which was __init, and that the permissions were r/o. But that's a little hard. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
| * | Add param ops struct for hvc_iucv driver.Sachin Sant2010-08-111-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Today's next 20091117 build failed on s390 with drivers/char/hvc_iucv.c:1331: error: 'param_ops_vmidfilter' undeclared here (not in a function) make[2]: *** [drivers/char/hvc_iucv.o] Error 1 Most probably caused by commit 684a6d340b8a5767db4670031b0f39455346018a (param:param_ops) which introduced a param_ops structure. The following compile tested patch adds a param_ops structure for hvc_iucv. Signed-off-by: Sachin Sant <sachinp@in.ibm.com> Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | nfs: update for module_param_named API changeStephen Rothwell2010-08-111-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After merging the rr tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: net/sunrpc/auth.c:74: error: 'param_ops_hashtbl_sz' undeclared here (not in a function) Caused by commit 0685652df0929cec7d78efa85127f6eb34962132 ("param:param_ops") interacting with commit f8f853ab19fcc415b6eadd273373edc424916212 ("SUNRPC: Make the credential cache hashtable size configurable") from the nfs tree. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | AppArmor: update for module_param_named API changeStephen Rothwell2010-08-111-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes these build errors: security/apparmor/lsm.c:701: error: 'param_ops_aabool' undeclared here (not in a function) security/apparmor/lsm.c:721: error: 'param_ops_aalockpolicy' undeclared here (not in a function) security/apparmor/lsm.c:729: error: 'param_ops_aauint' undeclared here (not in a function) Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | param: use ops in struct kernel_param, rather than get and set fns directlyRusty Russell2010-08-117-111/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is more kernel-ish, saves some space, and also allows us to expand the ops without breaking all the callers who are happy for the new members to be NULL. The few places which defined their own param types are changed to the new scheme (more which crept in recently fixed in following patches). Since we're touching them anyway, we change get() and set() to take a const struct kernel_param (which they really are). This causes some harmless warnings until we fix them (in following patches). To reduce churn, module_param_call creates the ops struct so the callers don't have to change (and casts the functions to reduce warnings). The modern version which takes an ops struct is called module_param_cb. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de> Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Ville Syrjala <syrjala@sci.fi> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Alessandro Rubini <rubini@ipvvis.unipv.it> Cc: Michal Januszewski <spock@gentoo.org> Cc: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Neil Brown <neilb@suse.de> Cc: linux-kernel@vger.kernel.org Cc: linux-input@vger.kernel.org Cc: linux-fbdev-devel@lists.sourceforge.net Cc: linux-nfs@vger.kernel.org Cc: netdev@vger.kernel.org
| * | param: move the EXPORT_SYMBOL to after the definitions.Rusty Russell2010-08-111-26/+13
| | | | | | | | | | | | | | | | | | | | | | | | This is modern style, and good to do before we start changing things. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de> Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
| * | params: don't hand NULL values to param.set callbacks.Rusty Russell2010-08-111-17/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An audit by Dongdong Deng revealed that most driver-author-written param calls don't handle val == NULL (which happens when parameters are specified with no =, eg "foo" instead of "foo=1"). The only real case to use this is boolean, so handle it specially for that case and remove a source of bugs for everyone else. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Dongdong Deng <dongdong.deng@windriver.com> Cc: Américo Wang <xiyou.wangcong@gmail.com>
| * | documentation: fix erroneous email address.Rusty Russell2010-08-111-1/+1
| |/ | | | | | | | | | | | | Hey, at least it has both l's. Reported-by: Marin Mitov <mitov@issp.bas.bg> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | Merge branch 'for-linus' of ↵Linus Torvalds2010-08-1221-22/+2431
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: (22 commits) regulator: Remove default DEBUG define from TPS6586x regulator: tps6507x - add missing platform_set_drvdata in tps6507x_pmic_probe regulator: tps6586x - add regulator_unregister() in tps6586x_regulator_remove() mfd: max8998 - fix incorrect kfree(i2c) in i2c_driver probe callback handler regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write() regulator: max8660 - fix a memory leak in max8660_remove() regulator: max1586 - fix a memory leak in max1586_pmic_remove() regulator: Default GPIO controlled WM8994 regulators to disabled regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write() max8998: fix off-by-one value range checking regulator: tps6586x: fix millivolt return values and SM2 table regulator: tps6586x: add dependancy on MFD_TPS6585x regulator: add TPS6586X regulator driver regulator: MAX8998: set_voltage bugfix. ramp_up delay and min/max voltage regulator: add support for regulators on the ab8500 MFD ab8500-mfd: add regulator support to ab8500 mfd device tps65023: Allow registering similar TPS65021 drivers: regulators: depend on MFD_MAX8998 drivers: regulator: add Maxim 8998 driver ISL6271A voltage regulator support. ...
| * | regulator: Remove default DEBUG define from TPS6586xMark Brown2010-08-111-1/+0
| | | | | | | | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: tps6507x - add missing platform_set_drvdata in tps6507x_pmic_probeAxel Lin2010-08-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | We should call platform_set_drvdata() before calling platform_get_drvdata(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: tps6586x - add regulator_unregister() in tps6586x_regulator_remove()Axel Lin2010-08-111-1/+4
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mike Rapoport <mike@compulab.co.il> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | mfd: max8998 - fix incorrect kfree(i2c) in i2c_driver probe callback handlerAxel Lin2010-08-111-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | The i2c_client received in probe() should not be kfree()'d. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write()Axel Lin2010-08-111-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | i2c_smbus_write_byte_data() returns zero or negative value, therefore no need to check if ret is greater than zero or not. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: max8660 - fix a memory leak in max8660_remove()Axel Lin2010-08-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In max8660_probe(), we allocate memory for max660. In max8660_remove(), current implementation only free rdev which is a member of struct max8660. Thus, there is a small memory leak when we unload the module. This patch fixes the memory leak by passing max660 to i2c clientdata, and properly kfree(max8660) in max8660_remove(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: max1586 - fix a memory leak in max1586_pmic_remove()Axel Lin2010-08-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In max1586_pmic_probe(), we allocate memory for max1586. In max1586_pmic_remove(), current implementation only free rdev which is a member of struct max1586_data. Thus, there is a small memory leak when we unload the module. This patch fixes the memory leak by passing max1586 to i2c clientdata, and properly kfree(max1586) in max1586_pmic_remove(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: Default GPIO controlled WM8994 regulators to disabledJoonyoung Shim2010-08-111-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that if the GPIO was not enabled prior to the driver starting the regulator API will insert the required powerup ramp delay when it enables the regulator. The gpiolib API does not provide this information. [Rewrote changelog to describe the actual change -- broonie.] Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write()Axel Lin2010-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | We already check count value before calling i2c_smbus_read_byte_data(), no need to check it again. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | max8998: fix off-by-one value range checkingAxel Lin2010-08-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In max8998_list_voltage() and max8998_set_voltage(), we use ldo as array index of ldo_voltage_map. Thus the valid range should be 0 .. ARRAY_SIZE(ldo_voltage_map)-1. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: tps6586x: fix millivolt return values and SM2 tableGary King2010-08-111-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | Hi Liam, Below are bugfixes for the tps6586x spotted by Gary King. Please add this patch to your regulator tree. Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: tps6586x: add dependancy on MFD_TPS6585xMike Rapoport2010-08-111-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: add TPS6586X regulator driverMike Rapoport2010-08-113-0/+394
| | | | | | | | | | | | | | | | | | Signed-off-by: Mike Rapoport <mike@compulab.co.il> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: MAX8998: set_voltage bugfix. ramp_up delay and min/max voltageMyungJoo Ham2010-08-111-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two issues are addressed for max8998_set_voltage function. 1. Min/Max Voltage. max8998_set_voltage had been using the voltage value of min ( voltage[i] >= max_vol , i ) This is corrected to use: min ( voltage[i] >= min_vol , i ) 2. Ramp Up Delay. max8998_set_voltage should provide delay for BUCK1/2 if ENRAMP is on. It reads RAMP value from ONOFF4 register to determine RAMP delay length. However, when max8998_set_voltage's new voltage is lower than the previous, we don't care because it does not deteriorate the stability. Changes since v1: - rebased onto latest regulator-for-next tree Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: add support for regulators on the ab8500 MFDSundar R IYER2010-08-113-0/+436
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi Mark, > I think that's everything. Please find the updated patch set as below. >From f4bf7eec4d210db5075c0bce4521d9be6bc76c8c Mon Sep 17 00:00:00 2001 From: Sundar R Iyer <sundar.iyer@stericsson.com> Date: Sun, 6 Jun 2010 19:12:12 +0530 Subject: [PATCH v3 1/2] regulator: add support for regulators on the ab8500 MFD Acked-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Bengt JONSSON <bengt.g.jonsson@stericsson.com> Signed-off-by: Sundar R Iyer <sundar.iyer@stericsson.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
OpenPOWER on IntegriCloud