bu21029 165 drivers/input/touchscreen/bu21029_ts.c static void bu21029_touch_report(struct bu21029_ts_data *bu21029, const u8 *buf) bu21029 169 drivers/input/touchscreen/bu21029_ts.c s32 max_pressure = input_abs_get_max(bu21029->in_dev, ABS_PRESSURE); bu21029 196 drivers/input/touchscreen/bu21029_ts.c rz *= bu21029->x_plate_ohms; bu21029 200 drivers/input/touchscreen/bu21029_ts.c touchscreen_report_pos(bu21029->in_dev, &bu21029->prop, bu21029 202 drivers/input/touchscreen/bu21029_ts.c input_report_abs(bu21029->in_dev, ABS_PRESSURE, bu21029 204 drivers/input/touchscreen/bu21029_ts.c input_report_key(bu21029->in_dev, BTN_TOUCH, 1); bu21029 205 drivers/input/touchscreen/bu21029_ts.c input_sync(bu21029->in_dev); bu21029 212 drivers/input/touchscreen/bu21029_ts.c struct bu21029_ts_data *bu21029 = from_timer(bu21029, t, timer); bu21029 214 drivers/input/touchscreen/bu21029_ts.c input_report_abs(bu21029->in_dev, ABS_PRESSURE, 0); bu21029 215 drivers/input/touchscreen/bu21029_ts.c input_report_key(bu21029->in_dev, BTN_TOUCH, 0); bu21029 216 drivers/input/touchscreen/bu21029_ts.c input_sync(bu21029->in_dev); bu21029 221 drivers/input/touchscreen/bu21029_ts.c struct bu21029_ts_data *bu21029 = data; bu21029 229 drivers/input/touchscreen/bu21029_ts.c error = i2c_smbus_read_i2c_block_data(bu21029->client, BU21029_AUTOSCAN, bu21029 234 drivers/input/touchscreen/bu21029_ts.c bu21029_touch_report(bu21029, buf); bu21029 237 drivers/input/touchscreen/bu21029_ts.c mod_timer(&bu21029->timer, bu21029 244 drivers/input/touchscreen/bu21029_ts.c static void bu21029_put_chip_in_reset(struct bu21029_ts_data *bu21029) bu21029 246 drivers/input/touchscreen/bu21029_ts.c if (bu21029->reset_gpios) { bu21029 247 drivers/input/touchscreen/bu21029_ts.c gpiod_set_value_cansleep(bu21029->reset_gpios, 1); bu21029 254 drivers/input/touchscreen/bu21029_ts.c struct bu21029_ts_data *bu21029 = input_get_drvdata(dev); bu21029 255 drivers/input/touchscreen/bu21029_ts.c struct i2c_client *i2c = bu21029->client; bu21029 269 drivers/input/touchscreen/bu21029_ts.c error = regulator_enable(bu21029->vdd); bu21029 276 drivers/input/touchscreen/bu21029_ts.c if (bu21029->reset_gpios) { bu21029 277 drivers/input/touchscreen/bu21029_ts.c gpiod_set_value_cansleep(bu21029->reset_gpios, 0); bu21029 314 drivers/input/touchscreen/bu21029_ts.c enable_irq(bu21029->client->irq); bu21029 318 drivers/input/touchscreen/bu21029_ts.c bu21029_put_chip_in_reset(bu21029); bu21029 319 drivers/input/touchscreen/bu21029_ts.c regulator_disable(bu21029->vdd); bu21029 325 drivers/input/touchscreen/bu21029_ts.c struct bu21029_ts_data *bu21029 = input_get_drvdata(dev); bu21029 327 drivers/input/touchscreen/bu21029_ts.c disable_irq(bu21029->client->irq); bu21029 328 drivers/input/touchscreen/bu21029_ts.c del_timer_sync(&bu21029->timer); bu21029 330 drivers/input/touchscreen/bu21029_ts.c bu21029_put_chip_in_reset(bu21029); bu21029 331 drivers/input/touchscreen/bu21029_ts.c regulator_disable(bu21029->vdd); bu21029 337 drivers/input/touchscreen/bu21029_ts.c struct bu21029_ts_data *bu21029; bu21029 350 drivers/input/touchscreen/bu21029_ts.c bu21029 = devm_kzalloc(&client->dev, sizeof(*bu21029), GFP_KERNEL); bu21029 351 drivers/input/touchscreen/bu21029_ts.c if (!bu21029) bu21029 355 drivers/input/touchscreen/bu21029_ts.c &bu21029->x_plate_ohms); bu21029 362 drivers/input/touchscreen/bu21029_ts.c bu21029->vdd = devm_regulator_get(&client->dev, "vdd"); bu21029 363 drivers/input/touchscreen/bu21029_ts.c if (IS_ERR(bu21029->vdd)) { bu21029 364 drivers/input/touchscreen/bu21029_ts.c error = PTR_ERR(bu21029->vdd); bu21029 371 drivers/input/touchscreen/bu21029_ts.c bu21029->reset_gpios = devm_gpiod_get_optional(&client->dev, bu21029 373 drivers/input/touchscreen/bu21029_ts.c if (IS_ERR(bu21029->reset_gpios)) { bu21029 374 drivers/input/touchscreen/bu21029_ts.c error = PTR_ERR(bu21029->reset_gpios); bu21029 387 drivers/input/touchscreen/bu21029_ts.c bu21029->client = client; bu21029 388 drivers/input/touchscreen/bu21029_ts.c bu21029->in_dev = in_dev; bu21029 389 drivers/input/touchscreen/bu21029_ts.c timer_setup(&bu21029->timer, bu21029_touch_release, 0); bu21029 400 drivers/input/touchscreen/bu21029_ts.c touchscreen_parse_properties(in_dev, false, &bu21029->prop); bu21029 402 drivers/input/touchscreen/bu21029_ts.c input_set_drvdata(in_dev, bu21029); bu21029 407 drivers/input/touchscreen/bu21029_ts.c IRQF_ONESHOT, DRIVER_NAME, bu21029); bu21029 421 drivers/input/touchscreen/bu21029_ts.c i2c_set_clientdata(client, bu21029); bu21029 429 drivers/input/touchscreen/bu21029_ts.c struct bu21029_ts_data *bu21029 = i2c_get_clientdata(i2c); bu21029 432 drivers/input/touchscreen/bu21029_ts.c mutex_lock(&bu21029->in_dev->mutex); bu21029 433 drivers/input/touchscreen/bu21029_ts.c if (bu21029->in_dev->users) bu21029 434 drivers/input/touchscreen/bu21029_ts.c bu21029_stop_chip(bu21029->in_dev); bu21029 435 drivers/input/touchscreen/bu21029_ts.c mutex_unlock(&bu21029->in_dev->mutex); bu21029 444 drivers/input/touchscreen/bu21029_ts.c struct bu21029_ts_data *bu21029 = i2c_get_clientdata(i2c); bu21029 447 drivers/input/touchscreen/bu21029_ts.c mutex_lock(&bu21029->in_dev->mutex); bu21029 448 drivers/input/touchscreen/bu21029_ts.c if (bu21029->in_dev->users) bu21029 449 drivers/input/touchscreen/bu21029_ts.c bu21029_start_chip(bu21029->in_dev); bu21029 450 drivers/input/touchscreen/bu21029_ts.c mutex_unlock(&bu21029->in_dev->mutex);