Commit 293e9a3d authored by Ioana Ciornei's avatar Ioana Ciornei Committed by Jakub Kicinski

net: phy: export phy_error and phy_trigger_machine

These functions are currently used by phy_interrupt() to either signal
an error condition or to trigger the link state machine. In an attempt
to actually support shared PHY IRQs, export these two functions so that
the actual PHY drivers can use them.

Cc: Alexandru Ardelean <alexandru.ardelean@analog.com>
Cc: Andre Edich <andre.edich@microchip.com>
Cc: Antoine Tenart <atenart@kernel.org>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: Divya Koppera <Divya.Koppera@microchip.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Kavya Sree Kotagiri <kavyasree.kotagiri@microchip.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Marco Felsch <m.felsch@pengutronix.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Mathias Kresin <dev@kresin.me>
Cc: Maxim Kochetkov <fido_max@inbox.ru>
Cc: Michael Walle <michael@walle.cc>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Nisar Sayed <Nisar.Sayed@microchip.com>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Philippe Schenker <philippe.schenker@toradex.com>
Cc: Willy Liu <willy.liu@realtek.com>
Cc: Yuiko Oshino <yuiko.oshino@microchip.com>
Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0356010d
...@@ -493,10 +493,11 @@ EXPORT_SYMBOL(phy_queue_state_machine); ...@@ -493,10 +493,11 @@ EXPORT_SYMBOL(phy_queue_state_machine);
* *
* @phydev: the phy_device struct * @phydev: the phy_device struct
*/ */
static void phy_trigger_machine(struct phy_device *phydev) void phy_trigger_machine(struct phy_device *phydev)
{ {
phy_queue_state_machine(phydev, 0); phy_queue_state_machine(phydev, 0);
} }
EXPORT_SYMBOL(phy_trigger_machine);
static void phy_abort_cable_test(struct phy_device *phydev) static void phy_abort_cable_test(struct phy_device *phydev)
{ {
...@@ -924,7 +925,7 @@ void phy_stop_machine(struct phy_device *phydev) ...@@ -924,7 +925,7 @@ void phy_stop_machine(struct phy_device *phydev)
* Must not be called from interrupt context, or while the * Must not be called from interrupt context, or while the
* phydev->lock is held. * phydev->lock is held.
*/ */
static void phy_error(struct phy_device *phydev) void phy_error(struct phy_device *phydev)
{ {
WARN_ON(1); WARN_ON(1);
...@@ -934,6 +935,7 @@ static void phy_error(struct phy_device *phydev) ...@@ -934,6 +935,7 @@ static void phy_error(struct phy_device *phydev)
phy_trigger_machine(phydev); phy_trigger_machine(phydev);
} }
EXPORT_SYMBOL(phy_error);
/** /**
* phy_disable_interrupts - Disable the PHY interrupts from the PHY side * phy_disable_interrupts - Disable the PHY interrupts from the PHY side
......
...@@ -1570,8 +1570,10 @@ void phy_drivers_unregister(struct phy_driver *drv, int n); ...@@ -1570,8 +1570,10 @@ void phy_drivers_unregister(struct phy_driver *drv, int n);
int phy_driver_register(struct phy_driver *new_driver, struct module *owner); int phy_driver_register(struct phy_driver *new_driver, struct module *owner);
int phy_drivers_register(struct phy_driver *new_driver, int n, int phy_drivers_register(struct phy_driver *new_driver, int n,
struct module *owner); struct module *owner);
void phy_error(struct phy_device *phydev);
void phy_state_machine(struct work_struct *work); void phy_state_machine(struct work_struct *work);
void phy_queue_state_machine(struct phy_device *phydev, unsigned long jiffies); void phy_queue_state_machine(struct phy_device *phydev, unsigned long jiffies);
void phy_trigger_machine(struct phy_device *phydev);
void phy_mac_interrupt(struct phy_device *phydev); void phy_mac_interrupt(struct phy_device *phydev);
void phy_start_machine(struct phy_device *phydev); void phy_start_machine(struct phy_device *phydev);
void phy_stop_machine(struct phy_device *phydev); void phy_stop_machine(struct phy_device *phydev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment