From patchwork Mon Jul 17 01:20:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 9843819 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AA00160392 for ; Mon, 17 Jul 2017 01:22:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9BBBA2837E for ; Mon, 17 Jul 2017 01:22:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A451283E8; Mon, 17 Jul 2017 01:22:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1FCED26E5D for ; Mon, 17 Jul 2017 01:22:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-reply-to:Message-id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=7HxaLrQwoEd7xdYxOZskPld8jCyU5CkWR9iIHU7vp2s=; b=ZjTIgms7vGXynl9N5WGzJJrYBx OJFZcgeS7d8DEb2pl25rWlB5U2uz5rkSwS8JyWk7UzezF2IGXAPVx5jVMiOO47JZzM9Ugv+RZA8EQ NPvWZVm0kgmw7OEUunaj8edbdHDb3cCqt0wB/2eUNGN4bhIQQrM3CDxywTwF3qL23kxQiGRhToIqI 23vz7K9YZt5xvJVusY7n2mjjKwjTezPMtXsx9YR/lhaVEXqlXXuotZU8xK3WOoBcu+4ctzpXCVsnt //3QmR3luTq7Xi7ovOEaPkUK7NZ6iio9kdRwW8c2tuaVT22pnUvT+Bm9vqTgMr+tQEXCbVJhNfLFz huDA8fzg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dWuk2-0000bZ-Sk; Mon, 17 Jul 2017 01:22:30 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dWuiy-000857-RZ; Mon, 17 Jul 2017 01:21:28 +0000 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20170717012058epoutp017390fe00bf08d99cacb16cc9b9291b41~R_XtGXoPD0997109971epoutp01X; Mon, 17 Jul 2017 01:20:58 +0000 (GMT) Received: from epsmges1p2.samsung.com (unknown [182.195.40.66]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20170717012058epcas1p2af6cd3f9070e8b1af2f9c29fb10e30bb~R_Xs3qSSn0514305143epcas1p2M; Mon, 17 Jul 2017 01:20:58 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 5C.76.06750.AF01C695; Mon, 17 Jul 2017 10:20:58 +0900 (KST) Received: from epsmgms2p1.samsung.com (unknown [182.195.42.79]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20170717012058epcas1p157e9a296eb5e415ae24bb51a1e6026db~R_XslyLwn1728317283epcas1p11; Mon, 17 Jul 2017 01:20:58 +0000 (GMT) X-AuditID: b6c32a36-f79db6d000001a5e-64-596c10fa57ea Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1.samsung.com (Symantec Messaging Gateway) with SMTP id C2.E5.05076.AF01C695; Mon, 17 Jul 2017 10:20:58 +0900 (KST) Received: from localhost.localdomain ([10.113.62.212]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OT7001NHNQX1OA0@mmp1.samsung.com>; Mon, 17 Jul 2017 10:20:57 +0900 (KST) From: Chanwoo Choi To: kishon@ti.com, balbi@kernel.org, gregkh@linuxfoundation.org Subject: [PATCH 2/5] phy: rockchip-inno-usb2: Replace the extcon API Date: Mon, 17 Jul 2017 10:20:53 +0900 Message-id: <1500254456-6525-3-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1500254456-6525-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrMKsWRmVeSWpSXmKPExsWy7bCmru4vgZxIg60XZCyOtT1ht5h44wqL xfUvz1ktmhevZ7O48LSHzWLT42usFpd3zWGz+PTgP7PFomWtzBa3G1ewOXB5bFrVyeaxf+4a do/NS+o9+rasYvQ4fmM7k8fnTXIBbFGpNhmpiSmpRQqpecn5KZl56bZK3sHxzvGmZgaGuoaW FuZKCnmJuam2Si4+AbpumTlAlykplCXmlAKFAhKLi5X07WyK8ktLUhUy8otLbJWiDQ2N9AwN zPWMjIz0TIxjrYxMgUoSUjPOHX7LVLBZuOLv+Q+sDYxbBboYOTkkBEwkju9dxAphi0lcuLee rYuRi0NIYAejxPVtv1kgnM+MEhMnPWSD6Xj0ZBYjiA1W1TzdB6LoB6PE1QNbWEASbAJaEvtf 3ABq4OAQEbCX2PwuC6SGWeAco8ScTwfAaoQFXCS6Dz5hArFZBFQlpm48CHYGL1D87ZkeZohl chIf9jxiB7E5BVwlzn89wQoySEKgmV3i9JsjTCALJARkJ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kUK8KYmVValF+fFFpTmpxYcYTYFOmcgsJZqcD4y9 vJJ4QxNLIxMDMzNDIwNjMyVx3gmBXyKEBNITS1KzU1MLUotg+pg4OKUaGKXkfwmcPlBja2dz dOlL148HLX5v5HdN8kz47BiVsm4fv5pC+XEDP//d264HrNg47e/btJuHg/dGSXIqiZoeXdR4 k39jY1lw4s+bvzfdMbZ4dGyywu6D3XdOdL38rKP6Wu6uVdq0qKeWPw868s6Qt15oPJv9wiRj M5baBxYPVvvqF5+fe0d3kqMSS3FGoqEWc1FxIgDj1K4EhQIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170717012058epcas1p157e9a296eb5e415ae24bb51a1e6026db X-Msg-Generator: CA X-Sender-IP: 182.195.42.79 X-Local-Sender: =?UTF-8?B?7LWc7LCs7JqwG1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbU2VuaW9yIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?Q2hhbndvbyBDaG9pG1RpemVuIFBsYXRmb3JtIExhYi4bU2Ft?= =?UTF-8?B?c3VuZyBFbGVjdHJvbmljcxtTZW5pb3IgRW5naW5lZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG1RFTEUbQzEwVjgxMTE=?= CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20170717012058epcas1p157e9a296eb5e415ae24bb51a1e6026db X-RootMTR: 20170717012058epcas1p157e9a296eb5e415ae24bb51a1e6026db References: <1500254456-6525-1-git-send-email-cw00.choi@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170716_182125_233710_2CA6F51B X-CRM114-Status: GOOD ( 11.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rockchip@lists.infradead.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, cw00.choi@samsung.com, myungjoo.ham@samsung.com, chanwoo@kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch uses the resource-managed extcon API for extcon_register_notifier() and replaces the deprecated extcon API as following: - extcon_get_cable_state_() -> extcon_get_state() - extcon_set_cable_state_() -> extcon_set_state_sync() Cc: linux-rockchip@lists.infradead.org acked-by: Kishon Vijay Abraham I Signed-off-by: Chanwoo Choi --- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c index 626883d9d176..ef033089b7a0 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c @@ -545,7 +545,7 @@ static void rockchip_usb2phy_otg_sm_work(struct work_struct *work) rockchip_usb2phy_power_off(rport->phy); /* fall through */ case OTG_STATE_B_IDLE: - if (extcon_get_cable_state_(rphy->edev, EXTCON_USB_HOST) > 0) { + if (extcon_get_state(rphy->edev, EXTCON_USB_HOST) > 0) { dev_dbg(&rport->phy->dev, "usb otg host connect\n"); rport->state = OTG_STATE_A_HOST; rockchip_usb2phy_power_on(rport->phy); @@ -598,7 +598,7 @@ static void rockchip_usb2phy_otg_sm_work(struct work_struct *work) rport->vbus_attached = vbus_attach; if (notify_charger && rphy->edev) { - extcon_set_cable_state_(rphy->edev, + extcon_set_state_sync(rphy->edev, cable, vbus_attach); if (cable == EXTCON_CHG_USB_SDP) extcon_set_state_sync(rphy->edev, @@ -619,7 +619,7 @@ static void rockchip_usb2phy_otg_sm_work(struct work_struct *work) sch_work = true; break; case OTG_STATE_A_HOST: - if (extcon_get_cable_state_(rphy->edev, EXTCON_USB_HOST) == 0) { + if (extcon_get_state(rphy->edev, EXTCON_USB_HOST) == 0) { dev_dbg(&rport->phy->dev, "usb otg host disconnect\n"); rport->state = OTG_STATE_B_IDLE; rockchip_usb2phy_power_off(rport->phy); @@ -1006,8 +1006,8 @@ static int rockchip_usb2phy_otg_port_init(struct rockchip_usb2phy *rphy, if (!IS_ERR(rphy->edev)) { rport->event_nb.notifier_call = rockchip_otg_event; - ret = extcon_register_notifier(rphy->edev, EXTCON_USB_HOST, - &rport->event_nb); + ret = devm_extcon_register_notifier(rphy->dev, rphy->edev, + EXTCON_USB_HOST, &rport->event_nb); if (ret) dev_err(rphy->dev, "register USB HOST notifier failed\n"); }