Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1131118pxb; Fri, 6 Nov 2020 01:36:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4a1I8BrOHlX1S262W7Kne6L76ZZgLsTVPVMb5yT14bjFv9qxpRHzgMaLGax4A+7AGJ++4 X-Received: by 2002:a50:f68b:: with SMTP id d11mr1142311edn.64.1604655370813; Fri, 06 Nov 2020 01:36:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604655370; cv=none; d=google.com; s=arc-20160816; b=sYOBodLc9fRWOjBw0+gsGyMa5jlTFWkBG2v7dg9vziEnIKlds2LqjmfyhykTmjOj48 Eur1c874KYc2hQ4Z2my5VzQff3WMcVcyqASbeKXC64I4+YuX/lj4b2BlKyIQFqBxDpf/ I/zyd8iIatYybAbCzwQn5cbvfd4ym9/xyyAbflDMvl1kL5muZN1i25xb/gq35AA91X+k OeMus92a8sy278i6kIWd4zqme9H43BjntrqyddCPwmBdvARZxzdi6qfSK4OhmmasT4Bq 9cDhp7+a5uy42VF800oMTV3oLy5M8ch0+6f07J+vIovx7LpyVIqOo0vr87REEqPrC636 pj1Q== 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=iwKZAPgr32SkRJc7gkftWmK8HE3YZ+MLeLgQ+L671/U=; b=M9kJAb4kPcuzB/6YgzUBfYwFhESi5zhFQeGi2VP3CRMone6IF72QRkxSPHkdHvgG9z R3JUVefq5gdLc2XoyjkdsvgS0LKkpuQvajo1y/5/bq/xugk3C16c3jPSwtIELqR3LwJd /B6mvoQa86OekhlbCQpZ5/uSDMvWAgr1H+LxUhhw9k8lX+vt3atRN7fmJcgV0EgdwwoN EW9ylLqizcw7i5FjaOFDjGG9ApUDOWK/TXswpkEN3AwBJ+itTew9yMtzeK4U8oP9tWxD S/gyd/ivGSHCCQoBlEuMQknLWLw0v6ds/exqMzBocs1QgTTdWHGXRgRvFMIEoQ2dMSXq oi2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=m1z2eGyt; 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 n9si485277ejo.640.2020.11.06.01.35.47; Fri, 06 Nov 2020 01:36:10 -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=m1z2eGyt; 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 S1726321AbgKFJcS (ORCPT + 99 others); Fri, 6 Nov 2020 04:32:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:55362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725868AbgKFJcR (ORCPT ); Fri, 6 Nov 2020 04:32:17 -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 DDFDA208FE; Fri, 6 Nov 2020 09:32:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604655136; bh=APtJwohAbN+6CTsQmtP1kYmsrkXqvgwwj9Pp9GfosC4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=m1z2eGytUx2lbJtJgUYv7To2ycNreIRCjjIRvlqdXj6TZYX3a1Ik/A7KCGAR+ISHR 2nx25jzRJg3R5LWWug13LPbyW9SFBNoaudKZtlazpm8v912BcXzOWZOGqkGr2k0yFs oc6WGdhteLJTBQTCZwYmsS2ZzRopt64My7v9/DJI= Date: Fri, 6 Nov 2020 10:33:02 +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: <20201106093302.GA2637814@kroah.com> References: <20201106012758.525472-1-pmalani@chromium.org> <20201106012758.525472-7-pmalani@chromium.org> <20201106072059.GA2614221@kroah.com> <20201106085907.GA823981@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201106085907.GA823981@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 06, 2020 at 12:59:07AM -0800, Prashant Malani wrote: > Hi Greg, > > Thanks for looking at the patch. > > On Fri, Nov 06, 2020 at 08:20:59AM +0100, Greg Kroah-Hartman wrote: > > 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? > > I believe I'd cc-ed you (and linux-usb) on the following patches in the > series(modified git_cc[1] which adds individual patch get_maintainers.pl to the cover > letter, patch 1 and patch 2): > cover letter: > https://lore.kernel.org/lkml/20201106012758.525472-1-pmalani@chromium.org/ > patch 1/6 (cros-ec-typec cleanup): > https://lore.kernel.org/lkml/20201106012758.525472-2-pmalani@chromium.org/ > patch 2/6 (cros-ec-typec cleanup): > https://lore.kernel.org/lkml/20201106012758.525472-2-pmalani@chromium.org/ > patch 5/6 (PD VDO header patch): > https://lore.kernel.org/lkml/20201106012758.525472-6-pmalani@chromium.org/ > patch 6/6 (this patch): > https://lore.kernel.org/lkml/20201106012758.525472-7-pmalani@chromium.org/ > > Did you not receive these? Ah, I got 1, 2, and 5, and now 6. That's confusing, think about if you were to receive such a series, what would you think to do with it? > > > 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 :) > > Will fix this in the next version. > > > > > 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? > > The type C connector class framework exposes it via syfs to user-space when we > register the cable via typec_register_cable() in patch 4/6 [2]. So you added a new sysfs file and api without updating Documentation/ABI/? That's not good :( > I'll go ahead and CC > you and linux-usb on the entire series for the next version. Please do, thanks! greg k-h