Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp270196pxx; Thu, 29 Oct 2020 02:05:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxf6hGWMUjpejTtpDUPJXlcDKvgPH4qjvkcvD/UtH2/kXsU2igSDkqimMK2QW4dh1uW8t5F X-Received: by 2002:a17:906:b1d6:: with SMTP id bv22mr3019739ejb.60.1603962342438; Thu, 29 Oct 2020 02:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603962342; cv=none; d=google.com; s=arc-20160816; b=c0M3imgNH9LZgF9tV2bg6hDTdzsGYDP3lwNQOdvjYasArXJP8JV3AQZ5qYw1tK0aot It1kPrDkBqTw5kaQPKtww9s/KN+hwJbON/LL3x7TsGrvi6wVYuytvSLMYYcFOXL5m3U9 2cFkudA8Nbu7CGQg4eCb2/uhAIVYccBuLiet1f+s2lywkv7wM7cwMf17CjF5Zu/6GgDj 2tkvx3gw0/KXtmNKvOl8GVJrmmNAUpCGo8o8INxwOhLoHv1R5s8iDIN2Op7Y9MxmYw9a PrZ8OH2ABBGNS+EMsSy9dyYmTGp1Jg8MKqoB/we2c7Fb1WrTuRI49iPFPSX07/EkAZnK 5uZQ== 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=nKf3Z+mHk5cb7eZEN7fINMBopCuZqqVu3IaAlKIkeXs=; b=FPFA6InhrCrAcLhYYOPk774KWQqbi98bm47VtwoWMCqGio0JWQIwYosbGx5NKX8RQN oTigbcr7wKFoW1WUEVpobLoN5ZgxJlOgQRRm5sTeuUj2NoCC6BirSULvFbdUupN18Y8g 6LWmIO8PZY4/dE09EjVi/SQU+yDeXcCNsxeAd43n40+SNVPOlAD8VdTMwiPLVB4T4qZB 57GMMFxpe1U+nwhecLVBAlDbFnT4Hqe6Iz2WXYQ5ye2PUxL2tCHyOwBLWdIkOy2VeM1J iKXqlEpLPIeDicnImZEOOuyOPvCyEbmpsIahx4UNtrOseroOAgCHvXoCRKSLilvzMvyr bmIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=t9HiEqZt; 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 h10si1265999eji.627.2020.10.29.02.05.20; Thu, 29 Oct 2020 02:05:42 -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=t9HiEqZt; 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 S1727008AbgJ2H5d (ORCPT + 99 others); Thu, 29 Oct 2020 03:57:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726996AbgJ2HYj (ORCPT ); Thu, 29 Oct 2020 03:24:39 -0400 Received: from mail-qk1-x74a.google.com (mail-qk1-x74a.google.com [IPv6:2607:f8b0:4864:20::74a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B85FC05BD31 for ; Wed, 28 Oct 2020 23:32:03 -0700 (PDT) Received: by mail-qk1-x74a.google.com with SMTP id f9so1199204qkg.13 for ; Wed, 28 Oct 2020 23:32:03 -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=nKf3Z+mHk5cb7eZEN7fINMBopCuZqqVu3IaAlKIkeXs=; b=t9HiEqZt/3f3GeXjkmaqsb5El/ycYKoWr3IyT4FWs2UOLroNgdHLtnfC7ykWTlv075 q46OI5gr/9GMull6zNFeXZGP1o6Y6jNwnXvw8ztnKOj4WWPeaIfZS9t1QkOu9DEnXZ+W Z8d3SR8X4NfBWwlVm/1JWG0H68PYCT0itGVReoNmFa3YhnKHHK4nabJeZM3wYU7tGYwu 6EtX+jS/hE+KIT6wY922SBz3f8L0IFgBH1CtJZ04F3oNdD7zrW9pC8BMS6cwTrd+H3R8 niWGehsFtUK1JikTzIAFIVJ31QXj1C2AFSxMqrjkCr2xarete3AVXJHfeEgwuVIaneip FEyg== 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=nKf3Z+mHk5cb7eZEN7fINMBopCuZqqVu3IaAlKIkeXs=; b=NBlJZfFDDmopb7/u8WKgJWsZdpEAGxxd9mf4um2oOHRRVQKYUXm+MoyPSY6ffzRGXi t8g1ISaescBhSuGlQg0asVyIFqsh4WS+CiLqAtYNRP1VoYpTM3n8L9Lb5RwXlJPq7rHk 6DFUwLXLdbue+eSntvrBapm9gVl282hfcuwIo76sTct2C3vFtD+RGJd+7bzUyNwFT60t pLacpLg7OVkcdtCCbxGD6+O/68njNFfGHWM8nmNNzoTVaVS+nm+rM0nYgRy25+6y97b8 zcwkXUN3SSLb0f7xcReEki9Y+Cl1nx9snldxNssz3X4uR5E5mf28v9uBnO4DAOezEdcX A8Hg== X-Gm-Message-State: AOAM5308mQiOxO7ubsHvStTMkUo68GZDLGJK9+3I+Am06iV8gxvWcAoS U9utA8xuXhY1FEhSQVe6OUzM64G97dA= Sender: "badhri via sendgmr" X-Received: from badhri.mtv.corp.google.com ([2620:15c:211:201:f292:1cff:fee0:66cf]) (user=badhri job=sendgmr) by 2002:a0c:cc88:: with SMTP id f8mr2862585qvl.27.1603953122731; Wed, 28 Oct 2020 23:32:02 -0700 (PDT) Date: Wed, 28 Oct 2020 23:31:37 -0700 In-Reply-To: <20201029063138.1429760-1-badhri@google.com> Message-Id: <20201029063138.1429760-10-badhri@google.com> Mime-Version: 1.0 References: <20201029063138.1429760-1-badhri@google.com> X-Mailer: git-send-email 2.29.1.341.ge80a0c044ae-goog Subject: [PATCH v12 09/10] 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 , Dan Carpenter 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 Reviewed-by: Heikki Krogerus --- 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. Changes since v9: - none. Changes since v10: -Added Reviewed-by: Heikki Krogerus Changes since v11: none --- 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 dd6171604362..536df4a7901a 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.29.1.341.ge80a0c044ae-goog