Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1709682
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Thierry Escande <thierry.escande@collabora.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 4/8] platform/chrome: cros_ec: register shutdown function for debugfs |
| Date | Fri, 11 Aug 2017 16:30:03 +0200 |
| Message-ID | <udj6P-4Eb-47@gated-at.bofh.it> (permalink) |
| References | <udj6O-4Eb-11@gated-at.bofh.it> |
| X-Mailer | git-send-email 2.7.4 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset = "utf-8" |
| Content-Transfert-Encoding | 8bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 44 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Joseph Lo <josephl@nvidia.com>, Gwendal Grignou <gwendal@chromium.org>, Douglas Anderson <dianders@chromium.org>, Daniel Hung-yu Wu <hywu@google.com>, Vincent Palatin <vpalatin@chromium.org>, Wei-Ning Huang <wnhuang@google.com>, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org |
| X-Original-Date | Fri, 11 Aug 2017 16:23:01 +0200 |
| X-Original-Message-ID | <1502461385-27564-5-git-send-email-thierry.escande@collabora.com> |
| X-Original-References | <1502461385-27564-1-git-send-email-thierry.escande@collabora.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1709682 |
Show key headers only | View raw
From: Daniel Hung-yu Wu <hywu@google.com>
Reboot or shutdown during delayed works could corrupt communication with
EC and certain I2C controller may not be able to recover from the error
state.
This patch registers a shutdown callback used to cancel the debugfs log
worker thread.
Signed-off-by: Daniel Hung-yu Wu <hywu@chromium.org>
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
---
drivers/platform/chrome/cros_ec_dev.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/platform/chrome/cros_ec_dev.c b/drivers/platform/chrome/cros_ec_dev.c
index 2571f5e..225d8e9 100644
--- a/drivers/platform/chrome/cros_ec_dev.c
+++ b/drivers/platform/chrome/cros_ec_dev.c
@@ -460,6 +460,14 @@ static int ec_device_remove(struct platform_device *pdev)
return 0;
}
+static void ec_device_shutdown(struct platform_device *pdev)
+{
+ struct cros_ec_dev *ec = dev_get_drvdata(&pdev->dev);
+
+ /* Be sure to clear up debugfs delayed works */
+ cros_ec_debugfs_remove(ec);
+}
+
static const struct platform_device_id cros_ec_id[] = {
{ "cros-ec-ctl", 0 },
{ /* sentinel */ },
@@ -502,6 +510,7 @@ static struct platform_driver cros_ec_dev_driver = {
},
.probe = ec_device_probe,
.remove = ec_device_remove,
+ .shutdown = ec_device_shutdown,
};
static int __init cros_ec_dev_init(void)
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/8] platform/chrome: cros_ec: Fixes and improvements Thierry Escande <thierry.escande@collabora.com> - 2017-08-11 16:30 +0200
[PATCH v2 8/8] platform/chrome: cros_ec: sysfs: Modify error handling Thierry Escande <thierry.escande@collabora.com> - 2017-08-11 16:30 +0200
[PATCH v2 4/8] platform/chrome: cros_ec: register shutdown function for debugfs Thierry Escande <thierry.escande@collabora.com> - 2017-08-11 16:30 +0200
Re: [PATCH v2 4/8] platform/chrome: cros_ec: register shutdown function for debugfs Benson Leung <bleung@google.com> - 2017-08-15 08:40 +0200
[PATCH v2 1/8] iio: cros_ec: Relax sampling frequency before suspending Thierry Escande <thierry.escande@collabora.com> - 2017-08-11 16:30 +0200
Re: [PATCH v2 1/8] iio: cros_ec: Relax sampling frequency before suspending Jonathan Cameron <jic23@kernel.org> - 2017-08-12 14:50 +0200
[PATCH v2 2/8] mfd: cros_ec_i2c: move the system sleep pm ops to late Thierry Escande <thierry.escande@collabora.com> - 2017-08-11 16:30 +0200
[PATCH v2 7/8] platform/chrome: cros_ec: Add sysfs entry to set keyboard wake lid angle Thierry Escande <thierry.escande@collabora.com> - 2017-08-11 16:30 +0200
csiph-web