Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1070585pxb; Thu, 5 Nov 2020 23:24:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJyh+FAxjWdaeRKFj0Ccyiz2IASZ7edFJnrvCxJmAj/iQ9fe4Xpnm64RjI+FmNLm+N2KorZe X-Received: by 2002:aa7:d615:: with SMTP id c21mr693750edr.23.1604647457162; Thu, 05 Nov 2020 23:24:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604647457; cv=none; d=google.com; s=arc-20160816; b=njMokqFBn6YoFPAu2FeCykgfefo4JlLuDKFbAP2eBjOAkOIrQl72bz6HU62x3lVRM7 EndFPo8dmnz5WRvIxWGqV3XxJ7bZw1z/BXFGm9fUa/CyEo6SdyiyYtLIIuyYVFlahYMS gNDCM5QszF7nzgbVrWc4HGHB0FxOevz5sA31FyaY92K+5PlSXLbErrM/+fOc3gbUzSNj qHoll5GrjcfBHXg2/u7XYeL5RP7VFr4c3pEDkEPtEj2oa4r37lfkUWXGgVRO1wl4z44I RHrq4FuJVF+9OiFbX/j72JHamX3n4qVk/uLqxp/DZpmp9ZnX1Kjl1SMemqR1qlHXC6O/ LZ0w== 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=ZzT/iFsAWDHHcdYtAE2z3YMxPScyeUKx0zYHORd4PMs=; b=wWL8OGH8MnpqUGBKL1gLvYzoZ/NNOcFZJttVnmn2osK9aGi2sal4WEYjrn+Ss8OLYb p1o6h5DcvLtqo7jUV53z13o8Nr0PqcEpsWJ8tRORBy7iwW3hZFLyX89fmV899UC1Syrh NU7OQIwGs4IqiAg80eyl/AJo3XrS1WVpITqrscTVWIqdv2bv2qz5r4n+KPiNG8W6ZaYV MNWRbnhkzdIlNfLd6MxstGErwQCyrYLFmgDSmatUdMJahGZoXKh0N5vWUvgI90GHa5U7 zYWZZTEaZ6PBlqd2UDSqMb5d45PcL3cCYI4/YIxSJKBSoSLJY7+7jgpV7C4F4TIaWI2R 74aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oskLS4mX; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a15si284854eju.273.2020.11.05.23.23.54; Thu, 05 Nov 2020 23:24:17 -0800 (PST) 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=@kernel.org header.s=default header.b=oskLS4mX; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726320AbgKFHUO (ORCPT + 99 others); Fri, 6 Nov 2020 02:20:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:45220 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbgKFHUN (ORCPT ); Fri, 6 Nov 2020 02:20:13 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 71421208FE; Fri, 6 Nov 2020 07:20:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604647213; bh=oiuaCuXvu3qqgBIhoDXutO+WSl9oQyHg8DPg/SV087A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oskLS4mXxC0RDgG0I5FjO85p80ZgUZ0104BLORszrRsPkyXTFbXfPtFkVV6Q3WogZ n0gnUGzwZkHpBQi4pm56evnqzsFrDrVv8Sl8tRzi4FA8NNGDSmdr0rPofShS6xUaF0 KjcSF0SAixPF59HJ+J1K0Y7coyUpqlAw50jmIRs0= Date: Fri, 6 Nov 2020 08:20:59 +0100 From: Greg Kroah-Hartman To: Prashant Malani Cc: linux-kernel@vger.kernel.org, heikki.krogerus@linux.intel.com, dzigterman@chromium.org, alevkoy@chromium.org, Benson Leung , Enric Balletbo i Serra , Guenter Roeck Subject: Re: [PATCH 6/6] platform/chrome: cros_ec_typec: Store cable plug type Message-ID: <20201106072059.GA2614221@kroah.com> References: <20201106012758.525472-1-pmalani@chromium.org> <20201106012758.525472-7-pmalani@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201106012758.525472-7-pmalani@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 05, 2020 at 05:28:03PM -0800, Prashant Malani wrote: > Use the PD VDO Type C cable plug type macro to retrieve and store the > cable plug type in the cable descriptor. > > Cc: Heikki Krogerus > Cc: Greg Kroah-Hartman > Signed-off-by: Prashant Malani > --- > drivers/platform/chrome/cros_ec_typec.c | 21 ++++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) Where are the first 5 patches in this series? > > diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c > index 5e7f0b4ebbec..0a2a8b0f8115 100644 > --- a/drivers/platform/chrome/cros_ec_typec.c > +++ b/drivers/platform/chrome/cros_ec_typec.c > @@ -709,6 +709,7 @@ static int cros_typec_handle_sop_prime_disc(struct cros_typec_data *typec, int p > .port = port_num, > .partner_type = TYPEC_PARTNER_SOP_PRIME, > }; > + uint32_t cable_plug_type; u32 please, this isn't userspace code :) > int ret = 0; > > memset(disc, 0, EC_PROTO2_MAX_RESPONSE_SIZE); > @@ -722,8 +723,26 @@ static int cros_typec_handle_sop_prime_disc(struct cros_typec_data *typec, int p > /* Parse the PD identity data, even if only 0s were returned. */ > cros_typec_parse_pd_identity(&port->c_identity, disc); > > - if (disc->identity_count != 0) > + if (disc->identity_count != 0) { > + cable_plug_type = VDO_TYPEC_CABLE_TYPE(port->c_identity.vdo[0]); > + switch (cable_plug_type) { > + case CABLE_ATYPE: > + desc.type = USB_PLUG_TYPE_A; > + break; > + case CABLE_BTYPE: > + desc.type = USB_PLUG_TYPE_B; > + break; > + case CABLE_CTYPE: > + desc.type = USB_PLUG_TYPE_C; > + break; > + case CABLE_CAPTIVE: > + desc.type = USB_PLUG_CAPTIVE; > + break; > + default: > + desc.type = USB_PLUG_NONE; > + } > desc.active = PD_IDH_PTYPE(port->c_identity.id_header) == IDH_PTYPE_ACABLE; > + } So you save it but what happens with the value? confused, greg k-h