greybus: svc: add Interface power measurements support
authorDavid Lin <dtwlin@google.com>
Fri, 8 Apr 2016 03:15:30 +0000 (20:15 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 8 Apr 2016 04:37:59 +0000 (21:37 -0700)
commitddb10c8acc8554ffb68bdb6d80d0e277e124cb2b
tree93c3a6e93f4b5fbe6bdab7993c66863a77a55872
parent89de9a06213240b9266f9f368a867cf90d0024bf
greybus: svc: add Interface power measurements support

This change implements the AP Power Monitor functions for obtaining
current/voltage/power on a specific rail of an Interface.

Testing Done:

$ cat /sys/bus/greybus/devices/1-3/current_now
103
$ cat /sys/bus/greybus/devices/1-3/power_now
303
$ cat /sys/bus/greybus/devices/1-3/voltage_now
203

Signed-off-by: David Lin <dtwlin@google.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/Documentation/sysfs-bus-greybus
drivers/staging/greybus/greybus_protocols.h
drivers/staging/greybus/interface.c
drivers/staging/greybus/svc.c
drivers/staging/greybus/svc.h