diff options
| author | David S. Miller <davem@davemloft.net> | 2018-03-30 10:40:19 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2018-03-30 10:40:19 -0400 |
| commit | caeeeda3444b1339dca8be22aa09e1441f90e6b7 (patch) | |
| tree | aa8828a2e9f4807236056d98097c89e6c075a307 /include | |
| parent | Merge branch 'nfp-flower-handle-MTU-changes' (diff) | |
| parent | net: macb: Try to retrieve MAC addess from nvmem provider (diff) | |
| download | linux-caeeeda3444b1339dca8be22aa09e1441f90e6b7.tar.gz linux-caeeeda3444b1339dca8be22aa09e1441f90e6b7.zip | |
Merge branch 'Implement-of_get_nvmem_mac_address-helper'
Mike Looijmans says:
====================
of_net: Implement of_get_nvmem_mac_address helper
Posted this as a small set now, with an (optional) second patch that shows
how the changes work and what I've used to test the code on a Topic Miami board.
I've taken the liberty to add appropriate "Acked" and "Review" tags.
v4: Replaced "6" with ETH_ALEN
v3: Add patch that implements mac in nvmem for the Cadence MACB controller
Remove the integrated of_get_mac_address call
v2: Use of_nvmem_cell_get to avoid needing the assiciated device
Use void* instead of char*
Add devicetree binding doc
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/of_net.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/of_net.h b/include/linux/of_net.h index 9cd72aab76fe..90d81ee9e6a0 100644 --- a/include/linux/of_net.h +++ b/include/linux/of_net.h @@ -13,6 +13,7 @@ struct net_device; extern int of_get_phy_mode(struct device_node *np); extern const void *of_get_mac_address(struct device_node *np); +extern int of_get_nvmem_mac_address(struct device_node *np, void *addr); extern struct net_device *of_find_net_device_by_node(struct device_node *np); #else static inline int of_get_phy_mode(struct device_node *np) @@ -25,6 +26,11 @@ static inline const void *of_get_mac_address(struct device_node *np) return NULL; } +static inline int of_get_nvmem_mac_address(struct device_node *np, void *addr) +{ + return -ENODEV; +} + static inline struct net_device *of_find_net_device_by_node(struct device_node *np) { return NULL; |
