Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6489cf0c authored by Guru Das Srinagesh's avatar Guru Das Srinagesh
Browse files

power: smb5-lib: Modify max USBIN voltage seen by userspace



Non-QC2.0-compliant adaptors, as the name suggests, support only a
subset of the three voltage levels (5, 9 and 12V). For example, a
non-compliant adaptor might support only up to 9V and not 12V (5V is
supported as a bare minimum). Thus, when a request for 12V is made, it
will collapse and unexpected behaviour will ensue.

Therefore for such adaptors, modify the maximum USBIN voltage provided
to userspace as follows: return the voltage that is the next lesser
value than the voltage that has been determined to be unsupported by the
adaptor. Also, reject all requests from userspace for these unsupported
voltage levels.

NOTE:
  This is only applicable to platforms that use SW INOV. The existing
  MAX_PULSES based solution works only for platforms that use HW INOV.
  To be clear, modifying the MAX_PULSES register happens in both HW and
  SW INOV modes, but only produces the desired effect in SW INOV mode.
  These two solutions do not interfere with each other and can coexist.

Change-Id: I99abea1651c5c89d5d895eb51587e30c0d5c52ea
Signed-off-by: default avatarGuru Das Srinagesh <gurus@codeaurora.org>
parent af21981a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment