Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3468642pxk; Mon, 28 Sep 2020 19:43:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4mFQKyx5V7yurnwimXmBjufViRrYvM0CdBZqFy9lb7i3sr7HXHuljVK5jKVV4BlKg/+om X-Received: by 2002:aa7:c394:: with SMTP id k20mr925956edq.279.1601347387389; Mon, 28 Sep 2020 19:43:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601347387; cv=none; d=google.com; s=arc-20160816; b=TO5SCmpFVd4cWYSdJOcGaW4fgTSszneofxYILM7sLqyA4kg1AExkHrumhrQXGx1uay 2riGewIBPuEc42Bp8e/Qa5+8Vz/aLLinP4Z3rUENHze0dFw5W+JTCy2UycXUOHJ7Enra aM8zSTisENBybna+D0RAhHdu4oBesQ8fJqNS4VTdIKgUSK45iYB+w4wogdLiGWRVvAc/ u7HBV8KJxbZkKaYNlrUmyuf1CjPZjZ/ijVgNYhyISdKsoB1JDBFMnnYb86Uctcw3fiVj kOtdav2/SmNjmqTNVyS+85+czK9GqtnyiBp67YY4Xfgtg81p87TrnYBXXzYsnIOdT8Jz nD5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=ETPAsWHvLyLNkSHJ+gS6oA+OTExuVARAMVUjKC9Fc/4=; b=iWb45QDHDBdFsTIdfuJleP4txgALWxTX/MIxAYZpqn2XstOCtyDKoe/91Qq+lvkQ9j qLQr5A0+O7PvmszoPk7eoP6gRv7AMFN/nfi7//aiFEcnc8TIHYvnT6ANLjkvk+rj/dJL I4grbG+lQPFfSz76QPWWJqaDcrMKyJDX1mCvzNErW6ctLR/VZ16y4Zozvbb/4FEfzUHK hNM7GxPsI4mVGmHAvwAG0nNUeZhaKS8bT4PnFtHiR3drtWNM23WZdegMkbZRm8Yj8USS W3OQR1s0A8IQqRQ99h6HXurB5mu0A828s6jodt+Sghqn5PrHnTcVF6HCT3O4WPaJr16I mDJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="YOzN/rOv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j4si1864735ejt.277.2020.09.28.19.42.36; Mon, 28 Sep 2020 19:43:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="YOzN/rOv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727499AbgI2Ckw (ORCPT + 99 others); Mon, 28 Sep 2020 22:40:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727459AbgI2Ckl (ORCPT ); Mon, 28 Sep 2020 22:40:41 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 203FEC0613DB for ; Mon, 28 Sep 2020 19:40:41 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id v106so3294508ybi.6 for ; Mon, 28 Sep 2020 19:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=ETPAsWHvLyLNkSHJ+gS6oA+OTExuVARAMVUjKC9Fc/4=; b=YOzN/rOvca1uPt9PY3XDoEf2RUnhEyq0eKxdF8Fg+uNyxFSFrujusub6QGt672Jep3 QQAQ1lYV+wvQ0XYYYxJrqwdRFZfO2FbRewFO+oty1wXCTAsmmK5tEmgyl0xi8oCvmsMi BUgFbkwEWW32XL+iyuCv5n5sGW2/bfdQGc4XxpLppVKIgyXxlVX54V5fnETAwQOBUurf kO+XGzvUsGuHa9ncWogKv+vLs2sUo+8z38OyopD8nZAaW0RpmXFU1oIlWwp8hY9Vyl2M algRGGfrfjDNQmXqY81pqW6LXhe2dneFr05VEUk0eHVhjIAljJpvrH94ot4Z89qeNJxD lJfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=ETPAsWHvLyLNkSHJ+gS6oA+OTExuVARAMVUjKC9Fc/4=; b=J7pdm9ai69zcIUIEBVO9N68dZrVj6CtxS3A2RWQ19wQVUrJCYnrVzUVKSID50u0Rpb bRoWyi2mgqSQX2a0NapSf85lgB+JX0O7d94WYoke4ODu5cpGLhV/P3wmlKL6Jin2PsaB N2zRpJKMAW6PHtwLit+2iyjoJp72S0NvgPUvA1Lzb7pV6eFpjWlSfC2EUGKrCZ8n2TfX LKcb+5NKOC9dCWTll7f2AerM54K4cT0Fk0t+QKTagl+NMNy8zAI9ICqU7u2pbYc6y5nJ aL85gaaONa10P2VhYA5ZCe65F5uBw3S+8ZzeX4tsV8aBc7BWNM6JfLkx6QyW0f70lAoc h9uA== X-Gm-Message-State: AOAM530VImE6vuawmY7TNYX/RZ5AiJJvVqhmLNjMs008HB/YaQ9E7Q71 e6Jz1SuikN/+sjvCZY72v3D7i4EOgw8= Sender: "badhri via sendgmr" X-Received: from badhri.mtv.corp.google.com ([2620:15c:211:1:f292:1cff:fee0:66cf]) (user=badhri job=sendgmr) by 2002:a25:d45:: with SMTP id 66mr3316010ybn.231.1601347240323; Mon, 28 Sep 2020 19:40:40 -0700 (PDT) Date: Mon, 28 Sep 2020 19:40:04 -0700 In-Reply-To: <20200929024004.244992-1-badhri@google.com> Message-Id: <20200929024004.244992-16-badhri@google.com> Mime-Version: 1.0 References: <20200929024004.244992-1-badhri@google.com> X-Mailer: git-send-email 2.28.0.709.gb0816b6eb0-goog Subject: [PATCH v9 15/15] usb: typec: tcpci_maxim: Enable auto discharge disconnect From: Badhri Jagan Sridharan To: Guenter Roeck , Heikki Krogerus , Greg Kroah-Hartman , Rob Herring , Lee Jones , Mark Brown , Maxime Ripard , Alexandre Belloni , Thierry Reding , Prashant Malani , Badhri Jagan Sridharan Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enable auto discharge disconnect for Maxim TCPC. Signed-off-by: Badhri Jagan Sridharan --- Changes since v1: - Changing patch version to v6 to fix version number confusion. Changes since v6: - Rebase on usb-next. Changes since v7: - Heikki's suggestion: Moved the actual write of TCPC_VBUS_SINK_DISCONNECT_THRES register to tcpci code. Changes since v8: - Moved the logic to program the default values of TCPC_VBUS_SINK_DISCONNECT_THRESH into the tcpci code. --- drivers/usb/typec/tcpm/tcpci_maxim.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c b/drivers/usb/typec/tcpm/tcpci_maxim.c index 43dcad95e897..55dea33387ec 100644 --- a/drivers/usb/typec/tcpm/tcpci_maxim.c +++ b/drivers/usb/typec/tcpm/tcpci_maxim.c @@ -441,6 +441,7 @@ static int max_tcpci_probe(struct i2c_client *client, const struct i2c_device_id chip->data.TX_BUF_BYTE_x_hidden = true; chip->data.init = tcpci_init; chip->data.frs_sourcing_vbus = max_tcpci_frs_sourcing_vbus; + chip->data.auto_discharge_disconnect = true; max_tcpci_init_regs(chip); chip->tcpci = tcpci_register_port(chip->dev, &chip->data); -- 2.28.0.709.gb0816b6eb0-goog