diff options
author | David Lin <dtwlin@google.com> | 2016-04-07 20:15:30 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-04-07 21:37:59 -0700 |
commit | ddb10c8acc8554ffb68bdb6d80d0e277e124cb2b (patch) | |
tree | 93c3a6e93f4b5fbe6bdab7993c66863a77a55872 /drivers/staging/greybus/svc.h | |
parent | 89de9a06213240b9266f9f368a867cf90d0024bf (diff) |
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>
Diffstat (limited to 'drivers/staging/greybus/svc.h')
-rw-r--r-- | drivers/staging/greybus/svc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/greybus/svc.h b/drivers/staging/greybus/svc.h index 8950baff9aef..08f8e3705b43 100644 --- a/drivers/staging/greybus/svc.h +++ b/drivers/staging/greybus/svc.h @@ -48,6 +48,8 @@ int gb_svc_add(struct gb_svc *svc); void gb_svc_del(struct gb_svc *svc); void gb_svc_put(struct gb_svc *svc); +int gb_svc_pwrmon_intf_sample_get(struct gb_svc *svc, u8 intf_id, + u8 measurement_type, u32 *value); int gb_svc_intf_device_id(struct gb_svc *svc, u8 intf_id, u8 device_id); int gb_svc_route_create(struct gb_svc *svc, u8 intf1_id, u8 dev1_id, u8 intf2_id, u8 dev2_id); |