From patchwork Fri Apr 13 05:55:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 10339561 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 88F1860329 for ; Fri, 13 Apr 2018 06:11:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A386286B5 for ; Fri, 13 Apr 2018 06:11:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4ECD4286BC; Fri, 13 Apr 2018 06:11:41 +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 CA60E286B5 for ; Fri, 13 Apr 2018 06:11:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752015AbeDMGLj (ORCPT ); Fri, 13 Apr 2018 02:11:39 -0400 Received: from mail-db5eur01on0055.outbound.protection.outlook.com ([104.47.2.55]:51837 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751149AbeDMGLi (ORCPT ); Fri, 13 Apr 2018 02:11:38 -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=sIjM4oKoFhDuM68TNmeS5so3DndDb2ImeGz5rbEyAQg=; b=nlGVfjtAT74/f8mUdKVC9syrJujAMWPHUm75xd3HkM774jq390I6SzzETpMEb8wreSqf557Wc2pfSv3PpoHDzfMCFZ64OL6b/iKzuWg6sVPwH1DDvpF5gbe8mlTXkmHde0orNhhUBlRbkdzPuIu1UBNXUz0t6hsl8mGFwhtKOMQ= 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 AM0PR0402MB3906.eurprd04.prod.outlook.com (2603:10a6:208:f::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.10; Fri, 13 Apr 2018 06:11:32 +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 v3 5/5] usb: typec: tcpm: remove max_snk_mv/ma/mw Date: Fri, 13 Apr 2018 13:55:13 +0800 Message-Id: <1523598913-11507-6-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523598913-11507-1-git-send-email-jun.li@nxp.com> References: <1523598913-11507-1-git-send-email-jun.li@nxp.com> MIME-Version: 1.0 X-Originating-IP: [92.121.68.129] X-ClientProxiedBy: KL1PR0302CA0007.apcprd03.prod.outlook.com (2603:1096:802::17) To AM0PR0402MB3906.eurprd04.prod.outlook.com (2603:10a6:208:f::26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM0PR0402MB3906; X-Microsoft-Exchange-Diagnostics: 1; AM0PR0402MB3906; 3:e4trNoTlrlEgqPIqHwJPia4kSK5TpLfDcClkPvNO2myXHGC95JgHGQxoPf3JYDBwpwJWEzcfMZVbTViSOfd7upsSEY8o0b/F672ZrzuDE70sstumTiiMuwB0haE97WhChdN/DFVasYzKkAn+6PbFNsjBSy99ShQOFATmk/uwc879PMROoyG6PHtn8ShxcEv1HZ1T+LKoIy5bbNQBE+3XyX0zaWei4cCwWpnL8kiQR9SBDfy0PJ6MFj0W63IhIEBQ; 25:05Vhg2XxyJYl6iu5DJnb9VgQ1pzpqD8xGDBjq7HRTix5MesUT+OpGpXq4fSref+ARmMsyEfbyq2+dGyPurP5m+XLOWn5FmZbx6YeaG1eGFIrNc0/zYayGxtXQqoYwZRLnI/Tek+m8xxdkFmk1MyJC105mB0LmlO/SQnXP461ayYaYDlQLvboH/bptW8SCaUPmsOpvsQjLMZVDiJCJghaf4r1cUNQb1QpLlidrhUN0G9iUCsqio1yQzu7KiVFXFzPZ9l7LemiVN8S63mcMW3IO0osIoHV8LMhYH10y+FF91CwtPlunj4W58l50OXiNlxOQInEtquM0rDNXbnU852VLQ==; 31:TMVvajj3k8EGB6r29UAnj65wNBhRDQp19fUmftzlVALk6EopMzF9+VljX1B2uS9EzrYXUnf9fqIO5aVr9PyqDyFmdUnH79ve9l217CgRyW2um04zrgfo912KFgJfgyq36G3fpm9U36foB/IQ44yZHzH+rgXsNHw/ifYFOms79onTl7UfIUtovchl46kgdM0B6YmCBZW7B1LE2C5D6VSX+uYBJdcMexd2tz2jmc5rxcM= X-MS-TrafficTypeDiagnostic: AM0PR0402MB3906: X-Microsoft-Exchange-Diagnostics: 1; AM0PR0402MB3906; 20:Iw3yiP4ZC41v5uSBldasxXQgbeQ8dRohBXrtwyJGI9atXUUg/pIvcf+gCMqrEpUd8sqkQuSazy/wHQprj/QJPe67bWwjUD3NJkQsBVOglIEuA/osZX/4jIQhRYthLQwuUk4RTjBD7hyDpR01a9qVCTdmyutrRzzmosv3aHmSF2CdelMI99sKzt6So0MSIpVbPsKhW1R8ZbArjKZgsusBJehOSKEGBBYZ++mRZo+t8VP0irrdrLhI2mcK5pOHNtm0cbGZ8+f2hlQGhooNnv0QNJBPEdl6RhB1zMcjFyVuCE4vziPgmOa71zXwsSNyT16/jKXzn3u/SASPu5uAFnwyumHQnGLRu1sSpdKhUdSKIsLFMcoEzb2lPWTjbX7zVpbgx6JY0O8vfVP9+dXDAPoLJPoQbufEYP5nb/V0aiLrU6JiNBcbBl325be++Hc6phgQII+JlF5/PR0UiCF1qiZz77rxK1Jzhr4xsFk+efFgpJ1DwXeGJtZACklWpuvfcCEt; 4:nxxBUdr4kZE2vvFdNQ8jWmjpLDJTV5wXCR+tOkuQ2tR0OyVH9VPCdGYYocMIrmXkYmEku7H4aLDKnVkjGbCw63qZGe9hX0B6I+4I1gIRyGtbb03MOqRN/YUbJqFDFQknC0EKa1i/S9hXNTte96dALkfOVVDBgQ7EhJxQfZE71To8FzPqxJ5I+XPZozo+wT1BWZphXTkx8+Bj00o2njBXd77Igzan6a1IanDeW3Yt1w8Tkv4MRCJBCUnL4++pa45NGVC55YKtffV7s93JUOU25ktNIkSV7de1AWhAu7W8/00cV28Hw+r6F7kvpy6KNGls 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)(10201501046)(93006095)(93001095)(3002001)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123564045)(20161123562045)(6072148)(201708071742011); SRVR:AM0PR0402MB3906; BCL:0; PCL:0; RULEID:; SRVR:AM0PR0402MB3906; X-Forefront-PRVS: 0641678E68 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(396003)(39380400002)(366004)(346002)(189003)(199004)(6116002)(305945005)(50466002)(956004)(2616005)(2906002)(52116002)(575784001)(76176011)(66066001)(48376002)(51416003)(6512007)(25786009)(97736004)(86362001)(16526019)(7736002)(186003)(476003)(11346002)(446003)(39060400002)(106356001)(486006)(316002)(16586007)(81166006)(36756003)(26005)(6486002)(81156014)(53936002)(8676002)(6666003)(4326008)(478600001)(50226002)(5660300001)(8936002)(68736007)(6506007)(386003)(47776003)(3846002)(105586002)(59450400001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0402MB3906; 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; AM0PR0402MB3906; 23:DlVMu0WPdhU9x6gVJ6GmavIppROyZXYGHPV0//b?= =?us-ascii?Q?MksPEcP2qHwipuh5NpQ+SMSqhkvH7psQuseuzl4eFwKOrxbo1tu9NmO6E4hj?= =?us-ascii?Q?DNGOflzKM3x8/bcMNxLfGGVb9RUmBXLGCh2Wt7XRZcxJbi5OqL08tVXdNWm8?= =?us-ascii?Q?YiOCag8C/htdYBSxe3/qSF1UG2N0snq6qQur/kwpMCqW+kNCVlj1sYjLiUhy?= =?us-ascii?Q?ZVND4oHgMcPVOmhP9Zl5oAn6zej/Ccaj5bJWIGykGayAluiRrUKsN40ski59?= =?us-ascii?Q?NAiPF7nzwupSp/TF3+AAnFoF4MVqLVIXpF26oa0gOFUCGCh1tXsVG8DGUkJx?= =?us-ascii?Q?ptBh6MMNvCs1Rlt/TqbLv0qL3B4J+3Kj7aYku9Ly5H6RlqD5a18LdDtjHJw/?= =?us-ascii?Q?yK2X0KW9Ho8miQss5tH96WxeS4Kdqb22uyPp1O/ey+mXNzYKEYUuU0xQUAo4?= =?us-ascii?Q?T9KM/gyWqqMXdOsZa6eLVkz5UG2wYHgo3asAaU5D7Fa8mGvjqUxH5UUErt1G?= =?us-ascii?Q?i1oMN0ZPm2yw90h6DjtLXMeMqyIlF42XZ79cPklkgmmAQmv688Ju7nUVaxZZ?= =?us-ascii?Q?a0OIgxahZyjaMAwwzXzeQFlKpx912xA+MwYCmJekloADIAET4k/LfmgLjFnz?= =?us-ascii?Q?O1f4jF1qCAAdeJdb3zW2naWXazvKg+siN0Z4MW2RjJY44lBZZAq4U8MAEICA?= =?us-ascii?Q?avxDdDuxcXCnIxdQ2Nx2Qyko+YjxSCSxg1Vk0ALtwGzW8tqfaZvlwXIwLW99?= =?us-ascii?Q?s/jwKTq30051Ado0+zex7M+0f0KumpXGvhyQqQNKXxZR5nq9f1nMkM/07rJe?= =?us-ascii?Q?w7hAxwpSk8L0NGjP+9Bbk/G94bgQu+LSYn7FJ9ickfgzSa8XUSCEhFxGyAom?= =?us-ascii?Q?6+bnPu2CrUJ8Jn8zg/Yem0bm+vF283GSZRapMCSebK8If1OnYi2cJBGla2V1?= =?us-ascii?Q?K6iqAJBnT7ckWv/a5Iqxsl33uAwI5ok4o9hxchMHS+c/jgUf2Vy3iIhLIk0P?= =?us-ascii?Q?PyvNi2DstZIDGBZAzekGgNiH8CukW+A9IKz5RS/RBTFU56vNYL3cToVLigPF?= =?us-ascii?Q?FFgWgWrUvmVmE5YiSHgj+jcvBFkKQIph8xGvV0YJgNjvo2afDtKp/qpn5jzT?= =?us-ascii?Q?Hj0+LLJW1yan8RTvn2uJTnfYbMtxFlDF9DUvLckP65VZDp9iRAhcD/+l29S0?= =?us-ascii?Q?MtyLua5Y5EJIdhjU0nfk5RoCZeLSBLy0xYry0auc3ZEJx+gVwd4Cx9ApefQ?= =?us-ascii?Q?=3D=3D?= X-Microsoft-Antispam-Message-Info: qWshGxjj9Ut1tCYTPKtbeQROOm7kwL1ymfo18dG5B/YR5L0kyE6m9A66Jo4MaPLNerExhXQ7Ao0K+47cUoFqFOvhbixu3lGafusNTSozjMmaxi8RvqPZgVbMjt0ltt3t0dxMIhPyB8iy8Y9yXAwc9Fri5ivGimeTlBh26qKRCAWkefOYDVwHwtqNvxVG/0eV X-Microsoft-Exchange-Diagnostics: 1;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2XDU3LYPzezemi+6W63sjwoO9 X-MS-Office365-Filtering-Correlation-Id: 8ba45149-0274-4f7f-185d-08d5a105699c X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2018 06:11:32.9976 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8ba45149-0274-4f7f-185d-08d5a105699c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0402MB3906 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. 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);