diff options
author | Carolyn Wyborny <carolyn.wyborny@intel.com> | 2012-12-07 03:00:30 +0000 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-01-18 04:55:21 -0800 |
commit | 441fc6fdb47ae739eeda625dce5b069941a54db3 (patch) | |
tree | 4f50c10e7166b3fa6da7c9a20b1371b3f23d5dc0 /drivers/net/ethernet/intel/igb/igb.h | |
parent | fa44f2f185f7f9da19d331929bb1b56c1ccd1d93 (diff) | |
download | lwn-441fc6fdb47ae739eeda625dce5b069941a54db3.tar.gz lwn-441fc6fdb47ae739eeda625dce5b069941a54db3.zip |
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 <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb.h')
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb.h | 11 |
1 files changed, 10 insertions, 1 deletions
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 <linux/ptp_clock_kernel.h> #include <linux/bitops.h> #include <linux/if_vlan.h> +#include <linux/i2c.h> +#include <linux/i2c-algo-bit.h> 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) |