GPIO: Move STM32 specific gpio_enabled_clocks

This function should not be part of the public GPIO API.  It is only
available and used in the STM32 implementation.  This moves the
prototype to a chip specific gpio.h that is used within the STM32 chip
directoy.

Signed-off-by: Anton Staaf <robotboy@chromium.org>

BRANCH=None
BUG=None
TEST=make buildall -j
     Manually verify GPIO functionality on discovery board

Change-Id: If9c97f8038b26815318652ca62c1132c95519fa2
Reviewed-on: https://chromium-review.googlesource.com/329968
Commit-Ready: Anton Staaf <robotboy@chromium.org>
Tested-by: Anton Staaf <robotboy@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
Anton Staaf
2016-03-02 09:00:43 -08:00
committed by chrome-bot
parent bb0c3687e6
commit faa870945e
4 changed files with 18 additions and 10 deletions

View File

@@ -10,7 +10,7 @@
*/
#include "common.h"
#include "gpio.h"
#include "gpio_chip.h"
#include "registers.h"
#include "util.h"

View File

@@ -8,7 +8,7 @@
#include "clock.h"
#include "common.h"
#include "console.h"
#include "gpio.h"
#include "gpio_chip.h"
#include "hooks.h"
#include "registers.h"
#include "system.h"

16
chip/stm32/gpio_chip.h Normal file
View File

@@ -0,0 +1,16 @@
/* Copyright 2016 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.
*/
#ifndef __CROS_EC_CHIP_STM32_GPIO_CHIP_H
#define __CROS_EC_CHIP_STM32_GPIO_CHIP_H
#include "include/gpio.h"
/**
* Enable GPIO peripheral clocks.
*/
void gpio_enable_clocks(void);
#endif /* __CROS_EC_CHIP_STM32_GPIO_CHIP_H */

View File

@@ -225,14 +225,6 @@ void gpio_set_flags_by_mask(uint32_t port, uint32_t mask, uint32_t flags);
*/
void gpio_set_alternate_function(uint32_t port, uint32_t mask, int func);
/**
* Enable GPIO peripheral clocks.
*
* This function is used by the GPIO implementation and should not be called
* outside of that context.
*/
void gpio_enable_clocks(void);
/* Optional board-level function to set hibernate GPIO states. */
void board_set_gpio_hibernate_state(void) __attribute__((weak));