From eb8920c93921122e19c1ccf682b76d45a0bda7fd Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Thu, 11 Jul 2013 14:30:41 -0700 Subject: Split wireless power/radio control out of switch.c Chipset control of wireless power uses the new API instead of overriding the wireless power itself. Refactor board-specific support for it to just a few config #defines instead of board-specific functions. This makes some assumptions about the polarity of the enable signals. Not making those assumptions would require defining an array of structs or some other heavier-weight board-specific info. Since the assumptions hold for all current boards, let's make them now because this is a step in the right direction, and reserve doing something more general until we actually have a use case for it (so we build in just the flexibility we need). BUG=chrome-os-partner:18343 BRANCH=none TEST=build all platforms; see that link wifi turns on at boot and off at shutdown (verify via 'gpioget' from EC console) Change-Id: Ic036e76158198d2d5e3dd244c3c7b9b1e8d62982 Signed-off-by: Randall Spangler Reviewed-on: https://gerrit.chromium.org/gerrit/61608 Reviewed-by: Bill Richardson --- util/ectool.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'util') diff --git a/util/ectool.c b/util/ectool.c index eafe2e5d93..70edcf3329 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -2041,9 +2041,10 @@ int cmd_wireless(int argc, char *argv[]) if (argc != 2) { fprintf(stderr, "Usage: %s \n", argv[0]); - fprintf(stderr, " 0x1 = WLAN\n" - " 0x2 = Bluetooth\n" - " 0x4 = WWAN\n"); + fprintf(stderr, " 0x1 = WLAN radio\n" + " 0x2 = Bluetooth radio\n" + " 0x4 = WWAN power\n" + " 0x8 = WLAN power\n"); return -1; } p.enabled = strtol(argv[1], &e, 0); -- cgit v1.2.1