Browse Source

usb: phy: ab8500-usb: fix phy tuning value select logic

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 <linus.walleij@linaro.org>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Fabio Baltieri 12 years ago
parent
commit
a96afc6b75
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/usb/phy/phy-ab8500-usb.c

+ 2 - 2
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);