History

platform/chrome: wilco_ec: Add support for raw commands in debugfs

Add a debugfs attribute that allows sending raw commands to the EC. This is useful for development and debug but should not be enabled in a production environment. To test: Get the EC firmware build date First send the request command > echo 00 f0 38 00 03 00 > raw Then read the result. "12/21/18" is in the middle of the response > cat raw 00 31 32 2f 32 31 2f 31 38 00 00 0f 01 00 01 00 .12/21/18....... Get the EC firmware build date First send the request command > echo 00 f0 38 00 03 00 > raw Then read the result. "12/21/18" is in the middle of the response > cat raw 00 31 32 2f 32 31 2f 31 38 00 00 0f 01 00 01 00 .12/21/18.......

Nick Crews committed 7 years ago

Commit b787bb11 parent 7b3d4f46 files · +289 −0Browse files

Showing the changes to include/linux (1 of 6 files). Show all

Unified · Split

include/linux/platform_data/wilco-ec.h+2−0
@@ -34,6 +34,7 @@ · 33 unmodified lines
3434 * @data_buffer: Buffer used for EC communication. The same buffer
3535 * is used to hold the request and the response.
3636 * @data_size: Size of the data buffer used for EC communication.
37+ * @debugfs_pdev: The child platform_device used by the debugfs sub-driver.
3738 */
3839 struct wilco_ec_device {
3940 struct device *dev;
@@ -43,6 +44,7 @@ struct wilco_ec_device { · 3 unmodified lines
4344 struct resource *io_packet;
4445 void *data_buffer;
4546 size_t data_size;
47+ struct platform_device *debugfs_pdev;
4648 };
4749
4850 /**

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t