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 <piotr.mienkowski@gmail.com>
diff --git a/include/gpio.h b/include/gpio.h
index 3952651..22c65ca 100644
--- a/include/gpio.h
+++ b/include/gpio.h
@@ -331,7 +331,8 @@
* @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 @@
* @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 @@
* @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 @@
* 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 @@
* @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);
}