History

platform/chrome: wilco_ec: Add RTC driver

This Embedded Controller has an internal RTC that is exposed as a standard RTC class driver with read/write functionality. The driver is added to the drivers/rtc/ so that the maintainer of that directory will be able to comment on this change, as that maintainer is the expert on this system. In addition, the driver code is called indirectly after a corresponding device is registered from core.c, as opposed to core.c registering the driver callbacks directly. To test: > hwclock --show --rtc /dev/rtc1 2007-12-31 16:01:20.460959-08:00 > hwclock --systohc --rtc /dev/rtc1 > hwclock --show --rtc /dev/rtc1 2018-11-29 17:08:00.780793-08:00 > hwclock --show --rtc /dev/rtc1 2007-12-31 16:01:20.460959-08:00 > hwclock --systohc --rtc /dev/rtc1 > hwclock --show --rtc /dev/rtc1 2018-11-29 17:08:00.780793-08:00

Nick Crews committed 7 years ago

Commit 0d2f2a31 parent b787bb15 files · +209 −0Browse files

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

Unified · Split

include/linux/platform_data/wilco-ec.h+2−0
@@ -35,6 +35,7 @@ · 34 unmodified lines
35 * is used to hold the request and the response.35 * is used to hold the request and the response.
36 * @data_size: Size of the data buffer used for EC communication.36 * @data_size: Size of the data buffer used for EC communication.
37 * @debugfs_pdev: The child platform_device used by the debugfs sub-driver.37 * @debugfs_pdev: The child platform_device used by the debugfs sub-driver.
38 * @rtc_pdev: The child platform_device used by the RTC sub-driver.
38 */39 */
39struct wilco_ec_device {40struct wilco_ec_device {
40 struct device *dev;41 struct device *dev;
@@ -45,6 +46,7 @@ struct wilco_ec_device { · 4 unmodified lines
45 void *data_buffer;46 void *data_buffer;
46 size_t data_size;47 size_t data_size;
47 struct platform_device *debugfs_pdev;48 struct platform_device *debugfs_pdev;
49 struct platform_device *rtc_pdev;
48};50};
49 51
50/**52/**

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