From patchwork Fri Apr 13 14:18:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 10340237 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 135E6604D4 for ; Fri, 13 Apr 2018 14:34:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A19B201BD for ; Fri, 13 Apr 2018 14:34:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F045C288B6; Fri, 13 Apr 2018 14:34:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BD33201BD for ; Fri, 13 Apr 2018 14:34:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753153AbeDMOet (ORCPT ); Fri, 13 Apr 2018 10:34:49 -0400 Received: from mail-eopbgr30053.outbound.protection.outlook.com ([40.107.3.53]:55952 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753103AbeDMOes (ORCPT ); Fri, 13 Apr 2018 10:34:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=dKLxJJLChoJ48agZQpYw4cXv/+IoBFTCZ+zzlP005l0=; b=JZJy40qEqqXu+ssSlyyw0KpCrg5JUVrEoFXVzCJV8K3ZRCexFLCsDFXt7pSEnamKfqlGcYQUb/egpT5AZ8eA0PZrN2tnGpWGDS5xmPNrO/sLcxnr1OJbolIFbs2QEL8Bo1thOpP2ZdEswSmI17UPsMX3xQFtq3EVjZSAF827ahU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jun.li@nxp.com; Received: from b47624-OptiPlex-7040.ap.freescale.net (92.121.68.129) by VI1PR0402MB3920.eurprd04.prod.outlook.com (2603:10a6:803:23::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Fri, 13 Apr 2018 14:34:40 +0000 From: Li Jun To: gregkh@linuxfoundation.org, robh+dt@kernel.org, heikki.krogerus@linux.intel.com, hdegoede@redhat.com Cc: linux@roeck-us.net, rmfrfs@gmail.com, yueyao.zhu@gmail.com, linux-usb@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH v4 5/5] usb: typec: tcpm: remove max_snk_mv/ma/mw Date: Fri, 13 Apr 2018 22:18:45 +0800 Message-Id: <1523629125-16332-6-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523629125-16332-1-git-send-email-jun.li@nxp.com> References: <1523629125-16332-1-git-send-email-jun.li@nxp.com> MIME-Version: 1.0 X-Originating-IP: [92.121.68.129] X-ClientProxiedBy: HK2PR02CA0139.apcprd02.prod.outlook.com (2603:1096:202:16::23) To VI1PR0402MB3920.eurprd04.prod.outlook.com (2603:10a6:803:23::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020); SRVR:VI1PR0402MB3920; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0402MB3920; 3:6/Flg7HAhm+TUj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hziHOmosFQKdYYp3NuegLaRdIuvy4C3kZvR446hhj1F9FqFagEkYoo7bl1Y0IuuEI+ufcxh+TBXPwOL8J7O0IjgA7J+EqUhc8NZH/RKrZTYKMytPy8NR+juZrqvnfwf/SRkIiyaj6cVVCBxVBwoy0Uy2FsqRKca10LTIiFclIbSRbjC9wjYywA1OLsof9AdN2uYc+cKKmkQQXqpkL9F7cIHecQBXSlyViZWsXWL9rjJQpK9GOvvWfZyPjqCxaEXEnpBLwoX26V41XUXlnXrTGJ852o0WTjkpOJww+UXxXZmhmqDjwaie8jBiSz5OXj5wEtwFtZNHXkDNL; 4:sgKZrXXC5bOutnTR7/gvJNa8SDBgOMc+prYxF7H4H1dUZ2nW9nzh5Ly58tKWNBYE5NuCcWSwaHhqQr0D5I36p5NY++n0PMMwWE29QlPEIJ8h01dkYRvnhZFSb5+fJP9Tv4jEVXHpigow4AgzhntlmcDUQ3cxn7ef953EYzQmLU+Fck2DfnbHBrdXPMCqH9oy/EpByQuK5vGjV/Ta0lr5/SfTLsSNzsf4p5BsNVYDHLI9JG9ywbvoPiBP8z0Hn49kbXqVvEndobeQJSxxeiSu0W0iFghyX0H87ojmWvMR/Go3SmiJB/n69WJLVZhp7ROm X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231232)(944501327)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041310)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:VI1PR0402MB3920; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0402MB3920; X-Forefront-PRVS: 0641678E68 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(39380400002)(366004)(396003)(376002)(189003)(199004)(305945005)(16526019)(3846002)(6506007)(6512007)(7736002)(446003)(476003)(47776003)(50466002)(48376002)(66066001)(486006)(81156014)(81166006)(956004)(2616005)(8936002)(11346002)(6486002)(2906002)(39060400002)(105586002)(6116002)(16586007)(53936002)(26005)(316002)(8676002)(36756003)(186003)(478600001)(25786009)(50226002)(97736004)(52116002)(575784001)(86362001)(59450400001)(76176011)(68736007)(106356001)(4326008)(51416003)(386003)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0402MB3920; H:b47624-OptiPlex-7040.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0402MB3920; 23:q/hBnJG0zseqY5+B/JEqO/6t3YGZKCb5f5h5IBu?= =?us-ascii?Q?NyGe+7i1pF2b7nOACaFKakqLYYvPGNh1f4AdgJQtYCNWr7CoYyKnunG1tqA6?= =?us-ascii?Q?Ga0tsxxqw+p1s2Eih8snRyuIKDhv0DAm52GbuwGKGenpXFcT3pIhLoNwkWNY?= =?us-ascii?Q?622DHtVYw5TZMohNDv399WdA2/PNAR9AJVhPaYh8dA7m7JroGiZ0gwVb8k3R?= =?us-ascii?Q?qf1G7+UC5A7YoKTi6DlFXziv2IvwyDD4UFCsBvlGfxEpWA5MzWE9vZKom7Tx?= =?us-ascii?Q?e94IYfF9koUq0nEgrZt/jFYS/LUv2YlI+uaeqQRkQrJo7PIvrFg+YAvuc+ZT?= =?us-ascii?Q?F26G1ZfqEQDifFvGfwmf4XsWJx9Bi1ZfoWUbB5LdBcMBFDhgIgF6M01y3BpX?= =?us-ascii?Q?Zw7msLAcVPZLSVeqEVvTBJQIBnIWc9WQcwdsOAMScOIHiCkvAHEP206ndQxT?= =?us-ascii?Q?HzSJ3O5SYNPHmkBaeuGZjgscO4JTHELAI13ya9f9XxzlclVSvi58YMTmBv1R?= =?us-ascii?Q?Ej1UtqOVFEeLURUZMthw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W5+fps3C0N65vNvcBS3SMD59HBfl3FScNuV9ikc3I1m9kTGiAtKPj9fa24PPJAuuSTY5AWYhnfb1WMp X-MS-Office365-Filtering-Correlation-Id: 22444d52-58af-4274-b4c3-08d5a14bb304 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2018 14:34:40.4592 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 22444d52-58af-4274-b4c3-08d5a14bb304 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3920 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since there is no user of max_snk_*, so we can remove them from tcpm. Reviewed-by: Hans de Goede Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 12 ------------ include/linux/usb/tcpm.h | 9 --------- 2 files changed, 21 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index c127339..3d9cfd6 100644 --- a/drivers/usb/typec/tcpm.c +++ b/drivers/usb/typec/tcpm.c @@ -257,9 +257,6 @@ struct tcpm_port { u32 snk_vdo[VDO_MAX_OBJECTS]; 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; /* Requested current / voltage */ @@ -3597,9 +3594,6 @@ EXPORT_SYMBOL_GPL(tcpm_update_source_capabilities); int tcpm_update_sink_capabilities(struct tcpm_port *port, const u32 *pdo, unsigned int nr_pdo, - unsigned int max_snk_mv, - unsigned int max_snk_ma, - unsigned int max_snk_mw, unsigned int operating_snk_mw) { if (tcpm_validate_caps(port, pdo, nr_pdo)) @@ -3607,9 +3601,6 @@ int tcpm_update_sink_capabilities(struct tcpm_port *port, const u32 *pdo, mutex_lock(&port->lock); port->nr_snk_pdo = tcpm_copy_pdos(port->snk_pdo, pdo, nr_pdo); - port->max_snk_mv = max_snk_mv; - port->max_snk_ma = max_snk_ma; - port->max_snk_mw = max_snk_mw; port->operating_snk_mw = operating_snk_mw; switch (port->state) { @@ -3675,9 +3666,6 @@ struct tcpm_port *tcpm_register_port(struct device *dev, struct tcpc_dev *tcpc) port->nr_snk_vdo = tcpm_copy_vdos(port->snk_vdo, tcpc->config->snk_vdo, tcpc->config->nr_snk_vdo); - port->max_snk_mv = tcpc->config->max_snk_mv; - port->max_snk_ma = tcpc->config->max_snk_ma; - port->max_snk_mw = tcpc->config->max_snk_mw; port->operating_snk_mw = tcpc->config->operating_snk_mw; if (!tcpc->config->try_role_hw) port->try_role = tcpc->config->default_role; diff --git a/include/linux/usb/tcpm.h b/include/linux/usb/tcpm.h index f0d839d..f5bda9a 100644 --- a/include/linux/usb/tcpm.h +++ b/include/linux/usb/tcpm.h @@ -62,9 +62,6 @@ enum tcpm_transmit_type { * @snk_pdo: PDO parameters sent to partner as response to * PD_CTRL_GET_SINK_CAP message * @nr_snk_pdo: Number of entries in @snk_pdo - * @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 * @operating_snk_mw: * Required operating sink power in mW * @type: Port type (TYPEC_PORT_DFP, TYPEC_PORT_UFP, or @@ -85,9 +82,6 @@ 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; @@ -174,9 +168,6 @@ int tcpm_update_source_capabilities(struct tcpm_port *port, const u32 *pdo, unsigned int nr_pdo); int tcpm_update_sink_capabilities(struct tcpm_port *port, const u32 *pdo, unsigned int nr_pdo, - unsigned int max_snk_mv, - unsigned int max_snk_ma, - unsigned int max_snk_mw, unsigned int operating_snk_mw); void tcpm_vbus_change(struct tcpm_port *port);