Lines Matching full:lm
45 struct wf_lm75_sensor *lm = wf_to_lm75(sr); in wf_lm75_get() local
48 if (lm->i2c == NULL) in wf_lm75_get()
52 if (!lm->inited) { in wf_lm75_get()
53 u8 cfg_new, cfg = (u8)i2c_smbus_read_byte_data(lm->i2c, 1); in wf_lm75_get()
62 i2c_smbus_write_byte_data(lm->i2c, 1, cfg_new); in wf_lm75_get()
63 lm->inited = 1; in wf_lm75_get()
70 data = (s32)le16_to_cpu(i2c_smbus_read_word_data(lm->i2c, 0)); in wf_lm75_get()
79 struct wf_lm75_sensor *lm = wf_to_lm75(sr); in wf_lm75_release() local
81 kfree(lm); in wf_lm75_release()
93 struct wf_lm75_sensor *lm; in wf_lm75_probe() local
133 lm = kzalloc(sizeof(struct wf_lm75_sensor), GFP_KERNEL); in wf_lm75_probe()
134 if (lm == NULL) in wf_lm75_probe()
137 lm->inited = 0; in wf_lm75_probe()
138 lm->ds1775 = ds1775; in wf_lm75_probe()
139 lm->i2c = client; in wf_lm75_probe()
140 lm->sens.name = name; in wf_lm75_probe()
141 lm->sens.ops = &wf_lm75_ops; in wf_lm75_probe()
142 i2c_set_clientdata(client, lm); in wf_lm75_probe()
144 rc = wf_register_sensor(&lm->sens); in wf_lm75_probe()
146 kfree(lm); in wf_lm75_probe()
152 struct wf_lm75_sensor *lm = i2c_get_clientdata(client); in wf_lm75_remove() local
155 lm->i2c = NULL; in wf_lm75_remove()
158 wf_unregister_sensor(&lm->sens); in wf_lm75_remove()