power: smb138x: Add usb main power supply

The usb main power supply was initially introduced to expose all
the properties required to implement parallel charging for the main
charger. Sharing lib and votables with parallel algorithm, smb138x
standalone charger also need to have main charger type.

These properties are implemented/supported,

- CONSTANT_CHARGE_CURRENT_MAX, sets and gets the FCC of the main charger
- ICL_REDUCTION, indicates by how much the main charger should reduce
  its ICL. The parallel charger would draw some portion of the ICL and
  this implementation ensures that the main charger reduce its ICL in
  order to not exceed the adapter limits.
- VOLTAGE_MAX, sets the float voltage of the battery, we continue to
  raise float voltage for the parallel charger so that it operates as
  current source.
- INPUT_CURRENT_SETTLED: indicates the AICL results.
- FCC_DELTA: indicates the value by which the main is correcting the
  FCC. The main reduces FCC by few mA when in JEITA or Step
  charging. This helps in determining the exact FCC which in turn
  helps distribute it correctly.

Change-Id: I2860494c69da7422c8f9f121bc8a7abd9d1f1420
Signed-off-by: Harry Yang <harryy@codeaurora.org>
1 file changed