OSDN Git Service

regulator: tps65086: Select dedicated regulator config for chip variant
authorAndre Werner <andre.werner@systec-electronic.com>
Fri, 18 Aug 2023 08:37:24 +0000 (10:37 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 18 Aug 2023 21:06:52 +0000 (22:06 +0100)
commit3a5e6e49855661ad39b8fbb1dbd041178af98e00
tree1373496febf33f12cbecebf6f2b78901b55fa1c5
parent1c6350f2d3b07b0d7281317f1d0c24c892597e5b
regulator: tps65086: Select dedicated regulator config for chip variant

Some configurations differ between chip variants, e,g. the register
to control the on of state of LDOA1 and SWB2. Thus, it is necessary
to choose the correct configuration for a dedicated device.
If the wrong configuration was used, the LDOA1 output that was
disabled by the bootloader was enabled in  Kernel again.

Each chip variant gets its dedicated configuration selected by
the chip ID previously collected from MFD probe function.
The VTT enum value (tps65086_regulators) is shifted because not all
chip variants have a separate SWB2 switch. Sometimes they are merged.
So the configuration possibilities differ, thus the regulator
configuration arrays have a different length.

Signed-off-by: Andre Werner <andre.werner@systec-electronic.com>
Link: https://lore.kernel.org/r/20230818083721.29790-5-andre.werner@systec-electronic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/tps65086-regulator.c
include/linux/mfd/tps65086.h