summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/aat2870-regulator.c
AgeCommit message (Collapse)AuthorFilesLines
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336Thomas Gleixner1-14/+1
Based on 1 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 distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 51 franklin st fifth floor boston ma 02110 1301 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 246 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190530000436.674189849@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-31regulator: aat2870-regulator: 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/aat2870-regulator.o text data bss dec hex filename 938 1424 0 2362 93a regulator/aat2870-regulator.o File size after: drivers/regulator/aat2870-regulator.o text data bss dec hex filename 1194 1168 0 2362 93a regulator/aat2870-regulator.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20regulator: drop owner assignment from platform_driversWolfram Sang1-1/+0
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>
2014-03-26regulator: aat2870: Use regulator_map_voltage_ascendAxel Lin1-0/+1
The voltages in aat2870_ldo_voltages table are in ascendant order, so use regulator_map_voltage_ascend. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17regulator: aat2870: Convert to devm_regulator_registerAxel Lin1-10/+1
Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Jinyoung Park <jinyoungp@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
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>
2012-11-20regulator: remove use of __devexitBill Pemberton1-1/+1
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>
2012-11-20regulator: remove use of __devexit_pBill Pemberton1-1/+1
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>
2012-09-10regulator: aat2870: Don't explicitly initialise the first fieldMark Brown1-1/+1
Doing so generates a warning as the first field is a pointer but we use 0 to initalize it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-12regulator: aat2870: Remove unused min_uV and max_uV from struct ↵Axel Lin1-5/+0
aat2870_regulator Both min_uV and max_uV are not used in the code, remove them. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-12regulator: aat2870: Convert to regulator_list_voltage_tableAxel Lin1-13/+3
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-23regulator: Remove unneeded 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. For the drivers that don't need the delay, don't need to include linux/delay.h. This patch removes the unneeded include of linux/delay.h in regulator drivers. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-09regulator: core: Use a struct to pass in regulator runtime configurationMark Brown1-2/+6
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>
2012-04-04regulator: aat2870: Add MODULE_ALIASMark Brown1-0/+1
Not that it's ever likely to get used. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jin Park <jinyoungp@nvidia.com>
2012-03-11regulator: Add a pointer to aat2870_data in struct aat2870_regulatorAxel Lin1-7/+7
The reason we add *pdev in struct aat2870_regulator is to use it to get a pointer to struct aat2870_data. Save a pointer to struct aat2870_data instead of pdev in struct aat2870_regulator, this change makes the intention more clear. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Jin Park <jinyoungp@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28Merge remote-tracking branch 'regulator/for-linus' into regulator-nextMark Brown1-1/+1
2011-11-28regulator: aat2870: Remove a redundant bitwise and operationAxel Lin1-1/+1
The implementation in aat2870_update() already did the bitwise and operation against mask parameter. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28regulator: aat2870: Fix the logic of checking if no id is matched in ↵Axel Lin1-1/+1
aat2870_get_regulator In current implementation, the pointer ri is not NULL if no id is matched. Fix it by checking i == ARRAY_SIZE(aat2870_regulators) if no id is matched. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-11-23regulator: pass additional of_node to regulator_register()Rajendra Nayak1-1/+1
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>
2011-08-08regulator: aat2870-regulator.c needs module.hRandy Dunlap1-0/+1
aat2870-regulator.c needs to include linux/module.h to fix multiple build errors. drivers/regulator/aat2870-regulator.c:145: error: 'THIS_MODULE' undeclared here (not in a function) drivers/regulator/aat2870-regulator.c:230: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION' drivers/regulator/aat2870-regulator.c:231: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE' drivers/regulator/aat2870-regulator.c:232: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR' Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-07-31regulator: aat2870: Add AAT2870 regulator driverJin Park1-0/+232
Add regulator driver for AnalogicTech AAT2870. Signed-off-by: Jin Park <jinyoungp@nvidia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>