All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org, pawel.moll@arm.com,
	mark.rutland@arm.com, ijc+devicetree@hellion.org.uk,
	galak@codeaurora.org, rogerq@ti.com, nsekhar@ti.com,
	linux-pci@vger.kernel.org, linux-usb@vger.kernel.org,
	tony@atomide.com, t-kristo@ti.com
Subject: Re: [PATCH v3 6/9] phy: ti-pipe3: use *syscon* framework API to power on/off the PHY
Date: Sat, 19 Dec 2015 21:38:37 -0600	[thread overview]
Message-ID: <20151220033836.GG9883@rob-hp-laptop> (raw)
In-Reply-To: <1450170968-11282-7-git-send-email-kishon@ti.com>

On Tue, Dec 15, 2015 at 02:46:05PM +0530, Kishon Vijay Abraham I wrote:
> Deprecate using phy-omap-control driver to power on/off the PHY and
> use *syscon* framework to do the same.
> 
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>  Documentation/devicetree/bindings/phy/ti-phy.txt |   10 ++-
>  drivers/phy/phy-ti-pipe3.c                       |   90 ++++++++++++++++++----
>  2 files changed, 85 insertions(+), 15 deletions(-)

For the binding:

Acked-by: Rob Herring <robh@kernel.org>

One comment on the driver though.

[...]

> --- a/drivers/phy/phy-ti-pipe3.c
> +++ b/drivers/phy/phy-ti-pipe3.c

[...]

> @@ -144,18 +155,53 @@ static void ti_pipe3_disable_clocks(struct ti_pipe3 *phy);
>  
>  static int ti_pipe3_power_off(struct phy *x)
>  {
> +	u32 val;
> +	int ret;
>  	struct ti_pipe3 *phy = phy_get_drvdata(x);
>  
> -	omap_control_phy_power(phy->control_dev, 0);
> +	if (phy->phy_power_syscon) {

Writing this as:

if (!phy->phy_power_syscon) {
	...
	return 0;
}

//regmap code


will make it simpler to remove the deprecated code later.


> +		val = PIPE3_PHY_TX_RX_POWEROFF <<
> +			PIPE3_PHY_PWRCTL_CLK_CMD_SHIFT;
> +
> +		ret = regmap_update_bits(phy->phy_power_syscon, phy->power_reg,
> +					 PIPE3_PHY_PWRCTL_CLK_CMD_MASK, val);
> +		if (ret < 0)
> +			return ret;
> +	} else {
> +		omap_control_phy_power(phy->control_dev, 0);
> +	}
>  
>  	return 0;

  reply	other threads:[~2015-12-20  3:38 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15  9:15 [PATCH v3 0/9] phy: use syscon framework APIs to set ctrl mod reg Kishon Vijay Abraham I
2015-12-15  9:15 ` Kishon Vijay Abraham I
2015-12-15  9:16 ` [PATCH v3 1/9] phy: ti-pipe3: introduce local struct device* in probe Kishon Vijay Abraham I
2015-12-15  9:16   ` Kishon Vijay Abraham I
2015-12-15  9:16 ` [PATCH v3 2/9] phy: ti-pipe3: move clk initialization to a separate function Kishon Vijay Abraham I
2015-12-15  9:16   ` Kishon Vijay Abraham I
2015-12-15  9:16 ` [PATCH v3 3/9] phy: ti-pipe3: move sysctrl " Kishon Vijay Abraham I
2015-12-15  9:16   ` Kishon Vijay Abraham I
2015-12-15  9:16 ` [PATCH v3 4/9] phy: ti-pipe3: move mem resource " Kishon Vijay Abraham I
2015-12-15  9:16   ` Kishon Vijay Abraham I
2015-12-15  9:16 ` [PATCH v3 5/9] phy: ti-pipe3: use ti_pipe3_power_off to power off the PHY during probe Kishon Vijay Abraham I
2015-12-15  9:16   ` Kishon Vijay Abraham I
2015-12-15  9:16 ` [PATCH v3 6/9] phy: ti-pipe3: use *syscon* framework API to power on/off the PHY Kishon Vijay Abraham I
2015-12-15  9:16   ` Kishon Vijay Abraham I
2015-12-20  3:38   ` Rob Herring [this message]
2015-12-21  8:36     ` Kishon Vijay Abraham I
2015-12-21  8:36       ` Kishon Vijay Abraham I
2015-12-15  9:16 ` [PATCH v3 7/9] phy: ti-pipe3: use *syscon* framework API to set PCS value of " Kishon Vijay Abraham I
2015-12-15  9:16   ` Kishon Vijay Abraham I
2015-12-20  3:38   ` Rob Herring
2015-12-15  9:16 ` [PATCH v3 8/9] phy: omap-usb2: use omap_usb_power_off to power off the PHY during probe Kishon Vijay Abraham I
2015-12-15  9:16   ` Kishon Vijay Abraham I
2015-12-15  9:16 ` [PATCH v3 9/9] phy: omap-usb2: use *syscon* framework API to power on/off the PHY Kishon Vijay Abraham I
2015-12-15  9:16   ` Kishon Vijay Abraham I
2015-12-20  3:39   ` Rob Herring
2015-12-20 12:07     ` Kishon Vijay Abraham I
2015-12-20 12:07       ` Kishon Vijay Abraham I
2015-12-22 18:19       ` Rob Herring
2015-12-22 18:19         ` Rob Herring
2015-12-15 10:56 ` [PATCH v3 0/9] phy: use syscon framework APIs to set ctrl mod reg Arnd Bergmann
2015-12-15 11:14   ` Kishon Vijay Abraham I
2015-12-15 11:14     ` Kishon Vijay Abraham I
2015-12-15 11:55     ` Arnd Bergmann
2015-12-15 12:46       ` Kishon Vijay Abraham I
2015-12-15 12:46         ` Kishon Vijay Abraham I
2015-12-15 15:26         ` Tony Lindgren
2015-12-15 15:26           ` Tony Lindgren
2015-12-18 10:16           ` Kishon Vijay Abraham I
2015-12-18 10:16             ` 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=20151220033836.GG9883@rob-hp-laptop \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=nsekhar@ti.com \
    --cc=pawel.moll@arm.com \
    --cc=rogerq@ti.com \
    --cc=t-kristo@ti.com \
    --cc=tony@atomide.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: link
Be 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.