From 001ef2d5000a851b4f5b3707a79b9fd449c29da7 Mon Sep 17 00:00:00 2001 From: Piotr Mienkowski Date: Thu, 31 Jan 2019 19:31:06 +0100 Subject: [PATCH] api: gpio: deprecate all gpio_port_ functions The gpio_port_ functions provided by the gpio API do not provide currently a mask parameter. As such they operate on a full port only. In practice such functions are not useful. This commit deprecates them to allow adding port functions with support for a mask parameter in the future. Signed-off-by: Piotr Mienkowski --- include/gpio.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/gpio.h b/include/gpio.h index 39526513cdf..22c65ca0b40 100644 --- a/include/gpio.h +++ b/include/gpio.h @@ -331,7 +331,8 @@ static inline int gpio_pin_disable_callback(struct device *port, u32_t pin) * @param flags Flags for the port configuration. IN/OUT, interrupt ... * @return 0 if successful, negative errno code on failure. */ -static inline int gpio_port_configure(struct device *port, int flags) +__deprecated static inline int gpio_port_configure(struct device *port, + int flags) { return gpio_config(port, GPIO_ACCESS_BY_PORT, 0, flags); } @@ -349,7 +350,7 @@ static inline int gpio_port_configure(struct device *port, int flags) * @param value Value to set on the port. * @return 0 if successful, negative errno code on failure. */ -static inline int gpio_port_write(struct device *port, u32_t value) +__deprecated static inline int gpio_port_write(struct device *port, u32_t value) { return gpio_write(port, GPIO_ACCESS_BY_PORT, 0, value); } @@ -367,7 +368,7 @@ static inline int gpio_port_write(struct device *port, u32_t value) * @param value Integer pointer to receive the data value from the port. * @return 0 if successful, negative errno code on failure. */ -static inline int gpio_port_read(struct device *port, u32_t *value) +__deprecated static inline int gpio_port_read(struct device *port, u32_t *value) { return gpio_read(port, GPIO_ACCESS_BY_PORT, 0, value); } @@ -382,7 +383,7 @@ static inline int gpio_port_read(struct device *port, u32_t *value) * are configured properly. So as a semantic detail, if no callback * is registered, of course none will be called. */ -static inline int gpio_port_enable_callback(struct device *port) +__deprecated static inline int gpio_port_enable_callback(struct device *port) { return gpio_enable_callback(port, GPIO_ACCESS_BY_PORT, 0); } @@ -392,7 +393,7 @@ static inline int gpio_port_enable_callback(struct device *port) * @param port Pointer to the device structure for the driver instance. * @return 0 if successful, negative errno code on failure. */ -static inline int gpio_port_disable_callback(struct device *port) +__deprecated static inline int gpio_port_disable_callback(struct device *port) { return gpio_disable_callback(port, GPIO_ACCESS_BY_PORT, 0); }