usb: typec: add max_snk_mv/ma/mw
authorVipul Kumar <vipul_kumar@mentor.com>
Thu, 10 Jan 2019 05:46:29 +0000 (11:16 +0530)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
This patch add max_snk_mv/ma/mw to fix the below
compilation error.

drivers/usb/typec/tcpci.c:707:15: error: ‘struct tcpc_config’ has no member named ‘max_snk_mv’
          &tcfg->max_snk_mv) ||
               ^~
drivers/usb/typec/tcpci.c:709:13: error: ‘struct tcpc_config’ has no member named ‘max_snk_ma’
        &tcfg->max_snk_ma) ||
             ^~

Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
include/linux/usb/tcpm.h

index cb1de58..9c24e5a 100644 (file)
@@ -65,6 +65,9 @@ enum tcpm_transmit_type {
  * @nr_src_pdo:        Number of entries in @src_pdo
  * @snk_pdo:   PDO parameters sent to partner as response to
  *             PD_CTRL_GET_SINK_CAP message
+ * @max_snk_mv:        Maximum acceptable sink voltage in mV
+ * @max_snk_ma:        Maximum sink current in mA
+ * @max_snk_mw:        Maximum required sink power in mW
  * @nr_snk_pdo:        Number of entries in @snk_pdo
  * @operating_snk_mw:
  *             Required operating sink power in mW
@@ -86,6 +89,10 @@ struct tcpc_config {
        const u32 *snk_vdo;
        unsigned int nr_snk_vdo;
 
+       unsigned int max_snk_mv;
+       unsigned int max_snk_ma;
+       unsigned int max_snk_mw;
+
        unsigned int operating_snk_mw;
 
        enum typec_port_type type;