greybus: endo: Add code to validate Endo ID

Endo is described by a 16 bit value. Which represents the properties of
modules, interface and ribs on front and back of endo.

This 16 bit value can be used to find all possible pairs of modules and
interfaces and creating modules based on that.

This patch provides helpers to parse 16 bit Endo ID.

(Based on original code written by Alex Elder.)

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2 files changed
tree: 17f0f0a5a36078e9e5087d17b89e871bc829668e
  1. drivers/