mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 18:21:24 +02:00
Merge branch 'net-phy-dp83822-add-optional-external-phy-clock'
Stefan Wahren says: ==================== net: phy: dp83822: Add optional external PHY clock This small series implement support for external PHY clock for the dp83822 driver. ==================== Link: https://patch.msgid.link/20260528184642.33424-1-wahrenst@gmx.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
dae89316d0
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2017 Texas Instruments Inc.
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/ethtool.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/kernel.h>
|
||||
|
|
@ -984,13 +985,20 @@ static int dp83822_attach_mdi_port(struct phy_device *phydev,
|
|||
|
||||
static int dp8382x_probe(struct phy_device *phydev)
|
||||
{
|
||||
struct device *dev = &phydev->mdio.dev;
|
||||
struct dp83822_private *dp83822;
|
||||
struct clk *clk;
|
||||
|
||||
dp83822 = devm_kzalloc(&phydev->mdio.dev, sizeof(*dp83822),
|
||||
GFP_KERNEL);
|
||||
dp83822 = devm_kzalloc(dev, sizeof(*dp83822), GFP_KERNEL);
|
||||
if (!dp83822)
|
||||
return -ENOMEM;
|
||||
|
||||
clk = devm_clk_get_optional_enabled(dev, NULL);
|
||||
if (IS_ERR(clk)) {
|
||||
return dev_err_probe(dev, PTR_ERR(clk),
|
||||
"Failed to request ref clock\n");
|
||||
}
|
||||
|
||||
dp83822->tx_amplitude_100base_tx_index = -1;
|
||||
dp83822->mac_termination_index = -1;
|
||||
phydev->priv = dp83822;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user