mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 10:00:51 +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>
31 lines
684 B
C
31 lines
684 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.
|
|
*/
|
|
|
|
/* Switch module for Chrome EC */
|
|
|
|
#ifndef __CROS_EC_SWITCH_H
|
|
#define __CROS_EC_SWITCH_H
|
|
|
|
#include "common.h"
|
|
#include "gpio.h"
|
|
|
|
#ifdef HAS_TASK_SWITCH
|
|
/**
|
|
* Interrupt handler for switch inputs.
|
|
*
|
|
* @param signal Signal which triggered the interrupt.
|
|
*/
|
|
void switch_interrupt(enum gpio_signal signal);
|
|
#else
|
|
#define switch_interrupt NULL
|
|
#endif /* HAS_TASK_SWITCH */
|
|
|
|
/**
|
|
* Return non-zero if write protect signal is asserted.
|
|
*/
|
|
int switch_get_write_protect(void);
|
|
|
|
#endif /* __CROS_EC_SWITCH_H */
|