mfd: cros_ec: Allow static din/dout buffers with cros_ec_register()
authorBill Richardson <wfrichar@chromium.org>
Wed, 18 Jun 2014 18:13:59 +0000 (11:13 -0700)
committerLee Jones <lee.jones@linaro.org>
Wed, 9 Jul 2014 13:58:15 +0000 (14:58 +0100)
The lower-level driver may want to provide its own buffers. If so,
there's no need to allocate new ones.  This already happens to work
just fine (since we check for size of 0 and use devm allocation), but
it's good to document it.

[dianders: Resolved conflicts; documented that no code changes needed
on mainline]

Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
include/linux/mfd/cros_ec.h

index 7e9fe6e98d2f6ae93f0a6d3e7f18297ce19da1cb..2ee3190b691ccdd35f2a49779ff6dbf43265af47 100644 (file)
@@ -68,8 +68,8 @@ struct cros_ec_msg {
  * We use this alignment to keep ARM and x86 happy. Probably word
  * alignment would be OK, there might be a small performance advantage
  * to using dword.
- * @din_size: size of din buffer
- * @dout_size: size of dout buffer
+ * @din_size: size of din buffer to allocate (zero to use static din)
+ * @dout_size: size of dout buffer to allocate (zero to use static dout)
  * @command_send: send a command
  * @command_recv: receive a command
  * @ec_name: name of EC device (e.g. 'chromeos-ec')