From 79c6132a6e6d9b5d00a33d7f73795cd88bd97017 Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Thu, 11 Apr 2013 13:02:27 -0700 Subject: Allow GPIO alternate function 0 gpio_set_alternate_function() used 0 to mean "normal GPIO function". But on chips like STM32L, alternate function 0 is actually a function on some pins. So change "normal GPIO function" to -1. Also add support for this on STM32L. BUG=chrome-os-partner:18343 BRANCH=none TEST=build and boot link and daisy Change-Id: I9cdd9ad91a315b616e373a0dc9a50545cf9d20fa Signed-off-by: Randall Spangler Reviewed-on: https://gerrit.chromium.org/gerrit/47903 Reviewed-by: Bill Richardson --- chip/lm4/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'chip/lm4/spi.c') diff --git a/chip/lm4/spi.c b/chip/lm4/spi.c index 09a5ec03a8..4607f7460c 100644 --- a/chip/lm4/spi.c +++ b/chip/lm4/spi.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +/* 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. */ @@ -41,7 +41,7 @@ int spi_enable(int enable) gpio_set_flags(GPIO_SPI_CSn, GPIO_HI_Z); /* PA2,4,5 normal function (high-Z GPIOs) */ - gpio_set_alternate_function(LM4_GPIO_A, 0x34, 0); + gpio_set_alternate_function(LM4_GPIO_A, 0x34, -1); } return EC_SUCCESS; -- cgit v1.2.1