aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator/rn5t618-regulator.c
AgeCommit message (Collapse)AuthorFilesLines
2023-03-20regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14Gravatar Douglas Anderson 1-0/+1
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>
2019-12-17Merge tag 'regulator-fix-v5.5-rc2' of ↵Gravatar Linus Torvalds 1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A small set of fixes for mostly minor issues here, the only real code ones are Wen Yang's fixes for error handling in the core and Christian Marussi's list_voltage() change which is a fix for disruptively bad performance for regulators with continuous voltage control (which are rare)" * tag 'regulator-fix-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: rn5t618: fix module aliases regulator: max77650: add of_match table regulator: core: avoid unneeded .list_voltage calls regulator: s5m8767: Fix a warning message regulator: core: fix regulator_register() error paths to properly release rdev regulator: fix use after free issue
2019-12-16regulator: rn5t618: fix module aliasesGravatar Andreas Kemnade 1-0/+1
platform device aliases were missing, preventing autoloading of module. Fixes: 811b700630ff ("regulator: rn5t618: add driver for Ricoh RN5T618 regulators") Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Link: https://lore.kernel.org/r/20191211221600.29438-1-andreas@kemnade.info Signed-off-by: Mark Brown <broonie@kernel.org>
2019-11-19regulator: rn5t618: fix rc5t619 ldo10 enableGravatar Andreas Kemnade 1-1/+1
LDO9 and LDO10 were listed with the same enable bits. That looks insane and there are no provisions in the code for handling such a special case. Also other out-of-tree drivers use a separate bit to enable it. Example: https://github.com/brunotl/kernel-kobo-mx6sl-ntx/blob/master/drivers/regulator/ricoh619-regulator.c So it seems to be clearly a bug. I cannot fully check it on my board without schematics and just discovered this during code analysis for another problem. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Link: https://lore.kernel.org/r/20191113182643.23885-1-andreas@kemnade.info Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 446Gravatar Thomas Gleixner 1-7/+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 you should have received a copy of the gnu general public license along with this program if not see http www gnu org licenses extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 30 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190531190115.962665879@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-20regulator: rn5t618: Constify regulator_descGravatar Axel Lin 1-4/+4
The regulator_desc never need to be modified, so define them as const as a hint to the compiler that they can go into .rodata. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-18regulator: rn5t618: Do not index regulator_desc arrays by idGravatar Leonard Crestez 1-1/+1
The regulator_desc arrays in this driver are indexed by RN5T618_* constants and some elements can be missing. This causes probe failures on older models: rn5t618-regulator rn5t618-regulator: failed to register (null) regulator rn5t618-regulator: probe of rn5t618-regulator failed with error -22 Fix this by making the arrays flat. This also saves a little memory because the regulator_desc arrays become smaller. Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Fixes: 83b2a3c2ab24 ("regulator: rn5t618: add RC5T619 PMIC support") Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-27regulator: rn5t618: add RC5T619 PMIC supportGravatar Pierre-Hugues Husson 1-4/+31
Extend the driver to support Ricoh RC5T619. Support the additional regulators and slightly different voltage ranges. Signed-off-by: Pierre-Hugues Husson <phh@phh.me> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31regulator: rn5t618: constify regulator_ops structureGravatar Bhumika Goyal 1-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/rn5t618-regulator.o text data bss dec hex filename 375 5392 0 5767 1687 regulator/rn5t618-regulator.o File size after: drivers/regulator/rn5t618-regulator.o text data bss dec hex filename 631 5136 0 5767 1687 regulator/rn5t618-regulator.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-29regulator: rn5t618: Add RN5T567 PMIC supportGravatar Stefan Agner 1-4/+36
Extend the driver to support Ricoh RN5T567. Support the additional DCDC and slightly different voltage range of LDORTC1. Signed-off-by: Stefan Agner <stefan@agner.ch> Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-10-20regulator: rn5t618: Convert to new style DT parsingGravatar Beniamino Galvani 1-47/+4
Use the simplified DT parsing method to remove some duplicated code. Since this is a MFD subdevice and its device object doesn't have an associated DT node, the configuration instance used to register the regulators has been changed to point to the parent device. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-30regulator: rn5t618: add driver for Ricoh RN5T618 regulatorsGravatar Beniamino Galvani 1-0/+143
This driver supports the 3 DCDC and 7 LDO regulators available on Ricoh RN5T618 PMIC. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>