mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Chanwoo Choi <cw00.choi@samsung.com>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <chanwoo@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>,
	<linux-rockchip@lists.infradead.org>
Subject: Re: [PATCH 2/2] phy: rockchip-inno-usb2: Replace the extcon API
Date: Thu, 13 Apr 2017 17:17:47 +0530	[thread overview]
Message-ID: <357e4565-e1df-2ccb-f2fa-369417061952@ti.com> (raw)
In-Reply-To: <1490675909-2533-2-git-send-email-cw00.choi@samsung.com>



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");
>  	}
> 

  reply	other threads:[~2017-04-13 11:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170328043830epcas1p4069bda461ad648cfd6598905b7167e9f@epcas1p4.samsung.com>
2017-03-28  4:38 ` [PATCH 1/2] phy: qcom-usb-hs: " Chanwoo Choi
     [not found]   ` <CGME20170328043830epcas5p2a949278d79e3741891991a3bbeafb9dc@epcas5p2.samsung.com>
2017-03-28  4:38     ` [PATCH 2/2] phy: rockchip-inno-usb2: " Chanwoo Choi
2017-04-13 11:47       ` Kishon Vijay Abraham I [this message]
2017-04-13  1:03   ` [PATCH 1/2] phy: qcom-usb-hs: " Chanwoo Choi
2017-04-13 11:47   ` Kishon Vijay Abraham I
2017-04-14  0:43     ` Chanwoo Choi
2017-04-14  4:57       ` Kishon Vijay Abraham I

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=357e4565-e1df-2ccb-f2fa-369417061952@ti.com \
    --to=kishon@ti.com \
    --cc=chanwoo@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®