Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp94378rdh; Sat, 23 Sep 2023 03:01:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IERryg53f32UDBUFXRvbVpU1iaRldB50J/bI/VwCV1cROqraOcIZOqRkvuaweQXTZJJ3IpF X-Received: by 2002:a05:6358:c1d:b0:132:ce36:ee31 with SMTP id f29-20020a0563580c1d00b00132ce36ee31mr2596014rwj.6.1695463314554; Sat, 23 Sep 2023 03:01:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695463314; cv=none; d=google.com; s=arc-20160816; b=IVngU29OSYkln2yNeOG2YyOP9XEf4q5enNJR3+8GkQ77ygA6koZY8bf3EpLWhMmiWW dmGwfElpMr9i2sOp6qscSe8F3CEFW4uFlBG771EMvdOYayc4WPqPisoXjpLm18vdQw3W 6NpUvufYhz6kJ9M5RvSfkB6srPQd6OCUzZ7KnH7KDhc+eSzKRyxP11mxPKMzIahrU1Jp nmBLb0/nS8Ios11kb4JwBsBT1OvT1sTgp8TEWjbYgMMd2RiAe+caqwQgseUdzAHLiwnv dFIDetDm8W8tor74F3gC4Mk/U5QjLHR1Z2g6t2APXq75Uo/heLjZ9uJV3YnIovgyUdsy 6MYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fIRa+aj4f6v9xT4/WGZX0P0iihhQsW2AVKNBUDiG5uU=; fh=UDTK5wkdLkKA1RzU/KF6Y0FI+lzcfubocuuGO7tFl2w=; b=1KsjH2cJUaE/PBf1uPDUc+Cot3tibE22c8oEZNh1PA1WLfDmVwIcZwF6BmBu21mxDe hiXB3TRlEeaJ5QjRBQGsrA8NF1SLd99acQ1rNnDbbQFhNspEH8NaZ4jYyHV5ZpavdnJI CIqjKbLCsoPnAmaHweB37MG0Q+W3odWMsT2CWFwm3pvkhf4e/GZzdbb+/kQkj6xjwOJy VZFkD3GuvroRo10DogY7y8uFlkWdg0WsWuidvmrG6ImGac3nqfE0eseEbyMsgMloK2XO S6s9zVWaeQmlZrtc2tw/KzlGNBeJSqUNrPHMySGwA9ddQ8bMsOE89pfMxgy+7WSXeXgZ Zxbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MYYpMPRZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id h132-20020a636c8a000000b00564bcae8b53si5500795pgc.803.2023.09.23.03.01.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 03:01:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MYYpMPRZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 30186801D483; Sat, 23 Sep 2023 00:41:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230373AbjIWHlJ (ORCPT + 99 others); Sat, 23 Sep 2023 03:41:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230286AbjIWHkz (ORCPT ); Sat, 23 Sep 2023 03:40:55 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA3BF1B3; Sat, 23 Sep 2023 00:40:48 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-50317080342so5595594e87.2; Sat, 23 Sep 2023 00:40:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695454847; x=1696059647; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fIRa+aj4f6v9xT4/WGZX0P0iihhQsW2AVKNBUDiG5uU=; b=MYYpMPRZiVoeBElScU4kKrpREl/FqOginl6g4pK6qKf7bfJuatcSp8MPBhGwFoP2V7 AgB0PQhMD5kxqq+z/eT/wIW2JrOFlOBsTXgolyKIdmixI2GaOjJo/6uBcb6K5fweT/ph 61H+zvszAZE2/u5gBDjC2jFVTKYLVPCeaCclMaPmpfEhgZcY5IDozNkDH4ZOKHn7+G8R HvIOtFWCltyBTHUBaoiYU2d+J+IDrG/pihzHF+oxVyXQlKWFnFiq8EasdIalsQHEOOat wAwF9MLxB7rmfKdDzihqRVyEP1nnQgSTIoYGy9spx1LaZu5jWKLsCstS254iUMjdemFN 7stQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695454847; x=1696059647; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fIRa+aj4f6v9xT4/WGZX0P0iihhQsW2AVKNBUDiG5uU=; b=F4kqxuW1Xqkd4nsfl7MuHzQcmVBlCVa0mRMEUrRBaooiqLIIf2G2Chfd7XV1+KVPVU EPOokPxnRz+YFOoCRYTfB41DYVANKgKxqZTL82uF13BpmwKmfaf3uiooeIF1nmbuWnTT 3Q4hBuQGy/5LO6G2riOXQkaoX1mdeeYuEcjd+e5mqfXBv/mepUHFKgF9kse66T72SJlQ Z3foPGT3a7G6Kf8K1Syi6mhD8xXhWw7E4rw0+LRkiJezHG7ldboGmsNMBbWVHQ/O7yzb A6Mo3WU8rUYV+LHwTKcg9I3P8l2XJGBpCAzNreQIFwAaTWuPrPO21UbrNsW6R1R2rXuJ BmMg== X-Gm-Message-State: AOJu0YzYxeHcAjGJF13nBIsZGZFoPSbNFbXVAKWxd7Wpi1/MaGHl0BFs eiRvU8y70dSdkmHJAKwX+Jo= X-Received: by 2002:a19:6506:0:b0:503:1bb0:a658 with SMTP id z6-20020a196506000000b005031bb0a658mr1092532lfb.32.1695454846430; Sat, 23 Sep 2023 00:40:46 -0700 (PDT) Received: from primary.. ([213.139.62.222]) by smtp.gmail.com with ESMTPSA id k6-20020adfe3c6000000b003196e992567sm6236955wrm.115.2023.09.23.00.40.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 00:40:46 -0700 (PDT) From: Abdel Alkuor To: heikki.krogerus@linux.intel.com, krzysztof.kozlowski+dt@linaro.org, bryan.odonoghue@linaro.org Cc: gregkh@linuxfoundation.org, robh+dt@kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, conor+dt@kernel.org, ryan.eleceng@gmail.com, Abdel Alkuor Subject: [PATCH v6 07/14] USB: typec: Apply patch again after power resume Date: Sat, 23 Sep 2023 03:39:52 -0400 Message-Id: <20230923073959.86660-8-alkuor@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230923073959.86660-1-alkuor@gmail.com> References: <20230923073959.86660-1-alkuor@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 23 Sep 2023 00:41:09 -0700 (PDT) From: Abdel Alkuor TPS25750 PD controller might be powered off externally at power suspend, after resuming PD controller power back, apply the patch again. Signed-off-by: Abdel Alkuor --- Changes in v6: - Check tps25750 using is_compatiable device node Changes in v5: - Incorporating tps25750 into tps6598x driver drivers/usb/typec/tipd/core.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c index 148b237d0df5..d77481f78100 100644 --- a/drivers/usb/typec/tipd/core.c +++ b/drivers/usb/typec/tipd/core.c @@ -1192,6 +1192,18 @@ static int __maybe_unused tps6598x_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct tps6598x *tps = i2c_get_clientdata(client); + struct device_node *np = client->dev.of_node; + int ret; + + ret = tps6598x_check_mode(tps); + if (ret < 0) + return ret; + + if (of_device_is_compatible(np, "ti,tps25750") && ret == TPS_MODE_PTCH) { + ret = tps25750_apply_patch(tps); + if (ret) + return ret; + } if (tps->wakeup) { disable_irq_wake(client->irq); -- 2.34.1