From 441fc6fdb47ae739eeda625dce5b069941a54db3 Mon Sep 17 00:00:00 2001 From: Carolyn Wyborny Date: Fri, 7 Dec 2012 03:00:30 +0000 Subject: igb: Add i2c interface to igb. Some of our adapters have sensors on them accessible via i2c and a private interface. This patch implements the kernel interface for i2c to those sensors. Subsequent patches will provide functions to export that data. Signed-off-by: Carolyn Wyborny Tested-by: Jeff Pieper Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igb/igb.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'drivers/net/ethernet/intel/igb/igb.h') diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h index 17f1686ee411..9f1af1b232d5 100644 --- a/drivers/net/ethernet/intel/igb/igb.h +++ b/drivers/net/ethernet/intel/igb/igb.h @@ -39,6 +39,8 @@ #include #include #include +#include +#include struct igb_adapter; @@ -301,6 +303,11 @@ static inline int igb_desc_unused(struct igb_ring *ring) return ring->count + ring->next_to_clean - ring->next_to_use - 1; } +struct igb_i2c_client_list { + struct i2c_client *client; + struct igb_i2c_client_list *next; +}; + /* board specific private data structure */ struct igb_adapter { unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)]; @@ -391,6 +398,9 @@ struct igb_adapter { struct timecounter tc; char fw_version[32]; + struct i2c_algo_bit_data i2c_algo; + struct i2c_adapter i2c_adap; + struct igb_i2c_client_list *i2c_clients; }; #define IGB_FLAG_HAS_MSI (1 << 0) @@ -466,7 +476,6 @@ static inline void igb_ptp_rx_hwtstamp(struct igb_q_vector *q_vector, extern int igb_ptp_hwtstamp_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd); - static inline s32 igb_reset_phy(struct e1000_hw *hw) { if (hw->phy.ops.reset) -- cgit v1.2.3-59-g8ed1b