Lines Matching +full:cros +full:- +full:ec
1 /* SPDX-License-Identifier: GPL-2.0+ */
20 struct gpio_desc ec_int; /* GPIO used as EC interrupt line */
25 * These two buffers will always be dword-aligned and include enough
26 * space for up to 7 word-alignment bytes also, so we can ensure that
27 * the body of the message is always dword-aligned (64-bit).
40 * Hard-code the number of columns we happen to know we have right now. It
51 /* Holds information about the Chrome EC */
53 struct fmap_entry flash; /* Address and size of EC flash */
55 * Byte value of erased flash, or -1 if not known. It is normally
63 * Read the ID of the CROS-EC device
65 * The ID is a string identifying the CROS-EC device.
67 * @param dev CROS-EC device
70 * @return 0 if ok, -1 on error
75 * Read a keyboard scan from the CROS-EC device
79 * @param dev CROS-EC device
81 * @return 0 if ok, -1 on error
86 * Read which image is currently running on the CROS-EC device.
88 * @param dev CROS-EC device
96 * Read the hash of the CROS-EC device firmware.
98 * @param dev CROS-EC device
107 * Send a reboot command to the CROS-EC device.
111 * @param dev CROS-EC device
119 * Check if the CROS-EC device has an interrupt pending.
121 * Read the status of the external interrupt connected to the CROS-EC device.
124 * @param dev CROS-EC device
139 * Initialise the Chromium OS EC driver
144 * expected), -ve if we should have an cros_ec device but failed to find
145 * one, or init failed (-CROS_EC_ERR_...).
152 * @param dev CROS-EC device
160 * @param dev CROS-EC device
169 * @param dev CROS-EC device
178 * @param dev CROS-EC device
183 * @param prot Destination for updated protection state from EC.
191 * Notify EC of current boot mode
193 * @param dev CROS-EC device
202 * @param dev CROS-EC device
208 * Update the EC RW copy.
210 * @param dev CROS-EC device
219 * Return a pointer to the board's CROS-EC device
221 * @return pointer to CROS-EC device, or NULL if none is available
234 ((struct dm_cros_ec_ops *)(dev)->driver->ops)
242 * @param cmd Command number associated with data, or -1 for none
249 * Calculate a simple 8-bit checksum of a data block
262 * Read an arbitrary amount of data from the EC flash, by repeatedly reading
268 * @param dev CROS-EC device
272 * @return 0 if ok, -1 on error
280 * This function reads back parameters of the flash as reported by the EC
291 * Write an arbitrary amount of data to the EC flash, by repeatedly writing
297 * Attempting to write to the region where the EC is currently running from
300 * @param dev CROS-EC device
304 * @return 0 if ok, -1 on error
312 * @param dev CROS-EC device
314 * @param offset Returns offset of flash region in EC flash
316 * @return 0 if ok, -1 on error
322 * Read/write non-volatile data from/to a CROS-EC device.
324 * @param dev CROS-EC device
326 * @return 0 if ok, -1 on error
332 * Read the version information for the EC images
334 * @param dev CROS-EC device
336 * @return 0 if ok, -1 on error
342 * Read the build information for the EC
344 * @param dev CROS-EC device
346 * @return 0 if ok, -1 on error
353 * @param dev CROS-EC device
356 * @return 0 if ok, -1 on error
363 * @param dev CROS-EC device
366 * @return 0 if ok, -1 on error
373 * This permits delayed reporting of the EC error if it failed during
376 * @return error (0 if there was no error, -ve if there was an error)
381 * Returns information from the FDT about the Chrome EC flash
392 * @param ec CROS-EC device
398 * Tunnel an I2C transfer to the EC
400 * @param dev CROS-EC device
401 * @param port The remote port on EC to use
409 * cros_ec_get_events_b() - Get event mask B
416 * cros_ec_clear_events_b() - Clear even mask B
420 * @return 0 if OK, -ve on error
425 * cros_ec_efs_verify() - tell the EC to verify one of its images
427 * @param dev CROS-EC device
429 * @return 0 if OK, -ve on error
434 * cros_ec_battery_cutoff() - Request that the battery be cut off
440 * @param dev CROS-EC device
442 * @return 0 if OK, -ve on error
447 * cros_ec_read_limit_power() - Check if power is limited by batter/charger
452 * @param dev CROS-EC device
454 * @return 0 if OK, -ENOSYS if the EC does not support this comment, -EINVAL
455 * if the EC returned an invalid response
460 * cros_ec_config_powerbtn() - Configure the behaviour of the power button
462 * @param dev CROS-EC device
464 * @return 0 if OK, -ve on error
469 * cros_ec_get_lid_shutdown_mask() - Set the lid shutdown mask
473 * @param dev CROS-EC device
474 * @return shufdown mas if OK, -ve on error
479 * cros_ec_set_lid_shutdown_mask() - Set the lid shutdown mask
483 * @param dev CROS-EC device
485 * @return shufdown mas if OK, -ve on error