aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/lp8755.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-08-16i2c: Make remove callback return voidUwe Kleine-König1-3/+1
The value returned by an i2c driver's remove function is mostly ignored. (Only an error message is printed if the value is non-zero that the error is ignored.) So change the prototype of the remove function to return no value. This way driver authors are not tempted to assume that passing an error to the upper layer is a good idea. All drivers are adapted accordingly. There is no intended change of behaviour, all callbacks were prepared to return 0 before. Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com> Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au> Reviewed-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Crt Mori <cmo@melexis.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Marek Behún <kabel@kernel.org> # for leds-turris-omnia Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Petr Machata <petrm@nvidia.com> # for mlxsw Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> # for surface3_power Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> # for bmc150-accel-i2c + kxcjk-1013 Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> # for media/* + staging/media/* Acked-by: Miguel Ojeda <ojeda@kernel.org> # for auxdisplay/ht16k33 + auxdisplay/lcd2s Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # for versaclock5 Reviewed-by: Ajay Gupta <ajayg@nvidia.com> # for ucsi_ccg Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # for iio Acked-by: Peter Rosin <peda@axentia.se> # for i2c-mux-*, max9860 Acked-by: Adrien Grassein <adrien.grassein@gmail.com> # for lontium-lt8912b Reviewed-by: Jean Delvare <jdelvare@suse.de> # for hwmon, i2c-core and i2c/muxes Acked-by: Corey Minyard <cminyard@mvista.com> # for IPMI Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> # for drivers/power Acked-by: Krzysztof Hałasa <khalasa@piap.pl> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Wolfram Sang <wsa@kernel.org>
2021-06-01regulator: lp8755: Convert to use regulator_set_ramp_delay_regmapAxel Lin1-47/+8
Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210527144248.247992-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-09-07regulator: remove locking around regulator_notifier_call_chain()Michał Mirosław1-6/+0
regulator_notifier_call_chain() doesn't need rdev lock and rdev's existence is assumed in the code anyway. Remove the locks from drivers. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/42393f66dcc4d80dcd9797be45216b4035aa96cb.1597032945.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18regulator: lp8755: Get rid of lp8755_read/lp8755_write/lp8755_update_bitsAxel Lin1-61/+21
Just use regmap_read/regmap_write/regmap_update_bits instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20200802090638.380589-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-5/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-13regulator: lp8755: Fix notifier mutex lock warningSteve Twiss1-3/+12
The mutex for the regulator_dev must be controlled by the caller of the regulator_notifier_call_chain(), as described in the comment for that function. Failure to mutex lock and unlock surrounding the notifier call results in a kernel WARN_ON_ONCE() which will dump a backtrace for the regulator_notifier_call_chain() when that function call is first made. The mutex can be controlled using the regulator_lock/unlock() API. Fixes: b59320cc5a5e ("regulator: lp8755: new driver for LP8755") Suggested-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-01-28regulator: lp8755: Constify lp8755_regulatorsAxel Lin1-1/+1
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-01-08regulator: Fix trivial language typosKrzysztof Kozlowski1-2/+2
Fix few trivial language typos in core and drivers. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-19regulator: lp8755: fix spelling mistake "acceess" -> "access"Colin Ian King1-7/+7
Trivial fix to spelling mistake in dev_err messages. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31regulator: lp8755: constify regulator_ops structureBhumika Goyal1-1/+1
Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/lp8755.o text data bss dec hex filename 3519 2800 8 6327 18b7 drivers/regulator/lp8755.o File size after: drivers/regulator/lp8755.o text data bss dec hex filename 3779 2544 8 6331 18bb drivers/regulator/lp8755.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-02regulator: lp8755: Convert to devm_request_threaded_irqAxel Lin1-15/+8
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-07-09regulator: lp8755: Use devm_regulator_registerHimangi Saraogi1-17/+6
This patch moves data allocated using regulator_register to devm_regulator_register and does away with the calls to regulator_unregister. Also some labels are removed and a new labelerr is introduced which is less specific to context. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-01Merge remote-tracking branch 'regulator/topic/max8660' into regulator-nextMark Brown1-1/+1
2013-09-01Merge remote-tracking branch 'regulator/topic/lp8755' into regulator-nextMark Brown1-0/+1
2013-07-30regulator: use dev_get_platdata()Jingoo Han1-1/+1
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-02regulator: lp8755: Provide map_voltage()Mark Brown1-0/+1
Improve performance when setting voltages by avoiding a scan through the selectors when we can simply calculate the selector we want. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-05-12regulator: Remove unnecessary include of linux/delay.h from regulator driversAxel Lin1-1/+0
All the drivers that need delay for the regulator voltage output voltage to stabilize after being enabled or after being set to a new value has been converted to implement enable_time and set_voltage_time_sel callbacks. Then regulator core will take care of the necessary delay. This patch removes the unneeded include of linux/delay.h in regulator drivers. Signed-off-by: Axel Lin <axel.lin@ingics.com> Cc: Daniel Jeong <daniel.jeong@ti.com> Cc: Sangbeom Kim <sbkim73@samsung.com> Cc: Chiwoong Byun <woong.byun@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-27regulator: lp8755: Use LP8755_BUCK_MAX instead of magic numberAxel Lin1-3/+3
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-17regulator: lp8755: Remove enum bucksAxel Lin1-33/+17
We already have enum lp8755_bucks in lp8755.h, so it looks pointless adding enum bucks in lp8755.c. Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Daniel Jeong <gshark.jeong@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-17regulator: lp8755: Don't show unrelated messags in lp8755_probe error pathsAxel Lin1-9/+10
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-08regulator: lp8755: Fix mask for pchip->mphaseAxel Lin1-1/+1
According to the datasheet, it has 9 multi-phase mode from 0 to 8 and it takes 4 bits in the register. The mask for pchip->mphase should be 0x0F. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-08regulator: lp8755: Fix lp8755_regulator_init unwind codeAxel Lin1-4/+5
It's safe to pass NULL argument to regulator_unregister(), so we can remove the NULL checking before calling regulator_unregister(). However pass a ERR_PTR to regulator_unregister() is wrong, so we need to explicitly set "pchip->rdev[buck_num] = NULL" before goto err_buck. This patch also includes below cleanups: Show correct regulator id in dev_err. Remove __devexit_p. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24regulator: lp8755: new driver for LP8755Daniel Jeong1-0/+580
This patch is for new lp8755 regulator dirver and several unsed variables were deleted and then test was done. LP8755 : The LP8755 is a high performance power management unit.It contains six step-down DC-DC converters which can can be filexibly bundled together in multiphase converters as required by application. www.ti.com Signed-off-by: Daniel Jeong <gshark.jeong@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>