Lines Matching refs:drv_data
162 struct steelseries_srws1_data *drv_data = hid_get_drvdata(hid); in steelseries_srws1_led_all_set_brightness() local
164 if (!drv_data) { in steelseries_srws1_led_all_set_brightness()
170 drv_data->led_state = 0; in steelseries_srws1_led_all_set_brightness()
172 drv_data->led_state = (1 << (SRWS1_NUMBER_LEDS + 1)) - 1; in steelseries_srws1_led_all_set_brightness()
174 steelseries_srws1_set_leds(hid, drv_data->led_state); in steelseries_srws1_led_all_set_brightness()
181 struct steelseries_srws1_data *drv_data; in steelseries_srws1_led_all_get_brightness() local
183 drv_data = hid_get_drvdata(hid); in steelseries_srws1_led_all_get_brightness()
185 if (!drv_data) { in steelseries_srws1_led_all_get_brightness()
190 return (drv_data->led_state >> SRWS1_NUMBER_LEDS) ? LED_FULL : LED_OFF; in steelseries_srws1_led_all_get_brightness()
198 struct steelseries_srws1_data *drv_data = hid_get_drvdata(hid); in steelseries_srws1_led_set_brightness() local
201 if (!drv_data) { in steelseries_srws1_led_set_brightness()
207 if (led_cdev != drv_data->led[i]) in steelseries_srws1_led_set_brightness()
210 state = (drv_data->led_state >> i) & 1; in steelseries_srws1_led_set_brightness()
212 drv_data->led_state &= ~(1 << i); in steelseries_srws1_led_set_brightness()
213 steelseries_srws1_set_leds(hid, drv_data->led_state); in steelseries_srws1_led_set_brightness()
215 drv_data->led_state |= 1 << i; in steelseries_srws1_led_set_brightness()
216 steelseries_srws1_set_leds(hid, drv_data->led_state); in steelseries_srws1_led_set_brightness()
226 struct steelseries_srws1_data *drv_data; in steelseries_srws1_led_get_brightness() local
229 drv_data = hid_get_drvdata(hid); in steelseries_srws1_led_get_brightness()
231 if (!drv_data) { in steelseries_srws1_led_get_brightness()
237 if (led_cdev == drv_data->led[i]) { in steelseries_srws1_led_get_brightness()
238 value = (drv_data->led_state >> i) & 1; in steelseries_srws1_led_get_brightness()
253 struct steelseries_srws1_data *drv_data = kzalloc(sizeof(*drv_data), GFP_KERNEL); in steelseries_srws1_probe() local
255 if (drv_data == NULL) { in steelseries_srws1_probe()
260 hid_set_drvdata(hdev, drv_data); in steelseries_srws1_probe()
280 drv_data->led_state = 0; in steelseries_srws1_probe()
282 drv_data->led[i] = NULL; in steelseries_srws1_probe()
303 drv_data->led[SRWS1_NUMBER_LEDS] = led; in steelseries_srws1_probe()
324 drv_data->led[i] = led; in steelseries_srws1_probe()
332 led = drv_data->led[i]; in steelseries_srws1_probe()
333 drv_data->led[i] = NULL; in steelseries_srws1_probe()
345 kfree(drv_data); in steelseries_srws1_probe()
354 struct steelseries_srws1_data *drv_data = hid_get_drvdata(hdev); in steelseries_srws1_remove() local
356 if (drv_data) { in steelseries_srws1_remove()
359 led = drv_data->led[i]; in steelseries_srws1_remove()
360 drv_data->led[i] = NULL; in steelseries_srws1_remove()
370 kfree(drv_data); in steelseries_srws1_remove()
477 struct power_supply_config battery_cfg = { .drv_data = sd, }; in steelseries_headset_battery_register()