diff mbox

[v5,4/5] usb: typec: wcove: remove max_snk_* for sink config

Message ID 1523861677-16893-5-git-send-email-jun.li@nxp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jun Li April 16, 2018, 6:54 a.m. UTC
Since max_snk_* is to be deprecated, so remove max_snk_* by adding a
variable PDO for sink config.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
---
 drivers/usb/typec/typec_wcove.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Heikki Krogerus April 20, 2018, 3:16 p.m. UTC | #1
On Mon, Apr 16, 2018 at 02:54:36PM +0800, Li Jun wrote:
> Since max_snk_* is to be deprecated, so remove max_snk_* by adding a
> variable PDO for sink config.
> 
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: Li Jun <jun.li@nxp.com>

Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/typec_wcove.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/typec/typec_wcove.c b/drivers/usb/typec/typec_wcove.c
> index 19cca7f..39cff11 100644
> --- a/drivers/usb/typec/typec_wcove.c
> +++ b/drivers/usb/typec/typec_wcove.c
> @@ -558,6 +558,7 @@ static const u32 src_pdo[] = {
>  static const u32 snk_pdo[] = {
>  	PDO_FIXED(5000, 500, PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP |
>  		  PDO_FIXED_USB_COMM),
> +	PDO_VAR(5000, 12000, 3000),
>  };
>  
>  static struct tcpc_config wcove_typec_config = {
> @@ -566,9 +567,6 @@ static struct tcpc_config wcove_typec_config = {
>  	.snk_pdo = snk_pdo,
>  	.nr_snk_pdo = ARRAY_SIZE(snk_pdo),
>  
> -	.max_snk_mv = 12000,
> -	.max_snk_ma = 3000,
> -	.max_snk_mw = 36000,
>  	.operating_snk_mw = 15000,
>  
>  	.type = TYPEC_PORT_DRP,
diff mbox

Patch

diff --git a/drivers/usb/typec/typec_wcove.c b/drivers/usb/typec/typec_wcove.c
index 19cca7f..39cff11 100644
--- a/drivers/usb/typec/typec_wcove.c
+++ b/drivers/usb/typec/typec_wcove.c
@@ -558,6 +558,7 @@  static const u32 src_pdo[] = {
 static const u32 snk_pdo[] = {
 	PDO_FIXED(5000, 500, PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP |
 		  PDO_FIXED_USB_COMM),
+	PDO_VAR(5000, 12000, 3000),
 };
 
 static struct tcpc_config wcove_typec_config = {
@@ -566,9 +567,6 @@  static struct tcpc_config wcove_typec_config = {
 	.snk_pdo = snk_pdo,
 	.nr_snk_pdo = ARRAY_SIZE(snk_pdo),
 
-	.max_snk_mv = 12000,
-	.max_snk_ma = 3000,
-	.max_snk_mw = 36000,
 	.operating_snk_mw = 15000,
 
 	.type = TYPEC_PORT_DRP,