touchkey           89 drivers/input/keyboard/tm2-touchkey.c 	struct tm2_touchkey_data *touchkey =
touchkey           96 drivers/input/keyboard/tm2-touchkey.c 		data = touchkey->variant->cmd_led_off;
touchkey           99 drivers/input/keyboard/tm2-touchkey.c 		data = touchkey->variant->cmd_led_on;
touchkey          102 drivers/input/keyboard/tm2-touchkey.c 	if (!touchkey->variant->fixed_regulator)
touchkey          103 drivers/input/keyboard/tm2-touchkey.c 		regulator_set_voltage(touchkey->vdd, volt, volt);
touchkey          105 drivers/input/keyboard/tm2-touchkey.c 	return touchkey->variant->no_reg ?
touchkey          106 drivers/input/keyboard/tm2-touchkey.c 		i2c_smbus_write_byte(touchkey->client, data) :
touchkey          107 drivers/input/keyboard/tm2-touchkey.c 		i2c_smbus_write_byte_data(touchkey->client,
touchkey          108 drivers/input/keyboard/tm2-touchkey.c 					  touchkey->variant->base_reg, data);
touchkey          111 drivers/input/keyboard/tm2-touchkey.c static int tm2_touchkey_power_enable(struct tm2_touchkey_data *touchkey)
touchkey          115 drivers/input/keyboard/tm2-touchkey.c 	error = regulator_bulk_enable(ARRAY_SIZE(touchkey->regulators),
touchkey          116 drivers/input/keyboard/tm2-touchkey.c 				      touchkey->regulators);
touchkey          128 drivers/input/keyboard/tm2-touchkey.c 	struct tm2_touchkey_data *touchkey = data;
touchkey          130 drivers/input/keyboard/tm2-touchkey.c 	regulator_bulk_disable(ARRAY_SIZE(touchkey->regulators),
touchkey          131 drivers/input/keyboard/tm2-touchkey.c 			       touchkey->regulators);
touchkey          136 drivers/input/keyboard/tm2-touchkey.c 	struct tm2_touchkey_data *touchkey = devid;
touchkey          141 drivers/input/keyboard/tm2-touchkey.c 	if (touchkey->variant->no_reg)
touchkey          142 drivers/input/keyboard/tm2-touchkey.c 		data = i2c_smbus_read_byte(touchkey->client);
touchkey          144 drivers/input/keyboard/tm2-touchkey.c 		data = i2c_smbus_read_byte_data(touchkey->client,
touchkey          145 drivers/input/keyboard/tm2-touchkey.c 						touchkey->variant->keycode_reg);
touchkey          147 drivers/input/keyboard/tm2-touchkey.c 		dev_err(&touchkey->client->dev,
touchkey          153 drivers/input/keyboard/tm2-touchkey.c 	if (index < 0 || index >= touchkey->num_keycodes) {
touchkey          154 drivers/input/keyboard/tm2-touchkey.c 		dev_warn(&touchkey->client->dev,
touchkey          160 drivers/input/keyboard/tm2-touchkey.c 		for (i = 0; i < touchkey->num_keycodes; i++)
touchkey          161 drivers/input/keyboard/tm2-touchkey.c 			input_report_key(touchkey->input_dev,
touchkey          162 drivers/input/keyboard/tm2-touchkey.c 					 touchkey->keycodes[i], 0);
touchkey          164 drivers/input/keyboard/tm2-touchkey.c 		input_report_key(touchkey->input_dev,
touchkey          165 drivers/input/keyboard/tm2-touchkey.c 				 touchkey->keycodes[index], 1);
touchkey          168 drivers/input/keyboard/tm2-touchkey.c 	input_sync(touchkey->input_dev);
touchkey          171 drivers/input/keyboard/tm2-touchkey.c 	if (touchkey->variant->fixed_regulator &&
touchkey          174 drivers/input/keyboard/tm2-touchkey.c 		if (touchkey->led_dev.brightness == LED_OFF)
touchkey          175 drivers/input/keyboard/tm2-touchkey.c 			tm2_touchkey_led_brightness_set(&touchkey->led_dev,
touchkey          186 drivers/input/keyboard/tm2-touchkey.c 	struct tm2_touchkey_data *touchkey;
touchkey          196 drivers/input/keyboard/tm2-touchkey.c 	touchkey = devm_kzalloc(&client->dev, sizeof(*touchkey), GFP_KERNEL);
touchkey          197 drivers/input/keyboard/tm2-touchkey.c 	if (!touchkey)
touchkey          200 drivers/input/keyboard/tm2-touchkey.c 	touchkey->client = client;
touchkey          201 drivers/input/keyboard/tm2-touchkey.c 	i2c_set_clientdata(client, touchkey);
touchkey          203 drivers/input/keyboard/tm2-touchkey.c 	touchkey->variant = of_device_get_match_data(&client->dev);
touchkey          205 drivers/input/keyboard/tm2-touchkey.c 	touchkey->regulators[0].supply = "vcc";
touchkey          206 drivers/input/keyboard/tm2-touchkey.c 	touchkey->regulators[1].supply = "vdd";
touchkey          208 drivers/input/keyboard/tm2-touchkey.c 					ARRAY_SIZE(touchkey->regulators),
touchkey          209 drivers/input/keyboard/tm2-touchkey.c 					touchkey->regulators);
touchkey          216 drivers/input/keyboard/tm2-touchkey.c 	touchkey->vdd = touchkey->regulators[1].consumer;
touchkey          218 drivers/input/keyboard/tm2-touchkey.c 	touchkey->num_keycodes = of_property_read_variable_u32_array(np,
touchkey          219 drivers/input/keyboard/tm2-touchkey.c 					"linux,keycodes", touchkey->keycodes, 0,
touchkey          220 drivers/input/keyboard/tm2-touchkey.c 					ARRAY_SIZE(touchkey->keycodes));
touchkey          221 drivers/input/keyboard/tm2-touchkey.c 	if (touchkey->num_keycodes <= 0) {
touchkey          223 drivers/input/keyboard/tm2-touchkey.c 		touchkey->keycodes[0] = KEY_PHONE;
touchkey          224 drivers/input/keyboard/tm2-touchkey.c 		touchkey->keycodes[1] = KEY_BACK;
touchkey          225 drivers/input/keyboard/tm2-touchkey.c 		touchkey->num_keycodes = 2;
touchkey          228 drivers/input/keyboard/tm2-touchkey.c 	error = tm2_touchkey_power_enable(touchkey);
touchkey          235 drivers/input/keyboard/tm2-touchkey.c 					 tm2_touchkey_power_disable, touchkey);
touchkey          243 drivers/input/keyboard/tm2-touchkey.c 	touchkey->input_dev = devm_input_allocate_device(&client->dev);
touchkey          244 drivers/input/keyboard/tm2-touchkey.c 	if (!touchkey->input_dev) {
touchkey          249 drivers/input/keyboard/tm2-touchkey.c 	touchkey->input_dev->name = TM2_TOUCHKEY_DEV_NAME;
touchkey          250 drivers/input/keyboard/tm2-touchkey.c 	touchkey->input_dev->id.bustype = BUS_I2C;
touchkey          252 drivers/input/keyboard/tm2-touchkey.c 	for (i = 0; i < touchkey->num_keycodes; i++)
touchkey          253 drivers/input/keyboard/tm2-touchkey.c 		input_set_capability(touchkey->input_dev, EV_KEY,
touchkey          254 drivers/input/keyboard/tm2-touchkey.c 				     touchkey->keycodes[i]);
touchkey          256 drivers/input/keyboard/tm2-touchkey.c 	error = input_register_device(touchkey->input_dev);
touchkey          266 drivers/input/keyboard/tm2-touchkey.c 					  TM2_TOUCHKEY_DEV_NAME, touchkey);
touchkey          274 drivers/input/keyboard/tm2-touchkey.c 	touchkey->led_dev.name = TM2_TOUCHKEY_DEV_NAME;
touchkey          275 drivers/input/keyboard/tm2-touchkey.c 	touchkey->led_dev.brightness = LED_ON;
touchkey          276 drivers/input/keyboard/tm2-touchkey.c 	touchkey->led_dev.max_brightness = LED_ON;
touchkey          277 drivers/input/keyboard/tm2-touchkey.c 	touchkey->led_dev.brightness_set_blocking =
touchkey          280 drivers/input/keyboard/tm2-touchkey.c 	error = devm_led_classdev_register(&client->dev, &touchkey->led_dev);
touchkey          287 drivers/input/keyboard/tm2-touchkey.c 	if (touchkey->variant->fixed_regulator)
touchkey          288 drivers/input/keyboard/tm2-touchkey.c 		tm2_touchkey_led_brightness_set(&touchkey->led_dev, LED_ON);
touchkey          296 drivers/input/keyboard/tm2-touchkey.c 	struct tm2_touchkey_data *touchkey = i2c_get_clientdata(client);
touchkey          299 drivers/input/keyboard/tm2-touchkey.c 	tm2_touchkey_power_disable(touchkey);
touchkey          307 drivers/input/keyboard/tm2-touchkey.c 	struct tm2_touchkey_data *touchkey = i2c_get_clientdata(client);
touchkey          312 drivers/input/keyboard/tm2-touchkey.c 	ret = tm2_touchkey_power_enable(touchkey);