Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3928790pxu; Tue, 20 Oct 2020 04:24:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5BTYskgH9YFx0jFIytxT3I7Tq83/zuYV7O59THmAR9tA/tW7bfFfN0GHrKeiFmExOz3SR X-Received: by 2002:a17:906:c186:: with SMTP id g6mr2486354ejz.465.1603193040485; Tue, 20 Oct 2020 04:24:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603193040; cv=none; d=google.com; s=arc-20160816; b=uQ2g3agobnuq+ozwIzMMoMc/WJYzDuR/dCnWGVrw/pajknf2PzIQjk1i6rhvArAV9H noXY6SaB/uXbSseQLNO5iukvOSw8B1rRu1Uq+FFSfqZIfwlosaO/b4FRXbIWyACVZiuF KuoPrUrCQ1eFu/+bLfl7ldLgcJRbA7/9fDthPmTaGo64nGK909P0uHDeo48iWKdjnQKP DnQ8R5Mev4ZH2RzKZ3XyW4+9Z2ATGtr8vtIB1W3Rgpj/4NRAqwv9G/b0WAa+tTFLKxT1 7g7HaW7w3KC8FaPcjUh9wInA0S5AHYIS7ir+lu1zMZQ7xulEMmiLqJma2FYT8sFHIKfq ROgQ== 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=r3JzWUNRrjq682a06yIScf4/krvhqrY6PtINhDvgCTc=; b=W/N9EvWt2cRgxZLZ/ppW0xbZ5/aTIehYzM8yiV481JNiT/M803Q+lIJyuGsg8nFJ/2 teiE2WlE7/yPeV7m6o5AmTnYh7oxcPX2PfOtqYvai01RdbMTYVg8TL0Xoq3ELQG5ggBP eZAa7GSw3ttr1mW2SmJ3/hypB9EABanem8OLFGxqZGGucFyDeI0RJrUZWlxOdhLqGYJU W3y55REPXfLZejr9dK1ye5FWLOLxSl4zl1Ud1bf/pBzQT4/MWQ6JnnFWu6M1+p2TAu9G 2ZGqNI3EsRvDY3BW7RFQldgqGNjL2iI9kJp+K68fTu8W36wuA2g6b7ySega+8bF/u4u5 uEyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=jNnueWZg; 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 nz21si1068182ejb.179.2020.10.20.04.23.38; Tue, 20 Oct 2020 04:24:00 -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=jNnueWZg; 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 S2405764AbgJTJg5 (ORCPT + 99 others); Tue, 20 Oct 2020 05:36:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405753AbgJTJgy (ORCPT ); Tue, 20 Oct 2020 05:36:54 -0400 Received: from mail-qv1-xf4a.google.com (mail-qv1-xf4a.google.com [IPv6:2607:f8b0:4864:20::f4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F37B9C061755 for ; Tue, 20 Oct 2020 02:36:52 -0700 (PDT) Received: by mail-qv1-xf4a.google.com with SMTP id m11so849299qvt.11 for ; Tue, 20 Oct 2020 02:36:52 -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=r3JzWUNRrjq682a06yIScf4/krvhqrY6PtINhDvgCTc=; b=jNnueWZgP0hwxnWozjesm/JVD1/uoPvY7/+6OPyoWzNYfPM2OBr5L3e30WeWbYkX7i g5KaYozep/eGB8kn6FkGQgfhEW1ZVoBhePHvWgCyNz9S641EGAWvL6FWQcDHO3VowqJ2 LztVnUlhG0N0EQvHQiu+K0mcFAqGDVfxJse0W3+Ie/bLP069GRglRfNS19znRj2pTKlC Uc0mn+mB3SVOOyNlm9mTCEwXTZtnEonhU0qh3QCbDXo5+uLbAxE2o/10xVhv+0zZ6LKb jl2K0KS+F8FYFA3TnRneZ1106cyvXXZawhde9BG2sKrq8xrl1WRZcUPKd90SPV3C/Viz 1QFA== 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=r3JzWUNRrjq682a06yIScf4/krvhqrY6PtINhDvgCTc=; b=eKAEObLHgkaslNnIENt7bREmrqeiyZz/1ygAXQJCrtJVpABWJyr3RyC1hsu1dcSi84 fzgpbz9IisVQXHQHFaVu2Z5W625FdbvVCfwiSvsERCXZfZRTaiXvoFj6V8WURzxzcBsW IyBYBGVsfG84JPMkCPgyIj8NZrCOV1wnKohI6mokBLGI90DNJOWMCbDeI5r1ht3dZSj2 RVAIKWWxcT1mQKCfsZcxCl2WRIWdAbmCtZAsJK2ZRj8v6Ne3BN3c3dk33iKrp81xO2f+ 1h6e9ASaACDG5MI/cjCRHM8QT9tL1mcpciYrxgbqqnDc09l2angrYP97NbswT+5hYFED r5Jw== X-Gm-Message-State: AOAM532Tal+NtA3tn50cqgoJqV6gvRFLjzqvBF8UsFcIe/CCR3KuN7ph alZZfXubmOJscoVd/3SwljJlNBCKVYM= 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:ad4:44a8:: with SMTP id n8mr2393037qvt.29.1603186612161; Tue, 20 Oct 2020 02:36:52 -0700 (PDT) Date: Tue, 20 Oct 2020 02:36:27 -0700 In-Reply-To: <20201020093627.256885-1-badhri@google.com> Message-Id: <20201020093627.256885-11-badhri@google.com> Mime-Version: 1.0 References: <20201020093627.256885-1-badhri@google.com> X-Mailer: git-send-email 2.29.0.rc1.297.gfa9743e501-goog Subject: [PATCH v11 10/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 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 --- 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 aa54b0cf7a64..3c6812daec3c 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.0.rc1.297.gfa9743e501-goog