MLK-17128-3 staging: typec: reading max_snk_mw setting from OF
authorLi Jun <jun.li@nxp.com>
Fri, 8 Dec 2017 14:26:49 +0000 (22:26 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:51:31 +0000 (14:51 -0500)
It's missing while do typec related properties read, sink
needs it to check if the provided PDO can match the required
power.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
drivers/staging/typec/tcpci.c

index 4a934b5..1a31a5e 100644 (file)
@@ -709,6 +709,8 @@ static int tcpci_parse_config(struct tcpci *tcpci)
                                                &tcfg->max_snk_mv) ||
                device_property_read_u32(tcpci->dev, "max-snk-ma",
                                                &tcfg->max_snk_ma) ||
+               device_property_read_u32(tcpci->dev, "max-snk-mw",
+                                               &tcfg->max_snk_mw) ||
                device_property_read_u32(tcpci->dev, "op-snk-mw",
                                                &tcfg->operating_snk_mw))
                goto snk_setting_wrong;