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
3535 * is used to hold the request and the response.
3636 * @data_size: Size of the data buffer used for EC communication.
3737 * @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.
3839 */
3940 struct wilco_ec_device {
4041 struct device *dev;
@@ -45,6 +46,7 @@ struct wilco_ec_device { · 4 unmodified lines
4546 void *data_buffer;
4647 size_t data_size;
4748 struct platform_device *debugfs_pdev;
49+ struct platform_device *rtc_pdev;
4850 };
4951
5052 /**

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