* [PATCH 1/2] phy: qcom-usb-hs: Replace the extcon API [not found] <CGME20170328043830epcas1p4069bda461ad648cfd6598905b7167e9f@epcas1p4.samsung.com> @ 2017-03-28 4:38 ` Chanwoo Choi 0 siblings, 0 replies; 16+ messages in thread From: Chanwoo Choi @ 2017-03-28 4:38 UTC (permalink / raw) To: kishon; +Cc: linux-arm-kernel, linux-kernel, chanwoo, Chanwoo Choi This patch uses the resource-managed extcon API for extcon_register_notifier() and replaces the deprecated extcon API as following: - (deprecated) extcon_get_cable_state_() -> extcon_get_state() Cc: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> --- drivers/phy/phy-qcom-usb-hs.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/phy/phy-qcom-usb-hs.c b/drivers/phy/phy-qcom-usb-hs.c index 94dfbfd739c3..f630fa553b7d 100644 --- a/drivers/phy/phy-qcom-usb-hs.c +++ b/drivers/phy/phy-qcom-usb-hs.c @@ -156,12 +156,12 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) } if (uphy->vbus_edev) { - state = extcon_get_cable_state_(uphy->vbus_edev, EXTCON_USB); + state = extcon_get_state(uphy->vbus_edev, EXTCON_USB); /* setup initial state */ qcom_usb_hs_phy_vbus_notifier(&uphy->vbus_notify, state, uphy->vbus_edev); - ret = extcon_register_notifier(uphy->vbus_edev, EXTCON_USB, - &uphy->vbus_notify); + ret = devm_extcon_register_notifier(&ulpi->dev, uphy->vbus_edev, + EXTCON_USB, &uphy->vbus_notify); if (ret) goto err_ulpi; } @@ -180,16 +180,8 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) static int qcom_usb_hs_phy_power_off(struct phy *phy) { - int ret; struct qcom_usb_hs_phy *uphy = phy_get_drvdata(phy); - if (uphy->vbus_edev) { - ret = extcon_unregister_notifier(uphy->vbus_edev, EXTCON_USB, - &uphy->vbus_notify); - if (ret) - return ret; - } - regulator_disable(uphy->v3p3); regulator_disable(uphy->v1p8); clk_disable_unprepare(uphy->sleep_clk); -- 1.9.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 1/2] phy: qcom-usb-hs: Replace the extcon API @ 2017-03-28 4:38 ` Chanwoo Choi 0 siblings, 0 replies; 16+ messages in thread From: Chanwoo Choi @ 2017-03-28 4:38 UTC (permalink / raw) To: linux-arm-kernel This patch uses the resource-managed extcon API for extcon_register_notifier() and replaces the deprecated extcon API as following: - (deprecated) extcon_get_cable_state_() -> extcon_get_state() Cc: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> --- drivers/phy/phy-qcom-usb-hs.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/phy/phy-qcom-usb-hs.c b/drivers/phy/phy-qcom-usb-hs.c index 94dfbfd739c3..f630fa553b7d 100644 --- a/drivers/phy/phy-qcom-usb-hs.c +++ b/drivers/phy/phy-qcom-usb-hs.c @@ -156,12 +156,12 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) } if (uphy->vbus_edev) { - state = extcon_get_cable_state_(uphy->vbus_edev, EXTCON_USB); + state = extcon_get_state(uphy->vbus_edev, EXTCON_USB); /* setup initial state */ qcom_usb_hs_phy_vbus_notifier(&uphy->vbus_notify, state, uphy->vbus_edev); - ret = extcon_register_notifier(uphy->vbus_edev, EXTCON_USB, - &uphy->vbus_notify); + ret = devm_extcon_register_notifier(&ulpi->dev, uphy->vbus_edev, + EXTCON_USB, &uphy->vbus_notify); if (ret) goto err_ulpi; } @@ -180,16 +180,8 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) static int qcom_usb_hs_phy_power_off(struct phy *phy) { - int ret; struct qcom_usb_hs_phy *uphy = phy_get_drvdata(phy); - if (uphy->vbus_edev) { - ret = extcon_unregister_notifier(uphy->vbus_edev, EXTCON_USB, - &uphy->vbus_notify); - if (ret) - return ret; - } - regulator_disable(uphy->v3p3); regulator_disable(uphy->v1p8); clk_disable_unprepare(uphy->sleep_clk); -- 1.9.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
[parent not found: <CGME20170328043830epcas5p2a949278d79e3741891991a3bbeafb9dc@epcas5p2.samsung.com>]
* [PATCH 2/2] phy: rockchip-inno-usb2: Replace the extcon API [not found] ` <CGME20170328043830epcas5p2a949278d79e3741891991a3bbeafb9dc@epcas5p2.samsung.com> 2017-03-28 4:38 ` Chanwoo Choi @ 2017-03-28 4:38 ` Chanwoo Choi 0 siblings, 0 replies; 16+ messages in thread From: Chanwoo Choi @ 2017-03-28 4:38 UTC (permalink / raw) To: kishon Cc: linux-arm-kernel, linux-kernel, chanwoo, Chanwoo Choi, Heiko Stuebner, 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: Kishon Vijay Abraham I <kishon@ti.com> Cc: Heiko Stuebner <heiko@sntech.de> Cc: linux-rockchip@lists.infradead.org Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> --- 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"); } -- 1.9.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/2] phy: rockchip-inno-usb2: Replace the extcon API @ 2017-03-28 4:38 ` Chanwoo Choi 0 siblings, 0 replies; 16+ messages in thread From: Chanwoo Choi @ 2017-03-28 4:38 UTC (permalink / raw) To: linux-arm-kernel 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 <kishon@ti.com> Cc: Heiko Stuebner <heiko@sntech.de> Cc: linux-rockchip at lists.infradead.org Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> --- 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"); } -- 1.9.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/2] phy: rockchip-inno-usb2: Replace the extcon API @ 2017-03-28 4:38 ` Chanwoo Choi 0 siblings, 0 replies; 16+ messages in thread From: Chanwoo Choi @ 2017-03-28 4:38 UTC (permalink / raw) To: kishon Cc: Heiko Stuebner, Chanwoo Choi, linux-kernel, linux-rockchip, chanwoo, linux-arm-kernel 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 <kishon@ti.com> Cc: Heiko Stuebner <heiko@sntech.de> Cc: linux-rockchip@lists.infradead.org Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> --- 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"); } -- 1.9.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 2/2] phy: rockchip-inno-usb2: Replace the extcon API @ 2017-04-13 11:47 ` Kishon Vijay Abraham I 0 siblings, 0 replies; 16+ messages in thread From: Kishon Vijay Abraham I @ 2017-04-13 11:47 UTC (permalink / raw) To: Chanwoo Choi Cc: linux-arm-kernel, linux-kernel, chanwoo, Heiko Stuebner, linux-rockchip On Tuesday 28 March 2017 10:08 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: Kishon Vijay Abraham I <kishon@ti.com> > Cc: Heiko Stuebner <heiko@sntech.de> > Cc: linux-rockchip@lists.infradead.org > Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> for this too: Acked-by: Kishon Vijay Abraham I <kishon@ti.com> > --- > 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"); > } > ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 2/2] phy: rockchip-inno-usb2: Replace the extcon API @ 2017-04-13 11:47 ` Kishon Vijay Abraham I 0 siblings, 0 replies; 16+ messages in thread From: Kishon Vijay Abraham I @ 2017-04-13 11:47 UTC (permalink / raw) To: linux-arm-kernel On Tuesday 28 March 2017 10:08 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: Kishon Vijay Abraham I <kishon@ti.com> > Cc: Heiko Stuebner <heiko@sntech.de> > Cc: linux-rockchip at lists.infradead.org > Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> for this too: Acked-by: Kishon Vijay Abraham I <kishon@ti.com> > --- > 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"); > } > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/2] phy: rockchip-inno-usb2: Replace the extcon API @ 2017-04-13 11:47 ` Kishon Vijay Abraham I 0 siblings, 0 replies; 16+ messages in thread From: Kishon Vijay Abraham I @ 2017-04-13 11:47 UTC (permalink / raw) To: Chanwoo Choi Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, chanwoo-DgEjT+Ai2ygdnm+yROfE0A, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Heiko Stuebner On Tuesday 28 March 2017 10:08 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: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org> > Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org> > Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org > Signed-off-by: Chanwoo Choi <cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> for this too: Acked-by: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org> > --- > 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"); > } > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] phy: qcom-usb-hs: Replace the extcon API 2017-03-28 4:38 ` Chanwoo Choi @ 2017-04-13 1:03 ` Chanwoo Choi -1 siblings, 0 replies; 16+ messages in thread From: Chanwoo Choi @ 2017-04-13 1:03 UTC (permalink / raw) To: kishon; +Cc: linux-arm-kernel, linux-kernel, chanwoo Hi Kishon, Could you please review these patches? On 2017년 03월 28일 13:38, Chanwoo Choi wrote: > This patch uses the resource-managed extcon API for extcon_register_notifier() > and replaces the deprecated extcon API as following: > - (deprecated) extcon_get_cable_state_() -> extcon_get_state() > > Cc: Kishon Vijay Abraham I <kishon@ti.com> > Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> > --- > drivers/phy/phy-qcom-usb-hs.c | 14 +++----------- > 1 file changed, 3 insertions(+), 11 deletions(-) > > diff --git a/drivers/phy/phy-qcom-usb-hs.c b/drivers/phy/phy-qcom-usb-hs.c > index 94dfbfd739c3..f630fa553b7d 100644 > --- a/drivers/phy/phy-qcom-usb-hs.c > +++ b/drivers/phy/phy-qcom-usb-hs.c > @@ -156,12 +156,12 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) > } > > if (uphy->vbus_edev) { > - state = extcon_get_cable_state_(uphy->vbus_edev, EXTCON_USB); > + state = extcon_get_state(uphy->vbus_edev, EXTCON_USB); > /* setup initial state */ > qcom_usb_hs_phy_vbus_notifier(&uphy->vbus_notify, state, > uphy->vbus_edev); > - ret = extcon_register_notifier(uphy->vbus_edev, EXTCON_USB, > - &uphy->vbus_notify); > + ret = devm_extcon_register_notifier(&ulpi->dev, uphy->vbus_edev, > + EXTCON_USB, &uphy->vbus_notify); > if (ret) > goto err_ulpi; > } > @@ -180,16 +180,8 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) > > static int qcom_usb_hs_phy_power_off(struct phy *phy) > { > - int ret; > struct qcom_usb_hs_phy *uphy = phy_get_drvdata(phy); > > - if (uphy->vbus_edev) { > - ret = extcon_unregister_notifier(uphy->vbus_edev, EXTCON_USB, > - &uphy->vbus_notify); > - if (ret) > - return ret; > - } > - > regulator_disable(uphy->v3p3); > regulator_disable(uphy->v1p8); > clk_disable_unprepare(uphy->sleep_clk); > -- Best Regards, Chanwoo Choi Samsung Electronics ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] phy: qcom-usb-hs: Replace the extcon API @ 2017-04-13 1:03 ` Chanwoo Choi 0 siblings, 0 replies; 16+ messages in thread From: Chanwoo Choi @ 2017-04-13 1:03 UTC (permalink / raw) To: linux-arm-kernel Hi Kishon, Could you please review these patches? On 2017? 03? 28? 13:38, Chanwoo Choi wrote: > This patch uses the resource-managed extcon API for extcon_register_notifier() > and replaces the deprecated extcon API as following: > - (deprecated) extcon_get_cable_state_() -> extcon_get_state() > > Cc: Kishon Vijay Abraham I <kishon@ti.com> > Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> > --- > drivers/phy/phy-qcom-usb-hs.c | 14 +++----------- > 1 file changed, 3 insertions(+), 11 deletions(-) > > diff --git a/drivers/phy/phy-qcom-usb-hs.c b/drivers/phy/phy-qcom-usb-hs.c > index 94dfbfd739c3..f630fa553b7d 100644 > --- a/drivers/phy/phy-qcom-usb-hs.c > +++ b/drivers/phy/phy-qcom-usb-hs.c > @@ -156,12 +156,12 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) > } > > if (uphy->vbus_edev) { > - state = extcon_get_cable_state_(uphy->vbus_edev, EXTCON_USB); > + state = extcon_get_state(uphy->vbus_edev, EXTCON_USB); > /* setup initial state */ > qcom_usb_hs_phy_vbus_notifier(&uphy->vbus_notify, state, > uphy->vbus_edev); > - ret = extcon_register_notifier(uphy->vbus_edev, EXTCON_USB, > - &uphy->vbus_notify); > + ret = devm_extcon_register_notifier(&ulpi->dev, uphy->vbus_edev, > + EXTCON_USB, &uphy->vbus_notify); > if (ret) > goto err_ulpi; > } > @@ -180,16 +180,8 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) > > static int qcom_usb_hs_phy_power_off(struct phy *phy) > { > - int ret; > struct qcom_usb_hs_phy *uphy = phy_get_drvdata(phy); > > - if (uphy->vbus_edev) { > - ret = extcon_unregister_notifier(uphy->vbus_edev, EXTCON_USB, > - &uphy->vbus_notify); > - if (ret) > - return ret; > - } > - > regulator_disable(uphy->v3p3); > regulator_disable(uphy->v1p8); > clk_disable_unprepare(uphy->sleep_clk); > -- Best Regards, Chanwoo Choi Samsung Electronics ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] phy: qcom-usb-hs: Replace the extcon API 2017-03-28 4:38 ` Chanwoo Choi @ 2017-04-13 11:47 ` Kishon Vijay Abraham I -1 siblings, 0 replies; 16+ messages in thread From: Kishon Vijay Abraham I @ 2017-04-13 11:47 UTC (permalink / raw) To: Chanwoo Choi; +Cc: linux-arm-kernel, linux-kernel, chanwoo Hi Chanwoo, On Tuesday 28 March 2017 10:08 AM, Chanwoo Choi wrote: > This patch uses the resource-managed extcon API for extcon_register_notifier() > and replaces the deprecated extcon API as following: > - (deprecated) extcon_get_cable_state_() -> extcon_get_state() > > Cc: Kishon Vijay Abraham I <kishon@ti.com> > Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> I've missed merging this patch for the next merge window. If you want to take this yourself. Acked-by: Kishon Vijay Abraham I <kishon@ti.com> Thanks Kishon > --- > drivers/phy/phy-qcom-usb-hs.c | 14 +++----------- > 1 file changed, 3 insertions(+), 11 deletions(-) > > diff --git a/drivers/phy/phy-qcom-usb-hs.c b/drivers/phy/phy-qcom-usb-hs.c > index 94dfbfd739c3..f630fa553b7d 100644 > --- a/drivers/phy/phy-qcom-usb-hs.c > +++ b/drivers/phy/phy-qcom-usb-hs.c > @@ -156,12 +156,12 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) > } > > if (uphy->vbus_edev) { > - state = extcon_get_cable_state_(uphy->vbus_edev, EXTCON_USB); > + state = extcon_get_state(uphy->vbus_edev, EXTCON_USB); > /* setup initial state */ > qcom_usb_hs_phy_vbus_notifier(&uphy->vbus_notify, state, > uphy->vbus_edev); > - ret = extcon_register_notifier(uphy->vbus_edev, EXTCON_USB, > - &uphy->vbus_notify); > + ret = devm_extcon_register_notifier(&ulpi->dev, uphy->vbus_edev, > + EXTCON_USB, &uphy->vbus_notify); > if (ret) > goto err_ulpi; > } > @@ -180,16 +180,8 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) > > static int qcom_usb_hs_phy_power_off(struct phy *phy) > { > - int ret; > struct qcom_usb_hs_phy *uphy = phy_get_drvdata(phy); > > - if (uphy->vbus_edev) { > - ret = extcon_unregister_notifier(uphy->vbus_edev, EXTCON_USB, > - &uphy->vbus_notify); > - if (ret) > - return ret; > - } > - > regulator_disable(uphy->v3p3); > regulator_disable(uphy->v1p8); > clk_disable_unprepare(uphy->sleep_clk); > ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] phy: qcom-usb-hs: Replace the extcon API @ 2017-04-13 11:47 ` Kishon Vijay Abraham I 0 siblings, 0 replies; 16+ messages in thread From: Kishon Vijay Abraham I @ 2017-04-13 11:47 UTC (permalink / raw) To: linux-arm-kernel Hi Chanwoo, On Tuesday 28 March 2017 10:08 AM, Chanwoo Choi wrote: > This patch uses the resource-managed extcon API for extcon_register_notifier() > and replaces the deprecated extcon API as following: > - (deprecated) extcon_get_cable_state_() -> extcon_get_state() > > Cc: Kishon Vijay Abraham I <kishon@ti.com> > Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> I've missed merging this patch for the next merge window. If you want to take this yourself. Acked-by: Kishon Vijay Abraham I <kishon@ti.com> Thanks Kishon > --- > drivers/phy/phy-qcom-usb-hs.c | 14 +++----------- > 1 file changed, 3 insertions(+), 11 deletions(-) > > diff --git a/drivers/phy/phy-qcom-usb-hs.c b/drivers/phy/phy-qcom-usb-hs.c > index 94dfbfd739c3..f630fa553b7d 100644 > --- a/drivers/phy/phy-qcom-usb-hs.c > +++ b/drivers/phy/phy-qcom-usb-hs.c > @@ -156,12 +156,12 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) > } > > if (uphy->vbus_edev) { > - state = extcon_get_cable_state_(uphy->vbus_edev, EXTCON_USB); > + state = extcon_get_state(uphy->vbus_edev, EXTCON_USB); > /* setup initial state */ > qcom_usb_hs_phy_vbus_notifier(&uphy->vbus_notify, state, > uphy->vbus_edev); > - ret = extcon_register_notifier(uphy->vbus_edev, EXTCON_USB, > - &uphy->vbus_notify); > + ret = devm_extcon_register_notifier(&ulpi->dev, uphy->vbus_edev, > + EXTCON_USB, &uphy->vbus_notify); > if (ret) > goto err_ulpi; > } > @@ -180,16 +180,8 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) > > static int qcom_usb_hs_phy_power_off(struct phy *phy) > { > - int ret; > struct qcom_usb_hs_phy *uphy = phy_get_drvdata(phy); > > - if (uphy->vbus_edev) { > - ret = extcon_unregister_notifier(uphy->vbus_edev, EXTCON_USB, > - &uphy->vbus_notify); > - if (ret) > - return ret; > - } > - > regulator_disable(uphy->v3p3); > regulator_disable(uphy->v1p8); > clk_disable_unprepare(uphy->sleep_clk); > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] phy: qcom-usb-hs: Replace the extcon API 2017-04-13 11:47 ` Kishon Vijay Abraham I @ 2017-04-14 0:43 ` Chanwoo Choi -1 siblings, 0 replies; 16+ messages in thread From: Chanwoo Choi @ 2017-04-14 0:43 UTC (permalink / raw) To: Kishon Vijay Abraham I; +Cc: linux-arm-kernel, linux-kernel, chanwoo Hi Kishon, On 2017년 04월 13일 20:47, Kishon Vijay Abraham I wrote: > Hi Chanwoo, > > On Tuesday 28 March 2017 10:08 AM, Chanwoo Choi wrote: >> This patch uses the resource-managed extcon API for extcon_register_notifier() >> and replaces the deprecated extcon API as following: >> - (deprecated) extcon_get_cable_state_() -> extcon_get_state() >> >> Cc: Kishon Vijay Abraham I <kishon@ti.com> >> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> > > I've missed merging this patch for the next merge window. If you want to take > this yourself. > Acked-by: Kishon Vijay Abraham I <kishon@ti.com> I already posted the pull-request to GregKH for extcon subsystem. So, if possible, I hope you handle these patches. Even if these patches are not merged to 4.12-rc1, I'm ok. Just I want to handle them on your tree for next time. > > Thanks > Kishon >> --- >> drivers/phy/phy-qcom-usb-hs.c | 14 +++----------- >> 1 file changed, 3 insertions(+), 11 deletions(-) >> >> diff --git a/drivers/phy/phy-qcom-usb-hs.c b/drivers/phy/phy-qcom-usb-hs.c >> index 94dfbfd739c3..f630fa553b7d 100644 >> --- a/drivers/phy/phy-qcom-usb-hs.c >> +++ b/drivers/phy/phy-qcom-usb-hs.c >> @@ -156,12 +156,12 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) >> } >> >> if (uphy->vbus_edev) { >> - state = extcon_get_cable_state_(uphy->vbus_edev, EXTCON_USB); >> + state = extcon_get_state(uphy->vbus_edev, EXTCON_USB); >> /* setup initial state */ >> qcom_usb_hs_phy_vbus_notifier(&uphy->vbus_notify, state, >> uphy->vbus_edev); >> - ret = extcon_register_notifier(uphy->vbus_edev, EXTCON_USB, >> - &uphy->vbus_notify); >> + ret = devm_extcon_register_notifier(&ulpi->dev, uphy->vbus_edev, >> + EXTCON_USB, &uphy->vbus_notify); >> if (ret) >> goto err_ulpi; >> } >> @@ -180,16 +180,8 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) >> >> static int qcom_usb_hs_phy_power_off(struct phy *phy) >> { >> - int ret; >> struct qcom_usb_hs_phy *uphy = phy_get_drvdata(phy); >> >> - if (uphy->vbus_edev) { >> - ret = extcon_unregister_notifier(uphy->vbus_edev, EXTCON_USB, >> - &uphy->vbus_notify); >> - if (ret) >> - return ret; >> - } >> - >> regulator_disable(uphy->v3p3); >> regulator_disable(uphy->v1p8); >> clk_disable_unprepare(uphy->sleep_clk); >> > > > -- Best Regards, Chanwoo Choi Samsung Electronics ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] phy: qcom-usb-hs: Replace the extcon API @ 2017-04-14 0:43 ` Chanwoo Choi 0 siblings, 0 replies; 16+ messages in thread From: Chanwoo Choi @ 2017-04-14 0:43 UTC (permalink / raw) To: linux-arm-kernel Hi Kishon, On 2017? 04? 13? 20:47, Kishon Vijay Abraham I wrote: > Hi Chanwoo, > > On Tuesday 28 March 2017 10:08 AM, Chanwoo Choi wrote: >> This patch uses the resource-managed extcon API for extcon_register_notifier() >> and replaces the deprecated extcon API as following: >> - (deprecated) extcon_get_cable_state_() -> extcon_get_state() >> >> Cc: Kishon Vijay Abraham I <kishon@ti.com> >> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> > > I've missed merging this patch for the next merge window. If you want to take > this yourself. > Acked-by: Kishon Vijay Abraham I <kishon@ti.com> I already posted the pull-request to GregKH for extcon subsystem. So, if possible, I hope you handle these patches. Even if these patches are not merged to 4.12-rc1, I'm ok. Just I want to handle them on your tree for next time. > > Thanks > Kishon >> --- >> drivers/phy/phy-qcom-usb-hs.c | 14 +++----------- >> 1 file changed, 3 insertions(+), 11 deletions(-) >> >> diff --git a/drivers/phy/phy-qcom-usb-hs.c b/drivers/phy/phy-qcom-usb-hs.c >> index 94dfbfd739c3..f630fa553b7d 100644 >> --- a/drivers/phy/phy-qcom-usb-hs.c >> +++ b/drivers/phy/phy-qcom-usb-hs.c >> @@ -156,12 +156,12 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) >> } >> >> if (uphy->vbus_edev) { >> - state = extcon_get_cable_state_(uphy->vbus_edev, EXTCON_USB); >> + state = extcon_get_state(uphy->vbus_edev, EXTCON_USB); >> /* setup initial state */ >> qcom_usb_hs_phy_vbus_notifier(&uphy->vbus_notify, state, >> uphy->vbus_edev); >> - ret = extcon_register_notifier(uphy->vbus_edev, EXTCON_USB, >> - &uphy->vbus_notify); >> + ret = devm_extcon_register_notifier(&ulpi->dev, uphy->vbus_edev, >> + EXTCON_USB, &uphy->vbus_notify); >> if (ret) >> goto err_ulpi; >> } >> @@ -180,16 +180,8 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) >> >> static int qcom_usb_hs_phy_power_off(struct phy *phy) >> { >> - int ret; >> struct qcom_usb_hs_phy *uphy = phy_get_drvdata(phy); >> >> - if (uphy->vbus_edev) { >> - ret = extcon_unregister_notifier(uphy->vbus_edev, EXTCON_USB, >> - &uphy->vbus_notify); >> - if (ret) >> - return ret; >> - } >> - >> regulator_disable(uphy->v3p3); >> regulator_disable(uphy->v1p8); >> clk_disable_unprepare(uphy->sleep_clk); >> > > > -- Best Regards, Chanwoo Choi Samsung Electronics ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] phy: qcom-usb-hs: Replace the extcon API 2017-04-14 0:43 ` Chanwoo Choi @ 2017-04-14 4:57 ` Kishon Vijay Abraham I -1 siblings, 0 replies; 16+ messages in thread From: Kishon Vijay Abraham I @ 2017-04-14 4:57 UTC (permalink / raw) To: Chanwoo Choi; +Cc: linux-arm-kernel, linux-kernel, chanwoo hi Chanwoo, On Friday 14 April 2017 06:13 AM, Chanwoo Choi wrote: > Hi Kishon, > > On 2017년 04월 13일 20:47, Kishon Vijay Abraham I wrote: >> Hi Chanwoo, >> >> On Tuesday 28 March 2017 10:08 AM, Chanwoo Choi wrote: >>> This patch uses the resource-managed extcon API for extcon_register_notifier() >>> and replaces the deprecated extcon API as following: >>> - (deprecated) extcon_get_cable_state_() -> extcon_get_state() >>> >>> Cc: Kishon Vijay Abraham I <kishon@ti.com> >>> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> >> >> I've missed merging this patch for the next merge window. If you want to take >> this yourself. >> Acked-by: Kishon Vijay Abraham I <kishon@ti.com> > > I already posted the pull-request to GregKH for extcon subsystem. > So, if possible, I hope you handle these patches. > Even if these patches are not merged to 4.12-rc1, I'm ok. > Just I want to handle them on your tree for next time. Sure, I'll take them then. Thanks Kishon > >> >> Thanks >> Kishon >>> --- >>> drivers/phy/phy-qcom-usb-hs.c | 14 +++----------- >>> 1 file changed, 3 insertions(+), 11 deletions(-) >>> >>> diff --git a/drivers/phy/phy-qcom-usb-hs.c b/drivers/phy/phy-qcom-usb-hs.c >>> index 94dfbfd739c3..f630fa553b7d 100644 >>> --- a/drivers/phy/phy-qcom-usb-hs.c >>> +++ b/drivers/phy/phy-qcom-usb-hs.c >>> @@ -156,12 +156,12 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) >>> } >>> >>> if (uphy->vbus_edev) { >>> - state = extcon_get_cable_state_(uphy->vbus_edev, EXTCON_USB); >>> + state = extcon_get_state(uphy->vbus_edev, EXTCON_USB); >>> /* setup initial state */ >>> qcom_usb_hs_phy_vbus_notifier(&uphy->vbus_notify, state, >>> uphy->vbus_edev); >>> - ret = extcon_register_notifier(uphy->vbus_edev, EXTCON_USB, >>> - &uphy->vbus_notify); >>> + ret = devm_extcon_register_notifier(&ulpi->dev, uphy->vbus_edev, >>> + EXTCON_USB, &uphy->vbus_notify); >>> if (ret) >>> goto err_ulpi; >>> } >>> @@ -180,16 +180,8 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) >>> >>> static int qcom_usb_hs_phy_power_off(struct phy *phy) >>> { >>> - int ret; >>> struct qcom_usb_hs_phy *uphy = phy_get_drvdata(phy); >>> >>> - if (uphy->vbus_edev) { >>> - ret = extcon_unregister_notifier(uphy->vbus_edev, EXTCON_USB, >>> - &uphy->vbus_notify); >>> - if (ret) >>> - return ret; >>> - } >>> - >>> regulator_disable(uphy->v3p3); >>> regulator_disable(uphy->v1p8); >>> clk_disable_unprepare(uphy->sleep_clk); >>> >> >> >> > > ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] phy: qcom-usb-hs: Replace the extcon API @ 2017-04-14 4:57 ` Kishon Vijay Abraham I 0 siblings, 0 replies; 16+ messages in thread From: Kishon Vijay Abraham I @ 2017-04-14 4:57 UTC (permalink / raw) To: linux-arm-kernel hi Chanwoo, On Friday 14 April 2017 06:13 AM, Chanwoo Choi wrote: > Hi Kishon, > > On 2017? 04? 13? 20:47, Kishon Vijay Abraham I wrote: >> Hi Chanwoo, >> >> On Tuesday 28 March 2017 10:08 AM, Chanwoo Choi wrote: >>> This patch uses the resource-managed extcon API for extcon_register_notifier() >>> and replaces the deprecated extcon API as following: >>> - (deprecated) extcon_get_cable_state_() -> extcon_get_state() >>> >>> Cc: Kishon Vijay Abraham I <kishon@ti.com> >>> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> >> >> I've missed merging this patch for the next merge window. If you want to take >> this yourself. >> Acked-by: Kishon Vijay Abraham I <kishon@ti.com> > > I already posted the pull-request to GregKH for extcon subsystem. > So, if possible, I hope you handle these patches. > Even if these patches are not merged to 4.12-rc1, I'm ok. > Just I want to handle them on your tree for next time. Sure, I'll take them then. Thanks Kishon > >> >> Thanks >> Kishon >>> --- >>> drivers/phy/phy-qcom-usb-hs.c | 14 +++----------- >>> 1 file changed, 3 insertions(+), 11 deletions(-) >>> >>> diff --git a/drivers/phy/phy-qcom-usb-hs.c b/drivers/phy/phy-qcom-usb-hs.c >>> index 94dfbfd739c3..f630fa553b7d 100644 >>> --- a/drivers/phy/phy-qcom-usb-hs.c >>> +++ b/drivers/phy/phy-qcom-usb-hs.c >>> @@ -156,12 +156,12 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) >>> } >>> >>> if (uphy->vbus_edev) { >>> - state = extcon_get_cable_state_(uphy->vbus_edev, EXTCON_USB); >>> + state = extcon_get_state(uphy->vbus_edev, EXTCON_USB); >>> /* setup initial state */ >>> qcom_usb_hs_phy_vbus_notifier(&uphy->vbus_notify, state, >>> uphy->vbus_edev); >>> - ret = extcon_register_notifier(uphy->vbus_edev, EXTCON_USB, >>> - &uphy->vbus_notify); >>> + ret = devm_extcon_register_notifier(&ulpi->dev, uphy->vbus_edev, >>> + EXTCON_USB, &uphy->vbus_notify); >>> if (ret) >>> goto err_ulpi; >>> } >>> @@ -180,16 +180,8 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) >>> >>> static int qcom_usb_hs_phy_power_off(struct phy *phy) >>> { >>> - int ret; >>> struct qcom_usb_hs_phy *uphy = phy_get_drvdata(phy); >>> >>> - if (uphy->vbus_edev) { >>> - ret = extcon_unregister_notifier(uphy->vbus_edev, EXTCON_USB, >>> - &uphy->vbus_notify); >>> - if (ret) >>> - return ret; >>> - } >>> - >>> regulator_disable(uphy->v3p3); >>> regulator_disable(uphy->v1p8); >>> clk_disable_unprepare(uphy->sleep_clk); >>> >> >> >> > > ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2017-04-14 4:57 UTC | newest] Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20170328043830epcas1p4069bda461ad648cfd6598905b7167e9f@epcas1p4.samsung.com> 2017-03-28 4:38 ` [PATCH 1/2] phy: qcom-usb-hs: Replace the extcon API Chanwoo Choi 2017-03-28 4:38 ` Chanwoo Choi [not found] ` <CGME20170328043830epcas5p2a949278d79e3741891991a3bbeafb9dc@epcas5p2.samsung.com> 2017-03-28 4:38 ` [PATCH 2/2] phy: rockchip-inno-usb2: " Chanwoo Choi 2017-03-28 4:38 ` Chanwoo Choi 2017-03-28 4:38 ` Chanwoo Choi 2017-04-13 11:47 ` Kishon Vijay Abraham I 2017-04-13 11:47 ` Kishon Vijay Abraham I 2017-04-13 11:47 ` Kishon Vijay Abraham I 2017-04-13 1:03 ` [PATCH 1/2] phy: qcom-usb-hs: " Chanwoo Choi 2017-04-13 1:03 ` Chanwoo Choi 2017-04-13 11:47 ` Kishon Vijay Abraham I 2017-04-13 11:47 ` Kishon Vijay Abraham I 2017-04-14 0:43 ` Chanwoo Choi 2017-04-14 0:43 ` Chanwoo Choi 2017-04-14 4:57 ` Kishon Vijay Abraham I 2017-04-14 4:57 ` Kishon Vijay Abraham I
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.