zephyr/drivers/pinmux/dev/pinmux_dev_stm32.c
David B. Kinder ac74d8b652 license: Replace Apache boilerplate with SPDX tag
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.

Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.

Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file.  Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.

Jira: ZEP-1457

Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-19 03:50:58 +00:00

82 lines
1.4 KiB
C

/*
* Copyright (c) 2016 Open-RnD Sp. z o.o.
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @brief
*
* A common driver for STM32 pinmux. Each SoC must implement a SoC
* specific part of the driver.
*/
#include <errno.h>
#include <kernel.h>
#include <device.h>
#include <soc.h>
#include "pinmux.h"
#include <pinmux.h>
#include <pinmux/stm32/pinmux_stm32.h>
static int pinmux_stm32_set(struct device *dev,
uint32_t pin, uint32_t func)
{
ARG_UNUSED(dev);
return _pinmux_stm32_set(pin, func, NULL);
}
static int pinmux_stm32_get(struct device *dev,
uint32_t pin, uint32_t *func)
{
ARG_UNUSED(dev);
ARG_UNUSED(pin);
ARG_UNUSED(func);
return -ENOTSUP;
}
static int pinmux_stm32_input(struct device *dev,
uint32_t pin,
uint8_t func)
{
ARG_UNUSED(dev);
ARG_UNUSED(pin);
ARG_UNUSED(func);
return -ENOTSUP;
}
static int pinmux_stm32_pullup(struct device *dev,
uint32_t pin,
uint8_t func)
{
ARG_UNUSED(dev);
ARG_UNUSED(pin);
ARG_UNUSED(func);
return -ENOTSUP;
}
static const struct pinmux_driver_api pinmux_stm32_api = {
.set = pinmux_stm32_set,
.get = pinmux_stm32_get,
.pullup = pinmux_stm32_pullup,
.input = pinmux_stm32_input,
};
static int pinmux_stm32_init(struct device *port)
{
ARG_UNUSED(port);
return 0;
}
DEVICE_AND_API_INIT(pmux_dev, CONFIG_PINMUX_DEV_NAME, &pinmux_stm32_init,
NULL, NULL,
PRE_KERNEL_1,
CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY,
&pinmux_stm32_api);