From patchwork Wed Apr 3 08:45:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 15843 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id D25C923E21 for ; Wed, 3 Apr 2013 08:48:08 +0000 (UTC) Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by fiordland.canonical.com (Postfix) with ESMTP id 783BCA18485 for ; Wed, 3 Apr 2013 08:48:08 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id m1sf2138693ves.11 for ; Wed, 03 Apr 2013 01:48:08 -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=kqitmwMSYzNG/Pi1KAfKU/K/dr8Bajv86PWWPHITSd8=; b=nK1ew+D1YvVSFOBY3kwVkgoJUjoE3t7QWTCPj2lz2RhCSMa4wbMGKsugUxJpycduBV 2kLvKakyyjTBBsoW0XkErF6fcsSb9/vVcVhPEgO9lxH76gutudqmQhofKyUOFJg76Qi6 JblgQRymx7phKrf+DFHoqx5z0ofU4adDgJ/Dowx1KKMZUTHejUooIjDWE5iPo054x1Y7 Jd8Rq4mcQascZqYt02tr1fMV05bl5vea3F3eQ1ADT5vHJHP4sEc3NWTXl3WZEsDnsUR+ 88W8ZEj66UDvVrEAEgfxeQqQx9qbwtwSS4bYHcype7NGyb9UJQQQ4QBh6ZbuD+GmXxpt /oSw== X-Received: by 10.224.172.200 with SMTP id m8mr708559qaz.0.1364978887999; Wed, 03 Apr 2013 01:48:07 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.50.226 with SMTP id f2ls813770qeo.13.gmail; Wed, 03 Apr 2013 01:48:07 -0700 (PDT) X-Received: by 10.220.150.74 with SMTP id x10mr471161vcv.68.1364978887811; Wed, 03 Apr 2013 01:48:07 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id do1si4243001vdb.134.2013.04.03.01.48.07 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Apr 2013 01:48:07 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id jw11so1466761veb.22 for ; Wed, 03 Apr 2013 01:48:07 -0700 (PDT) X-Received: by 10.220.225.200 with SMTP id it8mr502505vcb.39.1364978887725; Wed, 03 Apr 2013 01:48:07 -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.59.4.204 with SMTP id cg12csp160654ved; Wed, 3 Apr 2013 01:48:07 -0700 (PDT) X-Received: by 10.14.173.196 with SMTP id v44mr1806890eel.29.1364978886563; Wed, 03 Apr 2013 01:48:06 -0700 (PDT) Received: from mail-ee0-f46.google.com (mail-ee0-f46.google.com [74.125.83.46]) by mx.google.com with ESMTPS id r7si7610327eeo.56.2013.04.03.01.48.06 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Apr 2013 01:48:06 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.46 is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) client-ip=74.125.83.46; Received: by mail-ee0-f46.google.com with SMTP id e49so563964eek.19 for ; Wed, 03 Apr 2013 01:48:06 -0700 (PDT) X-Received: by 10.14.183.67 with SMTP id p43mr1915678eem.10.1364978886049; Wed, 03 Apr 2013 01:48:06 -0700 (PDT) Received: from localhost ([2a01:2003:1:1e91:8e70:5aff:feac:ad8]) by mx.google.com with ESMTPS id a1sm6923238eep.2.2013.04.03.01.47.59 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 03 Apr 2013 01:48:05 -0700 (PDT) From: Fabio Baltieri To: Felipe Balbi Cc: Linus Walleij , Praveena Nadahally , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Fabio Baltieri Subject: [PATCH 09/12] usb: phy: ab8500-usb: fix last notifier arguments Date: Wed, 3 Apr 2013 10:45:10 +0200 Message-Id: <1364978713-19612-10-git-send-email-fabio.baltieri@linaro.org> X-Mailer: git-send-email 1.8.1.3 In-Reply-To: <1364978713-19612-1-git-send-email-fabio.baltieri@linaro.org> References: <1364978713-19612-1-git-send-email-fabio.baltieri@linaro.org> X-Gm-Message-State: ALoCoQmKFBLYhQGuCG7g95YeEasLlthZu87Dw9HX7dbsgsJdZW9NnPpWC7rPg9V9vnmwhfezk5Zh X-Original-Sender: fabio.baltieri@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.177 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: , Fix last ab->phy.notifier call to use vbus_draw as notifier argument, as that's used in ab8500_charger to control charging current. Also drop a related TODO comment, and the additional ux500_musb_set_vbus(musb, 0), as with this patch it was causing an erratic behaviour of gadget ep0 state machine. Acked-by: Linus Walleij Signed-off-by: Fabio Baltieri --- drivers/usb/musb/ux500.c | 1 - drivers/usb/phy/phy-ab8500-usb.c | 10 +++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c index 88795f5..2c80004 100644 --- a/drivers/usb/musb/ux500.c +++ b/drivers/usb/musb/ux500.c @@ -114,7 +114,6 @@ static int musb_otg_notifications(struct notifier_block *nb, break; case UX500_MUSB_VBUS: dev_dbg(musb->controller, "VBUS Connect\n"); - ux500_musb_set_vbus(musb, 0); break; case UX500_MUSB_NONE: dev_dbg(musb->controller, "VBUS Disconnect\n"); diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c index b7f6639..ff27058 100644 --- a/drivers/usb/phy/phy-ab8500-usb.c +++ b/drivers/usb/phy/phy-ab8500-usb.c @@ -577,16 +577,12 @@ static int ab8500_usb_set_power(struct usb_phy *phy, unsigned mA) ab->vbus_draw = mA; - if (mA) - atomic_notifier_call_chain(&ab->phy.notifier, - UX500_MUSB_ENUMERATED, ab->phy.otg->gadget); + atomic_notifier_call_chain(&ab->phy.notifier, + UX500_MUSB_VBUS, &ab->vbus_draw); + return 0; } -/* TODO: Implement some way for charging or other drivers to read - * ab->vbus_draw. - */ - static int ab8500_usb_set_suspend(struct usb_phy *x, int suspend) { /* TODO */