Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1765397rdb; Mon, 2 Oct 2023 23:21:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFtsq7rr5m73WUD0znFjoR88h4ZsuRksqp1lB8K+FTM8p1gqnl5WLoZ4JfPZbGoQH6iSW16 X-Received: by 2002:a17:902:7246:b0:1bd:d6b5:a54f with SMTP id c6-20020a170902724600b001bdd6b5a54fmr12158388pll.55.1696314104884; Mon, 02 Oct 2023 23:21:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696314104; cv=none; d=google.com; s=arc-20160816; b=Va5m8ak2Q2Goq3l2++QgAjvs7WQYhr1WW45xyGRvSXhE6r0/5A+moLZAll2G1yq0he y1sKfbvQs0iETvJ+oEEtX8B2OhY8jCgFkOeK6z0xogd2sx5pCF6bx1iX3WuRaBmCqXHV WyBN2b29dxFjZBgOdflsNwKh/EIfFh8wEYyCVu9CuG2e/Wh7Ow9qKoiro2d8nfMiMH6F 2zJckdxwFimN2qKjUSZ9pnu2NoRYPCtOEC03h1EbDCBn/9OnMRCglSfslYsgWKDiYEIJ PmO00WAx5x5Fn1RkmfJx/ZR9hCca+1m4+/d1tVlL4LA4BnOKzkj6iN8RGd6PNTilTwox S/1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=AEmo/+VJwyulcOCMGOV0gnfuWt3G4epFWbA/RUJLtHs=; fh=4FTxD8y/AkqrxGSds7He/tgcu1K8JroTMbxcGH2DVaw=; b=mDlCImZV70X5DQAyP6Vd3vRewq4nB837ungYlbNSMki1lNhS3oBeI65GeIIwKNJP36 x6mQGSjVCuP7141mxE7FKrIaIkizOuIMMg5Rnn7Wl/gvraZKEPIIa1IGhupLvM5/9KwE 2WinMTmQuglB8X4pIhD520KeisXt1QkPO5pomgJm2kTIPFTB/5ctg93WW3RCC+cfV6iG 5Y/KtAbLZviLhxkO44Kp2Fp4Jjiuhx2swecwNooODnPm2i+peyLrtDvR4sNpib+u9dTF gGWgxlKbc5Fa1UzBCuZzS1d5HU3IivASXnHnxKNe/QU9/XtvYFIcaOGRvQlGOyKzTmbc lSvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=A9KtoCkT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id t6-20020a170902e84600b001b80ecdcb88si766753plg.473.2023.10.02.23.21.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 23:21:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=A9KtoCkT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 7EBFA8029235; Mon, 2 Oct 2023 23:21:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230235AbjJCGVS (ORCPT + 99 others); Tue, 3 Oct 2023 02:21:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230229AbjJCGVR (ORCPT ); Tue, 3 Oct 2023 02:21:17 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AE8DCE; Mon, 2 Oct 2023 23:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696314073; x=1727850073; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=aZY00p5Zs6evElTgNGG3NrD4dyDiLSahudswiJ1LeXk=; b=A9KtoCkT/hQw6Do0WapGZOfmqUQA29KiucFV902C3OI51Xf1wJnWOeCV Vy2+q8FMyghdMyJOM1mXxU86t4Q3x2IipAjenVAm7YLQDlxyauh7ymwKz EsoXjJotYI7TTD6rH3DP9jhX4784Fq5YpObtiz5z90PGu1OYaXMZi79jK ZdN4PMYMWIJ9BtyP8qaABdB7WsTad+scvRoAIw0rq2OcO9KLQyhg12OV5 WucwCHjrETlDMWELH67Fa542Ci4z/uly4GvJErqbFJvfXypsC9FV6E/C5 9yNeh7WpOKxM5TmBeq56gDZMvLPP0oP5EhrAzuIHDPqh2lBqQNSAYbGBI A==; X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="380079960" X-IronPort-AV: E=Sophos;i="6.03,196,1694761200"; d="scan'208";a="380079960" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2023 23:21:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="1081895650" X-IronPort-AV: E=Sophos;i="6.03,196,1694761200"; d="scan'208";a="1081895650" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmsmga005.fm.intel.com with SMTP; 02 Oct 2023 23:21:08 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Tue, 03 Oct 2023 09:21:08 +0300 Date: Tue, 3 Oct 2023 09:21:08 +0300 From: Heikki Krogerus To: Abdel Alkuor Cc: krzysztof.kozlowski+dt@linaro.org, bryan.odonoghue@linaro.org, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, ryan.eleceng@gmail.com, robh+dt@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org, Abdel Alkuor Subject: Re: [PATCH v9 07/14] USB: typec: tps6598x: Apply patch again after power resume Message-ID: References: <20231001081134.37101-1-alkuor@gmail.com> <20231001081134.37101-8-alkuor@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231001081134.37101-8-alkuor@gmail.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Mon, 02 Oct 2023 23:21:40 -0700 (PDT) On Sun, Oct 01, 2023 at 04:11:27AM -0400, Abdel Alkuor wrote: > 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 This one looks also like something that should be part of the patch 4. My concern is that with these separated features you are creating points into the kernel git tree where TPS25750 is enabled, but it's not fully functional, or even broken in scenarious like this (suspend/resume). You can't do that unless you have some really good reason. Since all of these add only a bit of code each, I think it would be better to just merge these into the initial patch that enabled TPS25750 - so I belive patch 4/14. > --- > Changes in v9: > - No changes > Changes in v8: > - Use device_is_compatible instead of of_device_is_compatible > Changes in v7: > - Add driver name to commit subject > Changes in v6: > - Check tps25750 using is_compatiable device node > Changes in v5: > - Incorporating tps25750 into tps6598x driver > drivers/usb/typec/tipd/core.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c > index 2598433a69cf..32e42798688f 100644 > --- a/drivers/usb/typec/tipd/core.c > +++ b/drivers/usb/typec/tipd/core.c > @@ -1203,6 +1203,17 @@ static int __maybe_unused tps6598x_resume(struct device *dev) > { > struct i2c_client *client = to_i2c_client(dev); > struct tps6598x *tps = i2c_get_clientdata(client); > + int ret; > + > + ret = tps6598x_check_mode(tps); > + if (ret < 0) > + return ret; > + > + if (device_is_compatible(tps->dev, "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 -- heikki