summaryrefslogtreecommitdiff
path: root/zephyr/projects
diff options
context:
space:
mode:
authorDeepti Deshatty <deepti.deshatty@intel.corp-partner.google.com>2022-02-20 20:43:18 +0530
committerCommit Bot <commit-bot@chromium.org>2022-03-01 00:29:07 +0000
commit3cd5bffefb9177ac8f8c0cba88001e0472c58e63 (patch)
treefd7e1172d1c86c2dc258cb15311b4b136769ff62 /zephyr/projects
parente246cc30fd93ddc9605da1aed041c02ec8ef8e41 (diff)
downloadchrome-ec-3cd5bffefb9177ac8f8c0cba88001e0472c58e63.tar.gz
nivviks/usbc: api to set source current limit
Typec SM sets the source current limit in TC_ATTACHED_SRC state by invoking typec_set_source_current_limit() api. Override this api for nivviks platform to set source current limit in Raa489000 tcpc chip. BUG=b:219891340 BRANCH=None TEST=Nivviks build is successful. Change-Id: I23dab59de2cd7f637387b93c40a01ca24b47ca26 Signed-off-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3475293 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Andrew McRae <amcrae@google.com> Commit-Queue: Andrew McRae <amcrae@google.com>
Diffstat (limited to 'zephyr/projects')
-rw-r--r--zephyr/projects/nissa/src/nivviks/usbc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/zephyr/projects/nissa/src/nivviks/usbc.c b/zephyr/projects/nissa/src/nivviks/usbc.c
index 8a08eda3a8..40f60f2bf0 100644
--- a/zephyr/projects/nissa/src/nivviks/usbc.c
+++ b/zephyr/projects/nissa/src/nivviks/usbc.c
@@ -156,6 +156,14 @@ void pd_power_supply_reset(int port)
pd_send_host_event(PD_EVENT_POWER_CHANGE);
}
+__override void typec_set_source_current_limit(int port, enum tcpc_rp_value rp)
+{
+ if (port < 0 || port >= CONFIG_USB_PD_PORT_MAX_COUNT)
+ return;
+
+ raa489000_set_output_current(port, rp);
+}
+
int pd_set_power_supply_ready(int port)
{
int rv;