From patchwork Mon Apr 16 06:54:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 10342307 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 1F53A60365 for ; Mon, 16 Apr 2018 07:11:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EA02285E8 for ; Mon, 16 Apr 2018 07:11:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8752228610; Mon, 16 Apr 2018 07:11:01 +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 A78FF285D3 for ; Mon, 16 Apr 2018 07:10:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753636AbeDPHKi (ORCPT ); Mon, 16 Apr 2018 03:10:38 -0400 Received: from mail-he1eur01on0060.outbound.protection.outlook.com ([104.47.0.60]:51040 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752979AbeDPHKh (ORCPT ); Mon, 16 Apr 2018 03:10:37 -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=/NXbYfy7MRtjIcd0qG5fOof0Ayrya2V1pKYfaOxWetk=; b=lPR6ugSgdsPCqlJmdOVFUpNmK29MZ22uULO52VlH+6YXzbwsmGn1twmNlEGaio4aMI5qZMovf4gxUkdoHrGoIx7+iL4O1Z5O4HwIrvWdGvyUV2NWfIhTdop/CDXS3QE4MxfkpW0Zxd/vxUSsdOP4bgouycn9XL6dASY66g8NRKA= 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 AM0PR0402MB3907.eurprd04.prod.outlook.com (2603:10a6:208:f::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.9; Mon, 16 Apr 2018 07:10:30 +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 v5 5/5] usb: typec: tcpm: remove max_snk_mv/ma/mw Date: Mon, 16 Apr 2018 14:54:37 +0800 Message-Id: <1523861677-16893-6-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523861677-16893-1-git-send-email-jun.li@nxp.com> References: <1523861677-16893-1-git-send-email-jun.li@nxp.com> MIME-Version: 1.0 X-Originating-IP: [92.121.68.129] X-ClientProxiedBy: HK2P15301CA0001.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::11) To AM0PR0402MB3907.eurprd04.prod.outlook.com (2603:10a6:208:f::27) 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:AM0PR0402MB3907; X-Microsoft-Exchange-Diagnostics: 1; AM0PR0402MB3907; 3:pwwoz/bJ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5WLxBWgLiR30uFCA5jX0Br4yD+A1Hmfm0iN9kQMHzaOCAJeHYpd+rYB6RHCnxSjRWWyr3jm38E+Rs/7ruyXGF1GLoksoSDSQkxdXtnMcDsJuXJGWmlgBh0Qj21WhDb0iQX4Tddpd7lJ1j/ehLH01QodzcXBRhwslqhCd1M5N4u6w+4YQYYzuVshhNtMKKeeV75omE1v5e93iq+zRhUOQnpOzTlH+O86Vx1/WgolTK/3woapkp3CkxmWxkNq+iE9ACRz9rqyytSwhNUaMQLWI4z6WGgZB9uB9xgDUOYzGNdrL/DBtgjJDwdd5efZNQBkHqbwN3nVJ7X9P; 4:/ghJSdrntI9afdu445U+l+gOyK1xqB6WY2ELSHp3OhghZKc0UwoWeWDdiYxovcWwbWaYbgky2YDNOonV3XOx91YgL6QFGuAek+L5U+ItLm6vgwub4GPIxQn+QzJFmRRmOrNkI5LRjWuHoULM4OZzBano54yfO4kXa/+hw1RlgvFMco/vvSllsXqFAHbQOkWXqcg7hGfXoGBt+mIqITsR7DwMPPEb/vZpA88Z3BOfvo3PcMFCM1QeykoAK95uIq7lht7zppk9vNxZGbHEAWrM9LDkpx/R7Y4ygDBTXGLESxAwF80z8zXLU4bLlx5Nycdv 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)(5005006)(8121501046)(3231232)(944501327)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:AM0PR0402MB3907; BCL:0; PCL:0; RULEID:; SRVR:AM0PR0402MB3907; X-Forefront-PRVS: 0644578634 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(346002)(39380400002)(366004)(396003)(199004)(189003)(52116002)(7736002)(11346002)(51416003)(316002)(305945005)(2906002)(478600001)(16586007)(26005)(76176011)(86362001)(59450400001)(575784001)(105586002)(6506007)(106356001)(25786009)(386003)(6486002)(97736004)(66066001)(47776003)(486006)(6116002)(16526019)(3846002)(6512007)(186003)(53936002)(5660300001)(36756003)(476003)(2616005)(50226002)(68736007)(48376002)(50466002)(446003)(4326008)(8936002)(81156014)(956004)(8676002)(81166006)(39060400002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0402MB3907; H:b47624-OptiPlex-7040.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM0PR0402MB3907; 23:DVpsWbyTizV8wp5WDExs/cA+uAf8c+/6RNZwSyz?= =?us-ascii?Q?mgbTzaI+1ylLvRHgNRs39fmtPdct4jmlXfDJ0/aQG7cJGrkEQu2mK3NYeBEX?= =?us-ascii?Q?0pyo5TN8vcAZtSJYjBR+Hxa4c71W6b+oQWopXybZeC+IVOISAxv99ypIoD0r?= =?us-ascii?Q?5jKvJH+HvlouSok34k97ESpr4Qo69p0RgO8BZwuAfwOMpJzJGaT0aeCanUDX?= =?us-ascii?Q?ZXYChTCLucfZ5cCsmVmKugp1S/MZyO3wnHK4aDWG5dH0SzNWBEzTZRU3PmKi?= =?us-ascii?Q?4Ift6SrOz5UdUEIdi3mEIqeG54dhW/z28KhG3BCuqfdXbUZcUvPa1khq5gQS?= =?us-ascii?Q?LuAlnIvXV3X+O03Oo+vK6TWc45f9XubKpyZ55SZ6P+04iGz/NVLETTG1P+fj?= =?us-ascii?Q?dUW68+d8gxAMRuIJbmCZbGhRjJ/vJIYWyb94dgatbPSHGZmScHkm2Yai4Ygu?= =?us-ascii?Q?/Dcp97Rrtp3u+xj77TEVSXjdQ4ZqcHe+Tzp8xF4ZT7/aG4w/rZrT0EqkxTNi?= =?us-ascii?Q?4WZJyXAUGWD+r/jKrgZvDU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Z7WgmAnebe1Cs+MBTBXK42XdU4hsBC9JNK+ljMtLzm08UKxdVCQPuOHZa0c8eRRE99sLnBT3EfsT8NF4fR+og0Q29TK X-MS-Office365-Filtering-Correlation-Id: 48f0d420-4975-4318-1dd0-08d5a36925c7 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Apr 2018 07:10:30.7555 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 48f0d420-4975-4318-1dd0-08d5a36925c7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0402MB3907 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 Acked-by: Heikki Krogerus --- 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 048b953..27192083 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 */ @@ -3598,9 +3595,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)) @@ -3608,9 +3602,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) { @@ -3676,9 +3667,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);