From patchwork Thu Aug 3 08:20:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 9878419 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 7361C6037D for ; Thu, 3 Aug 2017 08:23:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AF2F28778 for ; Thu, 3 Aug 2017 08:23:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D72F2887A; Thu, 3 Aug 2017 08:23:00 +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,RCVD_IN_DNSWL_NONE 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 833872886A for ; Thu, 3 Aug 2017 08:22:59 +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=aEvgi6pKDOFFRPAWVTOiNMzJMJ43zGiyE2J0pVpAFDs=; b=Fgd05fI+z9XY1uY0qjqcN4J0lI t4dJ2m+VtrOtYrOLx6e5lwmpbs3xu/IIvKE7XuX/MbWHEBlE5evbtQ4/dCAMgeeo4QAhZJuFixkaE C/GUBkbSslmfUws2+xm9C4qiv9B3weVsj6sNmKwFv9ZyaZrqN47O5cG8kvWGc9nyAfb9z23JczZVs U7TkLqIIrpxja0bRP2R/bSP6wWQIIZZ+87zvAb+rsf+SIfIioYQUNHpH/c9as5/D+K9vuosoqkVpc kPZfI5+wUyeeNF/gqlZyBnYZmltzNb59Iqa0+mWS8wbF50ZYEPmHGXor9PK22OphOSjkch/nJIH6J 2VasirRA==; 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 1ddBPF-0006OP-UG; Thu, 03 Aug 2017 08:22:57 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ddBNj-0004yf-4t for linux-arm-kernel@lists.infradead.org; Thu, 03 Aug 2017 08:21:27 +0000 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20170803082051epoutp024c7ad8785130e7b8de502128bb618a9f~XSEJ5yBcr3014230142epoutp02l; Thu, 3 Aug 2017 08:20:51 +0000 (GMT) Received: from epsmges1p2.samsung.com (unknown [182.195.40.70]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20170803082050epcas1p3df5c24ec254b87acc3da79ba9a82b95b~XSEJpw6sS1497614976epcas1p3J; Thu, 3 Aug 2017 08:20:50 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 09.88.20955.2ECD2895; Thu, 3 Aug 2017 17:20:50 +0900 (KST) Received: from epsmgms2p1.samsung.com (unknown [182.195.42.79]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20170803082050epcas1p3040420e1fef2186519f50a68f865e006~XSEJGWpyU3265532655epcas1p3z; Thu, 3 Aug 2017 08:20:50 +0000 (GMT) X-AuditID: b6c32a36-f79196d0000051db-ab-5982dce2e7d8 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1.samsung.com (Symantec Messaging Gateway) with SMTP id FF.EB.06213.2ECD2895; Thu, 3 Aug 2017 17:20:50 +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 <0OU3008ZJOIPQFB0@mmp1.samsung.com>; Thu, 03 Aug 2017 17:20:50 +0900 (KST) From: Chanwoo Choi To: balbi@kernel.org Subject: [PATCH v2 2/5] phy: rockchip-inno-usb2: Replace the extcon API Date: Thu, 03 Aug 2017 17:20:45 +0900 Message-id: <1501748448-26821-3-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1501748448-26821-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrAKsWRmVeSWpSXmKPExsWy7bCmvu6jO02RBmtvGlgca3vCbjHxxhUW i+tfnrNaNC9ez2Zx4WkPm8Wmx9dYLS7vmsNmsWhZK7PF7cYVbA6cHptWdbJ57J+7ht1j85J6 j74tqxg9jt/YzuTxeZNcAFtUqk1GamJKapFCal5yfkpmXrqtkndwvHO8qZmBoa6hpYW5kkJe Ym6qrZKLT4CuW2YO0FFKCmWJOaVAoYDE4mIlfTubovzSklSFjPziElulaENDIz1DA3M9IyMj PRPjWCsjU6CShNSMP+sXsRZ0C1dMOPaGuYFxgkAXIyeHhICJxL4pTYwQtpjEhXvr2boYuTiE BHYwSkz4tZIZwvnMKNHb/I0NpqN5/TKEqt5bF6GcH4wSVxbtAqtiE9CS2P/iBpgtIiAi0fZ8 BhNIEbPAVUaJTfeawRYKC7hLzP5/EsxmEVCVmHJnGhOIzSvgKnG89zM7xDo5iQ97HoHZnAJu Evfu/WKGiLezSzRN1uli5ACyZSU2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lEd59t5oihXhTEiurUovy44tKc1KLDzGaAp01kVlK NDkfGIt5JfGGJpZGJgZmZoZGBsZmSuK8EwK/RAgJpCeWpGanphakFsH0MXFwSjUwHg57oXsy 7uynqRNWG/sd0TH4nm82xev0irzJqSob32WyPjaqtumdu/X1goMm2/0r3KUWpMx8GD1H55oB Z0rDvMhFtfz7pvmYdCTI74iQWLX03ASvZf8Xbg8QYraZEurkf1yO8bTHH0Fxl+QrzjHr8mrk Mo83LrlU9PTu++q7Vdw2n92zLT3uKLEUZyQaajEXFScCANroUPSNAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170803082050epcas1p3040420e1fef2186519f50a68f865e006 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: 20170803082050epcas1p3040420e1fef2186519f50a68f865e006 X-RootMTR: 20170803082050epcas1p3040420e1fef2186519f50a68f865e006 References: <1501748448-26821-1-git-send-email-cw00.choi@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170803_012124_213193_096AAB62 X-CRM114-Status: GOOD ( 12.53 ) 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: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, kishon@ti.com, 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() 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"); }