#
259b93b2 |
|
16-Mar-2023 |
Douglas Anderson <dianders@chromium.org> |
regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14 Probing of regulators can be a slow operation and can contribute to slower boot times. This is especially true if a regulator is turned on at probe time (with regulator-boot-on or regulator-always-on) and the regulator requires delays (off-on-time, ramp time, etc). While the overall kernel is not ready to switch to async probe by default, as per the discussion on the mailing lists [1] it is believed that the regulator subsystem is in good shape and we can move regulator drivers over wholesale. There is no way to just magically opt in all regulators (regulators are just normal drivers like platform_driver), so we set PROBE_PREFER_ASYNCHRONOUS for all regulators found in 'drivers/regulator' individually. Given the number of drivers touched and the impossibility to test this ahead of time, it wouldn't be shocking at all if this caused a regression for someone. If there is a regression caused by this patch, it's likely to be one of the cases talked about in [1]. As a "quick fix", drivers involved in the regression could be fixed by changing them to PROBE_FORCE_SYNCHRONOUS. That being said, the correct fix would be to directly fix the problem that caused the issue with async probe. The approach here follows a similar approach that was used for the mmc subsystem several years ago [2]. In fact, I ran nearly the same python script to auto-generate the changes. The only thing I changed was to search for "i2c_driver", "spmi_driver", and "spi_driver" in addition to "platform_driver". [1] https://lore.kernel.org/r/06db017f-e985-4434-8d1d-02ca2100cca0@sirena.org.uk [2] https://lore.kernel.org/r/20200903232441.2694866-1-dianders@chromium.org/ Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20230316125351.1.I2a4677392a38db5758dee0788b2cea5872562a82@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
d2912cb1 |
|
04-Jun-2019 |
Thomas Gleixner <tglx@linutronix.de> |
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 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>
|
#
6185de50 |
|
20-Mar-2019 |
Axel Lin <axel.lin@ingics.com> |
regulator: max8925: Convert to regulator core's simplified DT parsing code Use regulator core's simplified DT parsing code to simply the driver implementation. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
85214c9a |
|
28-Jan-2017 |
Bhumika Goyal <bhumirks@gmail.com> |
regulator: max8925-regulator: constify regulator_ops structure 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/max8925-regulator.o text data bss dec hex filename 1356 7184 0 8540 215c regulator/max8925-regulator.o File size after: drivers/regulator/max8925-regulator.o text data bss dec hex filename 1868 6664 0 8532 2154 regulator/max8925-regulator.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
6c794b26 |
|
20-Oct-2014 |
Wolfram Sang <wsa@kernel.org> |
regulator: drop owner assignment from platform_drivers A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
|
#
b8b27a44 |
|
09-Sep-2014 |
Guodong Xu <guodong.xu@linaro.org> |
regulator: remove unnecessary of_node_get() to parent These of_node_get() were added to balance refcount decrements inside of of_find_node_by_name(). See: commit c92f5dd2c42f ("regulator: Add missing of_node_put()") However of_find_node_by_name() was then replaced by of_get_child_by_name(), which doesn't call of_node_put() against its input parameter. So, need to remove these unnecessary of_node_get() calls. Signed-off-by: Guodong Xu <guodong.xu@linaro.org> Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
c74c76e8 |
|
18-Mar-2014 |
Sachin Kamat <sachin.kamat@linaro.org> |
regulator: max8925: Silence checkpatch warning Silences the following type of checkpatch warning: WARNING: Missing a blank line after declarations Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
|
#
15af45d1 |
|
10-Mar-2014 |
Krzysztof Kozlowski <krzk@kernel.org> |
regulator: max8925: Remove unused state container fields Remove fields from 'struct max8925_regulator' which are not used anywhere in the driver. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
|
#
e9fa1a3a |
|
18-Feb-2014 |
Sachin Kamat <sachin.kamat@linaro.org> |
regulator: max8925: Do not hardcode return value Propagate the error value returned by the function instead. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
|
#
1f4f88c0 |
|
14-Feb-2014 |
Sachin Kamat <sachin.kamat@linaro.org> |
regulator: max8925: Use of_get_child_by_name of_find_node_by_name walks the allnodes list, and can thus walk outside of the parent node. Use of_get_child_by_name instead. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
|
#
58765e24 |
|
29-Sep-2013 |
Jingoo Han <jg1.han@samsung.com> |
regulator: max8925: use devm_regulator_register() Use devm_regulator_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
|
#
dff91d0b |
|
30-Jul-2013 |
Jingoo Han <jg1.han@samsung.com> |
regulator: use dev_get_platdata() 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>
|
#
405c5400 |
|
03-May-2013 |
Axel Lin <axel.lin@ingics.com> |
regulator: Remove all platform_set_drvdata(pdev, NULL) in drivers Since 0998d06310 "device-core: Ensure drvdata = NULL when no driver is bound", this is done by driver core after device_release or on probe failure. Thus we can remove all platform_set_drvdata(pdev, NULL) in drivers. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
#
ad4928f1 |
|
15-Feb-2013 |
Axel Lin <axel.lin@ingics.com> |
regulator: max8925: Remove unused parameter from max8925_regulator_dt_init The info parameter is not used at all, remove it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
#
c92f5dd2 |
|
27-Jan-2013 |
Axel Lin <axel.lin@ingics.com> |
regulator: Add missing of_node_put() of_find_node_by_name() returns a node pointer with refcount incremented, use of_node_put() on it when done. of_find_node_by_name() will call of_node_put() against from parameter, thus we also need to call of_node_get(from) before calling of_find_node_by_name(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
#
8dc995f5 |
|
19-Nov-2012 |
Bill Pemberton <wfp5p@virginia.edu> |
regulator: remove use of __devexit CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
#
a5023574 |
|
19-Nov-2012 |
Bill Pemberton <wfp5p@virginia.edu> |
regulator: remove use of __devinit CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
#
5eb9f2b9 |
|
19-Nov-2012 |
Bill Pemberton <wfp5p@virginia.edu> |
regulator: remove use of __devexit_p CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
#
45b6f8e8 |
|
07-Nov-2012 |
Qing Xu <qingx@marvell.com> |
regulator: max8925: support dt for regulator Signed-off-by: Qing Xu <qingx@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
#
51acdb61 |
|
16-Sep-2012 |
Haojian Zhuang <haojian.zhuang@gmail.com> |
mfd: max8925: Remove array in regulator platform data Remove array in parent's platform data. Use struct regulator_init_data as regulator device's platform data directly. So a lot of pdata are added into parent's platform data. And voltage out register offset is used as IORESOURCE_REG to distinguish different regualtor devices. Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
#
68c7ff8f |
|
16-May-2012 |
Axel Lin <axel.lin@gmail.com> |
regulator: max8925: Remove check_range function and max_uV from struct rc5t583_regulator_info This driver has been converted to use regulator_map_voltage_linear and set_voltage_sel now. regulator_map_voltage_linear will check the the voltage falls within specified range. The check_range() function and max_uV field are not used now, remove them. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
#
cd8318cb |
|
13-May-2012 |
Axel Lin <axel.lin@gmail.com> |
regulator: max8925: Convert to set_voltage_sel() and map_voltage() Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
#
4093e739 |
|
13-May-2012 |
Axel Lin <axel.lin@gmail.com> |
regulator: max8925: Convert to regulator_list_voltage_linear() Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
#
3c8983b9 |
|
13-May-2012 |
Axel Lin <axel.lin@gmail.com> |
regulator: max8925: Convert to get_voltage_sel Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
#
c172708d |
|
03-Apr-2012 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
regulator: core: Use a struct to pass in regulator runtime configuration Rather than adding new arguments to regulator_register() every time we want to add a new bit of dynamic information at runtime change the function to take these via a struct. By doing this we avoid needing to do further changes like the recent addition of device tree support which required each regulator driver to be updated to take an additional parameter. The regulator_desc which should (mostly) be static data is still passed separately as most drivers are able to configure this statically at build time. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
#
7f52ba77 |
|
01-Apr-2012 |
Axel Lin <axel.lin@gmail.com> |
regulator: Add missing n_voltages setting for max8925 The n_voltages are the same for all regulators: (max - min / step) + 1 == 64. The vol_shift is always 0, and the vol_nbits is always the same as n_voltages setting. Thus we can remove vol_shitf and vol_nbits fields from struct max8925_regulator_info. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
#
42ff9431 |
|
01-Apr-2012 |
Axel Lin <axel.lin@gmail.com> |
regulator: Set list_voltage callback for max8925 Current code implements max8925_list_voltage but does not set the list_voltage callback function in max8925_regulator_[ldo|sdv]_ops. Fix it. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
#
5db6d09a |
|
13-Mar-2012 |
Axel Lin <axel.lin@gmail.com> |
regulator: max8925: Use DIV_ROUND_UP macro Use DIV_ROUND_UP macro for better readability. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
#
65364e9a |
|
04-Jan-2012 |
Kevin Liu <kliu5@marvell.com> |
regulator: max8925: fix enabled/disabled judgement mistake Max8925 ldo status should be determined by two factors: 1. power up/down sequence selection(LDOCTL[4:2]). 2. i2c enable bit(LDOCTL[0]). Max8925 ldo support two types of power up/down sequence: 1. flexible sequence(LDOCTL[4:2] = 0~6). 2. i2c sequence(LDOCTL[4:2] = 7). With flexible sequence selected, the ldo is enabled during power up by default. With i2c sequence selected, the ldo is controlled by the i2c enable bit(LDOCTL[0]). Signed-off-by: Kevin Liu <kliu5@marvell.com> Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
#
2c043bcb |
|
18-Nov-2011 |
Rajendra Nayak <rnayak@ti.com> |
regulator: pass additional of_node to regulator_register() With device tree support for regulators, its needed that the regulator_dev->dev device has the right of_node attached. To be able to do this add an additional parameter to the regulator_register() api, wherein the dt-adapted driver can then pass this additional info onto the regulator core. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
#
65602c32 |
|
17-Jul-2011 |
Paul Gortmaker <paul.gortmaker@windriver.com> |
regulator: Add module.h to drivers/regulator users as required Another group of drivers that are taking advantage of the implicit presence of module.h -- and will break when we pull the carpet out from under them during a cleanup. Fix 'em now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
#
db13c040 |
|
18-Apr-2011 |
Haojian Zhuang <haojian.zhuang@marvell.com> |
regulator: Enable max8925 i2c sequence for control Force to enable i2c as power up/down sequence. Otherwise, SD/LDO can't be enabled or disabled via accessing i2c bus. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
#
3a93f2a9 |
|
10-Nov-2010 |
Mark Brown <broonie@opensource.wolfsonmicro.com> |
regulator: Report actual configured voltage to set_voltage() Change the interface used by set_voltage() to report the selected value to the regulator core in terms of a selector used by list_voltage(). This allows the regulator core to know the voltage that was chosen without having to do an explict get_voltage(), which would be much more expensive as it will generally access hardware. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
|
#
4b99fef0 |
|
06-Apr-2010 |
Haojian Zhuang <haojian.zhuang@marvell.com> |
regulator: fix enabling regulator issue on max8925 Fix regulator enabling issue that is caused by typo error in is_enabled(). Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
|
#
3fff6c04 |
|
24-Feb-2010 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Regulators: max8925-regulator - clean up driver data after removal It is a good tone to reset driver data after unbinding the device. Also change find_regulator_info() fro inline to __devinit - let compiler figure out if it wants it to be inlined or not. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
|
#
08ff6f2a |
|
11-Jan-2010 |
Haojian Zhuang <haojian.zhuang@marvell.com> |
regulator: Add max8925 support MAX8925 contains 3 Buck and 20 LDO regulator. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|