Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932550Ab3EOMEq (ORCPT ); Wed, 15 May 2013 08:04:46 -0400 Received: from mail-we0-f175.google.com ([74.125.82.175]:54932 "EHLO mail-we0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932414Ab3EOMEm (ORCPT ); Wed, 15 May 2013 08:04:42 -0400 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> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1449 Lines: 40 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); -- 1.8.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/