ec_dev             52 drivers/hid/hid-google-hammer.c static int cbas_ec_query_base(struct cros_ec_device *ec_dev, bool get_state,
ec_dev             73 drivers/hid/hid-google-hammer.c 	ret = cros_ec_cmd_xfer_status(ec_dev, msg);
ec_dev             76 drivers/hid/hid-google-hammer.c 			dev_warn(ec_dev->dev, "wrong result size: %d != %zu\n",
ec_dev            171 drivers/iio/accel/cros_ec_accel_legacy.c 	if (!ec || !ec->ec_dev) {
ec_dev            225 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c 	struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent);
ec_dev            231 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c 	if (!ec_dev || !ec_dev->ec_dev) {
ec_dev             29 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c static int cros_ec_get_host_cmd_version_mask(struct cros_ec_device *ec_dev,
ec_dev             48 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c 	ret = cros_ec_cmd_xfer_status(ec_dev, &buf.msg);
ec_dev             98 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c 	state->ec = ec->ec_dev;
ec_dev            172 drivers/iio/light/cros_ec_light_prox.c 	struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent);
ec_dev            178 drivers/iio/light/cros_ec_light_prox.c 	if (!ec_dev || !ec_dev->ec_dev) {
ec_dev            123 drivers/iio/pressure/cros_ec_baro.c 	struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent);
ec_dev            129 drivers/iio/pressure/cros_ec_baro.c 	if (!ec_dev || !ec_dev->ec_dev) {
ec_dev            329 drivers/input/keyboard/cros_ec_keyb.c static int cros_ec_keyb_info(struct cros_ec_device *ec_dev,
ec_dev            352 drivers/input/keyboard/cros_ec_keyb.c 	ret = cros_ec_cmd_xfer(ec_dev, msg);
ec_dev            354 drivers/input/keyboard/cros_ec_keyb.c 		dev_warn(ec_dev->dev, "Transfer error %d/%d: %d\n",
ec_dev            361 drivers/input/keyboard/cros_ec_keyb.c 		dev_warn(ec_dev->dev, "Error getting info %d/%d: %d\n",
ec_dev            365 drivers/input/keyboard/cros_ec_keyb.c 		dev_warn(ec_dev->dev, "Wrong size %d/%d: %d != %zu\n",
ec_dev            392 drivers/input/keyboard/cros_ec_keyb.c 	struct cros_ec_device *ec_dev = ckdev->ec;
ec_dev            396 drivers/input/keyboard/cros_ec_keyb.c 	ret = cros_ec_keyb_info(ec_dev, EC_MKBP_INFO_CURRENT,
ec_dev            443 drivers/input/keyboard/cros_ec_keyb.c 	struct cros_ec_device *ec_dev = ckdev->ec;
ec_dev            453 drivers/input/keyboard/cros_ec_keyb.c 	ret = cros_ec_keyb_info(ec_dev, EC_MKBP_INFO_SUPPORTED,
ec_dev            460 drivers/input/keyboard/cros_ec_keyb.c 	ret = cros_ec_keyb_info(ec_dev, EC_MKBP_INFO_SUPPORTED,
ec_dev            475 drivers/input/keyboard/cros_ec_keyb.c 	phys = devm_kasprintf(dev, GFP_KERNEL, "%s/input1", ec_dev->phys_name);
ec_dev            529 drivers/input/keyboard/cros_ec_keyb.c 	struct cros_ec_device *ec_dev = ckdev->ec;
ec_dev            551 drivers/input/keyboard/cros_ec_keyb.c 	phys = devm_kasprintf(dev, GFP_KERNEL, "%s/input0", ec_dev->phys_name);
ec_dev            262 drivers/media/platform/cros-ec-cec/cros-ec-cec.c 	struct cros_ec_dev *ec_dev = dev_get_drvdata(pdev->dev.parent);
ec_dev            263 drivers/media/platform/cros-ec-cec/cros-ec-cec.c 	struct cros_ec_device *cros_ec = ec_dev->ec_dev;
ec_dev            129 drivers/mfd/cros_ec_dev.c 		ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg);
ec_dev            179 drivers/mfd/cros_ec_dev.c 	ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg);
ec_dev            207 drivers/mfd/cros_ec_dev.c 		ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg);
ec_dev            294 drivers/mfd/cros_ec_dev.c 	struct cros_ec_device *ec_dev = ec->ec_dev;
ec_dev            309 drivers/mfd/cros_ec_dev.c 	if (ec_dev->cmd_readmem) {
ec_dev            310 drivers/mfd/cros_ec_dev.c 		ret = ec_dev->cmd_readmem(ec_dev, EC_MEMMAP_ACC_STATUS, 1,
ec_dev            335 drivers/mfd/cros_ec_dev.c 		dev_err(ec_dev->dev, "failed to add EC sensors\n");
ec_dev            351 drivers/mfd/cros_ec_dev.c 	ec->ec_dev = dev_get_drvdata(dev->parent);
ec_dev            428 drivers/mfd/cros_ec_dev.c 	node = ec->ec_dev->dev->of_node;
ec_dev             36 drivers/platform/chrome/cros_ec.c 	struct cros_ec_device *ec_dev = data;
ec_dev             40 drivers/platform/chrome/cros_ec.c 	ret = cros_ec_get_next_event(ec_dev, &wake_event);
ec_dev             47 drivers/platform/chrome/cros_ec.c 	if (wake_event && device_may_wakeup(ec_dev->dev))
ec_dev             48 drivers/platform/chrome/cros_ec.c 		pm_wakeup_event(ec_dev->dev, 0);
ec_dev             51 drivers/platform/chrome/cros_ec.c 		blocking_notifier_call_chain(&ec_dev->event_notifier,
ec_dev             52 drivers/platform/chrome/cros_ec.c 					     0, ec_dev);
ec_dev             56 drivers/platform/chrome/cros_ec.c static int cros_ec_sleep_event(struct cros_ec_device *ec_dev, u8 sleep_event)
ec_dev             70 drivers/platform/chrome/cros_ec.c 	if (ec_dev->host_sleep_v1) {
ec_dev             89 drivers/platform/chrome/cros_ec.c 	ret = cros_ec_cmd_xfer(ec_dev, &buf.msg);
ec_dev             92 drivers/platform/chrome/cros_ec.c 	if (ret >= 0 && ec_dev->host_sleep_v1 &&
ec_dev             94 drivers/platform/chrome/cros_ec.c 		ec_dev->last_resume_result =
ec_dev            107 drivers/platform/chrome/cros_ec.c int cros_ec_register(struct cros_ec_device *ec_dev)
ec_dev            109 drivers/platform/chrome/cros_ec.c 	struct device *dev = ec_dev->dev;
ec_dev            112 drivers/platform/chrome/cros_ec.c 	BLOCKING_INIT_NOTIFIER_HEAD(&ec_dev->event_notifier);
ec_dev            114 drivers/platform/chrome/cros_ec.c 	ec_dev->max_request = sizeof(struct ec_params_hello);
ec_dev            115 drivers/platform/chrome/cros_ec.c 	ec_dev->max_response = sizeof(struct ec_response_get_protocol_info);
ec_dev            116 drivers/platform/chrome/cros_ec.c 	ec_dev->max_passthru = 0;
ec_dev            118 drivers/platform/chrome/cros_ec.c 	ec_dev->din = devm_kzalloc(dev, ec_dev->din_size, GFP_KERNEL);
ec_dev            119 drivers/platform/chrome/cros_ec.c 	if (!ec_dev->din)
ec_dev            122 drivers/platform/chrome/cros_ec.c 	ec_dev->dout = devm_kzalloc(dev, ec_dev->dout_size, GFP_KERNEL);
ec_dev            123 drivers/platform/chrome/cros_ec.c 	if (!ec_dev->dout)
ec_dev            126 drivers/platform/chrome/cros_ec.c 	mutex_init(&ec_dev->lock);
ec_dev            128 drivers/platform/chrome/cros_ec.c 	err = cros_ec_query_all(ec_dev);
ec_dev            134 drivers/platform/chrome/cros_ec.c 	if (ec_dev->irq) {
ec_dev            135 drivers/platform/chrome/cros_ec.c 		err = devm_request_threaded_irq(dev, ec_dev->irq, NULL,
ec_dev            137 drivers/platform/chrome/cros_ec.c 				"chromeos-ec", ec_dev);
ec_dev            140 drivers/platform/chrome/cros_ec.c 				ec_dev->irq, err);
ec_dev            146 drivers/platform/chrome/cros_ec.c 	ec_dev->ec = platform_device_register_data(ec_dev->dev, "cros-ec-dev",
ec_dev            149 drivers/platform/chrome/cros_ec.c 	if (IS_ERR(ec_dev->ec)) {
ec_dev            150 drivers/platform/chrome/cros_ec.c 		dev_err(ec_dev->dev,
ec_dev            152 drivers/platform/chrome/cros_ec.c 		return PTR_ERR(ec_dev->ec);
ec_dev            155 drivers/platform/chrome/cros_ec.c 	if (ec_dev->max_passthru) {
ec_dev            164 drivers/platform/chrome/cros_ec.c 		ec_dev->pd = platform_device_register_data(ec_dev->dev,
ec_dev            168 drivers/platform/chrome/cros_ec.c 		if (IS_ERR(ec_dev->pd)) {
ec_dev            169 drivers/platform/chrome/cros_ec.c 			dev_err(ec_dev->dev,
ec_dev            171 drivers/platform/chrome/cros_ec.c 			platform_device_unregister(ec_dev->ec);
ec_dev            172 drivers/platform/chrome/cros_ec.c 			return PTR_ERR(ec_dev->pd);
ec_dev            179 drivers/platform/chrome/cros_ec.c 			platform_device_unregister(ec_dev->pd);
ec_dev            180 drivers/platform/chrome/cros_ec.c 			platform_device_unregister(ec_dev->ec);
ec_dev            190 drivers/platform/chrome/cros_ec.c 	err = cros_ec_sleep_event(ec_dev, 0);
ec_dev            192 drivers/platform/chrome/cros_ec.c 		dev_dbg(ec_dev->dev, "Error %d clearing sleep event to ec",
ec_dev            201 drivers/platform/chrome/cros_ec.c int cros_ec_unregister(struct cros_ec_device *ec_dev)
ec_dev            203 drivers/platform/chrome/cros_ec.c 	if (ec_dev->pd)
ec_dev            204 drivers/platform/chrome/cros_ec.c 		platform_device_unregister(ec_dev->pd);
ec_dev            205 drivers/platform/chrome/cros_ec.c 	platform_device_unregister(ec_dev->ec);
ec_dev            212 drivers/platform/chrome/cros_ec.c int cros_ec_suspend(struct cros_ec_device *ec_dev)
ec_dev            214 drivers/platform/chrome/cros_ec.c 	struct device *dev = ec_dev->dev;
ec_dev            222 drivers/platform/chrome/cros_ec.c 	ret = cros_ec_sleep_event(ec_dev, sleep_event);
ec_dev            224 drivers/platform/chrome/cros_ec.c 		dev_dbg(ec_dev->dev, "Error %d sending suspend event to ec",
ec_dev            228 drivers/platform/chrome/cros_ec.c 		ec_dev->wake_enabled = !enable_irq_wake(ec_dev->irq);
ec_dev            230 drivers/platform/chrome/cros_ec.c 	disable_irq(ec_dev->irq);
ec_dev            231 drivers/platform/chrome/cros_ec.c 	ec_dev->was_wake_device = ec_dev->wake_enabled;
ec_dev            232 drivers/platform/chrome/cros_ec.c 	ec_dev->suspended = true;
ec_dev            238 drivers/platform/chrome/cros_ec.c static void cros_ec_report_events_during_suspend(struct cros_ec_device *ec_dev)
ec_dev            240 drivers/platform/chrome/cros_ec.c 	while (ec_dev->mkbp_event_supported &&
ec_dev            241 drivers/platform/chrome/cros_ec.c 	       cros_ec_get_next_event(ec_dev, NULL) > 0)
ec_dev            242 drivers/platform/chrome/cros_ec.c 		blocking_notifier_call_chain(&ec_dev->event_notifier,
ec_dev            243 drivers/platform/chrome/cros_ec.c 					     1, ec_dev);
ec_dev            246 drivers/platform/chrome/cros_ec.c int cros_ec_resume(struct cros_ec_device *ec_dev)
ec_dev            251 drivers/platform/chrome/cros_ec.c 	ec_dev->suspended = false;
ec_dev            252 drivers/platform/chrome/cros_ec.c 	enable_irq(ec_dev->irq);
ec_dev            258 drivers/platform/chrome/cros_ec.c 	ret = cros_ec_sleep_event(ec_dev, sleep_event);
ec_dev            260 drivers/platform/chrome/cros_ec.c 		dev_dbg(ec_dev->dev, "Error %d sending resume event to ec",
ec_dev            263 drivers/platform/chrome/cros_ec.c 	if (ec_dev->wake_enabled) {
ec_dev            264 drivers/platform/chrome/cros_ec.c 		disable_irq_wake(ec_dev->irq);
ec_dev            265 drivers/platform/chrome/cros_ec.c 		ec_dev->wake_enabled = 0;
ec_dev            271 drivers/platform/chrome/cros_ec.c 	cros_ec_report_events_during_suspend(ec_dev);
ec_dev             35 drivers/platform/chrome/cros_ec_chardev.c 	struct cros_ec_dev *ec_dev;
ec_dev             40 drivers/platform/chrome/cros_ec_chardev.c 	struct cros_ec_dev *ec_dev;
ec_dev             71 drivers/platform/chrome/cros_ec_chardev.c 	ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg);
ec_dev             99 drivers/platform/chrome/cros_ec_chardev.c 	struct cros_ec_device *ec_dev = priv->ec_dev->ec_dev;
ec_dev            101 drivers/platform/chrome/cros_ec_chardev.c 	unsigned long event_bit = 1 << ec_dev->event_data.event_type;
ec_dev            102 drivers/platform/chrome/cros_ec_chardev.c 	int total_size = sizeof(*event) + ec_dev->event_size;
ec_dev            112 drivers/platform/chrome/cros_ec_chardev.c 	event->size = ec_dev->event_size;
ec_dev            113 drivers/platform/chrome/cros_ec_chardev.c 	event->event_type = ec_dev->event_data.event_type;
ec_dev            114 drivers/platform/chrome/cros_ec_chardev.c 	memcpy(event->data, &ec_dev->event_data.data, ec_dev->event_size);
ec_dev            164 drivers/platform/chrome/cros_ec_chardev.c 	struct cros_ec_dev *ec_dev = dev_get_drvdata(mdev->parent);
ec_dev            172 drivers/platform/chrome/cros_ec_chardev.c 	priv->ec_dev = ec_dev;
ec_dev            179 drivers/platform/chrome/cros_ec_chardev.c 	ret = blocking_notifier_chain_register(&ec_dev->ec_dev->event_notifier,
ec_dev            182 drivers/platform/chrome/cros_ec_chardev.c 		dev_err(ec_dev->dev, "failed to register event notifier\n");
ec_dev            207 drivers/platform/chrome/cros_ec_chardev.c 	struct cros_ec_dev *ec_dev = priv->ec_dev;
ec_dev            241 drivers/platform/chrome/cros_ec_chardev.c 	ret = ec_get_version(ec_dev, msg, sizeof(msg));
ec_dev            257 drivers/platform/chrome/cros_ec_chardev.c 	struct cros_ec_dev *ec_dev = priv->ec_dev;
ec_dev            260 drivers/platform/chrome/cros_ec_chardev.c 	blocking_notifier_chain_unregister(&ec_dev->ec_dev->event_notifier,
ec_dev            305 drivers/platform/chrome/cros_ec_chardev.c 	ret = cros_ec_cmd_xfer(ec->ec_dev, s_cmd);
ec_dev            320 drivers/platform/chrome/cros_ec_chardev.c 	struct cros_ec_device *ec_dev = ec->ec_dev;
ec_dev            325 drivers/platform/chrome/cros_ec_chardev.c 	if (!ec_dev->cmd_readmem)
ec_dev            331 drivers/platform/chrome/cros_ec_chardev.c 	num = ec_dev->cmd_readmem(ec_dev, s_mem.offset, s_mem.bytes,
ec_dev            346 drivers/platform/chrome/cros_ec_chardev.c 	struct cros_ec_dev *ec = priv->ec_dev;
ec_dev            377 drivers/platform/chrome/cros_ec_chardev.c 	struct cros_ec_dev *ec_dev = dev_get_drvdata(pdev->dev.parent);
ec_dev            378 drivers/platform/chrome/cros_ec_chardev.c 	struct cros_ec_platform *ec_platform = dev_get_platdata(ec_dev->dev);
ec_dev            386 drivers/platform/chrome/cros_ec_chardev.c 	data->ec_dev = ec_dev;
ec_dev             77 drivers/platform/chrome/cros_ec_debugfs.c 	ret = cros_ec_cmd_xfer_status(ec->ec_dev, &snapshot_msg);
ec_dev             94 drivers/platform/chrome/cros_ec_debugfs.c 		ret = cros_ec_cmd_xfer_status(ec->ec_dev,
ec_dev            201 drivers/platform/chrome/cros_ec_debugfs.c 	struct cros_ec_device *ec_dev = debug_info->ec->ec_dev;
ec_dev            233 drivers/platform/chrome/cros_ec_debugfs.c 		if (cros_ec_cmd_xfer_status(ec_dev, msg) < 0)
ec_dev            250 drivers/platform/chrome/cros_ec_debugfs.c 	struct cros_ec_device *ec_dev = debug_info->ec->ec_dev;
ec_dev            264 drivers/platform/chrome/cros_ec_debugfs.c 	ret = cros_ec_cmd_xfer_status(ec_dev, &msg.cmd);
ec_dev            318 drivers/platform/chrome/cros_ec_debugfs.c 	ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg) >= 0 &&
ec_dev            345 drivers/platform/chrome/cros_ec_debugfs.c 	read_response_size = ec->ec_dev->max_response;
ec_dev            384 drivers/platform/chrome/cros_ec_debugfs.c 	struct cros_ec_device *ec_dev = debug_info->ec->ec_dev;
ec_dev            389 drivers/platform/chrome/cros_ec_debugfs.c 	insize = ec_dev->max_response;
ec_dev            399 drivers/platform/chrome/cros_ec_debugfs.c 	ret = cros_ec_cmd_xfer_status(ec_dev, msg);
ec_dev            452 drivers/platform/chrome/cros_ec_debugfs.c 			   &ec->ec_dev->last_resume_result);
ec_dev             50 drivers/platform/chrome/cros_ec_i2c.c static int cros_ec_pkt_xfer_i2c(struct cros_ec_device *ec_dev,
ec_dev             53 drivers/platform/chrome/cros_ec_i2c.c 	struct i2c_client *client = ec_dev->priv;
ec_dev             73 drivers/platform/chrome/cros_ec_i2c.c 	BUG_ON(packet_len > ec_dev->din_size);
ec_dev             74 drivers/platform/chrome/cros_ec_i2c.c 	in_buf = ec_dev->din;
ec_dev             79 drivers/platform/chrome/cros_ec_i2c.c 	BUG_ON(packet_len > ec_dev->dout_size);
ec_dev             80 drivers/platform/chrome/cros_ec_i2c.c 	out_buf = ec_dev->dout;
ec_dev             88 drivers/platform/chrome/cros_ec_i2c.c 	ec_dev->dout++;
ec_dev             89 drivers/platform/chrome/cros_ec_i2c.c 	ret = cros_ec_prepare_tx(ec_dev, msg);
ec_dev             90 drivers/platform/chrome/cros_ec_i2c.c 	ec_dev->dout--;
ec_dev             95 drivers/platform/chrome/cros_ec_i2c.c 		dev_dbg(ec_dev->dev, "i2c transfer failed: %d\n", ret);
ec_dev             98 drivers/platform/chrome/cros_ec_i2c.c 		dev_err(ec_dev->dev, "failed to get response: %d\n", ret);
ec_dev            112 drivers/platform/chrome/cros_ec_i2c.c 		dev_dbg(ec_dev->dev, "command 0x%02x in progress\n",
ec_dev            117 drivers/platform/chrome/cros_ec_i2c.c 		dev_dbg(ec_dev->dev, "command 0x%02x returned %d\n",
ec_dev            135 drivers/platform/chrome/cros_ec_i2c.c 		dev_err(ec_dev->dev,
ec_dev            143 drivers/platform/chrome/cros_ec_i2c.c 		dev_err(ec_dev->dev,
ec_dev            164 drivers/platform/chrome/cros_ec_i2c.c 		dev_err(ec_dev->dev, "bad packet checksum\n");
ec_dev            178 drivers/platform/chrome/cros_ec_i2c.c static int cros_ec_cmd_xfer_i2c(struct cros_ec_device *ec_dev,
ec_dev            181 drivers/platform/chrome/cros_ec_i2c.c 	struct i2c_client *client = ec_dev->priv;
ec_dev            233 drivers/platform/chrome/cros_ec_i2c.c 		dev_err(ec_dev->dev, "i2c transfer failed: %d\n", ret);
ec_dev            236 drivers/platform/chrome/cros_ec_i2c.c 		dev_err(ec_dev->dev, "failed to get response: %d\n", ret);
ec_dev            243 drivers/platform/chrome/cros_ec_i2c.c 	ret = cros_ec_check_result(ec_dev, msg);
ec_dev            249 drivers/platform/chrome/cros_ec_i2c.c 		dev_err(ec_dev->dev, "packet too long (%d bytes, expected %d)",
ec_dev            261 drivers/platform/chrome/cros_ec_i2c.c 	dev_dbg(ec_dev->dev, "packet: %*ph, sum = %02x\n",
ec_dev            264 drivers/platform/chrome/cros_ec_i2c.c 		dev_err(ec_dev->dev, "bad packet checksum\n");
ec_dev            283 drivers/platform/chrome/cros_ec_i2c.c 	struct cros_ec_device *ec_dev = NULL;
ec_dev            286 drivers/platform/chrome/cros_ec_i2c.c 	ec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);
ec_dev            287 drivers/platform/chrome/cros_ec_i2c.c 	if (!ec_dev)
ec_dev            290 drivers/platform/chrome/cros_ec_i2c.c 	i2c_set_clientdata(client, ec_dev);
ec_dev            291 drivers/platform/chrome/cros_ec_i2c.c 	ec_dev->dev = dev;
ec_dev            292 drivers/platform/chrome/cros_ec_i2c.c 	ec_dev->priv = client;
ec_dev            293 drivers/platform/chrome/cros_ec_i2c.c 	ec_dev->irq = client->irq;
ec_dev            294 drivers/platform/chrome/cros_ec_i2c.c 	ec_dev->cmd_xfer = cros_ec_cmd_xfer_i2c;
ec_dev            295 drivers/platform/chrome/cros_ec_i2c.c 	ec_dev->pkt_xfer = cros_ec_pkt_xfer_i2c;
ec_dev            296 drivers/platform/chrome/cros_ec_i2c.c 	ec_dev->phys_name = client->adapter->name;
ec_dev            297 drivers/platform/chrome/cros_ec_i2c.c 	ec_dev->din_size = sizeof(struct ec_host_response_i2c) +
ec_dev            299 drivers/platform/chrome/cros_ec_i2c.c 	ec_dev->dout_size = sizeof(struct ec_host_request_i2c);
ec_dev            301 drivers/platform/chrome/cros_ec_i2c.c 	err = cros_ec_register(ec_dev);
ec_dev            312 drivers/platform/chrome/cros_ec_i2c.c 	struct cros_ec_device *ec_dev = i2c_get_clientdata(client);
ec_dev            314 drivers/platform/chrome/cros_ec_i2c.c 	return cros_ec_unregister(ec_dev);
ec_dev            320 drivers/platform/chrome/cros_ec_i2c.c 	struct cros_ec_device *ec_dev = to_ec_dev(dev);
ec_dev            322 drivers/platform/chrome/cros_ec_i2c.c 	return cros_ec_suspend(ec_dev);
ec_dev            327 drivers/platform/chrome/cros_ec_i2c.c 	struct cros_ec_device *ec_dev = to_ec_dev(dev);
ec_dev            329 drivers/platform/chrome/cros_ec_i2c.c 	return cros_ec_resume(ec_dev);
ec_dev            127 drivers/platform/chrome/cros_ec_ishtp.c 	struct cros_ec_device *ec_dev;
ec_dev            138 drivers/platform/chrome/cros_ec_ishtp.c 	struct cros_ec_device *ec_dev = client_data->ec_dev;
ec_dev            140 drivers/platform/chrome/cros_ec_ishtp.c 	if (cros_ec_get_next_event(ec_dev, NULL) > 0) {
ec_dev            141 drivers/platform/chrome/cros_ec_ishtp.c 		blocking_notifier_call_chain(&ec_dev->event_notifier,
ec_dev            142 drivers/platform/chrome/cros_ec_ishtp.c 					     0, ec_dev);
ec_dev            414 drivers/platform/chrome/cros_ec_ishtp.c static int prepare_cros_ec_rx(struct cros_ec_device *ec_dev,
ec_dev            423 drivers/platform/chrome/cros_ec_ishtp.c 	rv = cros_ec_check_result(ec_dev, msg);
ec_dev            428 drivers/platform/chrome/cros_ec_ishtp.c 		dev_err(ec_dev->dev, "Packet too long (%d bytes, expected %d)",
ec_dev            442 drivers/platform/chrome/cros_ec_ishtp.c 		dev_dbg(ec_dev->dev, "Bad received packet checksum %d\n", sum);
ec_dev            449 drivers/platform/chrome/cros_ec_ishtp.c static int cros_ec_pkt_xfer_ish(struct cros_ec_device *ec_dev,
ec_dev            453 drivers/platform/chrome/cros_ec_ishtp.c 	struct ishtp_cl *cros_ish_cl = ec_dev->priv;
ec_dev            456 drivers/platform/chrome/cros_ec_ishtp.c 	struct cros_ish_in_msg *in_msg = (struct cros_ish_in_msg *)ec_dev->din;
ec_dev            458 drivers/platform/chrome/cros_ec_ishtp.c 		(struct cros_ish_out_msg *)ec_dev->dout;
ec_dev            463 drivers/platform/chrome/cros_ec_ishtp.c 	if (in_size > ec_dev->din_size) {
ec_dev            466 drivers/platform/chrome/cros_ec_ishtp.c 			in_size, ec_dev->din_size);
ec_dev            470 drivers/platform/chrome/cros_ec_ishtp.c 	if (out_size > ec_dev->dout_size) {
ec_dev            473 drivers/platform/chrome/cros_ec_ishtp.c 			out_size, ec_dev->dout_size);
ec_dev            488 drivers/platform/chrome/cros_ec_ishtp.c 	ec_dev->dout += OUT_MSG_EC_REQUEST_PREAMBLE;
ec_dev            489 drivers/platform/chrome/cros_ec_ishtp.c 	cros_ec_prepare_tx(ec_dev, msg);
ec_dev            490 drivers/platform/chrome/cros_ec_ishtp.c 	ec_dev->dout -= OUT_MSG_EC_REQUEST_PREAMBLE;
ec_dev            507 drivers/platform/chrome/cros_ec_ishtp.c 	rv = prepare_cros_ec_rx(ec_dev, in_msg, msg);
ec_dev            531 drivers/platform/chrome/cros_ec_ishtp.c 	struct cros_ec_device *ec_dev;
ec_dev            534 drivers/platform/chrome/cros_ec_ishtp.c 	ec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);
ec_dev            535 drivers/platform/chrome/cros_ec_ishtp.c 	if (!ec_dev)
ec_dev            538 drivers/platform/chrome/cros_ec_ishtp.c 	client_data->ec_dev = ec_dev;
ec_dev            539 drivers/platform/chrome/cros_ec_ishtp.c 	dev->driver_data = ec_dev;
ec_dev            541 drivers/platform/chrome/cros_ec_ishtp.c 	ec_dev->dev = dev;
ec_dev            542 drivers/platform/chrome/cros_ec_ishtp.c 	ec_dev->priv = client_data->cros_ish_cl;
ec_dev            543 drivers/platform/chrome/cros_ec_ishtp.c 	ec_dev->cmd_xfer = NULL;
ec_dev            544 drivers/platform/chrome/cros_ec_ishtp.c 	ec_dev->pkt_xfer = cros_ec_pkt_xfer_ish;
ec_dev            545 drivers/platform/chrome/cros_ec_ishtp.c 	ec_dev->phys_name = dev_name(dev);
ec_dev            546 drivers/platform/chrome/cros_ec_ishtp.c 	ec_dev->din_size = sizeof(struct cros_ish_in_msg) +
ec_dev            548 drivers/platform/chrome/cros_ec_ishtp.c 	ec_dev->dout_size = sizeof(struct cros_ish_out_msg);
ec_dev            550 drivers/platform/chrome/cros_ec_ishtp.c 	return cros_ec_register(ec_dev);
ec_dev            592 drivers/platform/chrome/cros_ec_ishtp.c 	client_data->ec_dev->priv = client_data->cros_ish_cl;
ec_dev            594 drivers/platform/chrome/cros_ec_ishtp.c 	dev->driver_data = client_data->ec_dev;
ec_dev            713 drivers/platform/chrome/cros_ec_ishtp.c 	return cros_ec_suspend(client_data->ec_dev);
ec_dev            728 drivers/platform/chrome/cros_ec_ishtp.c 	return cros_ec_resume(client_data->ec_dev);
ec_dev            120 drivers/platform/chrome/cros_ec_lightbar.c 	ret = cros_ec_cmd_xfer(ec->ec_dev, msg);
ec_dev            197 drivers/platform/chrome/cros_ec_lightbar.c 	ret = cros_ec_cmd_xfer(ec->ec_dev, msg);
ec_dev            262 drivers/platform/chrome/cros_ec_lightbar.c 			ret = cros_ec_cmd_xfer(ec->ec_dev, msg);
ec_dev            309 drivers/platform/chrome/cros_ec_lightbar.c 	ret = cros_ec_cmd_xfer(ec->ec_dev, msg);
ec_dev            348 drivers/platform/chrome/cros_ec_lightbar.c 	ret = cros_ec_cmd_xfer(ec->ec_dev, msg);
ec_dev            381 drivers/platform/chrome/cros_ec_lightbar.c 	ret = cros_ec_cmd_xfer(ec->ec_dev, msg);
ec_dev            429 drivers/platform/chrome/cros_ec_lightbar.c 	ret = cros_ec_cmd_xfer(ec->ec_dev, msg);
ec_dev            460 drivers/platform/chrome/cros_ec_lightbar.c 	max_size = min(EC_LB_PROG_LEN, ec->ec_dev->max_request - extra_bytes);
ec_dev            491 drivers/platform/chrome/cros_ec_lightbar.c 	ret = cros_ec_cmd_xfer(ec->ec_dev, msg);
ec_dev            558 drivers/platform/chrome/cros_ec_lightbar.c 	struct cros_ec_dev *ec_dev = dev_get_drvdata(pd->dev.parent);
ec_dev            559 drivers/platform/chrome/cros_ec_lightbar.c 	struct cros_ec_platform *pdata = dev_get_platdata(ec_dev->dev);
ec_dev            574 drivers/platform/chrome/cros_ec_lightbar.c 	if (!get_lightbar_version(ec_dev, NULL, NULL))
ec_dev            578 drivers/platform/chrome/cros_ec_lightbar.c 	lb_manual_suspend_ctrl(ec_dev, 1);
ec_dev            580 drivers/platform/chrome/cros_ec_lightbar.c 	ret = sysfs_create_group(&ec_dev->class_dev.kobj,
ec_dev            591 drivers/platform/chrome/cros_ec_lightbar.c 	struct cros_ec_dev *ec_dev = dev_get_drvdata(pd->dev.parent);
ec_dev            593 drivers/platform/chrome/cros_ec_lightbar.c 	sysfs_remove_group(&ec_dev->class_dev.kobj,
ec_dev            597 drivers/platform/chrome/cros_ec_lightbar.c 	lb_manual_suspend_ctrl(ec_dev, 0);
ec_dev            604 drivers/platform/chrome/cros_ec_lightbar.c 	struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent);
ec_dev            609 drivers/platform/chrome/cros_ec_lightbar.c 	return lb_send_empty_cmd(ec_dev, LIGHTBAR_CMD_RESUME);
ec_dev            614 drivers/platform/chrome/cros_ec_lightbar.c 	struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent);
ec_dev            619 drivers/platform/chrome/cros_ec_lightbar.c 	return lb_send_empty_cmd(ec_dev, LIGHTBAR_CMD_SUSPEND);
ec_dev            314 drivers/platform/chrome/cros_ec_lpc.c 	struct cros_ec_device *ec_dev = data;
ec_dev            316 drivers/platform/chrome/cros_ec_lpc.c 	if (ec_dev->mkbp_event_supported &&
ec_dev            317 drivers/platform/chrome/cros_ec_lpc.c 	    cros_ec_get_next_event(ec_dev, NULL) > 0)
ec_dev            318 drivers/platform/chrome/cros_ec_lpc.c 		blocking_notifier_call_chain(&ec_dev->event_notifier, 0,
ec_dev            319 drivers/platform/chrome/cros_ec_lpc.c 					     ec_dev);
ec_dev            330 drivers/platform/chrome/cros_ec_lpc.c 	struct cros_ec_device *ec_dev;
ec_dev            372 drivers/platform/chrome/cros_ec_lpc.c 	ec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);
ec_dev            373 drivers/platform/chrome/cros_ec_lpc.c 	if (!ec_dev)
ec_dev            376 drivers/platform/chrome/cros_ec_lpc.c 	platform_set_drvdata(pdev, ec_dev);
ec_dev            377 drivers/platform/chrome/cros_ec_lpc.c 	ec_dev->dev = dev;
ec_dev            378 drivers/platform/chrome/cros_ec_lpc.c 	ec_dev->phys_name = dev_name(dev);
ec_dev            379 drivers/platform/chrome/cros_ec_lpc.c 	ec_dev->cmd_xfer = cros_ec_cmd_xfer_lpc;
ec_dev            380 drivers/platform/chrome/cros_ec_lpc.c 	ec_dev->pkt_xfer = cros_ec_pkt_xfer_lpc;
ec_dev            381 drivers/platform/chrome/cros_ec_lpc.c 	ec_dev->cmd_readmem = cros_ec_lpc_readmem;
ec_dev            382 drivers/platform/chrome/cros_ec_lpc.c 	ec_dev->din_size = sizeof(struct ec_host_response) +
ec_dev            384 drivers/platform/chrome/cros_ec_lpc.c 	ec_dev->dout_size = sizeof(struct ec_host_request);
ec_dev            392 drivers/platform/chrome/cros_ec_lpc.c 		ec_dev->irq = irq;
ec_dev            398 drivers/platform/chrome/cros_ec_lpc.c 	ret = cros_ec_register(ec_dev);
ec_dev            413 drivers/platform/chrome/cros_ec_lpc.c 						     ec_dev);
ec_dev            424 drivers/platform/chrome/cros_ec_lpc.c 	struct cros_ec_device *ec_dev = platform_get_drvdata(pdev);
ec_dev            432 drivers/platform/chrome/cros_ec_lpc.c 	return cros_ec_unregister(ec_dev);
ec_dev            500 drivers/platform/chrome/cros_ec_lpc.c 	struct cros_ec_device *ec_dev = dev_get_drvdata(dev);
ec_dev            502 drivers/platform/chrome/cros_ec_lpc.c 	return cros_ec_suspend(ec_dev);
ec_dev            507 drivers/platform/chrome/cros_ec_lpc.c 	struct cros_ec_device *ec_dev = dev_get_drvdata(dev);
ec_dev            509 drivers/platform/chrome/cros_ec_lpc.c 	return cros_ec_resume(ec_dev);
ec_dev             18 drivers/platform/chrome/cros_ec_proto.c static int prepare_packet(struct cros_ec_device *ec_dev,
ec_dev             26 drivers/platform/chrome/cros_ec_proto.c 	BUG_ON(ec_dev->proto_version != EC_HOST_REQUEST_VERSION);
ec_dev             27 drivers/platform/chrome/cros_ec_proto.c 	BUG_ON(msg->outsize + sizeof(*request) > ec_dev->dout_size);
ec_dev             29 drivers/platform/chrome/cros_ec_proto.c 	out = ec_dev->dout;
ec_dev             51 drivers/platform/chrome/cros_ec_proto.c static int send_command(struct cros_ec_device *ec_dev,
ec_dev             59 drivers/platform/chrome/cros_ec_proto.c 	if (ec_dev->proto_version > 2)
ec_dev             60 drivers/platform/chrome/cros_ec_proto.c 		xfer_fxn = ec_dev->pkt_xfer;
ec_dev             62 drivers/platform/chrome/cros_ec_proto.c 		xfer_fxn = ec_dev->cmd_xfer;
ec_dev             70 drivers/platform/chrome/cros_ec_proto.c 		dev_err_once(ec_dev->dev,
ec_dev             75 drivers/platform/chrome/cros_ec_proto.c 	ret = (*xfer_fxn)(ec_dev, msg);
ec_dev             98 drivers/platform/chrome/cros_ec_proto.c 			ret = (*xfer_fxn)(ec_dev, status_msg);
ec_dev            120 drivers/platform/chrome/cros_ec_proto.c int cros_ec_prepare_tx(struct cros_ec_device *ec_dev,
ec_dev            127 drivers/platform/chrome/cros_ec_proto.c 	if (ec_dev->proto_version > 2)
ec_dev            128 drivers/platform/chrome/cros_ec_proto.c 		return prepare_packet(ec_dev, msg);
ec_dev            131 drivers/platform/chrome/cros_ec_proto.c 	out = ec_dev->dout;
ec_dev            144 drivers/platform/chrome/cros_ec_proto.c int cros_ec_check_result(struct cros_ec_device *ec_dev,
ec_dev            151 drivers/platform/chrome/cros_ec_proto.c 		dev_dbg(ec_dev->dev, "command 0x%02x in progress\n",
ec_dev            155 drivers/platform/chrome/cros_ec_proto.c 		dev_dbg(ec_dev->dev, "command 0x%02x returned %d\n",
ec_dev            175 drivers/platform/chrome/cros_ec_proto.c static int cros_ec_get_host_event_wake_mask(struct cros_ec_device *ec_dev,
ec_dev            187 drivers/platform/chrome/cros_ec_proto.c 	ret = send_command(ec_dev, msg);
ec_dev            196 drivers/platform/chrome/cros_ec_proto.c static int cros_ec_host_command_proto_query(struct cros_ec_device *ec_dev,
ec_dev            208 drivers/platform/chrome/cros_ec_proto.c 	if (!ec_dev->pkt_xfer)
ec_dev            215 drivers/platform/chrome/cros_ec_proto.c 	ret = send_command(ec_dev, msg);
ec_dev            218 drivers/platform/chrome/cros_ec_proto.c 		dev_dbg(ec_dev->dev,
ec_dev            232 drivers/platform/chrome/cros_ec_proto.c static int cros_ec_host_command_proto_query_v2(struct cros_ec_device *ec_dev)
ec_dev            253 drivers/platform/chrome/cros_ec_proto.c 	ret = send_command(ec_dev, msg);
ec_dev            256 drivers/platform/chrome/cros_ec_proto.c 		dev_dbg(ec_dev->dev,
ec_dev            261 drivers/platform/chrome/cros_ec_proto.c 		dev_err(ec_dev->dev,
ec_dev            267 drivers/platform/chrome/cros_ec_proto.c 		dev_err(ec_dev->dev,
ec_dev            297 drivers/platform/chrome/cros_ec_proto.c static int cros_ec_get_host_command_version_mask(struct cros_ec_device *ec_dev,
ec_dev            318 drivers/platform/chrome/cros_ec_proto.c 	ret = send_command(ec_dev, msg);
ec_dev            329 drivers/platform/chrome/cros_ec_proto.c int cros_ec_query_all(struct cros_ec_device *ec_dev)
ec_dev            331 drivers/platform/chrome/cros_ec_proto.c 	struct device *dev = ec_dev->dev;
ec_dev            343 drivers/platform/chrome/cros_ec_proto.c 	ec_dev->proto_version = 3;
ec_dev            344 drivers/platform/chrome/cros_ec_proto.c 	ret = cros_ec_host_command_proto_query(ec_dev, 0, proto_msg);
ec_dev            349 drivers/platform/chrome/cros_ec_proto.c 		ec_dev->max_request = proto_info->max_request_packet_size -
ec_dev            351 drivers/platform/chrome/cros_ec_proto.c 		ec_dev->max_response = proto_info->max_response_packet_size -
ec_dev            353 drivers/platform/chrome/cros_ec_proto.c 		ec_dev->proto_version =
ec_dev            356 drivers/platform/chrome/cros_ec_proto.c 		dev_dbg(ec_dev->dev,
ec_dev            358 drivers/platform/chrome/cros_ec_proto.c 			ec_dev->proto_version);
ec_dev            360 drivers/platform/chrome/cros_ec_proto.c 		ec_dev->din_size = ec_dev->max_response +
ec_dev            363 drivers/platform/chrome/cros_ec_proto.c 		ec_dev->dout_size = ec_dev->max_request +
ec_dev            370 drivers/platform/chrome/cros_ec_proto.c 		ret = cros_ec_host_command_proto_query(ec_dev, 1, proto_msg);
ec_dev            373 drivers/platform/chrome/cros_ec_proto.c 			dev_dbg(ec_dev->dev, "no PD chip found: %d\n", ret);
ec_dev            374 drivers/platform/chrome/cros_ec_proto.c 			ec_dev->max_passthru = 0;
ec_dev            376 drivers/platform/chrome/cros_ec_proto.c 			dev_dbg(ec_dev->dev, "found PD chip\n");
ec_dev            377 drivers/platform/chrome/cros_ec_proto.c 			ec_dev->max_passthru =
ec_dev            383 drivers/platform/chrome/cros_ec_proto.c 		ec_dev->proto_version = 2;
ec_dev            384 drivers/platform/chrome/cros_ec_proto.c 		ret = cros_ec_host_command_proto_query_v2(ec_dev);
ec_dev            388 drivers/platform/chrome/cros_ec_proto.c 			dev_dbg(ec_dev->dev, "falling back to proto v2\n");
ec_dev            390 drivers/platform/chrome/cros_ec_proto.c 			ec_dev->max_request = EC_PROTO2_MAX_PARAM_SIZE;
ec_dev            391 drivers/platform/chrome/cros_ec_proto.c 			ec_dev->max_response = EC_PROTO2_MAX_PARAM_SIZE;
ec_dev            392 drivers/platform/chrome/cros_ec_proto.c 			ec_dev->max_passthru = 0;
ec_dev            393 drivers/platform/chrome/cros_ec_proto.c 			ec_dev->pkt_xfer = NULL;
ec_dev            394 drivers/platform/chrome/cros_ec_proto.c 			ec_dev->din_size = EC_PROTO2_MSG_BYTES;
ec_dev            395 drivers/platform/chrome/cros_ec_proto.c 			ec_dev->dout_size = EC_PROTO2_MSG_BYTES;
ec_dev            402 drivers/platform/chrome/cros_ec_proto.c 			ec_dev->proto_version = EC_PROTO_VERSION_UNKNOWN;
ec_dev            403 drivers/platform/chrome/cros_ec_proto.c 			dev_dbg(ec_dev->dev, "EC query failed: %d\n", ret);
ec_dev            408 drivers/platform/chrome/cros_ec_proto.c 	devm_kfree(dev, ec_dev->din);
ec_dev            409 drivers/platform/chrome/cros_ec_proto.c 	devm_kfree(dev, ec_dev->dout);
ec_dev            411 drivers/platform/chrome/cros_ec_proto.c 	ec_dev->din = devm_kzalloc(dev, ec_dev->din_size, GFP_KERNEL);
ec_dev            412 drivers/platform/chrome/cros_ec_proto.c 	if (!ec_dev->din) {
ec_dev            417 drivers/platform/chrome/cros_ec_proto.c 	ec_dev->dout = devm_kzalloc(dev, ec_dev->dout_size, GFP_KERNEL);
ec_dev            418 drivers/platform/chrome/cros_ec_proto.c 	if (!ec_dev->dout) {
ec_dev            419 drivers/platform/chrome/cros_ec_proto.c 		devm_kfree(dev, ec_dev->din);
ec_dev            425 drivers/platform/chrome/cros_ec_proto.c 	ret = cros_ec_get_host_command_version_mask(ec_dev,
ec_dev            429 drivers/platform/chrome/cros_ec_proto.c 		ec_dev->mkbp_event_supported = 0;
ec_dev            431 drivers/platform/chrome/cros_ec_proto.c 		ec_dev->mkbp_event_supported = 1;
ec_dev            434 drivers/platform/chrome/cros_ec_proto.c 	ret = cros_ec_get_host_command_version_mask(ec_dev,
ec_dev            437 drivers/platform/chrome/cros_ec_proto.c 	ec_dev->host_sleep_v1 = (ret >= 0 && (ver_mask & EC_VER_MASK(1)));
ec_dev            443 drivers/platform/chrome/cros_ec_proto.c 	ret = cros_ec_get_host_event_wake_mask(ec_dev, proto_msg,
ec_dev            444 drivers/platform/chrome/cros_ec_proto.c 					       &ec_dev->host_event_wake_mask);
ec_dev            446 drivers/platform/chrome/cros_ec_proto.c 		ec_dev->host_event_wake_mask = U32_MAX;
ec_dev            456 drivers/platform/chrome/cros_ec_proto.c int cros_ec_cmd_xfer(struct cros_ec_device *ec_dev,
ec_dev            461 drivers/platform/chrome/cros_ec_proto.c 	mutex_lock(&ec_dev->lock);
ec_dev            462 drivers/platform/chrome/cros_ec_proto.c 	if (ec_dev->proto_version == EC_PROTO_VERSION_UNKNOWN) {
ec_dev            463 drivers/platform/chrome/cros_ec_proto.c 		ret = cros_ec_query_all(ec_dev);
ec_dev            465 drivers/platform/chrome/cros_ec_proto.c 			dev_err(ec_dev->dev,
ec_dev            467 drivers/platform/chrome/cros_ec_proto.c 			mutex_unlock(&ec_dev->lock);
ec_dev            472 drivers/platform/chrome/cros_ec_proto.c 	if (msg->insize > ec_dev->max_response) {
ec_dev            473 drivers/platform/chrome/cros_ec_proto.c 		dev_dbg(ec_dev->dev, "clamping message receive buffer\n");
ec_dev            474 drivers/platform/chrome/cros_ec_proto.c 		msg->insize = ec_dev->max_response;
ec_dev            478 drivers/platform/chrome/cros_ec_proto.c 		if (msg->outsize > ec_dev->max_request) {
ec_dev            479 drivers/platform/chrome/cros_ec_proto.c 			dev_err(ec_dev->dev,
ec_dev            482 drivers/platform/chrome/cros_ec_proto.c 				ec_dev->max_request);
ec_dev            483 drivers/platform/chrome/cros_ec_proto.c 			mutex_unlock(&ec_dev->lock);
ec_dev            487 drivers/platform/chrome/cros_ec_proto.c 		if (msg->outsize > ec_dev->max_passthru) {
ec_dev            488 drivers/platform/chrome/cros_ec_proto.c 			dev_err(ec_dev->dev,
ec_dev            491 drivers/platform/chrome/cros_ec_proto.c 				ec_dev->max_passthru);
ec_dev            492 drivers/platform/chrome/cros_ec_proto.c 			mutex_unlock(&ec_dev->lock);
ec_dev            496 drivers/platform/chrome/cros_ec_proto.c 	ret = send_command(ec_dev, msg);
ec_dev            497 drivers/platform/chrome/cros_ec_proto.c 	mutex_unlock(&ec_dev->lock);
ec_dev            503 drivers/platform/chrome/cros_ec_proto.c int cros_ec_cmd_xfer_status(struct cros_ec_device *ec_dev,
ec_dev            508 drivers/platform/chrome/cros_ec_proto.c 	ret = cros_ec_cmd_xfer(ec_dev, msg);
ec_dev            510 drivers/platform/chrome/cros_ec_proto.c 		dev_err(ec_dev->dev, "Command xfer error (err:%d)\n", ret);
ec_dev            512 drivers/platform/chrome/cros_ec_proto.c 		dev_dbg(ec_dev->dev, "Command result (err: %d)\n", msg->result);
ec_dev            520 drivers/platform/chrome/cros_ec_proto.c static int get_next_event_xfer(struct cros_ec_device *ec_dev,
ec_dev            531 drivers/platform/chrome/cros_ec_proto.c 	ret = cros_ec_cmd_xfer(ec_dev, msg);
ec_dev            533 drivers/platform/chrome/cros_ec_proto.c 		ec_dev->event_size = ret - 1;
ec_dev            534 drivers/platform/chrome/cros_ec_proto.c 		memcpy(&ec_dev->event_data, msg->data, ret);
ec_dev            540 drivers/platform/chrome/cros_ec_proto.c static int get_next_event(struct cros_ec_device *ec_dev)
ec_dev            542 drivers/platform/chrome/cros_ec_proto.c 	u8 buffer[sizeof(struct cros_ec_command) + sizeof(ec_dev->event_data)];
ec_dev            547 drivers/platform/chrome/cros_ec_proto.c 	if (ec_dev->suspended) {
ec_dev            548 drivers/platform/chrome/cros_ec_proto.c 		dev_dbg(ec_dev->dev, "Device suspended.\n");
ec_dev            553 drivers/platform/chrome/cros_ec_proto.c 		ret = get_next_event_xfer(ec_dev, msg, cmd_version,
ec_dev            562 drivers/platform/chrome/cros_ec_proto.c 	ret = get_next_event_xfer(ec_dev, msg, cmd_version,
ec_dev            568 drivers/platform/chrome/cros_ec_proto.c static int get_keyboard_state_event(struct cros_ec_device *ec_dev)
ec_dev            571 drivers/platform/chrome/cros_ec_proto.c 		  sizeof(ec_dev->event_data.data)];
ec_dev            576 drivers/platform/chrome/cros_ec_proto.c 	msg->insize = sizeof(ec_dev->event_data.data);
ec_dev            579 drivers/platform/chrome/cros_ec_proto.c 	ec_dev->event_size = cros_ec_cmd_xfer(ec_dev, msg);
ec_dev            580 drivers/platform/chrome/cros_ec_proto.c 	ec_dev->event_data.event_type = EC_MKBP_EVENT_KEY_MATRIX;
ec_dev            581 drivers/platform/chrome/cros_ec_proto.c 	memcpy(&ec_dev->event_data.data, msg->data,
ec_dev            582 drivers/platform/chrome/cros_ec_proto.c 	       sizeof(ec_dev->event_data.data));
ec_dev            584 drivers/platform/chrome/cros_ec_proto.c 	return ec_dev->event_size;
ec_dev            587 drivers/platform/chrome/cros_ec_proto.c int cros_ec_get_next_event(struct cros_ec_device *ec_dev, bool *wake_event)
ec_dev            593 drivers/platform/chrome/cros_ec_proto.c 	if (!ec_dev->mkbp_event_supported) {
ec_dev            594 drivers/platform/chrome/cros_ec_proto.c 		ret = get_keyboard_state_event(ec_dev);
ec_dev            604 drivers/platform/chrome/cros_ec_proto.c 	ret = get_next_event(ec_dev);
ec_dev            609 drivers/platform/chrome/cros_ec_proto.c 		event_type = ec_dev->event_data.event_type;
ec_dev            610 drivers/platform/chrome/cros_ec_proto.c 		host_event = cros_ec_get_host_event(ec_dev);
ec_dev            620 drivers/platform/chrome/cros_ec_proto.c 			 !(host_event & ec_dev->host_event_wake_mask))
ec_dev            631 drivers/platform/chrome/cros_ec_proto.c u32 cros_ec_get_host_event(struct cros_ec_device *ec_dev)
ec_dev            635 drivers/platform/chrome/cros_ec_proto.c 	BUG_ON(!ec_dev->mkbp_event_supported);
ec_dev            637 drivers/platform/chrome/cros_ec_proto.c 	if (ec_dev->event_data.event_type != EC_MKBP_EVENT_HOST_EVENT)
ec_dev            640 drivers/platform/chrome/cros_ec_proto.c 	if (ec_dev->event_size != sizeof(host_event)) {
ec_dev            641 drivers/platform/chrome/cros_ec_proto.c 		dev_warn(ec_dev->dev, "Invalid host event size\n");
ec_dev            645 drivers/platform/chrome/cros_ec_proto.c 	host_event = get_unaligned_le32(&ec_dev->event_data.data.host_event);
ec_dev             60 drivers/platform/chrome/cros_ec_rpmsg.c static int cros_ec_cmd_xfer_rpmsg(struct cros_ec_device *ec_dev,
ec_dev             74 drivers/platform/chrome/cros_ec_rpmsg.c static int cros_ec_pkt_xfer_rpmsg(struct cros_ec_device *ec_dev,
ec_dev             77 drivers/platform/chrome/cros_ec_rpmsg.c 	struct cros_ec_rpmsg *ec_rpmsg = ec_dev->priv;
ec_dev             86 drivers/platform/chrome/cros_ec_rpmsg.c 	len = cros_ec_prepare_tx(ec_dev, ec_msg);
ec_dev             87 drivers/platform/chrome/cros_ec_rpmsg.c 	dev_dbg(ec_dev->dev, "prepared, len=%d\n", len);
ec_dev             90 drivers/platform/chrome/cros_ec_rpmsg.c 	ret = rpmsg_send(ec_rpmsg->ept, ec_dev->dout, len);
ec_dev             92 drivers/platform/chrome/cros_ec_rpmsg.c 		dev_err(ec_dev->dev, "rpmsg send failed\n");
ec_dev             99 drivers/platform/chrome/cros_ec_rpmsg.c 		dev_err(ec_dev->dev, "rpmsg send timeout\n");
ec_dev            104 drivers/platform/chrome/cros_ec_rpmsg.c 	response = (struct ec_host_response *)ec_dev->din;
ec_dev            107 drivers/platform/chrome/cros_ec_rpmsg.c 	ret = cros_ec_check_result(ec_dev, ec_msg);
ec_dev            112 drivers/platform/chrome/cros_ec_rpmsg.c 		dev_err(ec_dev->dev, "packet too long (%d bytes, expected %d)",
ec_dev            119 drivers/platform/chrome/cros_ec_rpmsg.c 	memcpy(ec_msg->data, ec_dev->din + sizeof(*response),
ec_dev            124 drivers/platform/chrome/cros_ec_rpmsg.c 		sum += ec_dev->din[i];
ec_dev            127 drivers/platform/chrome/cros_ec_rpmsg.c 		dev_err(ec_dev->dev, "bad packet checksum, calculated %x\n",
ec_dev            147 drivers/platform/chrome/cros_ec_rpmsg.c 	struct cros_ec_device *ec_dev = dev_get_drvdata(&ec_rpmsg->rpdev->dev);
ec_dev            151 drivers/platform/chrome/cros_ec_rpmsg.c 	ret = cros_ec_get_next_event(ec_dev, &wake_event);
ec_dev            158 drivers/platform/chrome/cros_ec_rpmsg.c 	if (wake_event && device_may_wakeup(ec_dev->dev))
ec_dev            159 drivers/platform/chrome/cros_ec_rpmsg.c 		pm_wakeup_event(ec_dev->dev, 0);
ec_dev            162 drivers/platform/chrome/cros_ec_rpmsg.c 		blocking_notifier_call_chain(&ec_dev->event_notifier,
ec_dev            163 drivers/platform/chrome/cros_ec_rpmsg.c 					     0, ec_dev);
ec_dev            169 drivers/platform/chrome/cros_ec_rpmsg.c 	struct cros_ec_device *ec_dev = dev_get_drvdata(&rpdev->dev);
ec_dev            170 drivers/platform/chrome/cros_ec_rpmsg.c 	struct cros_ec_rpmsg *ec_rpmsg = ec_dev->priv;
ec_dev            174 drivers/platform/chrome/cros_ec_rpmsg.c 		dev_warn(ec_dev->dev, "rpmsg received empty response");
ec_dev            181 drivers/platform/chrome/cros_ec_rpmsg.c 		if (len > ec_dev->din_size) {
ec_dev            182 drivers/platform/chrome/cros_ec_rpmsg.c 			dev_warn(ec_dev->dev,
ec_dev            184 drivers/platform/chrome/cros_ec_rpmsg.c 				 len, ec_dev->din_size);
ec_dev            185 drivers/platform/chrome/cros_ec_rpmsg.c 			len = ec_dev->din_size;
ec_dev            188 drivers/platform/chrome/cros_ec_rpmsg.c 		memcpy(ec_dev->din, resp->data, len);
ec_dev            200 drivers/platform/chrome/cros_ec_rpmsg.c 		dev_warn(ec_dev->dev, "rpmsg received invalid type = %d",
ec_dev            224 drivers/platform/chrome/cros_ec_rpmsg.c 	struct cros_ec_device *ec_dev;
ec_dev            227 drivers/platform/chrome/cros_ec_rpmsg.c 	ec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);
ec_dev            228 drivers/platform/chrome/cros_ec_rpmsg.c 	if (!ec_dev)
ec_dev            235 drivers/platform/chrome/cros_ec_rpmsg.c 	ec_dev->dev = dev;
ec_dev            236 drivers/platform/chrome/cros_ec_rpmsg.c 	ec_dev->priv = ec_rpmsg;
ec_dev            237 drivers/platform/chrome/cros_ec_rpmsg.c 	ec_dev->cmd_xfer = cros_ec_cmd_xfer_rpmsg;
ec_dev            238 drivers/platform/chrome/cros_ec_rpmsg.c 	ec_dev->pkt_xfer = cros_ec_pkt_xfer_rpmsg;
ec_dev            239 drivers/platform/chrome/cros_ec_rpmsg.c 	ec_dev->phys_name = dev_name(&rpdev->dev);
ec_dev            240 drivers/platform/chrome/cros_ec_rpmsg.c 	ec_dev->din_size = sizeof(struct ec_host_response) +
ec_dev            242 drivers/platform/chrome/cros_ec_rpmsg.c 	ec_dev->dout_size = sizeof(struct ec_host_request);
ec_dev            243 drivers/platform/chrome/cros_ec_rpmsg.c 	dev_set_drvdata(dev, ec_dev);
ec_dev            254 drivers/platform/chrome/cros_ec_rpmsg.c 	ret = cros_ec_register(ec_dev);
ec_dev            271 drivers/platform/chrome/cros_ec_rpmsg.c 	struct cros_ec_device *ec_dev = dev_get_drvdata(&rpdev->dev);
ec_dev            272 drivers/platform/chrome/cros_ec_rpmsg.c 	struct cros_ec_rpmsg *ec_rpmsg = ec_dev->priv;
ec_dev            274 drivers/platform/chrome/cros_ec_rpmsg.c 	cros_ec_unregister(ec_dev);
ec_dev            282 drivers/platform/chrome/cros_ec_rpmsg.c 	struct cros_ec_device *ec_dev = dev_get_drvdata(dev);
ec_dev            284 drivers/platform/chrome/cros_ec_rpmsg.c 	return cros_ec_suspend(ec_dev);
ec_dev            289 drivers/platform/chrome/cros_ec_rpmsg.c 	struct cros_ec_device *ec_dev = dev_get_drvdata(dev);
ec_dev            291 drivers/platform/chrome/cros_ec_rpmsg.c 	return cros_ec_resume(ec_dev);
ec_dev             80 drivers/platform/chrome/cros_ec_spi.c typedef int (*cros_ec_xfer_fn_t) (struct cros_ec_device *ec_dev,
ec_dev             96 drivers/platform/chrome/cros_ec_spi.c 	struct cros_ec_device *ec_dev;
ec_dev            115 drivers/platform/chrome/cros_ec_spi.c static int terminate_request(struct cros_ec_device *ec_dev)
ec_dev            117 drivers/platform/chrome/cros_ec_spi.c 	struct cros_ec_spi *ec_spi = ec_dev->priv;
ec_dev            136 drivers/platform/chrome/cros_ec_spi.c 		dev_err(ec_dev->dev,
ec_dev            149 drivers/platform/chrome/cros_ec_spi.c static int receive_n_bytes(struct cros_ec_device *ec_dev, u8 *buf, int n)
ec_dev            151 drivers/platform/chrome/cros_ec_spi.c 	struct cros_ec_spi *ec_spi = ec_dev->priv;
ec_dev            156 drivers/platform/chrome/cros_ec_spi.c 	BUG_ON(buf - ec_dev->din + n > ec_dev->din_size);
ec_dev            167 drivers/platform/chrome/cros_ec_spi.c 		dev_err(ec_dev->dev, "spi transfer failed: %d\n", ret);
ec_dev            184 drivers/platform/chrome/cros_ec_spi.c static int cros_ec_spi_receive_packet(struct cros_ec_device *ec_dev,
ec_dev            193 drivers/platform/chrome/cros_ec_spi.c 	BUG_ON(ec_dev->din_size < EC_MSG_PREAMBLE_COUNT);
ec_dev            200 drivers/platform/chrome/cros_ec_spi.c 		ret = receive_n_bytes(ec_dev,
ec_dev            201 drivers/platform/chrome/cros_ec_spi.c 				      ec_dev->din,
ec_dev            206 drivers/platform/chrome/cros_ec_spi.c 		ptr = ec_dev->din;
ec_dev            209 drivers/platform/chrome/cros_ec_spi.c 				dev_dbg(ec_dev->dev, "msg found at %zd\n",
ec_dev            210 drivers/platform/chrome/cros_ec_spi.c 					ptr - ec_dev->din);
ec_dev            223 drivers/platform/chrome/cros_ec_spi.c 			dev_warn(ec_dev->dev, "EC failed to respond in time\n");
ec_dev            233 drivers/platform/chrome/cros_ec_spi.c 	BUG_ON(todo < 0 || todo > ec_dev->din_size);
ec_dev            235 drivers/platform/chrome/cros_ec_spi.c 	memmove(ec_dev->din, ptr, todo);
ec_dev            236 drivers/platform/chrome/cros_ec_spi.c 	ptr = ec_dev->din + todo;
ec_dev            237 drivers/platform/chrome/cros_ec_spi.c 	dev_dbg(ec_dev->dev, "need %d, got %d bytes from preamble\n",
ec_dev            243 drivers/platform/chrome/cros_ec_spi.c 		ret = receive_n_bytes(ec_dev, ptr, sizeof(*response) - todo);
ec_dev            250 drivers/platform/chrome/cros_ec_spi.c 	response = (struct ec_host_response *)ec_dev->din;
ec_dev            253 drivers/platform/chrome/cros_ec_spi.c 	if (response->data_len > ec_dev->din_size)
ec_dev            265 drivers/platform/chrome/cros_ec_spi.c 		dev_dbg(ec_dev->dev, "loop, todo=%d, need_len=%d, ptr=%zd\n",
ec_dev            266 drivers/platform/chrome/cros_ec_spi.c 			todo, need_len, ptr - ec_dev->din);
ec_dev            268 drivers/platform/chrome/cros_ec_spi.c 		ret = receive_n_bytes(ec_dev, ptr, todo);
ec_dev            276 drivers/platform/chrome/cros_ec_spi.c 	dev_dbg(ec_dev->dev, "loop done, ptr=%zd\n", ptr - ec_dev->din);
ec_dev            293 drivers/platform/chrome/cros_ec_spi.c static int cros_ec_spi_receive_response(struct cros_ec_device *ec_dev,
ec_dev            301 drivers/platform/chrome/cros_ec_spi.c 	BUG_ON(ec_dev->din_size < EC_MSG_PREAMBLE_COUNT);
ec_dev            308 drivers/platform/chrome/cros_ec_spi.c 		ret = receive_n_bytes(ec_dev,
ec_dev            309 drivers/platform/chrome/cros_ec_spi.c 				      ec_dev->din,
ec_dev            314 drivers/platform/chrome/cros_ec_spi.c 		ptr = ec_dev->din;
ec_dev            317 drivers/platform/chrome/cros_ec_spi.c 				dev_dbg(ec_dev->dev, "msg found at %zd\n",
ec_dev            318 drivers/platform/chrome/cros_ec_spi.c 					ptr - ec_dev->din);
ec_dev            331 drivers/platform/chrome/cros_ec_spi.c 			dev_warn(ec_dev->dev, "EC failed to respond in time\n");
ec_dev            341 drivers/platform/chrome/cros_ec_spi.c 	BUG_ON(todo < 0 || todo > ec_dev->din_size);
ec_dev            343 drivers/platform/chrome/cros_ec_spi.c 	memmove(ec_dev->din, ptr, todo);
ec_dev            344 drivers/platform/chrome/cros_ec_spi.c 	ptr = ec_dev->din + todo;
ec_dev            345 drivers/platform/chrome/cros_ec_spi.c 	dev_dbg(ec_dev->dev, "need %d, got %d bytes from preamble\n",
ec_dev            358 drivers/platform/chrome/cros_ec_spi.c 		dev_dbg(ec_dev->dev, "loop, todo=%d, need_len=%d, ptr=%zd\n",
ec_dev            359 drivers/platform/chrome/cros_ec_spi.c 			todo, need_len, ptr - ec_dev->din);
ec_dev            361 drivers/platform/chrome/cros_ec_spi.c 		ret = receive_n_bytes(ec_dev, ptr, todo);
ec_dev            365 drivers/platform/chrome/cros_ec_spi.c 		debug_packet(ec_dev->dev, "interim", ptr, todo);
ec_dev            370 drivers/platform/chrome/cros_ec_spi.c 	dev_dbg(ec_dev->dev, "loop done, ptr=%zd\n", ptr - ec_dev->din);
ec_dev            381 drivers/platform/chrome/cros_ec_spi.c static int do_cros_ec_pkt_xfer_spi(struct cros_ec_device *ec_dev,
ec_dev            385 drivers/platform/chrome/cros_ec_spi.c 	struct cros_ec_spi *ec_spi = ec_dev->priv;
ec_dev            396 drivers/platform/chrome/cros_ec_spi.c 	len = cros_ec_prepare_tx(ec_dev, ec_msg);
ec_dev            397 drivers/platform/chrome/cros_ec_spi.c 	dev_dbg(ec_dev->dev, "prepared, len=%d\n", len);
ec_dev            423 drivers/platform/chrome/cros_ec_spi.c 	trans.tx_buf = ec_dev->dout;
ec_dev            460 drivers/platform/chrome/cros_ec_spi.c 		ret = cros_ec_spi_receive_packet(ec_dev,
ec_dev            463 drivers/platform/chrome/cros_ec_spi.c 		dev_err(ec_dev->dev, "spi transfer failed: %d\n", ret);
ec_dev            465 drivers/platform/chrome/cros_ec_spi.c 	final_ret = terminate_request(ec_dev);
ec_dev            474 drivers/platform/chrome/cros_ec_spi.c 	ptr = ec_dev->din;
ec_dev            480 drivers/platform/chrome/cros_ec_spi.c 	ret = cros_ec_check_result(ec_dev, ec_msg);
ec_dev            487 drivers/platform/chrome/cros_ec_spi.c 		dev_err(ec_dev->dev, "packet too long (%d bytes, expected %d)",
ec_dev            502 drivers/platform/chrome/cros_ec_spi.c 		dev_err(ec_dev->dev,
ec_dev            524 drivers/platform/chrome/cros_ec_spi.c static int do_cros_ec_cmd_xfer_spi(struct cros_ec_device *ec_dev,
ec_dev            527 drivers/platform/chrome/cros_ec_spi.c 	struct cros_ec_spi *ec_spi = ec_dev->priv;
ec_dev            538 drivers/platform/chrome/cros_ec_spi.c 	len = cros_ec_prepare_tx(ec_dev, ec_msg);
ec_dev            539 drivers/platform/chrome/cros_ec_spi.c 	dev_dbg(ec_dev->dev, "prepared, len=%d\n", len);
ec_dev            553 drivers/platform/chrome/cros_ec_spi.c 	debug_packet(ec_dev->dev, "out", ec_dev->dout, len);
ec_dev            555 drivers/platform/chrome/cros_ec_spi.c 	trans.tx_buf = ec_dev->dout;
ec_dev            579 drivers/platform/chrome/cros_ec_spi.c 		ret = cros_ec_spi_receive_response(ec_dev,
ec_dev            582 drivers/platform/chrome/cros_ec_spi.c 		dev_err(ec_dev->dev, "spi transfer failed: %d\n", ret);
ec_dev            584 drivers/platform/chrome/cros_ec_spi.c 	final_ret = terminate_request(ec_dev);
ec_dev            593 drivers/platform/chrome/cros_ec_spi.c 	ptr = ec_dev->din;
ec_dev            597 drivers/platform/chrome/cros_ec_spi.c 	ret = cros_ec_check_result(ec_dev, ec_msg);
ec_dev            604 drivers/platform/chrome/cros_ec_spi.c 		dev_err(ec_dev->dev, "packet too long (%d bytes, expected %d)",
ec_dev            618 drivers/platform/chrome/cros_ec_spi.c 	debug_packet(ec_dev->dev, "in", ptr, len + 3);
ec_dev            621 drivers/platform/chrome/cros_ec_spi.c 		dev_err(ec_dev->dev,
ec_dev            642 drivers/platform/chrome/cros_ec_spi.c 	params->ret = params->fn(params->ec_dev, params->ec_msg);
ec_dev            645 drivers/platform/chrome/cros_ec_spi.c static int cros_ec_xfer_high_pri(struct cros_ec_device *ec_dev,
ec_dev            649 drivers/platform/chrome/cros_ec_spi.c 	struct cros_ec_spi *ec_spi = ec_dev->priv;
ec_dev            653 drivers/platform/chrome/cros_ec_spi.c 		.ec_dev = ec_dev,
ec_dev            673 drivers/platform/chrome/cros_ec_spi.c static int cros_ec_pkt_xfer_spi(struct cros_ec_device *ec_dev,
ec_dev            676 drivers/platform/chrome/cros_ec_spi.c 	return cros_ec_xfer_high_pri(ec_dev, ec_msg, do_cros_ec_pkt_xfer_spi);
ec_dev            679 drivers/platform/chrome/cros_ec_spi.c static int cros_ec_cmd_xfer_spi(struct cros_ec_device *ec_dev,
ec_dev            682 drivers/platform/chrome/cros_ec_spi.c 	return cros_ec_xfer_high_pri(ec_dev, ec_msg, do_cros_ec_cmd_xfer_spi);
ec_dev            737 drivers/platform/chrome/cros_ec_spi.c 	struct cros_ec_device *ec_dev;
ec_dev            752 drivers/platform/chrome/cros_ec_spi.c 	ec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);
ec_dev            753 drivers/platform/chrome/cros_ec_spi.c 	if (!ec_dev)
ec_dev            759 drivers/platform/chrome/cros_ec_spi.c 	spi_set_drvdata(spi, ec_dev);
ec_dev            760 drivers/platform/chrome/cros_ec_spi.c 	ec_dev->dev = dev;
ec_dev            761 drivers/platform/chrome/cros_ec_spi.c 	ec_dev->priv = ec_spi;
ec_dev            762 drivers/platform/chrome/cros_ec_spi.c 	ec_dev->irq = spi->irq;
ec_dev            763 drivers/platform/chrome/cros_ec_spi.c 	ec_dev->cmd_xfer = cros_ec_cmd_xfer_spi;
ec_dev            764 drivers/platform/chrome/cros_ec_spi.c 	ec_dev->pkt_xfer = cros_ec_pkt_xfer_spi;
ec_dev            765 drivers/platform/chrome/cros_ec_spi.c 	ec_dev->phys_name = dev_name(&ec_spi->spi->dev);
ec_dev            766 drivers/platform/chrome/cros_ec_spi.c 	ec_dev->din_size = EC_MSG_PREAMBLE_COUNT +
ec_dev            769 drivers/platform/chrome/cros_ec_spi.c 	ec_dev->dout_size = sizeof(struct ec_host_request);
ec_dev            777 drivers/platform/chrome/cros_ec_spi.c 	err = cros_ec_register(ec_dev);
ec_dev            790 drivers/platform/chrome/cros_ec_spi.c 	struct cros_ec_device *ec_dev = spi_get_drvdata(spi);
ec_dev            792 drivers/platform/chrome/cros_ec_spi.c 	return cros_ec_unregister(ec_dev);
ec_dev            798 drivers/platform/chrome/cros_ec_spi.c 	struct cros_ec_device *ec_dev = dev_get_drvdata(dev);
ec_dev            800 drivers/platform/chrome/cros_ec_spi.c 	return cros_ec_suspend(ec_dev);
ec_dev            805 drivers/platform/chrome/cros_ec_spi.c 	struct cros_ec_device *ec_dev = dev_get_drvdata(dev);
ec_dev            807 drivers/platform/chrome/cros_ec_spi.c 	return cros_ec_resume(ec_dev);
ec_dev            103 drivers/platform/chrome/cros_ec_sysfs.c 	ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg);
ec_dev            132 drivers/platform/chrome/cros_ec_sysfs.c 	ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg);
ec_dev            153 drivers/platform/chrome/cros_ec_sysfs.c 	ret = cros_ec_cmd_xfer(ec->ec_dev, msg);
ec_dev            169 drivers/platform/chrome/cros_ec_sysfs.c 	ret = cros_ec_cmd_xfer(ec->ec_dev, msg);
ec_dev            193 drivers/platform/chrome/cros_ec_sysfs.c 	ret = cros_ec_cmd_xfer(ec->ec_dev, msg);
ec_dev            230 drivers/platform/chrome/cros_ec_sysfs.c 	ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg);
ec_dev            268 drivers/platform/chrome/cros_ec_sysfs.c 	ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg);
ec_dev            305 drivers/platform/chrome/cros_ec_sysfs.c 	ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg);
ec_dev            346 drivers/platform/chrome/cros_ec_sysfs.c 	struct cros_ec_dev *ec_dev = dev_get_drvdata(pd->dev.parent);
ec_dev            350 drivers/platform/chrome/cros_ec_sysfs.c 	ret = sysfs_create_group(&ec_dev->class_dev.kobj, &cros_ec_attr_group);
ec_dev            359 drivers/platform/chrome/cros_ec_sysfs.c 	struct cros_ec_dev *ec_dev = dev_get_drvdata(pd->dev.parent);
ec_dev            361 drivers/platform/chrome/cros_ec_sysfs.c 	sysfs_remove_group(&ec_dev->class_dev.kobj, &cros_ec_attr_group);
ec_dev             23 drivers/platform/chrome/cros_ec_vbc.c 	struct cros_ec_device *ecdev = ec->ec_dev;
ec_dev             63 drivers/platform/chrome/cros_ec_vbc.c 	struct cros_ec_device *ecdev = ec->ec_dev;
ec_dev            112 drivers/platform/chrome/cros_ec_vbc.c 	struct cros_ec_dev *ec_dev = dev_get_drvdata(pd->dev.parent);
ec_dev            116 drivers/platform/chrome/cros_ec_vbc.c 	ret = sysfs_create_group(&ec_dev->class_dev.kobj,
ec_dev            127 drivers/platform/chrome/cros_ec_vbc.c 	struct cros_ec_dev *ec_dev = dev_get_drvdata(pd->dev.parent);
ec_dev            129 drivers/platform/chrome/cros_ec_vbc.c 	sysfs_remove_group(&ec_dev->class_dev.kobj,
ec_dev             31 drivers/platform/chrome/cros_usbpd_logger.c 	struct cros_ec_dev *ec_dev;
ec_dev             64 drivers/platform/chrome/cros_usbpd_logger.c 	struct cros_ec_dev *ec_dev = logger->ec_dev;
ec_dev             70 drivers/platform/chrome/cros_usbpd_logger.c 	msg->command = ec_dev->cmd_offset + EC_CMD_PD_GET_LOG_ENTRY;
ec_dev             73 drivers/platform/chrome/cros_usbpd_logger.c 	ret = cros_ec_cmd_xfer_status(ec_dev->ec_dev, msg);
ec_dev            197 drivers/platform/chrome/cros_usbpd_logger.c 	struct cros_ec_dev *ec_dev = dev_get_drvdata(pd->dev.parent);
ec_dev            206 drivers/platform/chrome/cros_usbpd_logger.c 	logger->ec_dev = ec_dev;
ec_dev             47 drivers/power/supply/cros_usbpd-charger.c 	struct cros_ec_dev *ec_dev;
ec_dev            103 drivers/power/supply/cros_usbpd-charger.c 	struct cros_ec_dev *ec_dev = charger->ec_dev;
ec_dev            112 drivers/power/supply/cros_usbpd-charger.c 	msg->command = ec_dev->cmd_offset + command;
ec_dev            557 drivers/power/supply/cros_usbpd-charger.c 	struct cros_ec_dev *ec_dev = dev_get_drvdata(pd->dev.parent);
ec_dev            558 drivers/power/supply/cros_usbpd-charger.c 	struct cros_ec_device *ec_device = ec_dev->ec_dev;
ec_dev            573 drivers/power/supply/cros_usbpd-charger.c 	charger->ec_dev = ec_dev;
ec_dev            324 drivers/rtc/rtc-cros-ec.c 	struct cros_ec_dev *ec_dev = dev_get_drvdata(pdev->dev.parent);
ec_dev            325 drivers/rtc/rtc-cros-ec.c 	struct cros_ec_device *cros_ec = ec_dev->ec_dev;
ec_dev             25 include/linux/mfd/cros_ec.h 	struct cros_ec_device *ec_dev;
ec_dev            198 include/linux/platform_data/cros_ec_proto.h int cros_ec_suspend(struct cros_ec_device *ec_dev);
ec_dev            208 include/linux/platform_data/cros_ec_proto.h int cros_ec_resume(struct cros_ec_device *ec_dev);
ec_dev            221 include/linux/platform_data/cros_ec_proto.h int cros_ec_prepare_tx(struct cros_ec_device *ec_dev,
ec_dev            234 include/linux/platform_data/cros_ec_proto.h int cros_ec_check_result(struct cros_ec_device *ec_dev,
ec_dev            247 include/linux/platform_data/cros_ec_proto.h int cros_ec_cmd_xfer(struct cros_ec_device *ec_dev,
ec_dev            262 include/linux/platform_data/cros_ec_proto.h int cros_ec_cmd_xfer_status(struct cros_ec_device *ec_dev,
ec_dev            274 include/linux/platform_data/cros_ec_proto.h int cros_ec_register(struct cros_ec_device *ec_dev);
ec_dev            284 include/linux/platform_data/cros_ec_proto.h int cros_ec_unregister(struct cros_ec_device *ec_dev);
ec_dev            293 include/linux/platform_data/cros_ec_proto.h int cros_ec_query_all(struct cros_ec_device *ec_dev);
ec_dev            305 include/linux/platform_data/cros_ec_proto.h int cros_ec_get_next_event(struct cros_ec_device *ec_dev, bool *wake_event);
ec_dev            317 include/linux/platform_data/cros_ec_proto.h u32 cros_ec_get_host_event(struct cros_ec_device *ec_dev);