From patchwork Mon Sep 7 11:24:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ivan T. Ivanov" X-Patchwork-Id: 53227 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by patches.linaro.org (Postfix) with ESMTPS id 92C9522B05 for ; Mon, 7 Sep 2015 11:24:53 +0000 (UTC) Received: by wicgb1 with SMTP id gb1sf24369463wic.3 for ; Mon, 07 Sep 2015 04:24:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=QVYQuzt/giIH9dD48TY2jfZWgVgf7h+xQnJwC0TQ2yQ=; b=kuvoMEOoyAOqxltDf00AZixNOc4/7Uvd0+m3l4g5F8bonSkn6k0Ux6YUsnfVb5plgz Fpby2ISwLbMU1oZCU+iwVQ6IDYsxmQuxCWwRLM7NDBx3lBNH+81iuj6jJJPH0XdnhL/7 hRyQfQGeRmGJlbdE0+REtoOrA5TN6ZQJxxWqFbL0iQAnWFJ2SS6FFtB+z4i0+zeVZQWC 02eZwfuDHcPHUSvYefRtyHOGbY6/7JuPFVRQDPPxIwyVW7H6Bx7Xjpo6WtkdAe5R8ONy sz5qaKvM3muv15YjySbJm40NRDdor1dfqgPi62w3kxNHogbjP1evKYHvw93oP12Gv++f q5ag== X-Gm-Message-State: ALoCoQmiCP2REjNWn0PLXiKnq0WOdvv9dkAuNtjb9KYTMvlTvatXHMEwp3im5kDNJSfYejzpppiq X-Received: by 10.194.118.65 with SMTP id kk1mr4847337wjb.5.1441625092960; Mon, 07 Sep 2015 04:24:52 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.100 with SMTP id u4ls585885lae.51.gmail; Mon, 07 Sep 2015 04:24:52 -0700 (PDT) X-Received: by 10.112.13.136 with SMTP id h8mr4696667lbc.23.1441625092762; Mon, 07 Sep 2015 04:24:52 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id m6si2331032lah.100.2015.09.07.04.24.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Sep 2015 04:24:52 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbcjc2 with SMTP id jc2so37677540lbc.0 for ; Mon, 07 Sep 2015 04:24:52 -0700 (PDT) X-Received: by 10.112.168.66 with SMTP id zu2mr6126218lbb.29.1441625092661; Mon, 07 Sep 2015 04:24:52 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp317828lbq; Mon, 7 Sep 2015 04:24:51 -0700 (PDT) X-Received: by 10.50.114.65 with SMTP id je1mr24540163igb.20.1441625091742; Mon, 07 Sep 2015 04:24:51 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y4si19603805pdc.154.2015.09.07.04.24.48; Mon, 07 Sep 2015 04:24:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751120AbbIGLYr (ORCPT + 6 others); Mon, 7 Sep 2015 07:24:47 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:36378 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751034AbbIGLYq (ORCPT ); Mon, 7 Sep 2015 07:24:46 -0400 Received: by wicgb1 with SMTP id gb1so42201264wic.1 for ; Mon, 07 Sep 2015 04:24:45 -0700 (PDT) X-Received: by 10.194.93.166 with SMTP id cv6mr35541178wjb.63.1441625085323; Mon, 07 Sep 2015 04:24:45 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.googlemail.com with ESMTPSA id fr10sm772707wib.14.2015.09.07.04.24.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Sep 2015 04:24:44 -0700 (PDT) From: "Ivan T. Ivanov" To: Felipe Balbi Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH] usb: phy: qcom: Switch to new extcon framework API Date: Mon, 7 Sep 2015 14:24:36 +0300 Message-Id: <1441625076-20306-1-git-send-email-ivan.ivanov@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ivan.ivanov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , [un]register_interest and reading cable state by name have been deprecated. Switch to new API. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-qcom-8x16-usb.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/usb/phy/phy-qcom-8x16-usb.c b/drivers/usb/phy/phy-qcom-8x16-usb.c index 5d357a94599e..579587d97217 100644 --- a/drivers/usb/phy/phy-qcom-8x16-usb.c +++ b/drivers/usb/phy/phy-qcom-8x16-usb.c @@ -71,7 +71,7 @@ struct phy_8x16 { struct reset_control *phy_reset; - struct extcon_specific_cable_nb vbus_cable; + struct extcon_dev *vbus_edev; struct notifier_block vbus_notify; struct gpio_desc *switch_gpio; @@ -234,7 +234,7 @@ static int phy_8x16_init(struct usb_phy *phy) val = ULPI_PWR_OTG_COMP_DISABLE; usb_phy_io_write(phy, val, ULPI_SET(ULPI_PWR_CLK_MNG_REG)); - state = extcon_get_cable_state(qphy->vbus_cable.edev, "USB"); + state = extcon_get_cable_state_(qphy->vbus_edev, EXTCON_USB); if (state) phy_8x16_vbus_on(qphy); else @@ -314,7 +314,6 @@ static int phy_8x16_reboot_notify(struct notifier_block *this, static int phy_8x16_probe(struct platform_device *pdev) { - struct extcon_dev *edev; struct phy_8x16 *qphy; struct resource *res; struct usb_phy *phy; @@ -349,9 +348,9 @@ static int phy_8x16_probe(struct platform_device *pdev) if (ret < 0) return ret; - edev = extcon_get_edev_by_phandle(phy->dev, 0); - if (IS_ERR(edev)) - return PTR_ERR(edev); + qphy->vbus_edev = extcon_get_edev_by_phandle(phy->dev, 0); + if (IS_ERR(qphy->vbus_edev)) + return PTR_ERR(qphy->vbus_edev); ret = clk_set_rate(qphy->core_clk, INT_MAX); if (ret < 0) @@ -370,8 +369,8 @@ static int phy_8x16_probe(struct platform_device *pdev) goto off_clks; qphy->vbus_notify.notifier_call = phy_8x16_vbus_notify; - ret = extcon_register_interest(&qphy->vbus_cable, edev->name, - "USB", &qphy->vbus_notify); + ret = extcon_register_notifier(qphy->vbus_edev, EXTCON_USB, + &qphy->vbus_notify); if (ret < 0) goto off_power; @@ -385,7 +384,8 @@ static int phy_8x16_probe(struct platform_device *pdev) return 0; off_extcon: - extcon_unregister_interest(&qphy->vbus_cable); + extcon_unregister_notifier(qphy->vbus_edev, EXTCON_USB, + &qphy->vbus_notify); off_power: phy_8x16_regulators_disable(qphy); off_clks: @@ -400,7 +400,8 @@ static int phy_8x16_remove(struct platform_device *pdev) struct phy_8x16 *qphy = platform_get_drvdata(pdev); unregister_reboot_notifier(&qphy->reboot_notify); - extcon_unregister_interest(&qphy->vbus_cable); + extcon_unregister_notifier(qphy->vbus_edev, EXTCON_USB, + &qphy->vbus_notify); /* * Ensure that D+/D- lines are routed to uB connector, so