phy: for 4.3-rc

*) Fix compiler error in qcom-ufs when it is built as module
 *) Power down rockchip-usb PHY during probe to save power consumption
 *) Fix module autoload for berlin-sata PHY driver
 
 Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJWCiqHAAoJEA5ceFyATYLZPJMP/26KcH57egaN8nsCHMahN/p2
 /YCsg4Qmx1H/OiwWwiEIGqRX/V6gZxkLekSAK1dOhcD/XujxgtQww9lYCGf4dY8q
 14wejvHUoYH4dK73thPAOgqr0mR9yceDA3aSZQjR5iwldbdGTPQ0ZHqlb/2nf6y0
 BJB0SFiZrPmqBbSiNbpAJV5BGiEpAZtoHFk+SSH3gKI/6i4ECvIVKmqNvE09ij1q
 Qs5f11P71W3dX7vTsf9Yvb3sSm8xSIs7QhzbX0jRobsHG65mGvf0geI/l7faeMU+
 eIxp+F4A1l4P6admWqfgj5cWw+VBBRjKpfxoBTJPKodrrd7qgR3j9z99E4jtYNbL
 AR/bp3oWoTl8k6M9tSchrmRpG52g67ZRMoB3bvMg2yYRlDfHTaw+1Eudauwnnc1w
 QEqSyl6D9thr31B1219VXYbliCyix2FVIEEr7gV0qA2wQf1gcIaj1urK+43QEZBH
 E9iisBHH2GuqklgyKZxCtc9+dq060pVzN+DZTyFVHS/vmoUrE2rj9GGjWke1Pbj6
 vWhlNCyb4TrU7Da04/qeObLqFc2y0DGwbJcsr2gVrrCs8suqSqb7/le19z5sNJ6k
 br77J7okpxhn87qg02PZRMYNhh4ICA7eqMlp3PEeTLgCALL+2siwNTh0ifuwOc8r
 dLLqn0DR+/qGwXi86fwX
 =ygZW
 -----END PGP SIGNATURE-----

Merge tag 'phy-for-4.3-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus

Kishon writes:

phy: for 4.3-rc

*) Fix compiler error in qcom-ufs when it is built as module
*) Power down rockchip-usb PHY during probe to save power consumption
*) Fix module autoload for berlin-sata PHY driver

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
This commit is contained in:
Greg Kroah-Hartman 2015-10-03 13:39:40 +02:00
commit dd2bdd7072
3 changed files with 18 additions and 0 deletions

View file

@ -276,6 +276,7 @@ static const struct of_device_id phy_berlin_sata_of_match[] = {
{ .compatible = "marvell,berlin2q-sata-phy" },
{ },
};
MODULE_DEVICE_TABLE(of, phy_berlin_sata_of_match);
static struct platform_driver phy_berlin_sata_driver = {
.probe = phy_berlin_sata_probe,

View file

@ -432,6 +432,7 @@ out_disable_src:
out:
return ret;
}
EXPORT_SYMBOL_GPL(ufs_qcom_phy_enable_ref_clk);
static
int ufs_qcom_phy_disable_vreg(struct phy *phy,
@ -474,6 +475,7 @@ void ufs_qcom_phy_disable_ref_clk(struct phy *generic_phy)
phy->is_ref_clk_enabled = false;
}
}
EXPORT_SYMBOL_GPL(ufs_qcom_phy_disable_ref_clk);
#define UFS_REF_CLK_EN (1 << 5)
@ -517,11 +519,13 @@ void ufs_qcom_phy_enable_dev_ref_clk(struct phy *generic_phy)
{
ufs_qcom_phy_dev_ref_clk_ctrl(generic_phy, true);
}
EXPORT_SYMBOL_GPL(ufs_qcom_phy_enable_dev_ref_clk);
void ufs_qcom_phy_disable_dev_ref_clk(struct phy *generic_phy)
{
ufs_qcom_phy_dev_ref_clk_ctrl(generic_phy, false);
}
EXPORT_SYMBOL_GPL(ufs_qcom_phy_disable_dev_ref_clk);
/* Turn ON M-PHY RMMI interface clocks */
int ufs_qcom_phy_enable_iface_clk(struct phy *generic_phy)
@ -550,6 +554,7 @@ int ufs_qcom_phy_enable_iface_clk(struct phy *generic_phy)
out:
return ret;
}
EXPORT_SYMBOL_GPL(ufs_qcom_phy_enable_iface_clk);
/* Turn OFF M-PHY RMMI interface clocks */
void ufs_qcom_phy_disable_iface_clk(struct phy *generic_phy)
@ -562,6 +567,7 @@ void ufs_qcom_phy_disable_iface_clk(struct phy *generic_phy)
phy->is_iface_clk_enabled = false;
}
}
EXPORT_SYMBOL_GPL(ufs_qcom_phy_disable_iface_clk);
int ufs_qcom_phy_start_serdes(struct phy *generic_phy)
{
@ -578,6 +584,7 @@ int ufs_qcom_phy_start_serdes(struct phy *generic_phy)
return ret;
}
EXPORT_SYMBOL_GPL(ufs_qcom_phy_start_serdes);
int ufs_qcom_phy_set_tx_lane_enable(struct phy *generic_phy, u32 tx_lanes)
{
@ -595,6 +602,7 @@ int ufs_qcom_phy_set_tx_lane_enable(struct phy *generic_phy, u32 tx_lanes)
return ret;
}
EXPORT_SYMBOL_GPL(ufs_qcom_phy_set_tx_lane_enable);
void ufs_qcom_phy_save_controller_version(struct phy *generic_phy,
u8 major, u16 minor, u16 step)
@ -605,6 +613,7 @@ void ufs_qcom_phy_save_controller_version(struct phy *generic_phy,
ufs_qcom_phy->host_ctrl_rev_minor = minor;
ufs_qcom_phy->host_ctrl_rev_step = step;
}
EXPORT_SYMBOL_GPL(ufs_qcom_phy_save_controller_version);
int ufs_qcom_phy_calibrate_phy(struct phy *generic_phy, bool is_rate_B)
{
@ -625,6 +634,7 @@ int ufs_qcom_phy_calibrate_phy(struct phy *generic_phy, bool is_rate_B)
return ret;
}
EXPORT_SYMBOL_GPL(ufs_qcom_phy_calibrate_phy);
int ufs_qcom_phy_remove(struct phy *generic_phy,
struct ufs_qcom_phy *ufs_qcom_phy)
@ -662,6 +672,7 @@ int ufs_qcom_phy_is_pcs_ready(struct phy *generic_phy)
return ufs_qcom_phy->phy_spec_ops->
is_physical_coding_sublayer_ready(ufs_qcom_phy);
}
EXPORT_SYMBOL_GPL(ufs_qcom_phy_is_pcs_ready);
int ufs_qcom_phy_power_on(struct phy *generic_phy)
{

View file

@ -98,6 +98,7 @@ static int rockchip_usb_phy_probe(struct platform_device *pdev)
struct device_node *child;
struct regmap *grf;
unsigned int reg_offset;
int err;
grf = syscon_regmap_lookup_by_phandle(dev->of_node, "rockchip,grf");
if (IS_ERR(grf)) {
@ -129,6 +130,11 @@ static int rockchip_usb_phy_probe(struct platform_device *pdev)
return PTR_ERR(rk_phy->phy);
}
phy_set_drvdata(rk_phy->phy, rk_phy);
/* only power up usb phy when it use, so disable it when init*/
err = rockchip_usb_phy_power(rk_phy, 1);
if (err)
return err;
}
phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);