summaryrefslogtreecommitdiff
path: root/include/linux/platform_data/wilco-ec.h
diff options
context:
space:
mode:
authorNick Crews <ncrews@chromium.org>2019-02-09 03:37:19 +0300
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>2019-02-21 23:36:53 +0300
commit0d2f2a3da1f2a9ebeb66bb03073dd149fccf1bdd (patch)
tree1fb3c4114555aae7a7831adff13aa3f0ffd3f782 /include/linux/platform_data/wilco-ec.h
parentb787bb126cbcd73754bcbc055ae9f804ac576e4a (diff)
downloadlinux-0d2f2a3da1f2a9ebeb66bb03073dd149fccf1bdd.tar.xz
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 Signed-off-by: Duncan Laurie <dlaurie@google.com> Signed-off-by: Nick Crews <ncrews@chromium.org> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> [Fix the sparse warning: symbol 'wilco_ec_rtc_read/write' was not declared] Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Diffstat (limited to 'include/linux/platform_data/wilco-ec.h')
-rw-r--r--include/linux/platform_data/wilco-ec.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/platform_data/wilco-ec.h b/include/linux/platform_data/wilco-ec.h
index 5344975afa1a..446473a46b88 100644
--- a/include/linux/platform_data/wilco-ec.h
+++ b/include/linux/platform_data/wilco-ec.h
@@ -35,6 +35,7 @@
* is used to hold the request and the response.
* @data_size: Size of the data buffer used for EC communication.
* @debugfs_pdev: The child platform_device used by the debugfs sub-driver.
+ * @rtc_pdev: The child platform_device used by the RTC sub-driver.
*/
struct wilco_ec_device {
struct device *dev;
@@ -45,6 +46,7 @@ struct wilco_ec_device {
void *data_buffer;
size_t data_size;
struct platform_device *debugfs_pdev;
+ struct platform_device *rtc_pdev;
};
/**