Lines Matching refs:lm
46 struct wf_lm75_sensor *lm = wf_to_lm75(sr); in wf_lm75_get() local
49 if (lm->i2c == NULL) in wf_lm75_get()
53 if (!lm->inited) { in wf_lm75_get()
54 u8 cfg_new, cfg = (u8)i2c_smbus_read_byte_data(lm->i2c, 1); in wf_lm75_get()
63 i2c_smbus_write_byte_data(lm->i2c, 1, cfg_new); in wf_lm75_get()
64 lm->inited = 1; in wf_lm75_get()
71 data = (s32)le16_to_cpu(i2c_smbus_read_word_data(lm->i2c, 0)); in wf_lm75_get()
80 struct wf_lm75_sensor *lm = wf_to_lm75(sr); in wf_lm75_release() local
82 kfree(lm); in wf_lm75_release()
94 struct wf_lm75_sensor *lm; in wf_lm75_probe() local
134 lm = kzalloc(sizeof(struct wf_lm75_sensor), GFP_KERNEL); in wf_lm75_probe()
135 if (lm == NULL) in wf_lm75_probe()
138 lm->inited = 0; in wf_lm75_probe()
139 lm->ds1775 = ds1775; in wf_lm75_probe()
140 lm->i2c = client; in wf_lm75_probe()
141 lm->sens.name = name; in wf_lm75_probe()
142 lm->sens.ops = &wf_lm75_ops; in wf_lm75_probe()
143 i2c_set_clientdata(client, lm); in wf_lm75_probe()
145 rc = wf_register_sensor(&lm->sens); in wf_lm75_probe()
147 kfree(lm); in wf_lm75_probe()
153 struct wf_lm75_sensor *lm = i2c_get_clientdata(client); in wf_lm75_remove() local
156 lm->i2c = NULL; in wf_lm75_remove()
159 wf_unregister_sensor(&lm->sens); in wf_lm75_remove()