summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
| * | ab8500-mfd: add regulator support to ab8500 mfd deviceSundar R Iyer2010-08-113-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Acked-by: Linus Walleij <linus.walleij@stericsson.com> Acked-By: Mattias Wallin <mattias.wallin@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> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | tps65023: Allow registering similar TPS65021Marek Vasut2010-08-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | TPS65021 is an older model and is slightly weaker (can supply less current), otherwise is the same. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | drivers: regulators: depend on MFD_MAX8998Marek Szyprowski2010-08-111-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The MAX8998-pmic driver requires a core driver for all io operations. Like other regulator driver make it depend of the required MFD io driver. 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>
| * | drivers: regulator: add Maxim 8998 driverKyungmin Park2010-08-118-0/+981
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> This patch adds voltage regulator driver for Maxim 8998 chip. This chip is used on Samsung Aquila and GONI boards and provides following functionalities: - 4 BUCK voltage converters, 17 LDO power regulators and 5 other power controllers - battery charger This patch adds basic driver for voltage regulators and MAX 8998 MFD core. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | ISL6271A voltage regulator support.Marek Vasut2010-08-113-0/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device is very simple, it supports one buck and two LDOs. The LDOs are fixed-voltage. Only the buck is programable over the I2C bus to 16 possible voltages. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: make sure the regulator is available prior to the consumers.Sonic Zhang2010-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some systems are likely to want this to be subsys_initcall() to make sure the regulator is available prior to the consumers. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * | regulator: new drivers for AD5398 and AD5821Sonic Zhang2010-08-113-0/+295
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | The AD5398 and AD5821 are single 10-bit DAC with 120 mA output current sink capability. They feature an internal reference and operates from a single 2.7 V to 5.5 V supply. This driver supports both the AD5398 and the AD5821. It adapts into the voltage and current framework. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* | Merge branch 'for-next' of ↵Linus Torvalds2010-08-1243-339/+3933
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (40 commits) mfd: Fix incorrect kfree(i2c) in wm8994-core i2c_driver probe mfd: Fix incorrect kfree(i2c) in wm831x-core i2c_driver probe mfd: Fix incorrect kfree(i2c) in tps6507x i2c_driver probe mfd: Add TPS6586x driver mfd: Use macros instead of some constant magic numbers for menelaus mfd: Fix menelaus mmc slot 2 misconfiguration mfd: Missing slab.h includes mfd: Fix wrong wm8350-core kfree in error path mfd: Fix wm8994_device_init() return value mfd: Avoid calling platform_device_put() twice in ucb1400 probe error path mfd: Annotate tc6387xb probe/remove routines with __devinit/__devexit mfd: Fix tc6387xb resource reclaim mfd: Fix wrong goto labels for tc6393xb error handling mfd: Get rid of now unused mc13783 private header hwmon: Don't access struct mc13783 directly from mc13783-adc mfd: New mc13783 function exposing flags mfd: Check jz4740-adc kmalloc() result mfd: Fix jz4740-adc resource reclaim in probe error path mfd: Add WM8321 support mfd: Add stmpe auto sleep feature ...
| * | mfd: Fix incorrect kfree(i2c) in wm8994-core i2c_driver probeAxel Lin2010-08-121-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | The i2c_client received in probe() should not be kfree()'d. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | mfd: Fix incorrect kfree(i2c) in wm831x-core i2c_driver probeAxel Lin2010-08-121-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | The i2c_client received in probe() should not be kfree()'d. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | mfd: Fix incorrect kfree(i2c) in tps6507x i2c_driver probeAxel Lin2010-08-121-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>