From: Chanwoo Choi <cw00.choi@samsung.com> To: balbi@kernel.org Cc: kishon@ti.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, cw00.choi@samsung.com, chanwoo@kernel.org, myungjoo.ham@samsung.com Subject: [PATCH v2 2/5] phy: rockchip-inno-usb2: Replace the extcon API Date: Thu, 03 Aug 2017 17:20:45 +0900 [thread overview] Message-ID: <1501748448-26821-3-git-send-email-cw00.choi@samsung.com> (raw) In-Reply-To: <1501748448-26821-1-git-send-email-cw00.choi@samsung.com> 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 <kishon@ti.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> --- 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"); } -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: cw00.choi@samsung.com (Chanwoo Choi) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/5] phy: rockchip-inno-usb2: Replace the extcon API Date: Thu, 03 Aug 2017 17:20:45 +0900 [thread overview] Message-ID: <1501748448-26821-3-git-send-email-cw00.choi@samsung.com> (raw) In-Reply-To: <1501748448-26821-1-git-send-email-cw00.choi@samsung.com> 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 <kishon@ti.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> --- 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"); } -- 1.9.1
next prev parent reply other threads:[~2017-08-03 8:21 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <CGME20170803082049epcas1p3ca6cb415ce40b24fa360f7155ea0829c@epcas1p3.samsung.com> 2017-08-03 8:20 ` [PATCH v2 0/5] usb: Replace the deprecated extcon API Chanwoo Choi 2017-08-03 8:20 ` Chanwoo Choi [not found] ` <CGME20170803082050epcas1p2d72847ff1a6c31a9ba281daeecd17b18@epcas1p2.samsung.com> 2017-08-03 8:20 ` [PATCH v2 1/5] phy: qcom-usb-hs: Replace the " Chanwoo Choi 2017-08-03 8:20 ` Chanwoo Choi [not found] ` <CGME20170803082050epcas1p3040420e1fef2186519f50a68f865e006@epcas1p3.samsung.com> 2017-08-03 8:20 ` Chanwoo Choi [this message] 2017-08-03 8:20 ` [PATCH v2 2/5] phy: rockchip-inno-usb2: " Chanwoo Choi [not found] ` <CGME20170803082050epcas1p179818a40e214e4ab5884f8a3bca657f8@epcas1p1.samsung.com> 2017-08-03 8:20 ` [PATCH v2 3/5] phy: phy-bcm-ns2-usbdrd: Replace the deprecated " Chanwoo Choi 2017-08-03 8:20 ` Chanwoo Choi [not found] ` <CGME20170803082050epcas1p2491eedf2f26510f55cd15ce777356fce@epcas1p2.samsung.com> 2017-08-03 8:20 ` [PATCH v2 4/5] usb: gadget: udc: " Chanwoo Choi 2017-08-03 8:20 ` Chanwoo Choi 2017-08-07 2:07 ` Chanwoo Choi 2017-08-07 2:07 ` Chanwoo Choi 2017-08-10 0:09 ` Chanwoo Choi 2017-08-10 0:09 ` Chanwoo Choi 2017-08-15 9:48 ` Felipe Balbi 2017-08-15 9:48 ` Felipe Balbi 2017-08-16 0:19 ` Chanwoo Choi 2017-08-16 0:19 ` Chanwoo Choi [not found] ` <CGME20170803082050epcas1p38d70b5df911a855708c891b659a56fce@epcas1p3.samsung.com> 2017-08-03 8:20 ` [PATCH v2 5/5] extcon: Remove deprecated extcon_set/get_cable_state_() Chanwoo Choi 2017-08-03 8:20 ` Chanwoo Choi 2017-08-16 1:52 ` [PATCH v2 0/5] usb: Replace the deprecated extcon API Chanwoo Choi 2017-08-16 1:52 ` Chanwoo Choi
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1501748448-26821-3-git-send-email-cw00.choi@samsung.com \ --to=cw00.choi@samsung.com \ --cc=balbi@kernel.org \ --cc=chanwoo@kernel.org \ --cc=gregkh@linuxfoundation.org \ --cc=kishon@ti.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-usb@vger.kernel.org \ --cc=myungjoo.ham@samsung.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.