Lines Matching refs:cdata

158 mshw0011_notify(struct mshw0011_data *cdata, u8 arg1, u8 arg2,  in mshw0011_notify()  argument
166 handle = ACPI_HANDLE(&cdata->adp1->dev); in mshw0011_notify()
173 dev_err(&cdata->adp1->dev, "device _DSM execution failed\n"); in mshw0011_notify()
208 static int mshw0011_bix(struct mshw0011_data *cdata, struct bix *bix) in mshw0011_bix() argument
210 struct i2c_client *client = cdata->bat0; in mshw0011_bix()
265 static int mshw0011_bst(struct mshw0011_data *cdata, struct bst *bst) in mshw0011_bst() argument
267 struct i2c_client *client = cdata->bat0; in mshw0011_bst()
299 static int mshw0011_adp_psr(struct mshw0011_data *cdata) in mshw0011_adp_psr() argument
301 return i2c_smbus_read_byte_data(cdata->adp1, MSHW0011_ADP1_REG_PSR); in mshw0011_adp_psr()
304 static int mshw0011_isr(struct mshw0011_data *cdata) in mshw0011_isr() argument
311 ret = mshw0011_adp_psr(cdata); in mshw0011_isr()
316 if (status != cdata->charging) in mshw0011_isr()
317 mshw0011_notify(cdata, cdata->notify_mask, in mshw0011_isr()
320 cdata->charging = status; in mshw0011_isr()
322 ret = mshw0011_bst(cdata, &bst); in mshw0011_isr()
327 if (bat_status != cdata->bat_charging) in mshw0011_isr()
328 mshw0011_notify(cdata, cdata->notify_mask, in mshw0011_isr()
331 cdata->bat_charging = bat_status; in mshw0011_isr()
333 ret = mshw0011_bix(cdata, &bix); in mshw0011_isr()
337 if (bix.last_full_charg_capacity != cdata->full_capacity) in mshw0011_isr()
338 mshw0011_notify(cdata, cdata->notify_mask, in mshw0011_isr()
341 cdata->full_capacity = bix.last_full_charg_capacity; in mshw0011_isr()
348 struct mshw0011_data *cdata = data; in mshw0011_poll_task() local
351 cdata->kthread_running = true; in mshw0011_poll_task()
363 cdata->kthread_running = false; in mshw0011_poll_task()
377 struct mshw0011_data *cdata = i2c_get_clientdata(client); in mshw0011_space_handler() local
405 status = mshw0011_adp_psr(cdata); in mshw0011_space_handler()
424 ret = mshw0011_bix(cdata, &gsb->bix); in mshw0011_space_handler()
427 cdata->trip_point = gsb->cmd.arg2; in mshw0011_space_handler()
430 ret = mshw0011_bst(cdata, &gsb->bst); in mshw0011_space_handler()
433 dev_info(&cdata->bat0->dev, "command(0x%02x) is not supported.\n", gsb->cmd.arg1); in mshw0011_space_handler()
559 struct mshw0011_data *cdata = i2c_get_clientdata(client); in mshw0011_remove() local
563 if (cdata->kthread_running) in mshw0011_remove()
564 kthread_stop(cdata->poll_task); in mshw0011_remove()
566 i2c_unregister_device(cdata->bat0); in mshw0011_remove()