summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/rt4801-regulator.c
Commit message (Collapse)AuthorAgeFilesLines
* regulator: Switch i2c drivers back to use .probe()Uwe Kleine-König2023-05-081-1/+1
| | | | | | | | | | | | After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert back to (the new) .probe() to be able to eventually drop .probe_new() from struct i2c_driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de Link: https://lore.kernel.org/r/20230505220218.1239542-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org
* regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.4 and 5.10Douglas Anderson2023-03-201-0/+1
| | | | | | | | | | This follows on the change ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") but changes regulators didn't exist in Linux 5.4 but did exist in Linux 5.10. Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20230316125351.4.I01f21c98901641a009890590ddc1354c0f294e5e@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: richtek,rt4801: parse GPIOs per regulatorKrzysztof Kozlowski2022-04-251-11/+38
| | | | | | | | | | | | Having one enable-gpios property for all regulators is discouraged and instead, similarly to regulator core ena_gpiod feature, each GPIO should be present in each regulator node. Add support for parsing such GPIOs, keeping backwards compatibility. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Tested-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://lore.kernel.org/r/20220425072455.27356-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: rt4801: Fix NULL pointer dereference if priv->enable_gpios is NULLAxel Lin2021-06-031-2/+2
| | | | | | | | devm_gpiod_get_array_optional may return NULL if no GPIO was assigned. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210603094944.1114156-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: rt4801: Fix W=1 build warning when CONFIG_OF=nChiYuan Huang2020-08-241-1/+1
| | | | | | | | | | | | | Fix below warning when CONFIG_OF=n: drivers/regulator/rt4801-regulator.c:206:34: warning: unused variable 'rt4801_of_id' [-Wunused-const-variable] 206 | static const struct of_device_id rt4801_of_id[] = { | ^~~~~~~~~~~~ Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/1598234713-8532-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: rt4801: Add support for RT4801 Display Bias regulator driverChiYuan Huang2020-08-181-0/+223
Adds support for the RT4801 DSV. It has two regulators (DSVP/DSVN) with an I2C interface. DSVP/DSVN can provide the display panel module for the positive/negative voltage range from (+/-)4V to (+/-)6V. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://lore.kernel.org/r/1597461262-25878-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>