diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-07-11 14:30:41 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-07-11 16:51:40 -0700 |
commit | eb8920c93921122e19c1ccf682b76d45a0bda7fd (patch) | |
tree | dbf17dba2d4be2c24940369f768dd49b2e36a635 /include/wireless.h | |
parent | 6696843708b7e5cb83a6c061a76cf70cbfd2523f (diff) | |
download | chrome-ec-eb8920c93921122e19c1ccf682b76d45a0bda7fd.tar.gz |
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 <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61608
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'include/wireless.h')
-rw-r--r-- | include/wireless.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/wireless.h b/include/wireless.h new file mode 100644 index 0000000000..ca23832239 --- /dev/null +++ b/include/wireless.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* Wireless API for Chrome EC */ + +#ifndef __CROS_EC_WIRELESS_H +#define __CROS_EC_WIRELESS_H + +#include "common.h" +#include "ec_commands.h" + +/** + * Set wireless switch state. + * + * @param flags Enable flags from ec_commands.h (EC_WIRELESS_SWITCH_*), + * 0 to turn all wireless off, or -1 to turn all wireless + * on. + */ +void wireless_enable(int flags); + +#endif /* __CROS_EC_WIRELESS_H */ |