* [PATCH v4 0/2] Add support for cros-ec-rtc driver.
@ 2017-11-10 21:55 ` Enric Balletbo i Serra
0 siblings, 0 replies; 24+ messages in thread
From: Enric Balletbo i Serra @ 2017-11-10 21:55 UTC (permalink / raw)
To: Lee Jones, bleung
Cc: Guenter Roeck, Gwendal Grignou, linux-kernel, linux-iio, rtc-linux
Dear all,
This is an attempt to revive some patches from that [1] patchset, some
of them are still under discussion but I think there is no reason to not
have the other two in this fourth version to land upstream meanwhile we
discuss about the others.
[1] https://lkml.org/lkml/2017/7/12/182
Changes since v3:
* Rebased an retested with current mainline using a Samsung Chromebook Plus
* Removed from patchset
* 1/4 mfd: cros_ec: Get rid of cros_ec_check_features from cros_ec_dev.
* 4/4 mfd: cros_ec: add RTC as mfd subdevice.
Changes since v2:
- Rebase on top of mainline.
- Removed patch 'mfd: cros-ec: Fix host command buffer size' from series
as was already picked.
Changes since v1:
- Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
calibbias data' from series as was already picked.
- Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
calibbias data' from series as was already picked.
- Patch 2/5: Acked-by: Jonathan Cameron <***@kernel.org>
Best regards,
Enric
Stephen Barber (2):
mfd: cros_ec: Introduce RTC commands and events definitions.
rtc: cros-ec: add cros-ec-rtc driver.
drivers/rtc/Kconfig | 10 +
drivers/rtc/Makefile | 1 +
drivers/rtc/rtc-cros-ec.c | 413 +++++++++++++++++++++++++++++++++++
include/linux/mfd/cros_ec_commands.h | 8 +
4 files changed, 432 insertions(+)
create mode 100644 drivers/rtc/rtc-cros-ec.c
--
2.9.3
^ permalink raw reply [flat|nested] 24+ messages in thread
* [rtc-linux] [PATCH v4 0/2] Add support for cros-ec-rtc driver.
@ 2017-11-10 21:55 ` Enric Balletbo i Serra
0 siblings, 0 replies; 24+ messages in thread
From: Enric Balletbo i Serra @ 2017-11-10 21:55 UTC (permalink / raw)
To: Lee Jones, bleung
Cc: Guenter Roeck, Gwendal Grignou, linux-kernel, linux-iio, rtc-linux
Dear all,
This is an attempt to revive some patches from that [1] patchset, some
of them are still under discussion but I think there is no reason to not
have the other two in this fourth version to land upstream meanwhile we
discuss about the others.
[1] https://lkml.org/lkml/2017/7/12/182
Changes since v3:
* Rebased an retested with current mainline using a Samsung Chromebook Plus
* Removed from patchset
* 1/4 mfd: cros_ec: Get rid of cros_ec_check_features from cros_ec_dev.
* 4/4 mfd: cros_ec: add RTC as mfd subdevice.
Changes since v2:
- Rebase on top of mainline.
- Removed patch 'mfd: cros-ec: Fix host command buffer size' from series
as was already picked.
Changes since v1:
- Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
calibbias data' from series as was already picked.
- Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
calibbias data' from series as was already picked.
- Patch 2/5: Acked-by: Jonathan Cameron <***@kernel.org>
Best regards,
Enric
Stephen Barber (2):
mfd: cros_ec: Introduce RTC commands and events definitions.
rtc: cros-ec: add cros-ec-rtc driver.
drivers/rtc/Kconfig | 10 +
drivers/rtc/Makefile | 1 +
drivers/rtc/rtc-cros-ec.c | 413 +++++++++++++++++++++++++++++++++++
include/linux/mfd/cros_ec_commands.h | 8 +
4 files changed, 432 insertions(+)
create mode 100644 drivers/rtc/rtc-cros-ec.c
--
2.9.3
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH v4 1/2] mfd: cros_ec: Introduce RTC commands and events definitions.
2017-11-10 21:55 ` [rtc-linux] " Enric Balletbo i Serra
@ 2017-11-10 21:55 ` Enric Balletbo i Serra
-1 siblings, 0 replies; 24+ messages in thread
From: Enric Balletbo i Serra @ 2017-11-10 21:55 UTC (permalink / raw)
To: Lee Jones, bleung
Cc: Guenter Roeck, Gwendal Grignou, linux-kernel, linux-iio,
rtc-linux, Stephen Barber
From: Stephen Barber <smbarber@chromium.org>
The EC can function as a simple RT, this patch adds the RTC related
definitions needed by the rtc-cros-ec driver.
Signed-off-by: Stephen Barber <smbarber@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Benson Leung <bleung@chromium.org>
---
include/linux/mfd/cros_ec_commands.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h
index 2b16e95..c6046a2 100644
--- a/include/linux/mfd/cros_ec_commands.h
+++ b/include/linux/mfd/cros_ec_commands.h
@@ -291,6 +291,9 @@ enum host_event_code {
/* EC desires to change state of host-controlled USB mux */
EC_HOST_EVENT_USB_MUX = 28,
+ /* EC RTC event occurred */
+ EC_HOST_EVENT_RTC = 26,
+
/*
* The high bit of the event mask is not used as a host event code. If
* it reads back as set, then the entire event mask should be
@@ -799,6 +802,8 @@ enum ec_feature_code {
EC_FEATURE_USB_MUX = 23,
/* Motion Sensor code has an internal software FIFO */
EC_FEATURE_MOTION_SENSE_FIFO = 24,
+ /* EC has RTC feature that can be controlled by host commands */
+ EC_FEATURE_RTC = 27,
};
#define EC_FEATURE_MASK_0(event_code) (1UL << (event_code % 32))
@@ -1709,6 +1714,9 @@ struct ec_response_rtc {
#define EC_CMD_RTC_SET_VALUE 0x46
#define EC_CMD_RTC_SET_ALARM 0x47
+/* Pass as param to SET_ALARM to clear the current alarm */
+#define EC_RTC_ALARM_CLEAR 0
+
/*****************************************************************************/
/* Port80 log access */
--
2.9.3
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [rtc-linux] [PATCH v4 1/2] mfd: cros_ec: Introduce RTC commands and events definitions.
@ 2017-11-10 21:55 ` Enric Balletbo i Serra
0 siblings, 0 replies; 24+ messages in thread
From: Enric Balletbo i Serra @ 2017-11-10 21:55 UTC (permalink / raw)
To: Lee Jones, bleung
Cc: Guenter Roeck, Gwendal Grignou, linux-kernel, linux-iio,
rtc-linux, Stephen Barber
From: Stephen Barber <smbarber@chromium.org>
The EC can function as a simple RT, this patch adds the RTC related
definitions needed by the rtc-cros-ec driver.
Signed-off-by: Stephen Barber <smbarber@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Benson Leung <bleung@chromium.org>
---
include/linux/mfd/cros_ec_commands.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h
index 2b16e95..c6046a2 100644
--- a/include/linux/mfd/cros_ec_commands.h
+++ b/include/linux/mfd/cros_ec_commands.h
@@ -291,6 +291,9 @@ enum host_event_code {
/* EC desires to change state of host-controlled USB mux */
EC_HOST_EVENT_USB_MUX = 28,
+ /* EC RTC event occurred */
+ EC_HOST_EVENT_RTC = 26,
+
/*
* The high bit of the event mask is not used as a host event code. If
* it reads back as set, then the entire event mask should be
@@ -799,6 +802,8 @@ enum ec_feature_code {
EC_FEATURE_USB_MUX = 23,
/* Motion Sensor code has an internal software FIFO */
EC_FEATURE_MOTION_SENSE_FIFO = 24,
+ /* EC has RTC feature that can be controlled by host commands */
+ EC_FEATURE_RTC = 27,
};
#define EC_FEATURE_MASK_0(event_code) (1UL << (event_code % 32))
@@ -1709,6 +1714,9 @@ struct ec_response_rtc {
#define EC_CMD_RTC_SET_VALUE 0x46
#define EC_CMD_RTC_SET_ALARM 0x47
+/* Pass as param to SET_ALARM to clear the current alarm */
+#define EC_RTC_ALARM_CLEAR 0
+
/*****************************************************************************/
/* Port80 log access */
--
2.9.3
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v4 2/2] rtc: cros-ec: add cros-ec-rtc driver.
2017-11-10 21:55 ` [rtc-linux] " Enric Balletbo i Serra
@ 2017-11-10 21:55 ` Enric Balletbo i Serra
-1 siblings, 0 replies; 24+ messages in thread
From: Enric Balletbo i Serra @ 2017-11-10 21:55 UTC (permalink / raw)
To: Lee Jones, bleung
Cc: Guenter Roeck, Gwendal Grignou, linux-kernel, linux-iio,
rtc-linux, Stephen Barber
From: Stephen Barber <smbarber@chromium.org>
On platforms with a Chrome OS EC, the EC can function as a simple RTC.
Add a basic driver with this functionality.
Signed-off-by: Stephen Barber <smbarber@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Benson Leung <bleung@chromium.org>
---
drivers/rtc/Kconfig | 10 ++
drivers/rtc/Makefile | 1 +
drivers/rtc/rtc-cros-ec.c | 413 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 424 insertions(+)
create mode 100644 drivers/rtc/rtc-cros-ec.c
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index e0e58f3..f157288 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1231,6 +1231,16 @@ config RTC_DRV_ZYNQMP
If you say yes here you get support for the RTC controller found on
Xilinx Zynq Ultrascale+ MPSoC.
+config RTC_DRV_CROS_EC
+ tristate "Chrome OS EC RTC driver"
+ depends on MFD_CROS_EC
+ help
+ If you say yes here you will get support for the
+ Chrome OS Embedded Controller's RTC.
+
+ This driver can also be built as a module. If so, the module
+ will be called rtc-cros-ec.
+
comment "on-CPU RTC drivers"
config RTC_DRV_ASM9260
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 0bf1fc0..08789d7 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -44,6 +44,7 @@ obj-$(CONFIG_RTC_DRV_BQ4802) += rtc-bq4802.o
obj-$(CONFIG_RTC_DRV_CMOS) += rtc-cmos.o
obj-$(CONFIG_RTC_DRV_COH901331) += rtc-coh901331.o
obj-$(CONFIG_RTC_DRV_CPCAP) += rtc-cpcap.o
+obj-$(CONFIG_RTC_DRV_CROS_EC) += rtc-cros-ec.o
obj-$(CONFIG_RTC_DRV_DA9052) += rtc-da9052.o
obj-$(CONFIG_RTC_DRV_DA9055) += rtc-da9055.o
obj-$(CONFIG_RTC_DRV_DA9063) += rtc-da9063.o
diff --git a/drivers/rtc/rtc-cros-ec.c b/drivers/rtc/rtc-cros-ec.c
new file mode 100644
index 0000000..f0ea689
--- /dev/null
+++ b/drivers/rtc/rtc-cros-ec.c
@@ -0,0 +1,413 @@
+/*
+ * RTC driver for Chrome OS Embedded Controller
+ *
+ * Copyright (c) 2017, Google, Inc
+ *
+ * Author: Stephen Barber <smbarber@chromium.org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ */
+
+#include <linux/kernel.h>
+#include <linux/mfd/cros_ec.h>
+#include <linux/mfd/cros_ec_commands.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/rtc.h>
+#include <linux/slab.h>
+
+#define DRV_NAME "cros-ec-rtc"
+
+/**
+ * struct cros_ec_rtc - Driver data for EC RTC
+ *
+ * @cros_ec: Pointer to EC device
+ * @rtc: Pointer to RTC device
+ * @notifier: Notifier info for responding to EC events
+ * @saved_alarm: Alarm to restore when interrupts are reenabled
+ */
+struct cros_ec_rtc {
+ struct cros_ec_device *cros_ec;
+ struct rtc_device *rtc;
+ struct notifier_block notifier;
+ u32 saved_alarm;
+};
+
+static int cros_ec_rtc_get(struct cros_ec_device *cros_ec, u32 command,
+ u32 *response)
+{
+ int ret;
+ struct {
+ struct cros_ec_command msg;
+ struct ec_response_rtc data;
+ } __packed msg;
+
+ memset(&msg, 0, sizeof(msg));
+ msg.msg.command = command;
+ msg.msg.insize = sizeof(msg.data);
+
+ ret = cros_ec_cmd_xfer_status(cros_ec, &msg.msg);
+ if (ret < 0) {
+ dev_err(cros_ec->dev,
+ "error getting %s from EC: %d\n",
+ command == EC_CMD_RTC_GET_VALUE ? "time" : "alarm",
+ ret);
+ return ret;
+ }
+
+ *response = msg.data.time;
+
+ return 0;
+}
+
+static int cros_ec_rtc_set(struct cros_ec_device *cros_ec, u32 command,
+ u32 param)
+{
+ int ret = 0;
+ struct {
+ struct cros_ec_command msg;
+ struct ec_response_rtc data;
+ } __packed msg;
+
+ memset(&msg, 0, sizeof(msg));
+ msg.msg.command = command;
+ msg.msg.outsize = sizeof(msg.data);
+ msg.data.time = param;
+
+ ret = cros_ec_cmd_xfer_status(cros_ec, &msg.msg);
+ if (ret < 0) {
+ dev_err(cros_ec->dev, "error setting %s on EC: %d\n",
+ command == EC_CMD_RTC_SET_VALUE ? "time" : "alarm",
+ ret);
+ return ret;
+ }
+
+ return 0;
+}
+
+/* Read the current time from the EC. */
+static int cros_ec_rtc_read_time(struct device *dev, struct rtc_time *tm)
+{
+ struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(dev);
+ struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec;
+ int ret;
+ u32 time;
+
+ ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_VALUE, &time);
+ if (ret) {
+ dev_err(dev, "error getting time: %d\n", ret);
+ return ret;
+ }
+
+ rtc_time64_to_tm(time, tm);
+
+ return 0;
+}
+
+/* Set the current EC time. */
+static int cros_ec_rtc_set_time(struct device *dev, struct rtc_time *tm)
+{
+ struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(dev);
+ struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec;
+ int ret;
+ time64_t time;
+
+ time = rtc_tm_to_time64(tm);
+ if (time < 0 || time > U32_MAX)
+ return -EINVAL;
+
+ ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_VALUE, (u32)time);
+ if (ret < 0) {
+ dev_err(dev, "error setting time: %d\n", ret);
+ return ret;
+ }
+
+ return 0;
+}
+
+/* Read alarm time from RTC. */
+static int cros_ec_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
+{
+ struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(dev);
+ struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec;
+ int ret;
+ u32 current_time, alarm_offset;
+
+ /*
+ * The EC host command for getting the alarm is relative (i.e. 5
+ * seconds from now) whereas rtc_wkalrm is absolute. Get the current
+ * RTC time first so we can calculate the relative time.
+ */
+ ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_VALUE, ¤t_time);
+ if (ret < 0) {
+ dev_err(dev, "error getting time: %d\n", ret);
+ return ret;
+ }
+
+ ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_ALARM, &alarm_offset);
+ if (ret < 0) {
+ dev_err(dev, "error getting alarm: %d\n", ret);
+ return ret;
+ }
+
+ rtc_time64_to_tm(current_time + alarm_offset, &alrm->time);
+
+ return 0;
+}
+
+/* Set the EC's RTC alarm. */
+static int cros_ec_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
+{
+ struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(dev);
+ struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec;
+ int ret;
+ time64_t alarm_time;
+ u32 current_time, alarm_offset;
+
+ /*
+ * The EC host command for setting the alarm is relative
+ * (i.e. 5 seconds from now) whereas rtc_wkalrm is absolute.
+ * Get the current RTC time first so we can calculate the
+ * relative time.
+ */
+ ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_VALUE, ¤t_time);
+ if (ret < 0) {
+ dev_err(dev, "error getting time: %d\n", ret);
+ return ret;
+ }
+
+ alarm_time = rtc_tm_to_time64(&alrm->time);
+
+ if (alarm_time < 0 || alarm_time > U32_MAX)
+ return -EINVAL;
+
+ if (!alrm->enabled) {
+ /*
+ * If the alarm is being disabled, send an alarm
+ * clear command.
+ */
+ alarm_offset = EC_RTC_ALARM_CLEAR;
+ cros_ec_rtc->saved_alarm = (u32)alarm_time;
+ } else {
+ /* Don't set an alarm in the past. */
+ if ((u32)alarm_time < current_time)
+ alarm_offset = EC_RTC_ALARM_CLEAR;
+ else
+ alarm_offset = (u32)alarm_time - current_time;
+ }
+
+ ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_ALARM, alarm_offset);
+ if (ret < 0) {
+ dev_err(dev, "error setting alarm: %d\n", ret);
+ return ret;
+ }
+
+ return 0;
+}
+
+static int cros_ec_rtc_alarm_irq_enable(struct device *dev,
+ unsigned int enabled)
+{
+ struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(dev);
+ struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec;
+ int ret;
+ u32 current_time, alarm_offset, alarm_value;
+
+ ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_VALUE, ¤t_time);
+ if (ret < 0) {
+ dev_err(dev, "error getting time: %d\n", ret);
+ return ret;
+ }
+
+ if (enabled) {
+ /* Restore saved alarm if it's still in the future. */
+ if (cros_ec_rtc->saved_alarm < current_time)
+ alarm_offset = EC_RTC_ALARM_CLEAR;
+ else
+ alarm_offset = cros_ec_rtc->saved_alarm - current_time;
+
+ ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_ALARM,
+ alarm_offset);
+ if (ret < 0) {
+ dev_err(dev, "error restoring alarm: %d\n", ret);
+ return ret;
+ }
+ } else {
+ /* Disable alarm, saving the old alarm value. */
+ ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_ALARM,
+ &alarm_offset);
+ if (ret < 0) {
+ dev_err(dev, "error saving alarm: %d\n", ret);
+ return ret;
+ }
+
+ alarm_value = current_time + alarm_offset;
+
+ /*
+ * If the current EC alarm is already past, we don't want
+ * to set an alarm when we go through the alarm irq enable
+ * path.
+ */
+ if (alarm_value < current_time)
+ cros_ec_rtc->saved_alarm = EC_RTC_ALARM_CLEAR;
+ else
+ cros_ec_rtc->saved_alarm = alarm_value;
+
+ alarm_offset = EC_RTC_ALARM_CLEAR;
+ ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_ALARM,
+ alarm_offset);
+ if (ret < 0) {
+ dev_err(dev, "error disabling alarm: %d\n", ret);
+ return ret;
+ }
+ }
+
+ return 0;
+}
+
+static int cros_ec_rtc_event(struct notifier_block *nb,
+ unsigned long queued_during_suspend,
+ void *_notify)
+{
+ struct cros_ec_rtc *cros_ec_rtc;
+ struct rtc_device *rtc;
+ struct cros_ec_device *cros_ec;
+ u32 host_event;
+
+ cros_ec_rtc = container_of(nb, struct cros_ec_rtc, notifier);
+ rtc = cros_ec_rtc->rtc;
+ cros_ec = cros_ec_rtc->cros_ec;
+
+ host_event = cros_ec_get_host_event(cros_ec);
+ if (host_event & EC_HOST_EVENT_MASK(EC_HOST_EVENT_RTC)) {
+ rtc_update_irq(rtc, 1, RTC_IRQF | RTC_AF);
+ return NOTIFY_OK;
+ } else {
+ return NOTIFY_DONE;
+ }
+}
+
+static const struct rtc_class_ops cros_ec_rtc_ops = {
+ .read_time = cros_ec_rtc_read_time,
+ .set_time = cros_ec_rtc_set_time,
+ .read_alarm = cros_ec_rtc_read_alarm,
+ .set_alarm = cros_ec_rtc_set_alarm,
+ .alarm_irq_enable = cros_ec_rtc_alarm_irq_enable,
+};
+
+#ifdef CONFIG_PM_SLEEP
+static int cros_ec_rtc_suspend(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(&pdev->dev);
+
+ if (device_may_wakeup(dev))
+ enable_irq_wake(cros_ec_rtc->cros_ec->irq);
+
+ return 0;
+}
+
+static int cros_ec_rtc_resume(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(&pdev->dev);
+
+ if (device_may_wakeup(dev))
+ disable_irq_wake(cros_ec_rtc->cros_ec->irq);
+
+ return 0;
+}
+#endif
+
+static SIMPLE_DEV_PM_OPS(cros_ec_rtc_pm_ops, cros_ec_rtc_suspend,
+ cros_ec_rtc_resume);
+
+static int cros_ec_rtc_probe(struct platform_device *pdev)
+{
+ struct cros_ec_dev *ec_dev = dev_get_drvdata(pdev->dev.parent);
+ struct cros_ec_device *cros_ec = ec_dev->ec_dev;
+ struct cros_ec_rtc *cros_ec_rtc;
+ struct rtc_time tm;
+ int ret;
+
+ cros_ec_rtc = devm_kzalloc(&pdev->dev, sizeof(*cros_ec_rtc),
+ GFP_KERNEL);
+ if (!cros_ec_rtc)
+ return -ENOMEM;
+
+ platform_set_drvdata(pdev, cros_ec_rtc);
+ cros_ec_rtc->cros_ec = cros_ec;
+
+ /* Get initial time */
+ ret = cros_ec_rtc_read_time(&pdev->dev, &tm);
+ if (ret) {
+ dev_err(&pdev->dev, "failed to read RTC time\n");
+ return ret;
+ }
+
+ ret = device_init_wakeup(&pdev->dev, 1);
+ if (ret) {
+ dev_err(&pdev->dev, "failed to initialize wakeup\n");
+ return ret;
+ }
+
+ cros_ec_rtc->rtc = devm_rtc_device_register(&pdev->dev, DRV_NAME,
+ &cros_ec_rtc_ops,
+ THIS_MODULE);
+ if (IS_ERR(cros_ec_rtc->rtc)) {
+ ret = PTR_ERR(cros_ec_rtc->rtc);
+ dev_err(&pdev->dev, "failed to register rtc device\n");
+ return ret;
+ }
+
+ /* Get RTC events from the EC. */
+ cros_ec_rtc->notifier.notifier_call = cros_ec_rtc_event;
+ ret = blocking_notifier_chain_register(&cros_ec->event_notifier,
+ &cros_ec_rtc->notifier);
+ if (ret) {
+ dev_err(&pdev->dev, "failed to register notifier\n");
+ return ret;
+ }
+
+ return 0;
+}
+
+static int cros_ec_rtc_remove(struct platform_device *pdev)
+{
+ struct cros_ec_rtc *cros_ec_rtc = platform_get_drvdata(pdev);
+ struct device *dev = &pdev->dev;
+ int ret;
+
+ ret = blocking_notifier_chain_unregister(
+ &cros_ec_rtc->cros_ec->event_notifier,
+ &cros_ec_rtc->notifier);
+ if (ret) {
+ dev_err(dev, "failed to unregister notifier\n");
+ return ret;
+ }
+
+ return 0;
+}
+
+static struct platform_driver cros_ec_rtc_driver = {
+ .probe = cros_ec_rtc_probe,
+ .remove = cros_ec_rtc_remove,
+ .driver = {
+ .name = DRV_NAME,
+ .pm = &cros_ec_rtc_pm_ops,
+ },
+};
+
+module_platform_driver(cros_ec_rtc_driver);
+
+MODULE_DESCRIPTION("RTC driver for Chrome OS ECs");
+MODULE_AUTHOR("Stephen Barber <smbarber@chromium.org>");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:" DRV_NAME);
--
2.9.3
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [rtc-linux] [PATCH v4 2/2] rtc: cros-ec: add cros-ec-rtc driver.
@ 2017-11-10 21:55 ` Enric Balletbo i Serra
0 siblings, 0 replies; 24+ messages in thread
From: Enric Balletbo i Serra @ 2017-11-10 21:55 UTC (permalink / raw)
To: Lee Jones, bleung
Cc: Guenter Roeck, Gwendal Grignou, linux-kernel, linux-iio,
rtc-linux, Stephen Barber
From: Stephen Barber <smbarber@chromium.org>
On platforms with a Chrome OS EC, the EC can function as a simple RTC.
Add a basic driver with this functionality.
Signed-off-by: Stephen Barber <smbarber@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Benson Leung <bleung@chromium.org>
---
drivers/rtc/Kconfig | 10 ++
drivers/rtc/Makefile | 1 +
drivers/rtc/rtc-cros-ec.c | 413 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 424 insertions(+)
create mode 100644 drivers/rtc/rtc-cros-ec.c
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index e0e58f3..f157288 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1231,6 +1231,16 @@ config RTC_DRV_ZYNQMP
If you say yes here you get support for the RTC controller found on
Xilinx Zynq Ultrascale+ MPSoC.
+config RTC_DRV_CROS_EC
+ tristate "Chrome OS EC RTC driver"
+ depends on MFD_CROS_EC
+ help
+ If you say yes here you will get support for the
+ Chrome OS Embedded Controller's RTC.
+
+ This driver can also be built as a module. If so, the module
+ will be called rtc-cros-ec.
+
comment "on-CPU RTC drivers"
config RTC_DRV_ASM9260
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 0bf1fc0..08789d7 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -44,6 +44,7 @@ obj-$(CONFIG_RTC_DRV_BQ4802) += rtc-bq4802.o
obj-$(CONFIG_RTC_DRV_CMOS) += rtc-cmos.o
obj-$(CONFIG_RTC_DRV_COH901331) += rtc-coh901331.o
obj-$(CONFIG_RTC_DRV_CPCAP) += rtc-cpcap.o
+obj-$(CONFIG_RTC_DRV_CROS_EC) += rtc-cros-ec.o
obj-$(CONFIG_RTC_DRV_DA9052) += rtc-da9052.o
obj-$(CONFIG_RTC_DRV_DA9055) += rtc-da9055.o
obj-$(CONFIG_RTC_DRV_DA9063) += rtc-da9063.o
diff --git a/drivers/rtc/rtc-cros-ec.c b/drivers/rtc/rtc-cros-ec.c
new file mode 100644
index 0000000..f0ea689
--- /dev/null
+++ b/drivers/rtc/rtc-cros-ec.c
@@ -0,0 +1,413 @@
+/*
+ * RTC driver for Chrome OS Embedded Controller
+ *
+ * Copyright (c) 2017, Google, Inc
+ *
+ * Author: Stephen Barber <smbarber@chromium.org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ */
+
+#include <linux/kernel.h>
+#include <linux/mfd/cros_ec.h>
+#include <linux/mfd/cros_ec_commands.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/rtc.h>
+#include <linux/slab.h>
+
+#define DRV_NAME "cros-ec-rtc"
+
+/**
+ * struct cros_ec_rtc - Driver data for EC RTC
+ *
+ * @cros_ec: Pointer to EC device
+ * @rtc: Pointer to RTC device
+ * @notifier: Notifier info for responding to EC events
+ * @saved_alarm: Alarm to restore when interrupts are reenabled
+ */
+struct cros_ec_rtc {
+ struct cros_ec_device *cros_ec;
+ struct rtc_device *rtc;
+ struct notifier_block notifier;
+ u32 saved_alarm;
+};
+
+static int cros_ec_rtc_get(struct cros_ec_device *cros_ec, u32 command,
+ u32 *response)
+{
+ int ret;
+ struct {
+ struct cros_ec_command msg;
+ struct ec_response_rtc data;
+ } __packed msg;
+
+ memset(&msg, 0, sizeof(msg));
+ msg.msg.command = command;
+ msg.msg.insize = sizeof(msg.data);
+
+ ret = cros_ec_cmd_xfer_status(cros_ec, &msg.msg);
+ if (ret < 0) {
+ dev_err(cros_ec->dev,
+ "error getting %s from EC: %d\n",
+ command == EC_CMD_RTC_GET_VALUE ? "time" : "alarm",
+ ret);
+ return ret;
+ }
+
+ *response = msg.data.time;
+
+ return 0;
+}
+
+static int cros_ec_rtc_set(struct cros_ec_device *cros_ec, u32 command,
+ u32 param)
+{
+ int ret = 0;
+ struct {
+ struct cros_ec_command msg;
+ struct ec_response_rtc data;
+ } __packed msg;
+
+ memset(&msg, 0, sizeof(msg));
+ msg.msg.command = command;
+ msg.msg.outsize = sizeof(msg.data);
+ msg.data.time = param;
+
+ ret = cros_ec_cmd_xfer_status(cros_ec, &msg.msg);
+ if (ret < 0) {
+ dev_err(cros_ec->dev, "error setting %s on EC: %d\n",
+ command == EC_CMD_RTC_SET_VALUE ? "time" : "alarm",
+ ret);
+ return ret;
+ }
+
+ return 0;
+}
+
+/* Read the current time from the EC. */
+static int cros_ec_rtc_read_time(struct device *dev, struct rtc_time *tm)
+{
+ struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(dev);
+ struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec;
+ int ret;
+ u32 time;
+
+ ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_VALUE, &time);
+ if (ret) {
+ dev_err(dev, "error getting time: %d\n", ret);
+ return ret;
+ }
+
+ rtc_time64_to_tm(time, tm);
+
+ return 0;
+}
+
+/* Set the current EC time. */
+static int cros_ec_rtc_set_time(struct device *dev, struct rtc_time *tm)
+{
+ struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(dev);
+ struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec;
+ int ret;
+ time64_t time;
+
+ time = rtc_tm_to_time64(tm);
+ if (time < 0 || time > U32_MAX)
+ return -EINVAL;
+
+ ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_VALUE, (u32)time);
+ if (ret < 0) {
+ dev_err(dev, "error setting time: %d\n", ret);
+ return ret;
+ }
+
+ return 0;
+}
+
+/* Read alarm time from RTC. */
+static int cros_ec_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
+{
+ struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(dev);
+ struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec;
+ int ret;
+ u32 current_time, alarm_offset;
+
+ /*
+ * The EC host command for getting the alarm is relative (i.e. 5
+ * seconds from now) whereas rtc_wkalrm is absolute. Get the current
+ * RTC time first so we can calculate the relative time.
+ */
+ ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_VALUE, ¤t_time);
+ if (ret < 0) {
+ dev_err(dev, "error getting time: %d\n", ret);
+ return ret;
+ }
+
+ ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_ALARM, &alarm_offset);
+ if (ret < 0) {
+ dev_err(dev, "error getting alarm: %d\n", ret);
+ return ret;
+ }
+
+ rtc_time64_to_tm(current_time + alarm_offset, &alrm->time);
+
+ return 0;
+}
+
+/* Set the EC's RTC alarm. */
+static int cros_ec_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
+{
+ struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(dev);
+ struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec;
+ int ret;
+ time64_t alarm_time;
+ u32 current_time, alarm_offset;
+
+ /*
+ * The EC host command for setting the alarm is relative
+ * (i.e. 5 seconds from now) whereas rtc_wkalrm is absolute.
+ * Get the current RTC time first so we can calculate the
+ * relative time.
+ */
+ ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_VALUE, ¤t_time);
+ if (ret < 0) {
+ dev_err(dev, "error getting time: %d\n", ret);
+ return ret;
+ }
+
+ alarm_time = rtc_tm_to_time64(&alrm->time);
+
+ if (alarm_time < 0 || alarm_time > U32_MAX)
+ return -EINVAL;
+
+ if (!alrm->enabled) {
+ /*
+ * If the alarm is being disabled, send an alarm
+ * clear command.
+ */
+ alarm_offset = EC_RTC_ALARM_CLEAR;
+ cros_ec_rtc->saved_alarm = (u32)alarm_time;
+ } else {
+ /* Don't set an alarm in the past. */
+ if ((u32)alarm_time < current_time)
+ alarm_offset = EC_RTC_ALARM_CLEAR;
+ else
+ alarm_offset = (u32)alarm_time - current_time;
+ }
+
+ ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_ALARM, alarm_offset);
+ if (ret < 0) {
+ dev_err(dev, "error setting alarm: %d\n", ret);
+ return ret;
+ }
+
+ return 0;
+}
+
+static int cros_ec_rtc_alarm_irq_enable(struct device *dev,
+ unsigned int enabled)
+{
+ struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(dev);
+ struct cros_ec_device *cros_ec = cros_ec_rtc->cros_ec;
+ int ret;
+ u32 current_time, alarm_offset, alarm_value;
+
+ ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_VALUE, ¤t_time);
+ if (ret < 0) {
+ dev_err(dev, "error getting time: %d\n", ret);
+ return ret;
+ }
+
+ if (enabled) {
+ /* Restore saved alarm if it's still in the future. */
+ if (cros_ec_rtc->saved_alarm < current_time)
+ alarm_offset = EC_RTC_ALARM_CLEAR;
+ else
+ alarm_offset = cros_ec_rtc->saved_alarm - current_time;
+
+ ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_ALARM,
+ alarm_offset);
+ if (ret < 0) {
+ dev_err(dev, "error restoring alarm: %d\n", ret);
+ return ret;
+ }
+ } else {
+ /* Disable alarm, saving the old alarm value. */
+ ret = cros_ec_rtc_get(cros_ec, EC_CMD_RTC_GET_ALARM,
+ &alarm_offset);
+ if (ret < 0) {
+ dev_err(dev, "error saving alarm: %d\n", ret);
+ return ret;
+ }
+
+ alarm_value = current_time + alarm_offset;
+
+ /*
+ * If the current EC alarm is already past, we don't want
+ * to set an alarm when we go through the alarm irq enable
+ * path.
+ */
+ if (alarm_value < current_time)
+ cros_ec_rtc->saved_alarm = EC_RTC_ALARM_CLEAR;
+ else
+ cros_ec_rtc->saved_alarm = alarm_value;
+
+ alarm_offset = EC_RTC_ALARM_CLEAR;
+ ret = cros_ec_rtc_set(cros_ec, EC_CMD_RTC_SET_ALARM,
+ alarm_offset);
+ if (ret < 0) {
+ dev_err(dev, "error disabling alarm: %d\n", ret);
+ return ret;
+ }
+ }
+
+ return 0;
+}
+
+static int cros_ec_rtc_event(struct notifier_block *nb,
+ unsigned long queued_during_suspend,
+ void *_notify)
+{
+ struct cros_ec_rtc *cros_ec_rtc;
+ struct rtc_device *rtc;
+ struct cros_ec_device *cros_ec;
+ u32 host_event;
+
+ cros_ec_rtc = container_of(nb, struct cros_ec_rtc, notifier);
+ rtc = cros_ec_rtc->rtc;
+ cros_ec = cros_ec_rtc->cros_ec;
+
+ host_event = cros_ec_get_host_event(cros_ec);
+ if (host_event & EC_HOST_EVENT_MASK(EC_HOST_EVENT_RTC)) {
+ rtc_update_irq(rtc, 1, RTC_IRQF | RTC_AF);
+ return NOTIFY_OK;
+ } else {
+ return NOTIFY_DONE;
+ }
+}
+
+static const struct rtc_class_ops cros_ec_rtc_ops = {
+ .read_time = cros_ec_rtc_read_time,
+ .set_time = cros_ec_rtc_set_time,
+ .read_alarm = cros_ec_rtc_read_alarm,
+ .set_alarm = cros_ec_rtc_set_alarm,
+ .alarm_irq_enable = cros_ec_rtc_alarm_irq_enable,
+};
+
+#ifdef CONFIG_PM_SLEEP
+static int cros_ec_rtc_suspend(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(&pdev->dev);
+
+ if (device_may_wakeup(dev))
+ enable_irq_wake(cros_ec_rtc->cros_ec->irq);
+
+ return 0;
+}
+
+static int cros_ec_rtc_resume(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(&pdev->dev);
+
+ if (device_may_wakeup(dev))
+ disable_irq_wake(cros_ec_rtc->cros_ec->irq);
+
+ return 0;
+}
+#endif
+
+static SIMPLE_DEV_PM_OPS(cros_ec_rtc_pm_ops, cros_ec_rtc_suspend,
+ cros_ec_rtc_resume);
+
+static int cros_ec_rtc_probe(struct platform_device *pdev)
+{
+ struct cros_ec_dev *ec_dev = dev_get_drvdata(pdev->dev.parent);
+ struct cros_ec_device *cros_ec = ec_dev->ec_dev;
+ struct cros_ec_rtc *cros_ec_rtc;
+ struct rtc_time tm;
+ int ret;
+
+ cros_ec_rtc = devm_kzalloc(&pdev->dev, sizeof(*cros_ec_rtc),
+ GFP_KERNEL);
+ if (!cros_ec_rtc)
+ return -ENOMEM;
+
+ platform_set_drvdata(pdev, cros_ec_rtc);
+ cros_ec_rtc->cros_ec = cros_ec;
+
+ /* Get initial time */
+ ret = cros_ec_rtc_read_time(&pdev->dev, &tm);
+ if (ret) {
+ dev_err(&pdev->dev, "failed to read RTC time\n");
+ return ret;
+ }
+
+ ret = device_init_wakeup(&pdev->dev, 1);
+ if (ret) {
+ dev_err(&pdev->dev, "failed to initialize wakeup\n");
+ return ret;
+ }
+
+ cros_ec_rtc->rtc = devm_rtc_device_register(&pdev->dev, DRV_NAME,
+ &cros_ec_rtc_ops,
+ THIS_MODULE);
+ if (IS_ERR(cros_ec_rtc->rtc)) {
+ ret = PTR_ERR(cros_ec_rtc->rtc);
+ dev_err(&pdev->dev, "failed to register rtc device\n");
+ return ret;
+ }
+
+ /* Get RTC events from the EC. */
+ cros_ec_rtc->notifier.notifier_call = cros_ec_rtc_event;
+ ret = blocking_notifier_chain_register(&cros_ec->event_notifier,
+ &cros_ec_rtc->notifier);
+ if (ret) {
+ dev_err(&pdev->dev, "failed to register notifier\n");
+ return ret;
+ }
+
+ return 0;
+}
+
+static int cros_ec_rtc_remove(struct platform_device *pdev)
+{
+ struct cros_ec_rtc *cros_ec_rtc = platform_get_drvdata(pdev);
+ struct device *dev = &pdev->dev;
+ int ret;
+
+ ret = blocking_notifier_chain_unregister(
+ &cros_ec_rtc->cros_ec->event_notifier,
+ &cros_ec_rtc->notifier);
+ if (ret) {
+ dev_err(dev, "failed to unregister notifier\n");
+ return ret;
+ }
+
+ return 0;
+}
+
+static struct platform_driver cros_ec_rtc_driver = {
+ .probe = cros_ec_rtc_probe,
+ .remove = cros_ec_rtc_remove,
+ .driver = {
+ .name = DRV_NAME,
+ .pm = &cros_ec_rtc_pm_ops,
+ },
+};
+
+module_platform_driver(cros_ec_rtc_driver);
+
+MODULE_DESCRIPTION("RTC driver for Chrome OS ECs");
+MODULE_AUTHOR("Stephen Barber <smbarber@chromium.org>");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:" DRV_NAME);
--
2.9.3
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH v4 0/2] Add support for cros-ec-rtc driver.
2017-11-10 21:55 ` [rtc-linux] " Enric Balletbo i Serra
@ 2017-12-12 15:41 ` Enric Balletbo Serra
-1 siblings, 0 replies; 24+ messages in thread
From: Enric Balletbo Serra @ 2017-12-12 15:41 UTC (permalink / raw)
To: Enric Balletbo i Serra, Alessandro Zummo, Alexandre Belloni
Cc: Lee Jones, Benson Leung, Guenter Roeck, Gwendal Grignou,
linux-kernel, linux-iio, rtc-linux
+ Alessandro Zummo
+ Alexandre Belloni
2017-11-10 22:55 GMT+01:00 Enric Balletbo i Serra
<enric.balletbo@collabora.com>:
> Dear all,
>
> This is an attempt to revive some patches from that [1] patchset, some
> of them are still under discussion but I think there is no reason to not
> have the other two in this fourth version to land upstream meanwhile we
> discuss about the others.
>
> [1] https://lkml.org/lkml/2017/7/12/182
>
> Changes since v3:
> * Rebased an retested with current mainline using a Samsung Chromebook Plus
> * Removed from patchset
> * 1/4 mfd: cros_ec: Get rid of cros_ec_check_features from cros_ec_dev.
> * 4/4 mfd: cros_ec: add RTC as mfd subdevice.
>
> Changes since v2:
> - Rebase on top of mainline.
> - Removed patch 'mfd: cros-ec: Fix host command buffer size' from series
> as was already picked.
>
> Changes since v1:
> - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
> calibbias data' from series as was already picked.
> - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
> calibbias data' from series as was already picked.
> - Patch 2/5: Acked-by: Jonathan Cameron <***@kernel.org>
>
> Best regards,
>
> Enric
>
> Stephen Barber (2):
> mfd: cros_ec: Introduce RTC commands and events definitions.
> rtc: cros-ec: add cros-ec-rtc driver.
>
> drivers/rtc/Kconfig | 10 +
> drivers/rtc/Makefile | 1 +
> drivers/rtc/rtc-cros-ec.c | 413 +++++++++++++++++++++++++++++++++++
> include/linux/mfd/cros_ec_commands.h | 8 +
> 4 files changed, 432 insertions(+)
> create mode 100644 drivers/rtc/rtc-cros-ec.c
>
> --
> 2.9.3
>
Sorry, I just noticed that my script to add the email recipients
failed and I did not add the RTC maintainers :( So this is a gentle
ping cc'ing the maintainers to take in consideration these patches. If
you want I resend or something else just let me know please.
Thanks,
Enric
^ permalink raw reply [flat|nested] 24+ messages in thread
* [rtc-linux] Re: [PATCH v4 0/2] Add support for cros-ec-rtc driver.
@ 2017-12-12 15:41 ` Enric Balletbo Serra
0 siblings, 0 replies; 24+ messages in thread
From: Enric Balletbo Serra @ 2017-12-12 15:41 UTC (permalink / raw)
To: Enric Balletbo i Serra, Alessandro Zummo, Alexandre Belloni
Cc: Lee Jones, Benson Leung, Guenter Roeck, Gwendal Grignou,
linux-kernel, linux-iio, rtc-linux
+ Alessandro Zummo
+ Alexandre Belloni
2017-11-10 22:55 GMT+01:00 Enric Balletbo i Serra
<enric.balletbo@collabora.com>:
> Dear all,
>
> This is an attempt to revive some patches from that [1] patchset, some
> of them are still under discussion but I think there is no reason to not
> have the other two in this fourth version to land upstream meanwhile we
> discuss about the others.
>
> [1] https://lkml.org/lkml/2017/7/12/182
>
> Changes since v3:
> * Rebased an retested with current mainline using a Samsung Chromebook Plus
> * Removed from patchset
> * 1/4 mfd: cros_ec: Get rid of cros_ec_check_features from cros_ec_dev.
> * 4/4 mfd: cros_ec: add RTC as mfd subdevice.
>
> Changes since v2:
> - Rebase on top of mainline.
> - Removed patch 'mfd: cros-ec: Fix host command buffer size' from series
> as was already picked.
>
> Changes since v1:
> - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
> calibbias data' from series as was already picked.
> - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
> calibbias data' from series as was already picked.
> - Patch 2/5: Acked-by: Jonathan Cameron <***@kernel.org>
>
> Best regards,
>
> Enric
>
> Stephen Barber (2):
> mfd: cros_ec: Introduce RTC commands and events definitions.
> rtc: cros-ec: add cros-ec-rtc driver.
>
> drivers/rtc/Kconfig | 10 +
> drivers/rtc/Makefile | 1 +
> drivers/rtc/rtc-cros-ec.c | 413 +++++++++++++++++++++++++++++++++++
> include/linux/mfd/cros_ec_commands.h | 8 +
> 4 files changed, 432 insertions(+)
> create mode 100644 drivers/rtc/rtc-cros-ec.c
>
> --
> 2.9.3
>
Sorry, I just noticed that my script to add the email recipients
failed and I did not add the RTC maintainers :( So this is a gentle
ping cc'ing the maintainers to take in consideration these patches. If
you want I resend or something else just let me know please.
Thanks,
Enric
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v4 0/2] Add support for cros-ec-rtc driver.
2017-12-12 15:41 ` [rtc-linux] " Enric Balletbo Serra
@ 2017-12-12 16:05 ` Alexandre Belloni
-1 siblings, 0 replies; 24+ messages in thread
From: Alexandre Belloni @ 2017-12-12 16:05 UTC (permalink / raw)
To: Enric Balletbo Serra
Cc: Enric Balletbo i Serra, Alessandro Zummo, Lee Jones,
Benson Leung, Guenter Roeck, Gwendal Grignou, linux-kernel,
linux-iio, rtc-linux
On 12/12/2017 at 16:41:39 +0100, Enric Balletbo Serra wrote:
> + Alessandro Zummo
> + Alexandre Belloni
>
> 2017-11-10 22:55 GMT+01:00 Enric Balletbo i Serra
> <enric.balletbo@collabora.com>:
> > Dear all,
> >
> > This is an attempt to revive some patches from that [1] patchset, some
> > of them are still under discussion but I think there is no reason to not
> > have the other two in this fourth version to land upstream meanwhile we
> > discuss about the others.
> >
> > [1] https://lkml.org/lkml/2017/7/12/182
> >
> > Changes since v3:
> > * Rebased an retested with current mainline using a Samsung Chromebook Plus
> > * Removed from patchset
> > * 1/4 mfd: cros_ec: Get rid of cros_ec_check_features from cros_ec_dev.
> > * 4/4 mfd: cros_ec: add RTC as mfd subdevice.
> >
> > Changes since v2:
> > - Rebase on top of mainline.
> > - Removed patch 'mfd: cros-ec: Fix host command buffer size' from series
> > as was already picked.
> >
> > Changes since v1:
> > - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
> > calibbias data' from series as was already picked.
> > - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
> > calibbias data' from series as was already picked.
> > - Patch 2/5: Acked-by: Jonathan Cameron <***@kernel.org>
> >
> > Best regards,
> >
> > Enric
> >
> > Stephen Barber (2):
> > mfd: cros_ec: Introduce RTC commands and events definitions.
> > rtc: cros-ec: add cros-ec-rtc driver.
> >
> > drivers/rtc/Kconfig | 10 +
> > drivers/rtc/Makefile | 1 +
> > drivers/rtc/rtc-cros-ec.c | 413 +++++++++++++++++++++++++++++++++++
> > include/linux/mfd/cros_ec_commands.h | 8 +
> > 4 files changed, 432 insertions(+)
> > create mode 100644 drivers/rtc/rtc-cros-ec.c
> >
> > --
> > 2.9.3
> >
>
> Sorry, I just noticed that my script to add the email recipients
> failed and I did not add the RTC maintainers :( So this is a gentle
> ping cc'ing the maintainers to take in consideration these patches. If
> you want I resend or something else just let me know please.
>
I don't remember the specifics but I think the patches have the
necessary acks from me to go through the mfd tree (didn't we agree on
that ?)
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 24+ messages in thread
* [rtc-linux] Re: [PATCH v4 0/2] Add support for cros-ec-rtc driver.
@ 2017-12-12 16:05 ` Alexandre Belloni
0 siblings, 0 replies; 24+ messages in thread
From: Alexandre Belloni @ 2017-12-12 16:05 UTC (permalink / raw)
To: Enric Balletbo Serra
Cc: Enric Balletbo i Serra, Alessandro Zummo, Lee Jones,
Benson Leung, Guenter Roeck, Gwendal Grignou, linux-kernel,
linux-iio, rtc-linux
On 12/12/2017 at 16:41:39 +0100, Enric Balletbo Serra wrote:
> + Alessandro Zummo
> + Alexandre Belloni
>
> 2017-11-10 22:55 GMT+01:00 Enric Balletbo i Serra
> <enric.balletbo@collabora.com>:
> > Dear all,
> >
> > This is an attempt to revive some patches from that [1] patchset, some
> > of them are still under discussion but I think there is no reason to not
> > have the other two in this fourth version to land upstream meanwhile we
> > discuss about the others.
> >
> > [1] https://lkml.org/lkml/2017/7/12/182
> >
> > Changes since v3:
> > * Rebased an retested with current mainline using a Samsung Chromebook Plus
> > * Removed from patchset
> > * 1/4 mfd: cros_ec: Get rid of cros_ec_check_features from cros_ec_dev.
> > * 4/4 mfd: cros_ec: add RTC as mfd subdevice.
> >
> > Changes since v2:
> > - Rebase on top of mainline.
> > - Removed patch 'mfd: cros-ec: Fix host command buffer size' from series
> > as was already picked.
> >
> > Changes since v1:
> > - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
> > calibbias data' from series as was already picked.
> > - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
> > calibbias data' from series as was already picked.
> > - Patch 2/5: Acked-by: Jonathan Cameron <***@kernel.org>
> >
> > Best regards,
> >
> > Enric
> >
> > Stephen Barber (2):
> > mfd: cros_ec: Introduce RTC commands and events definitions.
> > rtc: cros-ec: add cros-ec-rtc driver.
> >
> > drivers/rtc/Kconfig | 10 +
> > drivers/rtc/Makefile | 1 +
> > drivers/rtc/rtc-cros-ec.c | 413 +++++++++++++++++++++++++++++++++++
> > include/linux/mfd/cros_ec_commands.h | 8 +
> > 4 files changed, 432 insertions(+)
> > create mode 100644 drivers/rtc/rtc-cros-ec.c
> >
> > --
> > 2.9.3
> >
>
> Sorry, I just noticed that my script to add the email recipients
> failed and I did not add the RTC maintainers :( So this is a gentle
> ping cc'ing the maintainers to take in consideration these patches. If
> you want I resend or something else just let me know please.
>
I don't remember the specifics but I think the patches have the
necessary acks from me to go through the mfd tree (didn't we agree on
that ?)
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [rtc-linux] Re: [PATCH v4 0/2] Add support for cros-ec-rtc driver.
2017-12-12 16:05 ` [rtc-linux] " Alexandre Belloni
(?)
@ 2017-12-12 17:05 ` Alexandre Belloni
2017-12-13 7:55 ` Lee Jones
-1 siblings, 1 reply; 24+ messages in thread
From: Alexandre Belloni @ 2017-12-12 17:05 UTC (permalink / raw)
To: Enric Balletbo Serra
Cc: Enric Balletbo i Serra, Alessandro Zummo, Lee Jones,
Benson Leung, Guenter Roeck, Gwendal Grignou, linux-kernel,
linux-iio, rtc-linux
On 12/12/2017 at 17:05:37 +0100, Alexandre Belloni wrote:
> On 12/12/2017 at 16:41:39 +0100, Enric Balletbo Serra wrote:
> > + Alessandro Zummo
> > + Alexandre Belloni
> >
> > 2017-11-10 22:55 GMT+01:00 Enric Balletbo i Serra
> > <enric.balletbo@collabora.com>:
> > > Dear all,
> > >
> > > This is an attempt to revive some patches from that [1] patchset, some
> > > of them are still under discussion but I think there is no reason to not
> > > have the other two in this fourth version to land upstream meanwhile we
> > > discuss about the others.
> > >
> > > [1] https://lkml.org/lkml/2017/7/12/182
> > >
> > > Changes since v3:
> > > * Rebased an retested with current mainline using a Samsung Chromebook Plus
> > > * Removed from patchset
> > > * 1/4 mfd: cros_ec: Get rid of cros_ec_check_features from cros_ec_dev.
> > > * 4/4 mfd: cros_ec: add RTC as mfd subdevice.
> > >
> > > Changes since v2:
> > > - Rebase on top of mainline.
> > > - Removed patch 'mfd: cros-ec: Fix host command buffer size' from series
> > > as was already picked.
> > >
> > > Changes since v1:
> > > - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
> > > calibbias data' from series as was already picked.
> > > - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
> > > calibbias data' from series as was already picked.
> > > - Patch 2/5: Acked-by: Jonathan Cameron <***@kernel.org>
> > >
> > > Best regards,
> > >
> > > Enric
> > >
> > > Stephen Barber (2):
> > > mfd: cros_ec: Introduce RTC commands and events definitions.
> > > rtc: cros-ec: add cros-ec-rtc driver.
> > >
> > > drivers/rtc/Kconfig | 10 +
> > > drivers/rtc/Makefile | 1 +
> > > drivers/rtc/rtc-cros-ec.c | 413 +++++++++++++++++++++++++++++++++++
> > > include/linux/mfd/cros_ec_commands.h | 8 +
> > > 4 files changed, 432 insertions(+)
> > > create mode 100644 drivers/rtc/rtc-cros-ec.c
> > >
> > > --
> > > 2.9.3
> > >
> >
> > Sorry, I just noticed that my script to add the email recipients
> > failed and I did not add the RTC maintainers :( So this is a gentle
> > ping cc'ing the maintainers to take in consideration these patches. If
> > you want I resend or something else just let me know please.
> >
>
> I don't remember the specifics but I think the patches have the
> necessary acks from me to go through the mfd tree (didn't we agree on
> that ?)
>
This was the reply from Lee a while ago:
> On Wed, 18 Jan 2017, Alexandre Belloni wrote:
> > I don't think that one has your ack, is it ok for me to take it?
>
> This set looks MFD heavy, so it's probably best that the set goes
> through MFD. Once the RTC patch has been fixed of course.
The series doesn't look MFD heavy anymore so it can also go through my
tree. I'll let Lee decide.
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [rtc-linux] Re: [PATCH v4 0/2] Add support for cros-ec-rtc driver.
2017-12-12 17:05 ` Alexandre Belloni
@ 2017-12-13 7:55 ` Lee Jones
0 siblings, 0 replies; 24+ messages in thread
From: Lee Jones @ 2017-12-13 7:55 UTC (permalink / raw)
To: Alexandre Belloni
Cc: Enric Balletbo Serra, Enric Balletbo i Serra, Alessandro Zummo,
Benson Leung, Guenter Roeck, Gwendal Grignou, linux-kernel,
linux-iio, rtc-linux
On Tue, 12 Dec 2017, Alexandre Belloni wrote:
> On 12/12/2017 at 17:05:37 +0100, Alexandre Belloni wrote:
> > On 12/12/2017 at 16:41:39 +0100, Enric Balletbo Serra wrote:
> > > + Alessandro Zummo
> > > + Alexandre Belloni
> > >
> > > 2017-11-10 22:55 GMT+01:00 Enric Balletbo i Serra
> > > <enric.balletbo@collabora.com>:
> > > > Dear all,
> > > >
> > > > This is an attempt to revive some patches from that [1] patchset, some
> > > > of them are still under discussion but I think there is no reason to not
> > > > have the other two in this fourth version to land upstream meanwhile we
> > > > discuss about the others.
> > > >
> > > > [1] https://lkml.org/lkml/2017/7/12/182
> > > >
> > > > Changes since v3:
> > > > * Rebased an retested with current mainline using a Samsung Chromebook Plus
> > > > * Removed from patchset
> > > > * 1/4 mfd: cros_ec: Get rid of cros_ec_check_features from cros_ec_dev.
> > > > * 4/4 mfd: cros_ec: add RTC as mfd subdevice.
> > > >
> > > > Changes since v2:
> > > > - Rebase on top of mainline.
> > > > - Removed patch 'mfd: cros-ec: Fix host command buffer size' from series
> > > > as was already picked.
> > > >
> > > > Changes since v1:
> > > > - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
> > > > calibbias data' from series as was already picked.
> > > > - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
> > > > calibbias data' from series as was already picked.
> > > > - Patch 2/5: Acked-by: Jonathan Cameron <***@kernel.org>
> > > >
> > > > Best regards,
> > > >
> > > > Enric
> > > >
> > > > Stephen Barber (2):
> > > > mfd: cros_ec: Introduce RTC commands and events definitions.
> > > > rtc: cros-ec: add cros-ec-rtc driver.
> > > >
> > > > drivers/rtc/Kconfig | 10 +
> > > > drivers/rtc/Makefile | 1 +
> > > > drivers/rtc/rtc-cros-ec.c | 413 +++++++++++++++++++++++++++++++++++
> > > > include/linux/mfd/cros_ec_commands.h | 8 +
> > > > 4 files changed, 432 insertions(+)
> > > > create mode 100644 drivers/rtc/rtc-cros-ec.c
> > > >
> > > >
> > >
> > > Sorry, I just noticed that my script to add the email recipients
> > > failed and I did not add the RTC maintainers :( So this is a gentle
> > > ping cc'ing the maintainers to take in consideration these patches. If
> > > you want I resend or something else just let me know please.
> > >
> >
> > I don't remember the specifics but I think the patches have the
> > necessary acks from me to go through the mfd tree (didn't we agree on
> > that ?)
> >
>
> This was the reply from Lee a while ago:
>
> > On Wed, 18 Jan 2017, Alexandre Belloni wrote:
> > > I don't think that one has your ack, is it ok for me to take it?
> >
> > This set looks MFD heavy, so it's probably best that the set goes
> > through MFD. Once the RTC patch has been fixed of course.
>
> The series doesn't look MFD heavy anymore so it can also go through my
> tree. I'll let Lee decide.
Fine by me.
--
Lee Jones
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [rtc-linux] Re: [PATCH v4 0/2] Add support for cros-ec-rtc driver.
@ 2017-12-13 7:55 ` Lee Jones
0 siblings, 0 replies; 24+ messages in thread
From: Lee Jones @ 2017-12-13 7:55 UTC (permalink / raw)
To: Alexandre Belloni
Cc: Enric Balletbo Serra, Enric Balletbo i Serra, Alessandro Zummo,
Benson Leung, Guenter Roeck, Gwendal Grignou, linux-kernel,
linux-iio, rtc-linux
On Tue, 12 Dec 2017, Alexandre Belloni wrote:
> On 12/12/2017 at 17:05:37 +0100, Alexandre Belloni wrote:
> > On 12/12/2017 at 16:41:39 +0100, Enric Balletbo Serra wrote:
> > > + Alessandro Zummo
> > > + Alexandre Belloni
> > >=20
> > > 2017-11-10 22:55 GMT+01:00 Enric Balletbo i Serra
> > > <enric.balletbo@collabora.com>:
> > > > Dear all,
> > > >
> > > > This is an attempt to revive some patches from that [1] patchset, s=
ome
> > > > of them are still under discussion but I think there is no reason t=
o not
> > > > have the other two in this fourth version to land upstream meanwhil=
e we
> > > > discuss about the others.
> > > >
> > > > [1] https://lkml.org/lkml/2017/7/12/182
> > > >
> > > > Changes since v3:
> > > > * Rebased an retested with current mainline using a Samsung Chromeb=
ook Plus
> > > > * Removed from patchset
> > > > * 1/4 mfd: cros_ec: Get rid of cros_ec_check_features from cros_e=
c_dev.
> > > > * 4/4 mfd: cros_ec: add RTC as mfd subdevice.
> > > >
> > > > Changes since v2:
> > > > - Rebase on top of mainline.
> > > > - Removed patch 'mfd: cros-ec: Fix host command buffer size' from s=
eries
> > > > as was already picked.
> > > >
> > > > Changes since v1:
> > > > - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw =
and
> > > > calibbias data' from series as was already picked.
> > > > - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw =
and
> > > > calibbias data' from series as was already picked.
> > > > - Patch 2/5: Acked-by: Jonathan Cameron <***@kernel.org>
> > > >
> > > > Best regards,
> > > >
> > > > Enric
> > > >
> > > > Stephen Barber (2):
> > > > mfd: cros_ec: Introduce RTC commands and events definitions.
> > > > rtc: cros-ec: add cros-ec-rtc driver.
> > > >
> > > > drivers/rtc/Kconfig | 10 +
> > > > drivers/rtc/Makefile | 1 +
> > > > drivers/rtc/rtc-cros-ec.c | 413 +++++++++++++++++++++++=
++++++++++++
> > > > include/linux/mfd/cros_ec_commands.h | 8 +
> > > > 4 files changed, 432 insertions(+)
> > > > create mode 100644 drivers/rtc/rtc-cros-ec.c
> > > >
> > > >
> > >=20
> > > Sorry, I just noticed that my script to add the email recipients
> > > failed and I did not add the RTC maintainers :( So this is a gentle
> > > ping cc'ing the maintainers to take in consideration these patches. I=
f
> > > you want I resend or something else just let me know please.
> > >=20
> >=20
> > I don't remember the specifics but I think the patches have the
> > necessary acks from me to go through the mfd tree (didn't we agree on
> > that ?)
> >=20
>=20
> This was the reply from Lee a while ago:
>=20
> > On Wed, 18 Jan 2017, Alexandre Belloni wrote:
> > > I don't think that one has your ack, is it ok for me to take it?
> >=20
> > This set looks MFD heavy, so it's probably best that the set goes
> > through MFD. Once the RTC patch has been fixed of course.
>=20
> The series doesn't look MFD heavy anymore so it can also go through my
> tree. I'll let Lee decide.
Fine by me.
--=20
Lee Jones
Linaro Services Technical Lead
Linaro.org =E2=94=82 Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--=20
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---=20
You received this message because you are subscribed to the Google Groups "=
rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v4 1/2] mfd: cros_ec: Introduce RTC commands and events definitions.
2017-11-10 21:55 ` [rtc-linux] " Enric Balletbo i Serra
@ 2017-12-16 4:55 ` Brian Norris
-1 siblings, 0 replies; 24+ messages in thread
From: Brian Norris @ 2017-12-16 4:55 UTC (permalink / raw)
To: Enric Balletbo i Serra, Alessandro Zummo, Alexandre Belloni
Cc: Lee Jones, bleung, Guenter Roeck, Gwendal Grignou, linux-kernel,
linux-iio, rtc-linux, Stephen Barber
Hi,
On Fri, Nov 10, 2017 at 10:55:52PM +0100, Enric Balletbo i Serra wrote:
> From: Stephen Barber <smbarber@chromium.org>
>
> The EC can function as a simple RT, this patch adds the RTC related
> definitions needed by the rtc-cros-ec driver.
>
> Signed-off-by: Stephen Barber <smbarber@chromium.org>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Acked-by: Lee Jones <lee.jones@linaro.org>
> Acked-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
I guess this is waiting to get merged by an RTC maintainer, since it's a
dependency for the RTC driver in patch 2? Alessandro or Alexandre, any
thoughts?
Brian
> ---
> include/linux/mfd/cros_ec_commands.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h
> index 2b16e95..c6046a2 100644
> --- a/include/linux/mfd/cros_ec_commands.h
> +++ b/include/linux/mfd/cros_ec_commands.h
> @@ -291,6 +291,9 @@ enum host_event_code {
> /* EC desires to change state of host-controlled USB mux */
> EC_HOST_EVENT_USB_MUX = 28,
>
> + /* EC RTC event occurred */
> + EC_HOST_EVENT_RTC = 26,
> +
> /*
> * The high bit of the event mask is not used as a host event code. If
> * it reads back as set, then the entire event mask should be
> @@ -799,6 +802,8 @@ enum ec_feature_code {
> EC_FEATURE_USB_MUX = 23,
> /* Motion Sensor code has an internal software FIFO */
> EC_FEATURE_MOTION_SENSE_FIFO = 24,
> + /* EC has RTC feature that can be controlled by host commands */
> + EC_FEATURE_RTC = 27,
> };
>
> #define EC_FEATURE_MASK_0(event_code) (1UL << (event_code % 32))
> @@ -1709,6 +1714,9 @@ struct ec_response_rtc {
> #define EC_CMD_RTC_SET_VALUE 0x46
> #define EC_CMD_RTC_SET_ALARM 0x47
>
> +/* Pass as param to SET_ALARM to clear the current alarm */
> +#define EC_RTC_ALARM_CLEAR 0
> +
> /*****************************************************************************/
> /* Port80 log access */
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [rtc-linux] Re: [PATCH v4 1/2] mfd: cros_ec: Introduce RTC commands and events definitions.
@ 2017-12-16 4:55 ` Brian Norris
0 siblings, 0 replies; 24+ messages in thread
From: Brian Norris @ 2017-12-16 4:55 UTC (permalink / raw)
To: Enric Balletbo i Serra, Alessandro Zummo, Alexandre Belloni
Cc: Lee Jones, bleung, Guenter Roeck, Gwendal Grignou, linux-kernel,
linux-iio, rtc-linux, Stephen Barber
Hi,
On Fri, Nov 10, 2017 at 10:55:52PM +0100, Enric Balletbo i Serra wrote:
> From: Stephen Barber <smbarber@chromium.org>
>
> The EC can function as a simple RT, this patch adds the RTC related
> definitions needed by the rtc-cros-ec driver.
>
> Signed-off-by: Stephen Barber <smbarber@chromium.org>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Acked-by: Lee Jones <lee.jones@linaro.org>
> Acked-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
I guess this is waiting to get merged by an RTC maintainer, since it's a
dependency for the RTC driver in patch 2? Alessandro or Alexandre, any
thoughts?
Brian
> ---
> include/linux/mfd/cros_ec_commands.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h
> index 2b16e95..c6046a2 100644
> --- a/include/linux/mfd/cros_ec_commands.h
> +++ b/include/linux/mfd/cros_ec_commands.h
> @@ -291,6 +291,9 @@ enum host_event_code {
> /* EC desires to change state of host-controlled USB mux */
> EC_HOST_EVENT_USB_MUX = 28,
>
> + /* EC RTC event occurred */
> + EC_HOST_EVENT_RTC = 26,
> +
> /*
> * The high bit of the event mask is not used as a host event code. If
> * it reads back as set, then the entire event mask should be
> @@ -799,6 +802,8 @@ enum ec_feature_code {
> EC_FEATURE_USB_MUX = 23,
> /* Motion Sensor code has an internal software FIFO */
> EC_FEATURE_MOTION_SENSE_FIFO = 24,
> + /* EC has RTC feature that can be controlled by host commands */
> + EC_FEATURE_RTC = 27,
> };
>
> #define EC_FEATURE_MASK_0(event_code) (1UL << (event_code % 32))
> @@ -1709,6 +1714,9 @@ struct ec_response_rtc {
> #define EC_CMD_RTC_SET_VALUE 0x46
> #define EC_CMD_RTC_SET_ALARM 0x47
>
> +/* Pass as param to SET_ALARM to clear the current alarm */
> +#define EC_RTC_ALARM_CLEAR 0
> +
> /*****************************************************************************/
> /* Port80 log access */
>
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v4 2/2] rtc: cros-ec: add cros-ec-rtc driver.
2017-11-10 21:55 ` [rtc-linux] " Enric Balletbo i Serra
@ 2017-12-16 4:57 ` Brian Norris
-1 siblings, 0 replies; 24+ messages in thread
From: Brian Norris @ 2017-12-16 4:57 UTC (permalink / raw)
To: Enric Balletbo i Serra
Cc: Lee Jones, bleung, Guenter Roeck, Gwendal Grignou, linux-kernel,
linux-iio, rtc-linux, Stephen Barber
On Fri, Nov 10, 2017 at 10:55:53PM +0100, Enric Balletbo i Serra wrote:
> From: Stephen Barber <smbarber@chromium.org>
>
> On platforms with a Chrome OS EC, the EC can function as a simple RTC.
> Add a basic driver with this functionality.
>
> Signed-off-by: Stephen Barber <smbarber@chromium.org>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> Acked-by: Benson Leung <bleung@chromium.org>
> ---
> drivers/rtc/Kconfig | 10 ++
> drivers/rtc/Makefile | 1 +
> drivers/rtc/rtc-cros-ec.c | 413 ++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 424 insertions(+)
> create mode 100644 drivers/rtc/rtc-cros-ec.c
This isn't quite super-helpful without the CrOS-EC / MFD additions to
actually create the device, but it's a good start, and I don't see any
problems with it. Any reason this isn't merged? Are the RTC maintainers
intendending to merge this, or should Lee (for the MFD header)? I
thought normally Lee deferred to other subsystem maintainers when the
only "MFD" stuff was a simple header change (such as in patch 1).
Anyway, FWIW:
Reviewed-by: Brian Norris <briannorris@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [rtc-linux] Re: [PATCH v4 2/2] rtc: cros-ec: add cros-ec-rtc driver.
@ 2017-12-16 4:57 ` Brian Norris
0 siblings, 0 replies; 24+ messages in thread
From: Brian Norris @ 2017-12-16 4:57 UTC (permalink / raw)
To: Enric Balletbo i Serra
Cc: Lee Jones, bleung, Guenter Roeck, Gwendal Grignou, linux-kernel,
linux-iio, rtc-linux, Stephen Barber
On Fri, Nov 10, 2017 at 10:55:53PM +0100, Enric Balletbo i Serra wrote:
> From: Stephen Barber <smbarber@chromium.org>
>
> On platforms with a Chrome OS EC, the EC can function as a simple RTC.
> Add a basic driver with this functionality.
>
> Signed-off-by: Stephen Barber <smbarber@chromium.org>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> Acked-by: Benson Leung <bleung@chromium.org>
> ---
> drivers/rtc/Kconfig | 10 ++
> drivers/rtc/Makefile | 1 +
> drivers/rtc/rtc-cros-ec.c | 413 ++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 424 insertions(+)
> create mode 100644 drivers/rtc/rtc-cros-ec.c
This isn't quite super-helpful without the CrOS-EC / MFD additions to
actually create the device, but it's a good start, and I don't see any
problems with it. Any reason this isn't merged? Are the RTC maintainers
intendending to merge this, or should Lee (for the MFD header)? I
thought normally Lee deferred to other subsystem maintainers when the
only "MFD" stuff was a simple header change (such as in patch 1).
Anyway, FWIW:
Reviewed-by: Brian Norris <briannorris@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v4 2/2] rtc: cros-ec: add cros-ec-rtc driver.
2017-12-16 4:57 ` [rtc-linux] " Brian Norris
@ 2017-12-16 5:01 ` Brian Norris
-1 siblings, 0 replies; 24+ messages in thread
From: Brian Norris @ 2017-12-16 5:01 UTC (permalink / raw)
To: Enric Balletbo i Serra, Alessandro Zummo, Alexandre Belloni
Cc: Lee Jones, bleung, Guenter Roeck, Gwendal Grignou, linux-kernel,
linux-iio, rtc-linux, Stephen Barber
+ RTC maintainers
On Fri, Dec 15, 2017 at 08:57:50PM -0800, Brian Norris wrote:
> On Fri, Nov 10, 2017 at 10:55:53PM +0100, Enric Balletbo i Serra wrote:
> > From: Stephen Barber <smbarber@chromium.org>
> >
> > On platforms with a Chrome OS EC, the EC can function as a simple RTC.
> > Add a basic driver with this functionality.
> >
> > Signed-off-by: Stephen Barber <smbarber@chromium.org>
> > Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> > Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> > Acked-by: Benson Leung <bleung@chromium.org>
> > ---
> > drivers/rtc/Kconfig | 10 ++
> > drivers/rtc/Makefile | 1 +
> > drivers/rtc/rtc-cros-ec.c | 413 ++++++++++++++++++++++++++++++++++++++++++++++
> > 3 files changed, 424 insertions(+)
> > create mode 100644 drivers/rtc/rtc-cros-ec.c
>
> This isn't quite super-helpful without the CrOS-EC / MFD additions to
> actually create the device, but it's a good start, and I don't see any
> problems with it. Any reason this isn't merged? Are the RTC maintainers
> intendending to merge this, or should Lee (for the MFD header)? I
> thought normally Lee deferred to other subsystem maintainers when the
> only "MFD" stuff was a simple header change (such as in patch 1).
>
> Anyway, FWIW:
>
> Reviewed-by: Brian Norris <briannorris@chromium.org>
> Tested-by: Brian Norris <briannorris@chromium.org>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [rtc-linux] Re: [PATCH v4 2/2] rtc: cros-ec: add cros-ec-rtc driver.
@ 2017-12-16 5:01 ` Brian Norris
0 siblings, 0 replies; 24+ messages in thread
From: Brian Norris @ 2017-12-16 5:01 UTC (permalink / raw)
To: Enric Balletbo i Serra, Alessandro Zummo, Alexandre Belloni
Cc: Lee Jones, bleung, Guenter Roeck, Gwendal Grignou, linux-kernel,
linux-iio, rtc-linux, Stephen Barber
+ RTC maintainers
On Fri, Dec 15, 2017 at 08:57:50PM -0800, Brian Norris wrote:
> On Fri, Nov 10, 2017 at 10:55:53PM +0100, Enric Balletbo i Serra wrote:
> > From: Stephen Barber <smbarber@chromium.org>
> >
> > On platforms with a Chrome OS EC, the EC can function as a simple RTC.
> > Add a basic driver with this functionality.
> >
> > Signed-off-by: Stephen Barber <smbarber@chromium.org>
> > Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> > Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> > Acked-by: Benson Leung <bleung@chromium.org>
> > ---
> > drivers/rtc/Kconfig | 10 ++
> > drivers/rtc/Makefile | 1 +
> > drivers/rtc/rtc-cros-ec.c | 413 ++++++++++++++++++++++++++++++++++++++++++++++
> > 3 files changed, 424 insertions(+)
> > create mode 100644 drivers/rtc/rtc-cros-ec.c
>
> This isn't quite super-helpful without the CrOS-EC / MFD additions to
> actually create the device, but it's a good start, and I don't see any
> problems with it. Any reason this isn't merged? Are the RTC maintainers
> intendending to merge this, or should Lee (for the MFD header)? I
> thought normally Lee deferred to other subsystem maintainers when the
> only "MFD" stuff was a simple header change (such as in patch 1).
>
> Anyway, FWIW:
>
> Reviewed-by: Brian Norris <briannorris@chromium.org>
> Tested-by: Brian Norris <briannorris@chromium.org>
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [rtc-linux] Re: [PATCH v4 1/2] mfd: cros_ec: Introduce RTC commands and events definitions.
2017-12-16 4:55 ` [rtc-linux] " Brian Norris
(?)
@ 2017-12-16 7:36 ` Enric Balletbo Serra
2017-12-18 17:44 ` [rtc-linux] " Brian Norris
-1 siblings, 1 reply; 24+ messages in thread
From: Enric Balletbo Serra @ 2017-12-16 7:36 UTC (permalink / raw)
To: Brian Norris
Cc: Enric Balletbo i Serra, Alessandro Zummo, Alexandre Belloni,
Lee Jones, bleung, Guenter Roeck, Gwendal Grignou, linux-kernel,
linux-iio, rtc-linux, Stephen Barber
[-- Attachment #1: Type: text/plain, Size: 2852 bytes --]
Brian,
El dia 16 des. 2017 05:58, "Brian Norris" <briannorris@chromium.org> va
escriure:
Hi,
On Fri, Nov 10, 2017 at 10:55:52PM +0100, Enric Balletbo i Serra wrote:
> From: Stephen Barber <smbarber@chromium.org>
>
> The EC can function as a simple RT, this patch adds the RTC related
> definitions needed by the rtc-cros-ec driver.
>
> Signed-off-by: Stephen Barber <smbarber@chromium.org>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Acked-by: Lee Jones <lee.jones@linaro.org>
> Acked-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
I guess this is waiting to get merged by an RTC maintainer, since it's a
dependency for the RTC driver in patch 2? Alessandro or Alexandre, any
thoughts?
Guess you missed the discussion in the cover letter of this patchset ;)
These patches has been accepted and merged soon for 4.16. Alexandre will do
it.
Thanks,
Enric
Brian
> ---
> include/linux/mfd/cros_ec_commands.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/linux/mfd/cros_ec_commands.h
b/include/linux/mfd/cros_ec_commands.h
> index 2b16e95..c6046a2 100644
> --- a/include/linux/mfd/cros_ec_commands.h
> +++ b/include/linux/mfd/cros_ec_commands.h
> @@ -291,6 +291,9 @@ enum host_event_code {
> /* EC desires to change state of host-controlled USB mux */
> EC_HOST_EVENT_USB_MUX = 28,
>
> + /* EC RTC event occurred */
> + EC_HOST_EVENT_RTC = 26,
> +
> /*
> * The high bit of the event mask is not used as a host event
code. If
> * it reads back as set, then the entire event mask should be
> @@ -799,6 +802,8 @@ enum ec_feature_code {
> EC_FEATURE_USB_MUX = 23,
> /* Motion Sensor code has an internal software FIFO */
> EC_FEATURE_MOTION_SENSE_FIFO = 24,
> + /* EC has RTC feature that can be controlled by host commands */
> + EC_FEATURE_RTC = 27,
> };
>
> #define EC_FEATURE_MASK_0(event_code) (1UL << (event_code % 32))
> @@ -1709,6 +1714,9 @@ struct ec_response_rtc {
> #define EC_CMD_RTC_SET_VALUE 0x46
> #define EC_CMD_RTC_SET_ALARM 0x47
>
> +/* Pass as param to SET_ALARM to clear the current alarm */
> +#define EC_RTC_ALARM_CLEAR 0
> +
> /***********************************************************
******************/
> /* Port80 log access */
>
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #2: Type: text/html, Size: 4730 bytes --]
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v4 1/2] mfd: cros_ec: Introduce RTC commands and events definitions.
2017-12-16 7:36 ` Enric Balletbo Serra
@ 2017-12-18 17:44 ` Brian Norris
0 siblings, 0 replies; 24+ messages in thread
From: Brian Norris @ 2017-12-18 17:44 UTC (permalink / raw)
To: Enric Balletbo Serra
Cc: Enric Balletbo i Serra, Alessandro Zummo, Alexandre Belloni,
Lee Jones, bleung, Guenter Roeck, Gwendal Grignou, linux-kernel,
linux-iio, rtc-linux, Stephen Barber
On Sat, Dec 16, 2017 at 08:36:23AM +0100, Enric Balletbo Serra wrote:
> Guess you missed the discussion in the cover letter of this patchset ;)
> These patches has been accepted and merged soon for 4.16. Alexandre
> will do it.
I wasn't copied on either the patches or the cover letter; I just found
them through patchwork, which does not catalog cover letters. I also
didn't see the patches in -next.
Anyway, good to hear.
Brian
^ permalink raw reply [flat|nested] 24+ messages in thread
* [rtc-linux] Re: [PATCH v4 1/2] mfd: cros_ec: Introduce RTC commands and events definitions.
@ 2017-12-18 17:44 ` Brian Norris
0 siblings, 0 replies; 24+ messages in thread
From: Brian Norris @ 2017-12-18 17:44 UTC (permalink / raw)
To: Enric Balletbo Serra
Cc: Enric Balletbo i Serra, Alessandro Zummo, Alexandre Belloni,
Lee Jones, bleung, Guenter Roeck, Gwendal Grignou, linux-kernel,
linux-iio, rtc-linux, Stephen Barber
On Sat, Dec 16, 2017 at 08:36:23AM +0100, Enric Balletbo Serra wrote:
> Guess you missed the discussion in the cover letter of this patchset ;)
> These patches has been accepted and merged soon for 4.16. Alexandre
> will do it.
I wasn't copied on either the patches or the cover letter; I just found
them through patchwork, which does not catalog cover letters. I also
didn't see the patches in -next.
Anyway, good to hear.
Brian
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [rtc-linux] Re: [PATCH v4 0/2] Add support for cros-ec-rtc driver.
2017-12-13 7:55 ` Lee Jones
@ 2017-12-18 22:07 ` Alexandre Belloni
-1 siblings, 0 replies; 24+ messages in thread
From: Alexandre Belloni @ 2017-12-18 22:07 UTC (permalink / raw)
To: Lee Jones
Cc: Enric Balletbo Serra, Enric Balletbo i Serra, Alessandro Zummo,
Benson Leung, Guenter Roeck, Gwendal Grignou, linux-kernel,
linux-iio, rtc-linux
On 13/12/2017 at 07:55:35 +0000, Lee Jones wrote:
> On Tue, 12 Dec 2017, Alexandre Belloni wrote:
>
> > On 12/12/2017 at 17:05:37 +0100, Alexandre Belloni wrote:
> > > On 12/12/2017 at 16:41:39 +0100, Enric Balletbo Serra wrote:
> > > > + Alessandro Zummo
> > > > + Alexandre Belloni
> > > >
> > > > 2017-11-10 22:55 GMT+01:00 Enric Balletbo i Serra
> > > > <enric.balletbo@collabora.com>:
> > > > > Dear all,
> > > > >
> > > > > This is an attempt to revive some patches from that [1] patchset, some
> > > > > of them are still under discussion but I think there is no reason to not
> > > > > have the other two in this fourth version to land upstream meanwhile we
> > > > > discuss about the others.
> > > > >
> > > > > [1] https://lkml.org/lkml/2017/7/12/182
> > > > >
> > > > > Changes since v3:
> > > > > * Rebased an retested with current mainline using a Samsung Chromebook Plus
> > > > > * Removed from patchset
> > > > > * 1/4 mfd: cros_ec: Get rid of cros_ec_check_features from cros_ec_dev.
> > > > > * 4/4 mfd: cros_ec: add RTC as mfd subdevice.
> > > > >
> > > > > Changes since v2:
> > > > > - Rebase on top of mainline.
> > > > > - Removed patch 'mfd: cros-ec: Fix host command buffer size' from series
> > > > > as was already picked.
> > > > >
> > > > > Changes since v1:
> > > > > - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
> > > > > calibbias data' from series as was already picked.
> > > > > - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
> > > > > calibbias data' from series as was already picked.
> > > > > - Patch 2/5: Acked-by: Jonathan Cameron <***@kernel.org>
> > > > >
> > > > > Best regards,
> > > > >
> > > > > Enric
> > > > >
> > > > > Stephen Barber (2):
> > > > > mfd: cros_ec: Introduce RTC commands and events definitions.
> > > > > rtc: cros-ec: add cros-ec-rtc driver.
> > > > >
> > > > > drivers/rtc/Kconfig | 10 +
> > > > > drivers/rtc/Makefile | 1 +
> > > > > drivers/rtc/rtc-cros-ec.c | 413 +++++++++++++++++++++++++++++++++++
> > > > > include/linux/mfd/cros_ec_commands.h | 8 +
> > > > > 4 files changed, 432 insertions(+)
> > > > > create mode 100644 drivers/rtc/rtc-cros-ec.c
> > > > >
> > > > >
> > > >
> > > > Sorry, I just noticed that my script to add the email recipients
> > > > failed and I did not add the RTC maintainers :( So this is a gentle
> > > > ping cc'ing the maintainers to take in consideration these patches. If
> > > > you want I resend or something else just let me know please.
> > > >
> > >
> > > I don't remember the specifics but I think the patches have the
> > > necessary acks from me to go through the mfd tree (didn't we agree on
> > > that ?)
> > >
> >
> > This was the reply from Lee a while ago:
> >
> > > On Wed, 18 Jan 2017, Alexandre Belloni wrote:
> > > > I don't think that one has your ack, is it ok for me to take it?
> > >
> > > This set looks MFD heavy, so it's probably best that the set goes
> > > through MFD. Once the RTC patch has been fixed of course.
> >
> > The series doesn't look MFD heavy anymore so it can also go through my
> > tree. I'll let Lee decide.
>
> Fine by me.
>
Applied and pushed now.
Lee, if you need a immutable branch at some point, I can create one.
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [rtc-linux] Re: [PATCH v4 0/2] Add support for cros-ec-rtc driver.
@ 2017-12-18 22:07 ` Alexandre Belloni
0 siblings, 0 replies; 24+ messages in thread
From: Alexandre Belloni @ 2017-12-18 22:07 UTC (permalink / raw)
To: Lee Jones
Cc: Enric Balletbo Serra, Enric Balletbo i Serra, Alessandro Zummo,
Benson Leung, Guenter Roeck, Gwendal Grignou, linux-kernel,
linux-iio, rtc-linux
On 13/12/2017 at 07:55:35 +0000, Lee Jones wrote:
> On Tue, 12 Dec 2017, Alexandre Belloni wrote:
>
> > On 12/12/2017 at 17:05:37 +0100, Alexandre Belloni wrote:
> > > On 12/12/2017 at 16:41:39 +0100, Enric Balletbo Serra wrote:
> > > > + Alessandro Zummo
> > > > + Alexandre Belloni
> > > >
> > > > 2017-11-10 22:55 GMT+01:00 Enric Balletbo i Serra
> > > > <enric.balletbo@collabora.com>:
> > > > > Dear all,
> > > > >
> > > > > This is an attempt to revive some patches from that [1] patchset, some
> > > > > of them are still under discussion but I think there is no reason to not
> > > > > have the other two in this fourth version to land upstream meanwhile we
> > > > > discuss about the others.
> > > > >
> > > > > [1] https://lkml.org/lkml/2017/7/12/182
> > > > >
> > > > > Changes since v3:
> > > > > * Rebased an retested with current mainline using a Samsung Chromebook Plus
> > > > > * Removed from patchset
> > > > > * 1/4 mfd: cros_ec: Get rid of cros_ec_check_features from cros_ec_dev.
> > > > > * 4/4 mfd: cros_ec: add RTC as mfd subdevice.
> > > > >
> > > > > Changes since v2:
> > > > > - Rebase on top of mainline.
> > > > > - Removed patch 'mfd: cros-ec: Fix host command buffer size' from series
> > > > > as was already picked.
> > > > >
> > > > > Changes since v1:
> > > > > - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
> > > > > calibbias data' from series as was already picked.
> > > > > - Removed patch 'iio: cros_ec_sensors: Fix return value to get raw and
> > > > > calibbias data' from series as was already picked.
> > > > > - Patch 2/5: Acked-by: Jonathan Cameron <***@kernel.org>
> > > > >
> > > > > Best regards,
> > > > >
> > > > > Enric
> > > > >
> > > > > Stephen Barber (2):
> > > > > mfd: cros_ec: Introduce RTC commands and events definitions.
> > > > > rtc: cros-ec: add cros-ec-rtc driver.
> > > > >
> > > > > drivers/rtc/Kconfig | 10 +
> > > > > drivers/rtc/Makefile | 1 +
> > > > > drivers/rtc/rtc-cros-ec.c | 413 +++++++++++++++++++++++++++++++++++
> > > > > include/linux/mfd/cros_ec_commands.h | 8 +
> > > > > 4 files changed, 432 insertions(+)
> > > > > create mode 100644 drivers/rtc/rtc-cros-ec.c
> > > > >
> > > > >
> > > >
> > > > Sorry, I just noticed that my script to add the email recipients
> > > > failed and I did not add the RTC maintainers :( So this is a gentle
> > > > ping cc'ing the maintainers to take in consideration these patches. If
> > > > you want I resend or something else just let me know please.
> > > >
> > >
> > > I don't remember the specifics but I think the patches have the
> > > necessary acks from me to go through the mfd tree (didn't we agree on
> > > that ?)
> > >
> >
> > This was the reply from Lee a while ago:
> >
> > > On Wed, 18 Jan 2017, Alexandre Belloni wrote:
> > > > I don't think that one has your ack, is it ok for me to take it?
> > >
> > > This set looks MFD heavy, so it's probably best that the set goes
> > > through MFD. Once the RTC patch has been fixed of course.
> >
> > The series doesn't look MFD heavy anymore so it can also go through my
> > tree. I'll let Lee decide.
>
> Fine by me.
>
Applied and pushed now.
Lee, if you need a immutable branch at some point, I can create one.
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2017-12-18 22:07 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-10 21:55 [PATCH v4 0/2] Add support for cros-ec-rtc driver Enric Balletbo i Serra
2017-11-10 21:55 ` [rtc-linux] " Enric Balletbo i Serra
2017-11-10 21:55 ` [PATCH v4 1/2] mfd: cros_ec: Introduce RTC commands and events definitions Enric Balletbo i Serra
2017-11-10 21:55 ` [rtc-linux] " Enric Balletbo i Serra
2017-12-16 4:55 ` Brian Norris
2017-12-16 4:55 ` [rtc-linux] " Brian Norris
2017-12-16 7:36 ` Enric Balletbo Serra
2017-12-18 17:44 ` Brian Norris
2017-12-18 17:44 ` [rtc-linux] " Brian Norris
2017-11-10 21:55 ` [PATCH v4 2/2] rtc: cros-ec: add cros-ec-rtc driver Enric Balletbo i Serra
2017-11-10 21:55 ` [rtc-linux] " Enric Balletbo i Serra
2017-12-16 4:57 ` Brian Norris
2017-12-16 4:57 ` [rtc-linux] " Brian Norris
2017-12-16 5:01 ` Brian Norris
2017-12-16 5:01 ` [rtc-linux] " Brian Norris
2017-12-12 15:41 ` [PATCH v4 0/2] Add support for " Enric Balletbo Serra
2017-12-12 15:41 ` [rtc-linux] " Enric Balletbo Serra
2017-12-12 16:05 ` Alexandre Belloni
2017-12-12 16:05 ` [rtc-linux] " Alexandre Belloni
2017-12-12 17:05 ` Alexandre Belloni
2017-12-13 7:55 ` Lee Jones
2017-12-13 7:55 ` Lee Jones
2017-12-18 22:07 ` Alexandre Belloni
2017-12-18 22:07 ` Alexandre Belloni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.