summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/mt6397-regulator.c
Commit message (Collapse)AuthorAgeFilesLines
* regulator: mt6397: Remove modeset_shift from struct mt6397_regulator_infoAxel Lin2021-07-111-7/+8
| | | | | | | | | The shift setting can be calculated via the corresponding mask field, so remove modeset_shift. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210629130503.2183574-3-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: mt6397: Implement of_map_modeAnand K Mistry2020-07-021-0/+13
| | | | | | | | | | Implementing of_map_mode is necessary to be able to specify operating modes in the devicetree using 'regulator-allowed-modes', and to change regulator modes. Signed-off-by: Anand K Mistry <amistry@google.com> Link: https://lore.kernel.org/r/20200702162231.v2.3.I7acfb591bfacf3b1b04a3d388385098bfcc9fecd@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: mt6397: Move buck modes into header fileAnand K Mistry2020-07-021-3/+1
| | | | | | | | This will allow device trees to make use of these constants. Signed-off-by: Anand K Mistry <amistry@google.com> Link: https://lore.kernel.org/r/20200702162231.v2.1.Icf69e2041b1af4548347018186c3ba6310f53e66@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: use linear_ranges helperMatti Vaittinen2020-05-081-3/+3
| | | | | | | | | | | Change the regulator helpers to use common linear_ranges code. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: Mark Brown <broonie@kernel.org> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Link: https://lore.kernel.org/r/64f01d5e381b8631a271616b7790f9d5640974fb.1588944082.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: mt63xx: Switch to SPDX identifierAxel Lin2019-04-261-13/+4
| | | | | | | Convert MediaTek mt63xx PMIC drivers to SPDX identifier. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: mt6397: Use unsigned int for volt_tablesAxel Lin2019-03-181-8/+8
| | | | | | | Make it consistent as .volt_table should be const unsigned int *. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: mt6397: Add buck change mode regulator interface for mt6397Henry Chen2016-05-301-9/+80
| | | | | | | | BUCKs of mt6397 have auto mode and pwm mode. User can use regulator interfaces to control modes Signed-off-by: Henry Chen <henryc.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: mt6397: Constify struct regulator_opsHenry Chen2016-05-301-3/+3
| | | | | | | Consitify the structure of regulator operations. Signed-off-by: Henry Chen <henryc.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: mt6397: Add OF match tableJavier Martinez Canillas2016-01-271-0/+7
| | | | | | | | | | | | | | The Documentation/devicetree/bindings/regulator/mt6397-regulator.txt doc mentions that a compatible "mediatek,mt6397-regulator" is required for the MT6397 device node but the driver doesn't provide a OF match table so the platform bus .match fallbacks to match using the driver name instead. This also means that module auto-loading is broken for this driver since the MFD driver that register the device, has a .of_compatible set so the platform .uevent callback reports a OF modalias that's not in the module. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: mt6397: Add platform device ID tableJavier Martinez Canillas2016-01-271-1/+7
| | | | | | | | | | | | | The platform bus_type .match callback attempts to match the platform device name with an entry on the .id_table if provided and fallbacks to match with the driver's name if a table is not provided. Using a platform device ID to match is more explicit, allows the driver to support more than one device and also the MODULE_DEVICE_TABLE macro can be used to export the module aliases information instead of the MODULE_ALIAS. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: mt6397: Add support for MT6397 regulatorFlora Fu2014-12-241-0/+332
Add MT6397 regulator driver. Signed-off-by: Flora Fu <flora.fu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>