haptics            33 drivers/input/misc/arizona-haptics.c 	struct arizona_haptics *haptics = container_of(work,
haptics            36 drivers/input/misc/arizona-haptics.c 	struct arizona *arizona = haptics->arizona;
haptics            41 drivers/input/misc/arizona-haptics.c 	if (!haptics->arizona->dapm) {
haptics            46 drivers/input/misc/arizona-haptics.c 	if (haptics->intensity) {
haptics            50 drivers/input/misc/arizona-haptics.c 					 haptics->intensity);
haptics           111 drivers/input/misc/arizona-haptics.c 	struct arizona_haptics *haptics = input_get_drvdata(input);
haptics           112 drivers/input/misc/arizona-haptics.c 	struct arizona *arizona = haptics->arizona;
haptics           122 drivers/input/misc/arizona-haptics.c 			haptics->intensity =
haptics           125 drivers/input/misc/arizona-haptics.c 				haptics->intensity += 0x7f;
haptics           127 drivers/input/misc/arizona-haptics.c 			haptics->intensity =
haptics           131 drivers/input/misc/arizona-haptics.c 		haptics->intensity = 0;
haptics           134 drivers/input/misc/arizona-haptics.c 	schedule_work(&haptics->work);
haptics           141 drivers/input/misc/arizona-haptics.c 	struct arizona_haptics *haptics = input_get_drvdata(input);
haptics           144 drivers/input/misc/arizona-haptics.c 	cancel_work_sync(&haptics->work);
haptics           146 drivers/input/misc/arizona-haptics.c 	if (haptics->arizona->dapm) {
haptics           147 drivers/input/misc/arizona-haptics.c 		component = snd_soc_dapm_to_component(haptics->arizona->dapm);
haptics           155 drivers/input/misc/arizona-haptics.c 	struct arizona_haptics *haptics;
haptics           158 drivers/input/misc/arizona-haptics.c 	haptics = devm_kzalloc(&pdev->dev, sizeof(*haptics), GFP_KERNEL);
haptics           159 drivers/input/misc/arizona-haptics.c 	if (!haptics)
haptics           162 drivers/input/misc/arizona-haptics.c 	haptics->arizona = arizona;
haptics           172 drivers/input/misc/arizona-haptics.c 	INIT_WORK(&haptics->work, arizona_haptics_work);
haptics           174 drivers/input/misc/arizona-haptics.c 	haptics->input_dev = devm_input_allocate_device(&pdev->dev);
haptics           175 drivers/input/misc/arizona-haptics.c 	if (!haptics->input_dev) {
haptics           180 drivers/input/misc/arizona-haptics.c 	input_set_drvdata(haptics->input_dev, haptics);
haptics           182 drivers/input/misc/arizona-haptics.c 	haptics->input_dev->name = "arizona:haptics";
haptics           183 drivers/input/misc/arizona-haptics.c 	haptics->input_dev->close = arizona_haptics_close;
haptics           184 drivers/input/misc/arizona-haptics.c 	__set_bit(FF_RUMBLE, haptics->input_dev->ffbit);
haptics           186 drivers/input/misc/arizona-haptics.c 	ret = input_ff_create_memless(haptics->input_dev, NULL,
haptics           194 drivers/input/misc/arizona-haptics.c 	ret = input_register_device(haptics->input_dev);
haptics           250 drivers/input/misc/drv260x.c 	struct drv260x_data *haptics = container_of(work, struct drv260x_data, work);
haptics           253 drivers/input/misc/drv260x.c 	gpiod_set_value(haptics->enable_gpio, 1);
haptics           257 drivers/input/misc/drv260x.c 	error = regmap_write(haptics->regmap,
haptics           260 drivers/input/misc/drv260x.c 		dev_err(&haptics->client->dev,
haptics           263 drivers/input/misc/drv260x.c 		error = regmap_write(haptics->regmap,
haptics           264 drivers/input/misc/drv260x.c 				     DRV260X_RT_PB_IN, haptics->magnitude);
haptics           266 drivers/input/misc/drv260x.c 			dev_err(&haptics->client->dev,
haptics           274 drivers/input/misc/drv260x.c 	struct drv260x_data *haptics = input_get_drvdata(input);
haptics           276 drivers/input/misc/drv260x.c 	haptics->mode = DRV260X_LRA_NO_CAL_MODE;
haptics           279 drivers/input/misc/drv260x.c 		haptics->magnitude = effect->u.rumble.strong_magnitude;
haptics           281 drivers/input/misc/drv260x.c 		haptics->magnitude = effect->u.rumble.weak_magnitude;
haptics           283 drivers/input/misc/drv260x.c 		haptics->magnitude = 0;
haptics           285 drivers/input/misc/drv260x.c 	schedule_work(&haptics->work);
haptics           292 drivers/input/misc/drv260x.c 	struct drv260x_data *haptics = input_get_drvdata(input);
haptics           295 drivers/input/misc/drv260x.c 	cancel_work_sync(&haptics->work);
haptics           297 drivers/input/misc/drv260x.c 	error = regmap_write(haptics->regmap, DRV260X_MODE, DRV260X_STANDBY);
haptics           299 drivers/input/misc/drv260x.c 		dev_err(&haptics->client->dev,
haptics           302 drivers/input/misc/drv260x.c 	gpiod_set_value(haptics->enable_gpio, 0);
haptics           344 drivers/input/misc/drv260x.c static int drv260x_init(struct drv260x_data *haptics)
haptics           349 drivers/input/misc/drv260x.c 	error = regmap_write(haptics->regmap,
haptics           350 drivers/input/misc/drv260x.c 			     DRV260X_RATED_VOLT, haptics->rated_voltage);
haptics           352 drivers/input/misc/drv260x.c 		dev_err(&haptics->client->dev,
haptics           358 drivers/input/misc/drv260x.c 	error = regmap_write(haptics->regmap,
haptics           359 drivers/input/misc/drv260x.c 			     DRV260X_OD_CLAMP_VOLT, haptics->overdrive_voltage);
haptics           361 drivers/input/misc/drv260x.c 		dev_err(&haptics->client->dev,
haptics           367 drivers/input/misc/drv260x.c 	switch (haptics->mode) {
haptics           369 drivers/input/misc/drv260x.c 		error = regmap_register_patch(haptics->regmap,
haptics           373 drivers/input/misc/drv260x.c 			dev_err(&haptics->client->dev,
haptics           382 drivers/input/misc/drv260x.c 		error = regmap_register_patch(haptics->regmap,
haptics           386 drivers/input/misc/drv260x.c 			dev_err(&haptics->client->dev,
haptics           392 drivers/input/misc/drv260x.c 		error = regmap_update_bits(haptics->regmap, DRV260X_LIB_SEL,
haptics           394 drivers/input/misc/drv260x.c 					   haptics->library);
haptics           396 drivers/input/misc/drv260x.c 			dev_err(&haptics->client->dev,
haptics           405 drivers/input/misc/drv260x.c 		error = regmap_register_patch(haptics->regmap,
haptics           409 drivers/input/misc/drv260x.c 			dev_err(&haptics->client->dev,
haptics           415 drivers/input/misc/drv260x.c 		error = regmap_update_bits(haptics->regmap, DRV260X_LIB_SEL,
haptics           417 drivers/input/misc/drv260x.c 					   haptics->library);
haptics           419 drivers/input/misc/drv260x.c 			dev_err(&haptics->client->dev,
haptics           429 drivers/input/misc/drv260x.c 	error = regmap_write(haptics->regmap, DRV260X_GO, DRV260X_GO_BIT);
haptics           431 drivers/input/misc/drv260x.c 		dev_err(&haptics->client->dev,
haptics           438 drivers/input/misc/drv260x.c 		error = regmap_read(haptics->regmap, DRV260X_GO, &cal_buf);
haptics           440 drivers/input/misc/drv260x.c 			dev_err(&haptics->client->dev,
haptics           464 drivers/input/misc/drv260x.c 	struct drv260x_data *haptics;
haptics           468 drivers/input/misc/drv260x.c 	haptics = devm_kzalloc(dev, sizeof(*haptics), GFP_KERNEL);
haptics           469 drivers/input/misc/drv260x.c 	if (!haptics)
haptics           472 drivers/input/misc/drv260x.c 	error = device_property_read_u32(dev, "mode", &haptics->mode);
haptics           478 drivers/input/misc/drv260x.c 	if (haptics->mode < DRV260X_LRA_MODE ||
haptics           479 drivers/input/misc/drv260x.c 	    haptics->mode > DRV260X_ERM_MODE) {
haptics           480 drivers/input/misc/drv260x.c 		dev_err(dev, "Vibrator mode is invalid: %i\n", haptics->mode);
haptics           484 drivers/input/misc/drv260x.c 	error = device_property_read_u32(dev, "library-sel", &haptics->library);
haptics           490 drivers/input/misc/drv260x.c 	if (haptics->library < DRV260X_LIB_EMPTY ||
haptics           491 drivers/input/misc/drv260x.c 	    haptics->library > DRV260X_ERM_LIB_F) {
haptics           493 drivers/input/misc/drv260x.c 			"Library value is invalid: %i\n", haptics->library);
haptics           497 drivers/input/misc/drv260x.c 	if (haptics->mode == DRV260X_LRA_MODE &&
haptics           498 drivers/input/misc/drv260x.c 	    haptics->library != DRV260X_LIB_EMPTY &&
haptics           499 drivers/input/misc/drv260x.c 	    haptics->library != DRV260X_LIB_LRA) {
haptics           504 drivers/input/misc/drv260x.c 	if (haptics->mode == DRV260X_ERM_MODE &&
haptics           505 drivers/input/misc/drv260x.c 	    (haptics->library == DRV260X_LIB_EMPTY ||
haptics           506 drivers/input/misc/drv260x.c 	     haptics->library == DRV260X_LIB_LRA)) {
haptics           512 drivers/input/misc/drv260x.c 	haptics->rated_voltage = error ? DRV260X_DEF_RATED_VOLT :
haptics           516 drivers/input/misc/drv260x.c 	haptics->overdrive_voltage = error ? DRV260X_DEF_OD_CLAMP_VOLT :
haptics           519 drivers/input/misc/drv260x.c 	haptics->regulator = devm_regulator_get(dev, "vbat");
haptics           520 drivers/input/misc/drv260x.c 	if (IS_ERR(haptics->regulator)) {
haptics           521 drivers/input/misc/drv260x.c 		error = PTR_ERR(haptics->regulator);
haptics           526 drivers/input/misc/drv260x.c 	haptics->enable_gpio = devm_gpiod_get_optional(dev, "enable",
haptics           528 drivers/input/misc/drv260x.c 	if (IS_ERR(haptics->enable_gpio))
haptics           529 drivers/input/misc/drv260x.c 		return PTR_ERR(haptics->enable_gpio);
haptics           531 drivers/input/misc/drv260x.c 	haptics->input_dev = devm_input_allocate_device(dev);
haptics           532 drivers/input/misc/drv260x.c 	if (!haptics->input_dev) {
haptics           537 drivers/input/misc/drv260x.c 	haptics->input_dev->name = "drv260x:haptics";
haptics           538 drivers/input/misc/drv260x.c 	haptics->input_dev->close = drv260x_close;
haptics           539 drivers/input/misc/drv260x.c 	input_set_drvdata(haptics->input_dev, haptics);
haptics           540 drivers/input/misc/drv260x.c 	input_set_capability(haptics->input_dev, EV_FF, FF_RUMBLE);
haptics           542 drivers/input/misc/drv260x.c 	error = input_ff_create_memless(haptics->input_dev, NULL,
haptics           549 drivers/input/misc/drv260x.c 	INIT_WORK(&haptics->work, drv260x_worker);
haptics           551 drivers/input/misc/drv260x.c 	haptics->client = client;
haptics           552 drivers/input/misc/drv260x.c 	i2c_set_clientdata(client, haptics);
haptics           554 drivers/input/misc/drv260x.c 	haptics->regmap = devm_regmap_init_i2c(client, &drv260x_regmap_config);
haptics           555 drivers/input/misc/drv260x.c 	if (IS_ERR(haptics->regmap)) {
haptics           556 drivers/input/misc/drv260x.c 		error = PTR_ERR(haptics->regmap);
haptics           561 drivers/input/misc/drv260x.c 	error = drv260x_init(haptics);
haptics           567 drivers/input/misc/drv260x.c 	error = input_register_device(haptics->input_dev);
haptics           578 drivers/input/misc/drv260x.c 	struct drv260x_data *haptics = dev_get_drvdata(dev);
haptics           581 drivers/input/misc/drv260x.c 	mutex_lock(&haptics->input_dev->mutex);
haptics           583 drivers/input/misc/drv260x.c 	if (haptics->input_dev->users) {
haptics           584 drivers/input/misc/drv260x.c 		ret = regmap_update_bits(haptics->regmap,
haptics           593 drivers/input/misc/drv260x.c 		gpiod_set_value(haptics->enable_gpio, 0);
haptics           595 drivers/input/misc/drv260x.c 		ret = regulator_disable(haptics->regulator);
haptics           598 drivers/input/misc/drv260x.c 			regmap_update_bits(haptics->regmap,
haptics           604 drivers/input/misc/drv260x.c 	mutex_unlock(&haptics->input_dev->mutex);
haptics           610 drivers/input/misc/drv260x.c 	struct drv260x_data *haptics = dev_get_drvdata(dev);
haptics           613 drivers/input/misc/drv260x.c 	mutex_lock(&haptics->input_dev->mutex);
haptics           615 drivers/input/misc/drv260x.c 	if (haptics->input_dev->users) {
haptics           616 drivers/input/misc/drv260x.c 		ret = regulator_enable(haptics->regulator);
haptics           622 drivers/input/misc/drv260x.c 		ret = regmap_update_bits(haptics->regmap,
haptics           627 drivers/input/misc/drv260x.c 			regulator_disable(haptics->regulator);
haptics           631 drivers/input/misc/drv260x.c 		gpiod_set_value(haptics->enable_gpio, 1);
haptics           635 drivers/input/misc/drv260x.c 	mutex_unlock(&haptics->input_dev->mutex);
haptics            78 drivers/input/misc/drv2665.c 	struct drv2665_data *haptics =
haptics            83 drivers/input/misc/drv2665.c 	error = regmap_read(haptics->regmap, DRV2665_STATUS, &read_buf);
haptics            85 drivers/input/misc/drv2665.c 		dev_err(&haptics->client->dev,
haptics            91 drivers/input/misc/drv2665.c 		error = regmap_bulk_write(haptics->regmap,
haptics            96 drivers/input/misc/drv2665.c 			dev_err(&haptics->client->dev,
haptics           106 drivers/input/misc/drv2665.c 	struct drv2665_data *haptics = input_get_drvdata(input);
haptics           108 drivers/input/misc/drv2665.c 	schedule_work(&haptics->work);
haptics           115 drivers/input/misc/drv2665.c 	struct drv2665_data *haptics = input_get_drvdata(input);
haptics           118 drivers/input/misc/drv2665.c 	cancel_work_sync(&haptics->work);
haptics           120 drivers/input/misc/drv2665.c 	error = regmap_update_bits(haptics->regmap, DRV2665_CTRL_2,
haptics           123 drivers/input/misc/drv2665.c 		dev_err(&haptics->client->dev,
haptics           132 drivers/input/misc/drv2665.c static int drv2665_init(struct drv2665_data *haptics)
haptics           136 drivers/input/misc/drv2665.c 	error = regmap_register_patch(haptics->regmap,
haptics           140 drivers/input/misc/drv2665.c 		dev_err(&haptics->client->dev,
haptics           162 drivers/input/misc/drv2665.c 	struct drv2665_data *haptics;
haptics           165 drivers/input/misc/drv2665.c 	haptics = devm_kzalloc(&client->dev, sizeof(*haptics), GFP_KERNEL);
haptics           166 drivers/input/misc/drv2665.c 	if (!haptics)
haptics           169 drivers/input/misc/drv2665.c 	haptics->regulator = devm_regulator_get(&client->dev, "vbat");
haptics           170 drivers/input/misc/drv2665.c 	if (IS_ERR(haptics->regulator)) {
haptics           171 drivers/input/misc/drv2665.c 		error = PTR_ERR(haptics->regulator);
haptics           177 drivers/input/misc/drv2665.c 	haptics->input_dev = devm_input_allocate_device(&client->dev);
haptics           178 drivers/input/misc/drv2665.c 	if (!haptics->input_dev) {
haptics           183 drivers/input/misc/drv2665.c 	haptics->input_dev->name = "drv2665:haptics";
haptics           184 drivers/input/misc/drv2665.c 	haptics->input_dev->dev.parent = client->dev.parent;
haptics           185 drivers/input/misc/drv2665.c 	haptics->input_dev->close = drv2665_close;
haptics           186 drivers/input/misc/drv2665.c 	input_set_drvdata(haptics->input_dev, haptics);
haptics           187 drivers/input/misc/drv2665.c 	input_set_capability(haptics->input_dev, EV_FF, FF_RUMBLE);
haptics           189 drivers/input/misc/drv2665.c 	error = input_ff_create_memless(haptics->input_dev, NULL,
haptics           197 drivers/input/misc/drv2665.c 	INIT_WORK(&haptics->work, drv2665_worker);
haptics           199 drivers/input/misc/drv2665.c 	haptics->client = client;
haptics           200 drivers/input/misc/drv2665.c 	i2c_set_clientdata(client, haptics);
haptics           202 drivers/input/misc/drv2665.c 	haptics->regmap = devm_regmap_init_i2c(client, &drv2665_regmap_config);
haptics           203 drivers/input/misc/drv2665.c 	if (IS_ERR(haptics->regmap)) {
haptics           204 drivers/input/misc/drv2665.c 		error = PTR_ERR(haptics->regmap);
haptics           210 drivers/input/misc/drv2665.c 	error = drv2665_init(haptics);
haptics           216 drivers/input/misc/drv2665.c 	error = input_register_device(haptics->input_dev);
haptics           228 drivers/input/misc/drv2665.c 	struct drv2665_data *haptics = dev_get_drvdata(dev);
haptics           231 drivers/input/misc/drv2665.c 	mutex_lock(&haptics->input_dev->mutex);
haptics           233 drivers/input/misc/drv2665.c 	if (haptics->input_dev->users) {
haptics           234 drivers/input/misc/drv2665.c 		ret = regmap_update_bits(haptics->regmap, DRV2665_CTRL_2,
haptics           238 drivers/input/misc/drv2665.c 			regulator_disable(haptics->regulator);
haptics           242 drivers/input/misc/drv2665.c 		ret = regulator_disable(haptics->regulator);
haptics           245 drivers/input/misc/drv2665.c 			regmap_update_bits(haptics->regmap,
haptics           251 drivers/input/misc/drv2665.c 	mutex_unlock(&haptics->input_dev->mutex);
haptics           257 drivers/input/misc/drv2665.c 	struct drv2665_data *haptics = dev_get_drvdata(dev);
haptics           260 drivers/input/misc/drv2665.c 	mutex_lock(&haptics->input_dev->mutex);
haptics           262 drivers/input/misc/drv2665.c 	if (haptics->input_dev->users) {
haptics           263 drivers/input/misc/drv2665.c 		ret = regulator_enable(haptics->regulator);
haptics           269 drivers/input/misc/drv2665.c 		ret = regmap_update_bits(haptics->regmap, DRV2665_CTRL_2,
haptics           273 drivers/input/misc/drv2665.c 			regulator_disable(haptics->regulator);
haptics           280 drivers/input/misc/drv2665.c 	mutex_unlock(&haptics->input_dev->mutex);
haptics           127 drivers/input/misc/drv2667.c static int drv2667_set_waveform_freq(struct drv2667_data *haptics)
haptics           136 drivers/input/misc/drv2667.c 	freq = (haptics->frequency * 1000) / 78125;
haptics           138 drivers/input/misc/drv2667.c 		dev_err(&haptics->client->dev,
haptics           143 drivers/input/misc/drv2667.c 	error = regmap_read(haptics->regmap, DRV2667_PAGE, &read_buf);
haptics           145 drivers/input/misc/drv2667.c 		dev_err(&haptics->client->dev,
haptics           151 drivers/input/misc/drv2667.c 		haptics->page != read_buf) {
haptics           152 drivers/input/misc/drv2667.c 		error = regmap_write(haptics->regmap,
haptics           153 drivers/input/misc/drv2667.c 				DRV2667_PAGE, haptics->page);
haptics           155 drivers/input/misc/drv2667.c 			dev_err(&haptics->client->dev,
haptics           161 drivers/input/misc/drv2667.c 	error = regmap_write(haptics->regmap, DRV2667_RAM_FREQ,	freq);
haptics           163 drivers/input/misc/drv2667.c 		dev_err(&haptics->client->dev,
haptics           168 drivers/input/misc/drv2667.c 		haptics->page != read_buf) {
haptics           169 drivers/input/misc/drv2667.c 		error = regmap_write(haptics->regmap, DRV2667_PAGE, read_buf);
haptics           171 drivers/input/misc/drv2667.c 			dev_err(&haptics->client->dev,
haptics           182 drivers/input/misc/drv2667.c 	struct drv2667_data *haptics = container_of(work, struct drv2667_data, work);
haptics           185 drivers/input/misc/drv2667.c 	if (haptics->magnitude) {
haptics           186 drivers/input/misc/drv2667.c 		error = regmap_write(haptics->regmap,
haptics           187 drivers/input/misc/drv2667.c 				DRV2667_PAGE, haptics->page);
haptics           189 drivers/input/misc/drv2667.c 			dev_err(&haptics->client->dev,
haptics           194 drivers/input/misc/drv2667.c 		error = regmap_write(haptics->regmap, DRV2667_RAM_AMP,
haptics           195 drivers/input/misc/drv2667.c 				haptics->magnitude);
haptics           197 drivers/input/misc/drv2667.c 			dev_err(&haptics->client->dev,
haptics           202 drivers/input/misc/drv2667.c 		error = regmap_write(haptics->regmap,
haptics           205 drivers/input/misc/drv2667.c 			dev_err(&haptics->client->dev,
haptics           210 drivers/input/misc/drv2667.c 		error = regmap_write(haptics->regmap,
haptics           213 drivers/input/misc/drv2667.c 			dev_err(&haptics->client->dev,
haptics           217 drivers/input/misc/drv2667.c 		error = regmap_update_bits(haptics->regmap, DRV2667_CTRL_2,
haptics           220 drivers/input/misc/drv2667.c 			dev_err(&haptics->client->dev,
haptics           229 drivers/input/misc/drv2667.c 	struct drv2667_data *haptics = input_get_drvdata(input);
haptics           232 drivers/input/misc/drv2667.c 		haptics->magnitude = effect->u.rumble.strong_magnitude;
haptics           234 drivers/input/misc/drv2667.c 		haptics->magnitude = effect->u.rumble.weak_magnitude;
haptics           236 drivers/input/misc/drv2667.c 		haptics->magnitude = 0;
haptics           238 drivers/input/misc/drv2667.c 	schedule_work(&haptics->work);
haptics           245 drivers/input/misc/drv2667.c 	struct drv2667_data *haptics = input_get_drvdata(input);
haptics           248 drivers/input/misc/drv2667.c 	cancel_work_sync(&haptics->work);
haptics           250 drivers/input/misc/drv2667.c 	error = regmap_update_bits(haptics->regmap, DRV2667_CTRL_2,
haptics           253 drivers/input/misc/drv2667.c 		dev_err(&haptics->client->dev,
haptics           276 drivers/input/misc/drv2667.c static int drv2667_init(struct drv2667_data *haptics)
haptics           281 drivers/input/misc/drv2667.c 	haptics->frequency = 195;
haptics           282 drivers/input/misc/drv2667.c 	haptics->page = DRV2667_PAGE_1;
haptics           284 drivers/input/misc/drv2667.c 	error = regmap_register_patch(haptics->regmap,
haptics           288 drivers/input/misc/drv2667.c 		dev_err(&haptics->client->dev,
haptics           294 drivers/input/misc/drv2667.c 	error = regmap_write(haptics->regmap, DRV2667_PAGE, haptics->page);
haptics           296 drivers/input/misc/drv2667.c 		dev_err(&haptics->client->dev, "Failed to set page: %d\n",
haptics           301 drivers/input/misc/drv2667.c 	error = drv2667_set_waveform_freq(haptics);
haptics           305 drivers/input/misc/drv2667.c 	error = regmap_register_patch(haptics->regmap,
haptics           309 drivers/input/misc/drv2667.c 		dev_err(&haptics->client->dev,
haptics           315 drivers/input/misc/drv2667.c 	error = regmap_write(haptics->regmap, DRV2667_PAGE, DRV2667_PAGE_0);
haptics           319 drivers/input/misc/drv2667.c 	regmap_write(haptics->regmap, DRV2667_PAGE, DRV2667_PAGE_0);
haptics           337 drivers/input/misc/drv2667.c 	struct drv2667_data *haptics;
haptics           340 drivers/input/misc/drv2667.c 	haptics = devm_kzalloc(&client->dev, sizeof(*haptics), GFP_KERNEL);
haptics           341 drivers/input/misc/drv2667.c 	if (!haptics)
haptics           344 drivers/input/misc/drv2667.c 	haptics->regulator = devm_regulator_get(&client->dev, "vbat");
haptics           345 drivers/input/misc/drv2667.c 	if (IS_ERR(haptics->regulator)) {
haptics           346 drivers/input/misc/drv2667.c 		error = PTR_ERR(haptics->regulator);
haptics           352 drivers/input/misc/drv2667.c 	haptics->input_dev = devm_input_allocate_device(&client->dev);
haptics           353 drivers/input/misc/drv2667.c 	if (!haptics->input_dev) {
haptics           358 drivers/input/misc/drv2667.c 	haptics->input_dev->name = "drv2667:haptics";
haptics           359 drivers/input/misc/drv2667.c 	haptics->input_dev->dev.parent = client->dev.parent;
haptics           360 drivers/input/misc/drv2667.c 	haptics->input_dev->close = drv2667_close;
haptics           361 drivers/input/misc/drv2667.c 	input_set_drvdata(haptics->input_dev, haptics);
haptics           362 drivers/input/misc/drv2667.c 	input_set_capability(haptics->input_dev, EV_FF, FF_RUMBLE);
haptics           364 drivers/input/misc/drv2667.c 	error = input_ff_create_memless(haptics->input_dev, NULL,
haptics           372 drivers/input/misc/drv2667.c 	INIT_WORK(&haptics->work, drv2667_worker);
haptics           374 drivers/input/misc/drv2667.c 	haptics->client = client;
haptics           375 drivers/input/misc/drv2667.c 	i2c_set_clientdata(client, haptics);
haptics           377 drivers/input/misc/drv2667.c 	haptics->regmap = devm_regmap_init_i2c(client, &drv2667_regmap_config);
haptics           378 drivers/input/misc/drv2667.c 	if (IS_ERR(haptics->regmap)) {
haptics           379 drivers/input/misc/drv2667.c 		error = PTR_ERR(haptics->regmap);
haptics           385 drivers/input/misc/drv2667.c 	error = drv2667_init(haptics);
haptics           391 drivers/input/misc/drv2667.c 	error = input_register_device(haptics->input_dev);
haptics           403 drivers/input/misc/drv2667.c 	struct drv2667_data *haptics = dev_get_drvdata(dev);
haptics           406 drivers/input/misc/drv2667.c 	mutex_lock(&haptics->input_dev->mutex);
haptics           408 drivers/input/misc/drv2667.c 	if (haptics->input_dev->users) {
haptics           409 drivers/input/misc/drv2667.c 		ret = regmap_update_bits(haptics->regmap, DRV2667_CTRL_2,
haptics           413 drivers/input/misc/drv2667.c 			regulator_disable(haptics->regulator);
haptics           417 drivers/input/misc/drv2667.c 		ret = regulator_disable(haptics->regulator);
haptics           420 drivers/input/misc/drv2667.c 			regmap_update_bits(haptics->regmap,
haptics           426 drivers/input/misc/drv2667.c 	mutex_unlock(&haptics->input_dev->mutex);
haptics           432 drivers/input/misc/drv2667.c 	struct drv2667_data *haptics = dev_get_drvdata(dev);
haptics           435 drivers/input/misc/drv2667.c 	mutex_lock(&haptics->input_dev->mutex);
haptics           437 drivers/input/misc/drv2667.c 	if (haptics->input_dev->users) {
haptics           438 drivers/input/misc/drv2667.c 		ret = regulator_enable(haptics->regulator);
haptics           444 drivers/input/misc/drv2667.c 		ret = regmap_update_bits(haptics->regmap, DRV2667_CTRL_2,
haptics           448 drivers/input/misc/drv2667.c 			regulator_disable(haptics->regulator);
haptics           455 drivers/input/misc/drv2667.c 	mutex_unlock(&haptics->input_dev->mutex);