aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2014-06-18 14:14:04 -0400
committerLee Jones <lee.jones@linaro.org>2014-07-09 09:58:18 -0400
commit5799f95a373a2752e5c732f531a6f40fe458b818 (patch)
tree70c4fcb0c05b37bab60d69dff8ce505d963fb3c4 /include/linux/mfd
parent533cec8f34778de10412dfabac991cf458ebf3c9 (diff)
mfd: cros_ec: cleanup: Remove EC wrapper functions
Remove the three wrapper functions that talk to the EC without passing all the desired arguments and just use the underlying communication function that passes everything in a struct intead. This is internal code refactoring only. Nothing should change. Signed-off-by: Bill Richardson <wfrichar@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/cros_ec.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h
index 2b0c5982dbc1..60c088055f3a 100644
--- a/include/linux/mfd/cros_ec.h
+++ b/include/linux/mfd/cros_ec.h
@@ -63,9 +63,10 @@ struct cros_ec_command {
63 * @was_wake_device: true if this device was set to wake the system from 63 * @was_wake_device: true if this device was set to wake the system from
64 * sleep at the last suspend 64 * sleep at the last suspend
65 * @event_notifier: interrupt event notifier for transport devices 65 * @event_notifier: interrupt event notifier for transport devices
66 * @command_send: send a command 66 * @cmd_xfer: send command to EC and get response
67 * @command_recv: receive a response 67 * Returns 0 if the communication succeeded, but that doesn't mean the EC
68 * @command_sendrecv: send a command and receive a response 68 * was happy with the command it got. Caller should check msg.result for
69 * the EC's result code.
69 * 70 *
70 * @priv: Private data 71 * @priv: Private data
71 * @irq: Interrupt to use 72 * @irq: Interrupt to use
@@ -83,7 +84,6 @@ struct cros_ec_command {
83 * @parent: pointer to parent device (e.g. i2c or spi device) 84 * @parent: pointer to parent device (e.g. i2c or spi device)
84 * @wake_enabled: true if this device can wake the system from sleep 85 * @wake_enabled: true if this device can wake the system from sleep
85 * @lock: one transaction at a time 86 * @lock: one transaction at a time
86 * @cmd_xfer: low-level channel to the EC
87 */ 87 */
88struct cros_ec_device { 88struct cros_ec_device {
89 89
@@ -94,13 +94,8 @@ struct cros_ec_device {
94 bool was_wake_device; 94 bool was_wake_device;
95 struct class *cros_class; 95 struct class *cros_class;
96 struct blocking_notifier_head event_notifier; 96 struct blocking_notifier_head event_notifier;
97 int (*command_send)(struct cros_ec_device *ec, 97 int (*cmd_xfer)(struct cros_ec_device *ec,
98 uint16_t cmd, void *out_buf, int out_len); 98 struct cros_ec_command *msg);
99 int (*command_recv)(struct cros_ec_device *ec,
100 uint16_t cmd, void *in_buf, int in_len);
101 int (*command_sendrecv)(struct cros_ec_device *ec,
102 uint16_t cmd, void *out_buf, int out_len,
103 void *in_buf, int in_len);
104 99
105 /* These are used to implement the platform-specific interface */ 100 /* These are used to implement the platform-specific interface */
106 void *priv; 101 void *priv;
@@ -112,8 +107,6 @@ struct cros_ec_device {
112 struct device *parent; 107 struct device *parent;
113 bool wake_enabled; 108 bool wake_enabled;
114 struct mutex lock; 109 struct mutex lock;
115 int (*cmd_xfer)(struct cros_ec_device *ec,
116 struct cros_ec_command *msg);
117}; 110};
118 111
119/** 112/**