drivers: regulator: pca9420: refactor mode handling

- Similar to what was done for other parts of the driver, remove any
  register specification from Devicetree (modesel-reg/mask)
- Keep all the information in the driver, and define modes as "numbers",
  e.g. PCA9420_MODE0: 0, PCA9420_MODE1: 1, etc.
- Bindings provide IC defaults now (all modes allowed 0/1/2/3 and
  initial mode set to 0).
- When mode is controlled via the MODESEL0/1 pins (ie directly by an iMX
  MCU using the dedicated PMIC_MODE0/1 pins), the driver will not allow
  to select a mode (it is not possible). This mode is now enabled by
  setting `nxp,enable-modesel-pins` in Devicetree. When enabled, all the
  allowed modes are configured to be selectable via pins. When disabled,
  mode can be set via I2C (using TOP_CNTL3 MODE0/1_I2C fields)

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
5 files changed