blob: 34597c8c1a4cad4942c6c575cccc3190f01ad274 [file] [log] [blame]
David Daney4b6ba8a2010-10-26 15:07:13 -07001/*
2 * OF helpers for network devices.
3 *
4 * This file is released under the GPLv2
5 */
6
7#ifndef __LINUX_OF_NET_H
8#define __LINUX_OF_NET_H
9
10#ifdef CONFIG_OF_NET
11#include <linux/of.h>
Geert Uytterhoeven7e0bdf12013-08-18 13:01:30 +020012extern int of_get_phy_mode(struct device_node *np);
David Daney4b6ba8a2010-10-26 15:07:13 -070013extern const void *of_get_mac_address(struct device_node *np);
Guenter Roeck65b3841b2013-04-02 09:35:07 +000014#else
Geert Uytterhoeven7e0bdf12013-08-18 13:01:30 +020015static inline int of_get_phy_mode(struct device_node *np)
Guenter Roeck65b3841b2013-04-02 09:35:07 +000016{
17 return -ENODEV;
18}
19
20static inline const void *of_get_mac_address(struct device_node *np)
21{
22 return NULL;
23}
David Daney4b6ba8a2010-10-26 15:07:13 -070024#endif
25
26#endif /* __LINUX_OF_NET_H */