* [PATCH 2/5] phy: rockchip-inno-usb2: Replace the extcon API [not found] ` <1500254456-6525-1-git-send-email-cw00.choi@samsung.com> @ 2017-07-17 1:20 ` Chanwoo Choi [not found] ` <1500254456-6525-3-git-send-email-cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Chanwoo Choi @ 2017-07-17 1:20 UTC (permalink / raw) To: kishon, balbi, gregkh Cc: linux-kernel, linux-arm-kernel, linux-usb, cw00.choi, chanwoo, myungjoo.ham, linux-rockchip 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 <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 ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <1500254456-6525-3-git-send-email-cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>]
* Re: [PATCH 2/5] phy: rockchip-inno-usb2: Replace the extcon API [not found] ` <1500254456-6525-3-git-send-email-cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> @ 2017-08-02 5:12 ` Kishon Vijay Abraham I [not found] ` <06154871-a821-edab-23d8-340c5b0f5081-l0cyMroinI0@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Kishon Vijay Abraham I @ 2017-08-02 5:12 UTC (permalink / raw) To: Chanwoo Choi, balbi-DgEjT+Ai2ygdnm+yROfE0A, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ, chanwoo-DgEjT+Ai2ygdnm+yROfE0A, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On Monday 17 July 2017 06:50 AM, Chanwoo Choi wrote: > 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-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org > acked-by: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org> ^ should be 'A' here. -Kishon > Signed-off-by: Chanwoo Choi <cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> > --- > 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"); > } > ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <06154871-a821-edab-23d8-340c5b0f5081-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH 2/5] phy: rockchip-inno-usb2: Replace the extcon API [not found] ` <06154871-a821-edab-23d8-340c5b0f5081-l0cyMroinI0@public.gmane.org> @ 2017-08-03 8:11 ` Chanwoo Choi 0 siblings, 0 replies; 3+ messages in thread From: Chanwoo Choi @ 2017-08-03 8:11 UTC (permalink / raw) To: Kishon Vijay Abraham I, balbi-DgEjT+Ai2ygdnm+yROfE0A, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-usb-u79uwXL29TY76Z2rM5mHXA, chanwoo-DgEjT+Ai2ygdnm+yROfE0A, myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Hi, On 2017년 08월 02일 14:12, Kishon Vijay Abraham I wrote: > > > On Monday 17 July 2017 06:50 AM, Chanwoo Choi wrote: >> 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-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org >> acked-by: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org> > ^ > should be 'A' here. My mistake. I'll fix it. [snip] -- Best Regards, Chanwoo Choi Samsung Electronics -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-03 8:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20170717012058epcas1p157e9a296eb5e415ae24bb51a1e6026db@epcas1p1.samsung.com>
[not found] ` <1500254456-6525-1-git-send-email-cw00.choi@samsung.com>
2017-07-17 1:20 ` [PATCH 2/5] phy: rockchip-inno-usb2: Replace the extcon API Chanwoo Choi
[not found] ` <1500254456-6525-3-git-send-email-cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2017-08-02 5:12 ` Kishon Vijay Abraham I
[not found] ` <06154871-a821-edab-23d8-340c5b0f5081-l0cyMroinI0@public.gmane.org>
2017-08-03 8:11 ` Chanwoo Choi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).