Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7124071rwb; Wed, 23 Nov 2022 02:28:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf6kwmN/gd5UNaWdG8xgQ9eqZZbrGCFBdHlsqldrJPqVHsO4LbTL62UjyRHg172FsmuM0sCw X-Received: by 2002:a17:906:d8ad:b0:7ae:9187:eb70 with SMTP id qc13-20020a170906d8ad00b007ae9187eb70mr21852094ejb.533.1669199303288; Wed, 23 Nov 2022 02:28:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669199303; cv=none; d=google.com; s=arc-20160816; b=sGjTgQ5HMcvDGHxOffn5pz0E68ILwHW50QfKzN7bHrvpTSvcVje8RZDuRMexwiGpUU xIBMTytkHoJQI/yFJx1R7xCinzl/MIM9oRPBl4A9w8HmG6k3+OLgWOV8j+dfECKteZPi GRiPrjMC5AacQwOy7sSkloHMR4CUVWJDKxvFObs+BrYDkPnsanEZx5DQ7tIRJY4sBlKi Zr5aIcxhxAOo/lKtljkmcHvt6O4vZK4nJwcqycNULPL6gukPe/M9MuO3D0drZ3vJq0Ky 8Zwl9lvwgpTSSqwFWmQHvTWcTR6uf4B2B4+6zj4Lnz7bzCv7HZee5YnYVWpyKzfCnEZa VtLg== 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=iGUBtfSUkqIsWmAJ8gZ/MDc3NzvI7XGeWasmyOa7rew=; b=Y4q7nZApoR7sP9IVxP6s2Gb9kTao3FhZt2B5J395Kbzaqq1N6l/N9T3rhsY/xBV9nB H0M1pkGNOG9fcbSa1OsKL5E+m1r+trqokTNpInYUXBEjzGapYlIjmVH3CHSjcpTpjwUr V8Vm6CJkn3s/YZeY7Yg8k/0sp1FTFb8xmAe0oLowzy4jO9uQMoa1RgN3n2ajxJCTWkHN EbrFBM4OlBfstHIoVXRZS/99O8ES/W5D3ddnHCiFb3av29uh7GRO6vFcQYuMk/vwbQ6B MtsNFpIVHaajkQ1JWTiQ2QVkjyL6J/GgauqGXVmVsgkawkn+MSYr/UbqG+i43QKrFdoN uD0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YTXEX0gG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji15-20020a170907980f00b007acbaeed9besi15696279ejc.398.2022.11.23.02.28.02; Wed, 23 Nov 2022 02:28:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YTXEX0gG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236742AbiKWIzB (ORCPT + 88 others); Wed, 23 Nov 2022 03:55:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236260AbiKWIym (ORCPT ); Wed, 23 Nov 2022 03:54:42 -0500 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF492748FE; Wed, 23 Nov 2022 00:54:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669193681; x=1700729681; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=VZbmJPZfndM+pgDfB8pn/QDgWDK1DpcXGRSBx6vCr6Q=; b=YTXEX0gGuJhzf2zJ91kCh6AJjVMNaqAcFDat+JwdNAgcZqICbm47CqnF Bt06dva4MacwRb23vGzJtDplOKVG5Au9A2yi7TSQWk/48K6xuNgF6SuF1 e/4XHQmh//C8MYiqlPt44dWsiEAoKQuT8dualGeupjIdgMsTQq8vbzPj0 KyhjypFbEeYW0+KFBAIYPZD4iUqg9SC8ngxD9yBiGDUw62u364QqbkyqR JzFKZrNycWu/r33uC1tRD14aAOlYxNwnzHYTk1GwtE4smO/d0HjeljR61 4c+LcrjT79Nun8aAI0MwAjaYGApgXUHJEVu3Y/uOWo41JkOIL6ttcowKW Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10539"; a="293725710" X-IronPort-AV: E=Sophos;i="5.96,186,1665471600"; d="scan'208";a="293725710" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2022 00:54:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10539"; a="784161624" X-IronPort-AV: E=Sophos;i="5.96,186,1665471600"; d="scan'208";a="784161624" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmsmga001.fm.intel.com with SMTP; 23 Nov 2022 00:54:23 -0800 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Wed, 23 Nov 2022 10:54:23 +0200 Date: Wed, 23 Nov 2022 10:54:23 +0200 From: Heikki Krogerus To: Prashant Malani Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, chrome-platform@lists.linux.dev, Benson Leung , Greg Kroah-Hartman , Guenter Roeck Subject: Re: [PATCH v2 2/2] platform/chrome: cros_ec_typec: Set parent of partner PD object Message-ID: References: <20221122220538.2991775-1-pmalani@chromium.org> <20221122220538.2991775-3-pmalani@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221122220538.2991775-3-pmalani@chromium.org> X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE 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 On Tue, Nov 22, 2022 at 10:05:37PM +0000, Prashant Malani wrote: > In order to tell what Type-C device a PD object belongs to, its parent > needs to be set. Use the Type-C partner USB PD registration wrapper > to set the parent appropriately for PD objects which are created for > connected Type-C partners. > > Cc: Benson Leung > Cc: Heikki Krogerus > Signed-off-by: Prashant Malani Reviewed-by: Heikki Krogerus > --- > > Changes since v1: > - Use wrapper function introduced in Patch1 (v2). > - Update commit message to reflect that we are using the wrapper. > > drivers/platform/chrome/cros_ec_typec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c > index 2a7ff14dc37e..d5bc4021aca2 100644 > --- a/drivers/platform/chrome/cros_ec_typec.c > +++ b/drivers/platform/chrome/cros_ec_typec.c > @@ -968,7 +968,7 @@ static void cros_typec_register_partner_pdos(struct cros_typec_data *typec, > if (!resp->source_cap_count && !resp->sink_cap_count) > return; > > - port->partner_pd = usb_power_delivery_register(NULL, &desc); > + port->partner_pd = typec_partner_usb_power_delivery_register(port->partner, &desc); > if (IS_ERR(port->partner_pd)) { > dev_warn(typec->dev, "Failed to register partner PD device, port: %d\n", port_num); > return; thanks, -- heikki