From patchwork Tue Mar 28 04:38:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 9648063 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 93D7F602C8 for ; Tue, 28 Mar 2017 04:39:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86FE525F31 for ; Tue, 28 Mar 2017 04:39:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77C2728338; Tue, 28 Mar 2017 04:39:30 +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=ham 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 859BB25F31 for ; Tue, 28 Mar 2017 04:39:29 +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=FphJNSVojGsgD9fe/qM80CkJ5aQvxA4TpLRKpAuKkOk=; b=e/TIvbNj9ofQheU0FOTXH3Upex edusgZJoUkKPGJkIeW3QVDzzmhEpv3siR1ZFDxrJtwzdfYQpaQk+kZf75Pz9A1fux6b+iAItI6NXA NiFsvJxqhZVFTqcYI+oBv90a/2n+J8rjRvvF04umuAPpBlKUCZTB0XMfGfixkBWxHh0Q6DwygKt+C 6MIAxAKQ8t/Sj/9f87+iLoKmorquWFqYltLV4G2dk+dhst6CfbbaxscK82ap7X5HxZjGtjIdiCWe9 n4tGvi519hGw2p/cDvk9SxiuurO8ftFyjg352i/3aYEwGPObgU2QLU3nfv2YsUPEwz90XAwQDv3gn s1/CnOVA==; 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 1csiug-0004T8-Kc; Tue, 28 Mar 2017 04:39:22 +0000 Received: from mailout2.samsung.com ([203.254.224.25] helo=epoutp02.samsung.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1csiuH-0004Kg-Kg; Tue, 28 Mar 2017 04:38:59 +0000 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by epoutp02.samsung.com (KnoxPortal) with ESMTP id 20170328043833epoutp027fc9acfb56cabfb255ed55a92a446be2~v8dhOIb9u0276202762epoutp02V; Tue, 28 Mar 2017 04:38:33 +0000 (GMT) Received: from epsmges5p3.samsung.com (unknown [182.195.40.69]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20170328043832epcas1p462540abd8c2f5fab6968349d80d16563~v8dg5r0W92704427044epcas1p4y; Tue, 28 Mar 2017 04:38:32 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p3.samsung.com (EPCPMTA) with SMTP id 1A.B0.18112.8C8E9D85; Tue, 28 Mar 2017 13:38:32 +0900 (KST) Received: from epcpsbgm2new.samsung.com (u27.gpu120.samsung.co.kr [203.254.230.27]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20170328043830epcas5p2a949278d79e3741891991a3bbeafb9dc~v8dfTGqII1980719807epcas5p2T; Tue, 28 Mar 2017 04:38:30 +0000 (GMT) X-AuditID: b6c32a2e-f79506d0000046c0-0f-58d9e8c8842e Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 82.95.05013.6C8E9D85; Tue, 28 Mar 2017 13:38:30 +0900 (KST) Received: from localhost.localdomain ([10.113.62.212]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0ONI007OGCW6U4A0@mmp2.samsung.com>; Tue, 28 Mar 2017 13:38:30 +0900 (KST) From: Chanwoo Choi To: kishon@ti.com Subject: [PATCH 2/2] phy: rockchip-inno-usb2: Replace the extcon API Date: Tue, 28 Mar 2017 13:38:29 +0900 Message-id: <1490675909-2533-2-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1490675909-2533-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrGKsWRmVeSWpSXmKPExsWy7bCmhu6JFzcjDG6dFbCYeOMKi8X1L89Z Lf4/es1qceFpD5vFpsfXWC0u75rDZvHpwX9mB3aPTas62Tw2L6n36NuyitFj+7V5zB7Hb2xn 8vi8SS6ALSrVJiM1MSW1SCE1Lzk/JTMv3VbJOzjeOd7UzMBQ19DSwlxJIS8xN9VWycUnQNct MwfoFCWFssScUqBQQGJxsZK+nU1RfmlJqkJGfnGJrVK0oaGRnqGBuZ6RkZGeiXGslZEpUElC asaTV8/ZCpYJV0yc85KxgXGxQBcjJ4eEgInEjr57zBC2mMSFe+vZuhi5OIQEljJKPHgzCcpp Z5JY+nEuM0zHogv3mCAScxglJm5exwzh/GCU+LZkEwtIFZuAlsT+FzeA2jk4RAQEJT59YgSp YRY4xSjRcOcaO0iNsICLRO+BJ6wgNouAqsTBM4vBNvACxRcuncAOsU1O4sOeR2A2p4CrxOLJ s8AGSQh8Z5P49vAMI8gCCQFZiU0HoK5zkbi04hOULSzx6vgWqDnSEn+X3oLq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U3M TcyNDSzMLS1NjJTEeRtnPwsXEkhPLEnNTk0tSC2C6WPi4JRqYKys+a1S/G19vWjz6kkBW68m 6jWWzeaftPeM4mFR0Yz1jgEzhX/+bq71Yvnyuseh4ME098Kv4h4TSlI2F7iY61l0BWpGf9j1 7Alzh8+PibP7vdPUODprS4TV1CZPDimba3f+Y73YjtTlJflh38qtFzSHcT+68cHhXOBR8zW/ fRO2X9d0trT1UWIpzkg01GIuKk4EACQUjMuEAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170328043830epcas5p2a949278d79e3741891991a3bbeafb9dc X-Msg-Generator: CA X-Sender-IP: 203.254.230.27 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?QzEwG1NUQUYbQzEwVjgxMTE=?= CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20170328043830epcas5p2a949278d79e3741891991a3bbeafb9dc X-RootMTR: 20170328043830epcas5p2a949278d79e3741891991a3bbeafb9dc References: <1490675909-2533-1-git-send-email-cw00.choi@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170327_213857_833081_C918167A X-CRM114-Status: GOOD ( 11.85 ) 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: Heiko Stuebner , Chanwoo Choi , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, 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: Kishon Vijay Abraham I Cc: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org Signed-off-by: Chanwoo Choi Acked-by: Kishon Vijay Abraham I --- drivers/phy/phy-rockchip-inno-usb2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/phy/phy-rockchip-inno-usb2.c b/drivers/phy/phy-rockchip-inno-usb2.c index 4ea95c28a66f..02751f70067e 100644 --- a/drivers/phy/phy-rockchip-inno-usb2.c +++ b/drivers/phy/phy-rockchip-inno-usb2.c @@ -540,7 +540,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); @@ -596,7 +596,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, @@ -617,7 +617,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); @@ -1003,8 +1003,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"); }