mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
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>
24 lines
568 B
C
24 lines
568 B
C
/* 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 */
|