Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp245670ybz; Tue, 28 Apr 2020 22:48:24 -0700 (PDT) X-Google-Smtp-Source: APiQypKGMD1VJ8/mSVD9BlIsKJAJAYt7WEG0N8MQEXPrhjAt4PYz5VAJUiOldkoaukmrRcQ9m6Gp X-Received: by 2002:a17:906:5e45:: with SMTP id b5mr1117452eju.0.1588139304424; Tue, 28 Apr 2020 22:48:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588139304; cv=none; d=google.com; s=arc-20160816; b=KO1uo5pC7fESJm08+vcyadxQRcp69i0/itjYo3NCbw2ya2OZ7WEj1ZyhKPhYpFoQIz NxosvJSrYjEwTpIiNawYqd6bgevYx3dFE4P4agjBopwZZvuKO8PoaUfAOAQgxWAcxSS/ vhtQJJl/TAiosIMuEHq2sl/I7rkKTwtCMyPjXGq2Lu0A7jDDxhR7B5EWYD55PAUn5bOe EG6ylSIsbQ1xA5LqmMoFcGNeL1AlWGfVVO2qpj6O6BGBtcGjJ+MFOc0zZdTlFQ0iG+EA F/MPcbDFlUKFP83EgfXsz+pO+ad5KZ//nPKfrKPni0c9KGlfg9uxHmtURQWl65wk0WtE NBeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=z6P3Px4RUsQGpCsP0tLcahroG5Q7PAYgk++UN9Efoaw=; b=fksxxf2I0L4A3h/3t3a4oid+fot+01GHcx371Vx7YY6xXtrV5tX6McwzYvjEtEfwd5 7J6yerZZ8EuPtE6Z+fC1poP7E0zN5O6cb+UbrKZQzCH0+o4Zocsv1k0kwc4DYJKsnTP/ 0uVKcWxMqaP0b9otUs+aE9dyJqA5Fwc+Kl90GYIl8QtksFKmoKNUgx66LII9AUOwVoV+ FtWBXN4qSudYeTbZONJWAp3j6dVL+ney8bqQHosOzwfhFmiHs4ioQ9eWaqlTGEwZEzxG tVqp7okNoLcl2rc7UViWV5bzoL6xTgXPJVU8RKNBlIpbvywdnAWnLqmoTZGyV9EisNmK HduQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=QKBgOWhX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w2si3070310ejq.225.2020.04.28.22.48.00; Tue, 28 Apr 2020 22:48:24 -0700 (PDT) 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=@chromium.org header.s=google header.b=QKBgOWhX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726556AbgD2FqO (ORCPT + 99 others); Wed, 29 Apr 2020 01:46:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725861AbgD2FqN (ORCPT ); Wed, 29 Apr 2020 01:46:13 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B22FFC03C1AD for ; Tue, 28 Apr 2020 22:46:12 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id 20so848765qkl.10 for ; Tue, 28 Apr 2020 22:46:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=z6P3Px4RUsQGpCsP0tLcahroG5Q7PAYgk++UN9Efoaw=; b=QKBgOWhXO0CGqmIPgmrY/waFwwJCD1tMEsHj/0+i4Yksqe4nRqI9ez82ompbl4Znkt R75KhHsT+uL4Mb/QXMcentByrET3RCOnXsUuIyfA0S0Q6cTjIqlSXYv+4O+StaNST7Sr ByBO3ho9QnYrSomRn0ge+mt3rNN9oM5M5WREw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=z6P3Px4RUsQGpCsP0tLcahroG5Q7PAYgk++UN9Efoaw=; b=ZTC6dZCHg/XJ9y/NvbsnOA/n5lWsH9+CrGqVjC69tFJrYVDqRfJPHreQR/4QXxbjqT UJswrXWTbB+cDqP72Nn1dTz9e+3Cv30gBdVdtAgayr8ZHrj34oG3FB/6il75uIZ/5eUx 4FrNQ8/jV0YID+a3VxLlQvpuGRYvS19CzYVg9YElarzgkFIwexXioNiecznu2U3A7d5b Rlj0E4oMoFCXFcs1w7dGGPdxnEkqXpbOKdR1guYeNGE7gLFKAjkKTnJmsimi013W/Kko fsQmnC33WU2+KPdAkCtkJ+PO/dRCOW5vBULtnICCbsb2RN6SPSzaMyVthrIo8oL9N5vc 8Owg== X-Gm-Message-State: AGi0PubinSYvUitmQZQBTC5KvvblDeemBgYu8YleTVitJDwZkQ2k0w1z 8vy+t4TVRbL5ODJoI0Xi7eyezFycZwI0VWNm7Nuc5pig X-Received: by 2002:a05:620a:7f6:: with SMTP id k22mr19884854qkk.180.1588139171615; Tue, 28 Apr 2020 22:46:11 -0700 (PDT) MIME-Version: 1.0 References: <20200429053319.113508-1-pmalani@chromium.org> In-Reply-To: <20200429053319.113508-1-pmalani@chromium.org> From: Prashant Malani Date: Tue, 28 Apr 2020 22:45:59 -0700 Message-ID: Subject: Re: [PATCH] usb: typec: mux: intel: Handle alt mode HPD_LVL To: Linux Kernel Mailing List Cc: Heikki Krogerus , Benson Leung , Greg Kroah-Hartman , "open list:USB TYPEC CLASS" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sorry, didn't compose the Commit message quite right, have sent out v2. Thanks, On Tue, Apr 28, 2020 at 10:34 PM Prashant Malani wro= te: > > According to the PMC Type C Subsystem (TCSS) Mux programming guide rev > 0.6, when a device is transitioning to DP Alternate Mode state, if the > HPD_LVL in the status update command VDO is set, the HPD_HIGH field in > the Alternate Mode request =E2=80=9Cmode_data=E2=80=9D field (bit 14) sho= uld also be > set. Ensure the bit is correctly handled while issuing the Alternate > Mode request. > > Signed-off-by: Prashant Malani > Fixes: 6701adfa9693 ("usb: typec: driver for Intel PMC mux control") > --- > drivers/usb/typec/mux/intel_pmc_mux.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c b/drivers/usb/typec/mu= x/intel_pmc_mux.c > index f5c5e0aef66f..c599112559e7 100644 > --- a/drivers/usb/typec/mux/intel_pmc_mux.c > +++ b/drivers/usb/typec/mux/intel_pmc_mux.c > @@ -157,6 +157,10 @@ pmc_usb_mux_dp(struct pmc_usb_port *port, struct typ= ec_mux_state *state) > req.mode_data |=3D (state->mode - TYPEC_STATE_MODAL) << > PMC_USB_ALTMODE_DP_MODE_SHIFT; > > + if (data->status & DP_STATUS_HPD_STATE) > + req.mode_data |=3D PMC_USB_DP_HPD_LVL << > + PMC_USB_ALTMODE_DP_MODE_SHIFT; > + > return pmc_usb_command(port, (void *)&req, sizeof(req)); > } > > -- > 2.26.2.303.gf8c07b1a785-goog >