diff options
author | David Lin <dtwlin@google.com> | 2016-04-20 16:55:08 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-04-21 10:50:56 +0900 |
commit | 9504677c9a9ef4123e4bc9fb8f6903b92453ea6f (patch) | |
tree | a2d69392373817433895285b75a24c308e655d41 /drivers/staging/greybus/svc.h | |
parent | 05a849191f964cf684777fed9ac471d59f2f18ef (diff) |
greybus: svc: add AP power measurements debugfs support
This change adds the AP Power Monitor functions to
read out all the rails power information monitored by
the SVC.
Testing Done:
- $ cat /d/greybus/1-svc/pwrmon/*/*
and validate the output with the svc stub power
monitor functions
- $ tree /d/greybus/1-svc/pwrmon
| | | |---pwrmon
| | | | |---DUMMY_RAIL_1
| | | | | |---current_now
| | | | | |---power_now
| | | | | |---voltage_now
| | | | |---DUMMY_RAIL_2
| | | | | |---current_now
| | | | | |---power_now
| | | | | |---voltage_now
| | | | |---DUMMY_RAIL_3
| | | | | |---current_now
| | | | | |---power_now
| | | | | |---voltage_now
| | | | |---DUMMY_RAIL_4
| | | | | |---current_now
| | | | | |---power_now
| | | | | |---voltage_now
Signed-off-by: David Lin <dtwlin@google.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
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 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/staging/greybus/svc.h b/drivers/staging/greybus/svc.h index 08f8e3705b43..72bc716bf2fe 100644 --- a/drivers/staging/greybus/svc.h +++ b/drivers/staging/greybus/svc.h @@ -22,6 +22,11 @@ enum gb_svc_state { struct gb_svc_watchdog; +struct svc_debugfs_pwrmon_rail { + u8 id; + struct gb_svc *svc; +}; + struct gb_svc { struct device dev; @@ -40,6 +45,11 @@ struct gb_svc { struct input_dev *input; char *input_phys; struct gb_svc_watchdog *watchdog; + + struct dentry *debugfs_dentry; + struct svc_debugfs_pwrmon_rail *pwrmon_rails; + struct gb_svc_pwrmon_rail_names_get_response *rail_names; + u8 rail_count; }; #define to_gb_svc(d) container_of(d, struct gb_svc, dev) |