From patchwork Wed May 15 12:03:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 16960 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 18F8E2396C for ; Wed, 15 May 2013 12:05:20 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id z6sf2405746yhz.11 for ; Wed, 15 May 2013 05:04:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=x82qUuFl1QFOcA7X3K6ep+K2G1GupaxORJaee6f2Z7E=; b=Y/reORQBjb8hOMzcgTNYq6BzqV9/BWbPY6BKLn9RQFpLzEdBkNZp7nZj6eGhQJRPwo qFS5EV3Q2GSjCbnN/p4Cmr34VqlIrDZjMbvKgZz9R8IlWARzZavCQUl7tUrQ7BL70ioO 7tK8irR9eXrO4fLfeDOYo184d7JWpEHaPtGxJSC65kyJ0RiLc+OZ73S5MkuJ7tW0VBFj M4CNgeyfXR7uNEVtI8/qKTt8MpPf2TZy2yOJCMJx1YbzCYz9aZQq4piKZvRyQlnlxgi5 B08c86Aqozjfrmqpzc76kmzj10AycipjfGPPrUCNUD4Tnnaityv0F/A3VSEPys/Jkky4 K2cg== X-Received: by 10.224.215.194 with SMTP id hf2mr23284943qab.0.1368619483223; Wed, 15 May 2013 05:04:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.107.105 with SMTP id hb9ls651835qeb.5.gmail; Wed, 15 May 2013 05:04:43 -0700 (PDT) X-Received: by 10.52.29.172 with SMTP id l12mr20871757vdh.47.1368619483086; Wed, 15 May 2013 05:04:43 -0700 (PDT) Received: from mail-vb0-x229.google.com (mail-vb0-x229.google.com [2607:f8b0:400c:c02::229]) by mx.google.com with ESMTPS id sa4si1260017vdc.10.2013.05.15.05.04.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 15 May 2013 05:04:43 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::229 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::229; Received: by mail-vb0-f41.google.com with SMTP id w8so361087vbf.14 for ; Wed, 15 May 2013 05:04:42 -0700 (PDT) X-Received: by 10.221.4.131 with SMTP id oc3mr2124835vcb.49.1368619482907; Wed, 15 May 2013 05:04:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.217.15 with SMTP id hk15csp16089vcb; Wed, 15 May 2013 05:04:42 -0700 (PDT) X-Received: by 10.194.80.170 with SMTP id s10mr3668388wjx.9.1368619481632; Wed, 15 May 2013 05:04:41 -0700 (PDT) Received: from mail-wg0-x22f.google.com (mail-wg0-x22f.google.com [2a00:1450:400c:c00::22f]) by mx.google.com with ESMTPS id wt5si650814wjb.164.2013.05.15.05.04.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 15 May 2013 05:04:41 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c00::22f is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) client-ip=2a00:1450:400c:c00::22f; Received: by mail-wg0-f47.google.com with SMTP id e11so1454107wgh.2 for ; Wed, 15 May 2013 05:04:41 -0700 (PDT) X-Received: by 10.180.205.200 with SMTP id li8mr14244778wic.15.1368619481228; Wed, 15 May 2013 05:04:41 -0700 (PDT) Received: from localhost ([2a01:2003:1:1025:8e70:5aff:feac:ad8]) by mx.google.com with ESMTPSA id fz8sm2425084wib.2.2013.05.15.05.04.35 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 15 May 2013 05:04:40 -0700 (PDT) From: Fabio Baltieri To: Felipe Balbi Cc: Linus Walleij , Lee Jones , Praveena Nadahally , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Fabio Baltieri Subject: [PATCH 05/10] usb: phy: ab8500-usb: fix phy tuning value select logic Date: Wed, 15 May 2013 14:03:28 +0200 Message-Id: <1368619413-24647-6-git-send-email-fabio.baltieri@linaro.org> X-Mailer: git-send-email 1.8.2 In-Reply-To: <1368619413-24647-1-git-send-email-fabio.baltieri@linaro.org> References: <1368619413-24647-1-git-send-email-fabio.baltieri@linaro.org> X-Gm-Message-State: ALoCoQknZGy/42DTMDDxpquSQJ1ANC6lKNhL3RWGlntZMo1JTYnKKzoCUp9VlL8jQBd/fCrKAdgC X-Original-Sender: fabio.baltieri@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::229 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The driver supports both ab8500 and ab8505, but the actual phy tuning values logic sets ab8500 values: if (!is_ab8500_2p0_or_earlier(ab->ab8500)) which is supposed to set values for ab8500, but incorrectly results true for ab8505 too. Fix this by adding an additional is_ab8500(ab->ab8500) check. Acked-by: Linus Walleij Acked-by: Maxime Coquelin Signed-off-by: Fabio Baltieri --- drivers/usb/phy/phy-ab8500-usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c index bbe51cc..d105cce 100644 --- a/drivers/usb/phy/phy-ab8500-usb.c +++ b/drivers/usb/phy/phy-ab8500-usb.c @@ -835,8 +835,8 @@ static int ab8500_usb_probe(struct platform_device *pdev) return err; } - /* Phy tuning values for AB8500 */ - if (!is_ab8500_2p0_or_earlier(ab->ab8500)) { + /* Phy tuning values for AB8500 > v2.0 */ + if (is_ab8500(ab->ab8500) && !is_ab8500_2p0_or_earlier(ab->ab8500)) { /* Enable the PBT/Bank 0x12 access */ err = abx500_set_register_interruptible(ab->dev, AB8500_DEVELOPMENT, AB8500_BANK12_ACCESS, 0x01);