Commit graph

9 commits

Author SHA1 Message Date
Yang Li
6023fffc3e
regulator: Remove duplicated include in mt6359-regulator.c
./drivers/regulator/mt6359-regulator.c: linux/platform_device.h is included more than once.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5901
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230718003255.124594-1-yang.lee@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-07-18 15:11:31 +01:00
Rob Herring
045a44d4c9
regulator: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230714174930.4063320-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-07-14 20:52:54 +01:00
Sen Chu
a511637502
regulator: mt6359: add read check for PMIC MT6359
Add hardware version read check for PMIC MT6359

Signed-off-by: Sen Chu <sen.chu@mediatek.com
Fixes: 4cfc965475 ("regulator: mt6359: Add support for MT6359P regulator")
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com
Link: https://lore.kernel.org/r/20230518040646.8730-1-sen.chu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-18 19:24:47 +09:00
Douglas Anderson
46600ab142
regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.10 and 5.15
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.10 but did exist in Linux 5.15.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20230316125351.5.Ia0e6d859bdfe42ea5c187fb1eb4705c1b5ea23a1@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-20 13:11:29 +00:00
Axel Lin
d6208ba870
regulator: mt6359: Remove shift fields from struct mt6359_regulator_info
The shift setting can be calculated via the corresponding mask field,
so remove these shift fields.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20210629130503.2183574-2-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-07-11 23:50:36 +01:00
Axel Lin
73d4ae57f8
regulator: mt6359: Get rid of linear_range tables
The MT6359_BUCK and MT6359_LDO_LINEAR macros setup both
linear settings (min_uV, uV_step, linear_min_sel) and linar_range
(linear_ranges, n_linear_ranges) settings.
All the linear range tables actually only has one entry.
Let's simplify it by using linear instead of linear range.

The linear_min_sel setting is 0 for all cases, remove it
from the macros.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20210606065052.1417111-3-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-07 16:24:09 +01:00
Axel Lin
5a5e31150c
regulator: mt6359: Use unsigned int for volt_tables
The regulator_desc expects "const unsigned int *volt_table", thus use
unsigned int instead of u32.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20210606065052.1417111-2-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-07 16:24:09 +01:00
Hsin-Hsiung Wang
4cfc965475 regulator: mt6359: Add support for MT6359P regulator
The MT6359P is a eco version for MT6359 regulator.
We add support based on MT6359 regulator driver.

Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-06-01 16:44:36 +01:00
Wen Su
d7a58decc7 regulator: mt6359: Add support for MT6359 regulator
The MT6359 is a regulator found on boards based on MediaTek MT6779 and
probably other SoCs. It is a so called pmic and connects as a slave to
SoC using SPI, wrapped inside the pmic-wrapper.

Signed-off-by: Wen Su <wen.su@mediatek.com>
Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-06-01 16:44:31 +01:00