Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3056170ybd; Fri, 28 Jun 2019 02:03:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+A0NwlEm5GAt+09Q6Q1PPGrTo5mtkwA2Qu8Hiig8np5lPZJLlnQuv1a7ABEiR8FZIi3gg X-Received: by 2002:a17:902:2983:: with SMTP id h3mr10311509plb.45.1561712594588; Fri, 28 Jun 2019 02:03:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561712594; cv=none; d=google.com; s=arc-20160816; b=0yDUycfFN2gOCrI/jXuyenOjQnnGPKmSj8umDz4sUeiD+mR9oP3Xg+YRecD2Plj0Rf MvRV3bYarjPUrCVrPbgQFCxuQAjZTPfcEprlZOfBiBZsmrQvuE/NB7x1Lg0XERISvshO z/sWELgmyhh2RrGy7dseqrszpGNSPkCTb7G4ZMenp8cV1drCnajq1Q5aHYJ0Fd4YpZlR M+SKWEo+/32XDv6N+322l8bHwnM+IBhBwfcFIrQ3wxn6QNyNXIQV3Q38HWeeUSs+qNYr pLmNBzvu7d8OO0GQnJ6pjC8woYlIeSlebE3VgeU9HTqDklvEQ1B1Bcwd32Wx0ofzOsOK RCmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=rJU/X2pQw+qmxPWbSvDhlAOp3VgZjiEG4VvB/M97Zxw=; b=uJ4uWdGm/29MFTAgPRqw8HrqGMaRwJusMnDKP5dCFHCfyMdHOwzA1itBHazutvBwT7 pKZIZWJGKqU82leTI0rdMJNpeRGfvEEgLZXWczUzMtT7P37JbvKZ9C0mQ7dpkbBqOANq dqqtWqm9BSkcysovFS5qoLw8aXCnS1MdWX40xTmUr8Hs0BHMUj8cNdVXulGIeddljDmV BxEZQdWw7QdW+Z3VTzWIL14CGBVVpwr1hWKNU9+b4lzyrh3RGHpMMfQohaI9RVtH4eCV M01NmGYjy7XFv03LH34wZZrq6gb7FF/JMe8bSmlxWtHUh2oE20xu8r6c//+eCrmeFakF Hu1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1si1576373pgc.130.2019.06.28.02.02.57; Fri, 28 Jun 2019 02:03:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726618AbfF1JBX (ORCPT + 99 others); Fri, 28 Jun 2019 05:01:23 -0400 Received: from mail.steuer-voss.de ([85.183.69.95]:40954 "EHLO mail.steuer-voss.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726520AbfF1JBX (ORCPT ); Fri, 28 Jun 2019 05:01:23 -0400 X-Virus-Scanned: Debian amavisd-new at mail.steuer-voss.de Received: from pc-niv.weinmann.com (localhost [127.0.0.1]) by mail.steuer-voss.de (Postfix) with ESMTP id B9C964B8A3; Fri, 28 Jun 2019 11:01:20 +0200 (CEST) From: Nikolaus Voss To: Heikki Krogerus , Greg Kroah-Hartman Cc: Nikolaus Voss , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, nv@vosn.de Subject: [PATCH 1/2] drivers/usb/typec/tps6598x.c: fix portinfo width Date: Fri, 28 Jun 2019 11:01:08 +0200 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190628083417.GA21701@kuha.fi.intel.com> References: <20190628083417.GA21701@kuha.fi.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Portinfo bit field is 3 bits wide, not 2 bits. This led to a wrong driver configuration for some tps6598x configurations. Fixes: 0a4c005bd171 ("usb: typec: driver for TI TPS6598x USB Power Delivery controllers") Signed-off-by: Nikolaus Voss --- drivers/usb/typec/tps6598x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/tps6598x.c b/drivers/usb/typec/tps6598x.c index c674abe3cf99..a170c49c2542 100644 --- a/drivers/usb/typec/tps6598x.c +++ b/drivers/usb/typec/tps6598x.c @@ -41,7 +41,7 @@ #define TPS_STATUS_VCONN(s) (!!((s) & BIT(7))) /* TPS_REG_SYSTEM_CONF bits */ -#define TPS_SYSCONF_PORTINFO(c) ((c) & 3) +#define TPS_SYSCONF_PORTINFO(c) ((c) & 7) enum { TPS_PORTINFO_SINK, -- 2.17.1