Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1295509

Re: [PATCH v3 6/9] phy: ti-pipe3: use *syscon* framework API to power on/off the PHY

From Rob Herring <robh@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v3 6/9] phy: ti-pipe3: use *syscon* framework API to power on/off the PHY
Date 2015-12-20 04:40 +0100
Message-ID <qHD0K-3Ju-5@gated-at.bofh.it> (permalink)
References <qFTW1-225-3@gated-at.bofh.it> <qFTW1-225-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 6/9] phy: ti-pipe3: use *syscon* framework API to power on/off the PHY Kishon Vijay Abraham I <kishon@ti.com> - 2015-12-15 10:20 +0100
  Re: [PATCH v3 6/9] phy: ti-pipe3: use *syscon* framework API to  power on/off the PHY Rob Herring <robh@kernel.org> - 2015-12-20 04:40 +0100
    Re: [PATCH v3 6/9] phy: ti-pipe3: use *syscon* framework API to power  on/off the PHY Kishon Vijay Abraham I <kishon@ti.com> - 2015-12-21 09:40 +0100

csiph-web