Commit Graph

7 Commits

Author SHA1 Message Date
Kamal Heib ea0af4b6d6 staging: greybus: authentication.c: Fix alignment should match open parenthesis
Fix the following error found by checkpatch.pl:
CHECK: Alignment should match open parenthesis
+static int cap_ioctl(struct gb_cap *cap, unsigned int cmd,
+			 void __user *buf)

Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-22 11:48:06 +01:00
Greg Kroah-Hartman 863dbc52e7 staging: greybus: Remove redundant license text
Now that the SPDX tag is in all greybus files, that identifies the
license in a specific and legally-defined manner.  So the extra GPL text
wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Vaibhav Hiremath <hvaibhav.linux@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Acked-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Acked-by: David Lin <dtwlin@gmail.com>
Acked-by: Johan Hovold <johan@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Mark Greer <mgreer@animalcreek.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Acked-by: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-11 14:46:21 +01:00
Greg Kroah-Hartman eb50fd3a22 staging: greybus: add SPDX identifiers to all greybus driver files
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the drivers/staging/greybus files files with the correct SPDX
license identifier based on the license text in the file itself.  The
SPDX identifier is a legally binding shorthand, which can be used
instead of the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Vaibhav Hiremath <hvaibhav.linux@gmail.com>
Cc: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Acked-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Acked-by: David Lin <dtwlin@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Acked-by: Johan Hovold <johan@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Mark Greer <mgreer@animalcreek.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-11 14:46:20 +01:00
Masanari Iida 5f50ca98af staging: greybus: Remove duplicate include file
This patch removed duplicated include line.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03 13:01:36 +01:00
Viresh Kumar c57fbb404a greybus: firmware: Add runtime PM support
This patch implements runtime PM support for firmware management bundle.
This guarantees that the bundle will be active, while the AP or the
Module is trying to exchange any operations over any of the CPorts.

- Firmware Management CPort:

  Runtime PM get/put calls are placed around the ioctl calls, which are
  all implemented as blocking ioctls.

- Component Authentication CPort:

  Runtime PM get/put calls are placed around the ioctl calls, which are
  all implemented as blocking ioctls.

- SPI:

  Uses the interface provided by spilib.c and runtime PM get/put are
  called around connection usage.

- firmware-download:

  This is the most tricky one. All operations on this CPort are
  initiated from the Module and not from the AP. And the AP needs to do
  runtime_pm_get() before any request is received over this CPort.

  The module doesn't send any request over this connection, unless the
  AP has requested the module over firmware management CPort to download
  a firmware package over firmware download CPort.

  And so the runtime PM get/put calls around the ioctls in
  fw-management.c are sufficient to handle the firmware management CPort
  as well.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-07-26 15:29:00 -07:00
Alex Elder fc0c38b3d1 greybus: use memdup_user()
Coccinelle reports that there are two opportunities to use memdup_user()
in "authentication.c".  This patch simplifies the code in cap_ioctl() by
taking advantage of that.  Make use of a local variable "size" to improve
readability.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-07-15 09:14:27 +09:00
Viresh Kumar e3eda54d0b greybus: Add Component Authentication Protocol support
This patch adds Component Authentication Protocol support in greybus.
The purpose of the CAP protocol is to authenticate the Module hardware,
and it can only be used when it is present as part of the
firmware-management bundle, on a separate CPort.

Compile tested only.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Jun Li <li_jun@projectara.com>
Tested-by: Jun Li <li_jun@projectara.com>
Signed-off-by: Alex Elder <elder@linaro.org>
2016-07-06 17:51:32 -05:00