From patchwork Wed Jan 18 12:19:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 91737 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp986756qgi; Wed, 18 Jan 2017 04:20:50 -0800 (PST) X-Received: by 10.98.71.7 with SMTP id u7mr3518370pfa.76.1484742049996; Wed, 18 Jan 2017 04:20:49 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1si94363pld.109.2017.01.18.04.20.49; Wed, 18 Jan 2017 04:20:49 -0800 (PST) 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; dkim=pass header.i=@linaro.org; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752662AbdARMUm (ORCPT + 25 others); Wed, 18 Jan 2017 07:20:42 -0500 Received: from mail-pg0-f43.google.com ([74.125.83.43]:36495 "EHLO mail-pg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752422AbdARMUk (ORCPT ); Wed, 18 Jan 2017 07:20:40 -0500 Received: by mail-pg0-f43.google.com with SMTP id t6so4394316pgt.3 for ; Wed, 18 Jan 2017 04:20:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=QM3cxBdElhfbkS4copR8Q10HJ647xgvonBgXRAXMeFQ=; b=E7HDJMuFejxiUYkD5pz+rZYOrNbMa6Axp2NNDobAdoafqKuoExLmGRaUKLdVpVFeHY yDp0cH8wvWUqjRBrKCIpPPqP4/XgCUnR8hc8B/ShVa6GIyg+DiwBR6bwrkr+zRgBZM7V K52bkPtd3DXb6EVvksIfBSmXnyNpFqiurnsNE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=QM3cxBdElhfbkS4copR8Q10HJ647xgvonBgXRAXMeFQ=; b=TdU+yIW+sfKOZLsqR70IRhzGWqkGDCtdHTFhOTjTJHROKxDXYmcssexOO9xWRn0SoR JGSJmaUzOr7pbadudTE994C5dizLZ+13ROqE30ox5apiDSBlBYxRY9j51gOsPpppjv/5 NrnjDg1dpZrM295QrhGnRadll6p7pVve/MwFsvH/EX7se1QypdMh9sOWQrrpgvkWAqYK ys5hksAAhAqEuirubeGrAZ3vNk/eQvK+D2lwBelHm901Co6zYqf4HGRV8qCgNWntpbKb 6CwRpfh0nX5EZ1/qUemV3VsE4uwKxSwsDEKmPkSR4DBqn6zD2cr/d9UEl7OWk42URuGE 9UBw== X-Gm-Message-State: AIkVDXJDLNhS1+miSZa7xZ7OzEeKMizwlO4KSeb/0kTjAaa88r1xL/NBkdzqI8LbYkAr1fUD X-Received: by 10.99.251.5 with SMTP id o5mr3643381pgh.152.1484742037845; Wed, 18 Jan 2017 04:20:37 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id o12sm382837pfg.15.2017.01.18.04.20.35 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Jan 2017 04:20:37 -0800 (PST) From: Baolin Wang To: balbi@kernel.org, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org, broonie@kernel.org, baolin.wang@linaro.org Subject: [RFC PATCH 1/3] usb: phy: ab8500: Remove the set_power callback Date: Wed, 18 Jan 2017 20:19:47 +0800 Message-Id: <575125480cc13ee90c4b0354e444cfd8eb2da459.1484741420.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are no users will use the vbus_draw variable set by set_power() callback to set the vbus current. Thus we can remove it. Signed-off-by: Baolin Wang --- drivers/usb/phy/phy-ab8500-usb.c | 20 -------------------- 1 file changed, 20 deletions(-) -- 1.7.9.5 diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c index a03caf4..3dfbb97 100644 --- a/drivers/usb/phy/phy-ab8500-usb.c +++ b/drivers/usb/phy/phy-ab8500-usb.c @@ -1036,25 +1036,6 @@ static unsigned ab8500_eyediagram_workaroud(struct ab8500_usb *ab, unsigned mA) return mA; } -static int ab8500_usb_set_power(struct usb_phy *phy, unsigned mA) -{ - struct ab8500_usb *ab; - - if (!phy) - return -ENODEV; - - ab = phy_to_ab(phy); - - mA = ab8500_eyediagram_workaroud(ab, mA); - - ab->vbus_draw = mA; - - atomic_notifier_call_chain(&ab->phy.notifier, - UX500_MUSB_VBUS, &ab->vbus_draw); - - return 0; -} - static int ab8500_usb_set_suspend(struct usb_phy *x, int suspend) { /* TODO */ @@ -1392,7 +1373,6 @@ static int ab8500_usb_probe(struct platform_device *pdev) ab->phy.otg = otg; ab->phy.label = "ab8500"; ab->phy.set_suspend = ab8500_usb_set_suspend; - ab->phy.set_power = ab8500_usb_set_power; ab->phy.otg->state = OTG_STATE_UNDEFINED; otg->usb_phy = &ab->phy; From patchwork Wed Jan 18 12:19:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 91740 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp987061qgi; Wed, 18 Jan 2017 04:21:36 -0800 (PST) X-Received: by 10.99.161.17 with SMTP id b17mr3715465pgf.72.1484742096428; Wed, 18 Jan 2017 04:21:36 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si99752plf.93.2017.01.18.04.21.35; Wed, 18 Jan 2017 04:21:36 -0800 (PST) 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; dkim=pass header.i=@linaro.org; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752770AbdARMVW (ORCPT + 25 others); Wed, 18 Jan 2017 07:21:22 -0500 Received: from mail-pg0-f49.google.com ([74.125.83.49]:35109 "EHLO mail-pg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752559AbdARMUl (ORCPT ); Wed, 18 Jan 2017 07:20:41 -0500 Received: by mail-pg0-f49.google.com with SMTP id 194so4411248pgd.2 for ; Wed, 18 Jan 2017 04:20:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=GKaSQRMEhnpA08wscOE+7EkN7kqdITvA6cog1itlYto=; b=MC5ew0jneflhd417vps7qeK9UjfMSeaGXLjvlVBcdKrZZ2stowFbP4nieBYy4gqy2x 6JG9ZObEmAUGVV9ZZSMY/AAGxlp0yL87gO1nuVVO/lyoiHOukH2vtaZhMkJfxMeq3Jli KLRgclUT1TO0bjorPtgUvbUBK7QKvct8+m6Pw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=GKaSQRMEhnpA08wscOE+7EkN7kqdITvA6cog1itlYto=; b=oWH8zNzYCAhCiMxbCOL42DLqiO4qJukcc84PM7puPvydar7Mpa3533LTYV4OemMFsz kk8CXABM0+5DthKWxA3wX0/EG23kl1KsWr3ta3gwD38NO6BAQ0LBckvU+qW/PBCxsPVM EPa+jVICFBkvG4PisBmkZXiB90tbmhDmHCt5RL4TWNjjHbgoI0VMUjpP6N8fbrwz8yq+ xKP2K+EMa8vUlSM03HCDOR/xK3VfGVm7NCJ/jvUh1oG3vt9SC4SjlTdgsAQKeuzk1yNa 2Y4642MZjpjAi+H77r3z0qTKgBMExxVz4w0gn4mlS8YqwcZgeJ9ZCrqpD99t0i+xFQ1p OMlw== X-Gm-Message-State: AIkVDXL8K4rvcuNUjpfykoD497sPVTVNm5rUUd34CbK7ZCDQBzw4E3UtWXDY4sBJlRMwUs5r X-Received: by 10.98.202.139 with SMTP id y11mr3417841pfk.98.1484742040337; Wed, 18 Jan 2017 04:20:40 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id o12sm382837pfg.15.2017.01.18.04.20.38 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Jan 2017 04:20:39 -0800 (PST) From: Baolin Wang To: balbi@kernel.org, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org, broonie@kernel.org, baolin.wang@linaro.org Subject: [RFC PATCH 2/3] usb: phy: msm: Remove the set_power callback Date: Wed, 18 Jan 2017 20:19:48 +0800 Message-Id: <15ee3137fd4bd6705df75118accf977e61328d56.1484741420.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since it will not set the PMIC current drawn from USB configuration by set_power callback, then remove it. Signed-off-by: Baolin Wang --- drivers/usb/phy/phy-msm-usb.c | 18 ------------------ 1 file changed, 18 deletions(-) -- 1.7.9.5 diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index 8a34759..9e52890 100644 --- a/drivers/usb/phy/phy-msm-usb.c +++ b/drivers/usb/phy/phy-msm-usb.c @@ -842,23 +842,6 @@ static void msm_otg_notify_charger(struct msm_otg *motg, unsigned mA) motg->cur_power = mA; } -static int msm_otg_set_power(struct usb_phy *phy, unsigned mA) -{ - struct msm_otg *motg = container_of(phy, struct msm_otg, phy); - - /* - * Gadget driver uses set_power method to notify about the - * available current based on suspend/configured states. - * - * IDEV_CHG can be drawn irrespective of suspend/un-configured - * states when CDP/ACA is connected. - */ - if (motg->chg_type == USB_SDP_CHARGER) - msm_otg_notify_charger(motg, mA); - - return 0; -} - static void msm_otg_start_host(struct usb_phy *phy, int on) { struct msm_otg *motg = container_of(phy, struct msm_otg, phy); @@ -1950,7 +1933,6 @@ static int msm_otg_probe(struct platform_device *pdev) } phy->init = msm_phy_init; - phy->set_power = msm_otg_set_power; phy->notify_disconnect = msm_phy_notify_disconnect; phy->type = USB_PHY_TYPE_USB2; From patchwork Wed Jan 18 12:19:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 91739 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp986799qgi; Wed, 18 Jan 2017 04:20:56 -0800 (PST) X-Received: by 10.99.24.92 with SMTP id 28mr3702187pgy.100.1484742056048; Wed, 18 Jan 2017 04:20:56 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1si94363pld.109.2017.01.18.04.20.55; Wed, 18 Jan 2017 04:20:56 -0800 (PST) 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; dkim=pass header.i=@linaro.org; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752723AbdARMUx (ORCPT + 25 others); Wed, 18 Jan 2017 07:20:53 -0500 Received: from mail-pg0-f51.google.com ([74.125.83.51]:36501 "EHLO mail-pg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752664AbdARMUn (ORCPT ); Wed, 18 Jan 2017 07:20:43 -0500 Received: by mail-pg0-f51.google.com with SMTP id t6so4394726pgt.3 for ; Wed, 18 Jan 2017 04:20:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=XMH5AJsCkN4/JZHmGYs216qWy31bklJ9pbAeLM29zSk=; b=jh0uSR0CsE0EcPnd/sZKEIY8Kc5ZBhxeJO1aeacX92U0nzC5IcNSGXGtafp/hkbq2P iTZuCnEcSDZ6FPxy/gTIJQ9T1L7G3d+6TB9T4bmQCJD5HpyE2mA9hezghDLwmvUq59FT OIYDnOm/loerXbFB/GNWZXkvaWzKTWrOv0IGk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=XMH5AJsCkN4/JZHmGYs216qWy31bklJ9pbAeLM29zSk=; b=R/juHhinaAq0XYeVxDA8w/ALv0Oj9JuQ1yVwd3wljhycKelqBPJy/2E/MADe1yOcTZ DDpiM4CsOgIgzhu0MoeMG8r+SjS3yUzP/b8M6Pv2ZrC8rF+1Q5wfecx8TueFCOiP2gQ0 IT1IcpSArfm9fNrQy1AzG0yfhhoNSLBxsHJeuyTS9ybLwYENQNHLPGVTJD/cBYDuaz4f RpafLFttc13bf/npYnE3H2NvbPaYVJTeRu0/KshWy+3s14YY8tjyMGILJ2MIAaCgMGDB OtjlL63I4xH741W75oO2IKY8NuTIDanUVfzKxdzNDaJTFcsuAPIw3HxaKyQthYgllcex Z1SA== X-Gm-Message-State: AIkVDXLmD7Cezey3O/XE+IcdBX9OLuXxBbG8UuIyr+Teb9lou4izfmnqm6eEexwbPrhOwa+k X-Received: by 10.98.85.198 with SMTP id j189mr3429325pfb.182.1484742042811; Wed, 18 Jan 2017 04:20:42 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id o12sm382837pfg.15.2017.01.18.04.20.40 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Jan 2017 04:20:42 -0800 (PST) From: Baolin Wang To: balbi@kernel.org, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org, broonie@kernel.org, baolin.wang@linaro.org Subject: [RFC PATCH 3/3] usb: phy: fsl: Remove the set_power callback Date: Wed, 18 Jan 2017 20:19:49 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the set_power callback did not do anything for power setting, then remove it. Signed-off-by: Baolin Wang --- drivers/usb/phy/phy-fsl-usb.c | 12 ------------ 1 file changed, 12 deletions(-) -- 1.7.9.5 diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c index 94eb292..392ab42 100644 --- a/drivers/usb/phy/phy-fsl-usb.c +++ b/drivers/usb/phy/phy-fsl-usb.c @@ -642,17 +642,6 @@ static int fsl_otg_set_peripheral(struct usb_otg *otg, return 0; } -/* Set OTG port power, only for B-device */ -static int fsl_otg_set_power(struct usb_phy *phy, unsigned mA) -{ - if (!fsl_otg_dev) - return -ENODEV; - if (phy->otg->state == OTG_STATE_B_PERIPHERAL) - pr_info("FSL OTG: Draw %d mA\n", mA); - - return 0; -} - /* * Delayed pin detect interrupt processing. * @@ -821,7 +810,6 @@ static int fsl_otg_conf(struct platform_device *pdev) /* initialize the otg structure */ fsl_otg_tc->phy.label = DRIVER_DESC; fsl_otg_tc->phy.dev = &pdev->dev; - fsl_otg_tc->phy.set_power = fsl_otg_set_power; fsl_otg_tc->phy.otg->usb_phy = &fsl_otg_tc->phy; fsl_otg_tc->phy.otg->set_host = fsl_otg_set_host;