diff options
author | Guenter Roeck <linux@roeck-us.net> | 2014-10-29 17:45:01 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-30 18:54:11 (GMT) |
commit | 6793abb4e8491b1d673ccfd09e1a73d1ff8b9386 (patch) | |
tree | c6a2a1c1a626016fe80f212969cf6f62063c346d /include/net/dsa.h | |
parent | 87e5f66b3723b2d912b565bf7100e5121f302cbf (diff) | |
download | linux-6793abb4e8491b1d673ccfd09e1a73d1ff8b9386.tar.xz |
net: dsa: Add support for switch EEPROM access
On some chips it is possible to access the switch eeprom.
Add infrastructure support for it.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r-- | include/net/dsa.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 55e75e7..37856a2 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -38,6 +38,9 @@ struct dsa_chip_data { struct device *host_dev; int sw_addr; + /* set to size of eeprom if supported by the switch */ + int eeprom_len; + /* Device tree node pointer for this specific switch chip * used during switch setup in case additional properties * and resources needs to be used @@ -258,6 +261,13 @@ struct dsa_switch_driver { int (*set_temp_limit)(struct dsa_switch *ds, int temp); int (*get_temp_alarm)(struct dsa_switch *ds, bool *alarm); #endif + + /* EEPROM access */ + int (*get_eeprom_len)(struct dsa_switch *ds); + int (*get_eeprom)(struct dsa_switch *ds, + struct ethtool_eeprom *eeprom, u8 *data); + int (*set_eeprom)(struct dsa_switch *ds, + struct ethtool_eeprom *eeprom, u8 *data); }; void register_switch_driver(struct dsa_switch_driver *type); |