struct qup_i2c_dev {
struct device *dev;
void __iomem *base; /* virtual */
void __iomem *gsbi; /* virtual */
int in_irq;
int out_irq;
int err_irq;
int num_irqs;
struct clk *clk;
struct clk *pclk;
struct i2c_adapter adapter;
struct i2c_msg *msg;
int pos;
int cnt;
int err;
int mode;
int clk_ctl;
int one_bit_t;
int out_fifo_sz;
int in_fifo_sz;
int out_blk_sz;
int in_blk_sz;
int wr_sz;
struct msm_i2c_platform_data *pdata;
enum msm_i2c_state pwr_state;
struct mutex mlock;
void *complete;
int i2c_gpios[ARRAY_SIZE(i2c_rsrcs)];
struct qup_i2c_clk_path_vote clk_path_vote;
};
struct platform_device {
const char * name;
int id;
struct device dev;
u32 num_resources;
struct resource * resource;
const struct platform_device_id *id_entry;
/* MFD cell pointer */
struct mfd_cell *mfd_cell;
/* arch specific additions */
struct pdev_archdata archdata;
};
struct qup_i2c_dev *dev;
dev = kzalloc(sizeof(struct qup_i2c_dev), GFP_KERNEL);
dev->dev = &pdev->dev;
struct qup_i2c_dev {struct device *dev;void __iomem *base; /* virtual */void __iomem *gsbi; /* virtual */int in_irq;int out_irq;int err_irq;int num_irqs;struct clk *clk;struct clk *pclk;struct i2c_adapter adapter;struct i2c_msg *msg;int pos;int cnt;int err;int mode;int clk_ctl;int one_bit_t;int out_fifo_sz;int in_fifo_sz;int out_blk_sz;int in_blk_sz;int wr_sz;struct msm_i2c_platform_data *pdata;enum msm_i2c_state pwr_state;struct mutex mlock;void *complete;int i2c_gpios[ARRAY_SIZE(i2c_rsrcs)];struct qup_i2c_clk_path_vote clk_path_vote;};