mraa: Add flags to not setup bus pinmux
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Fri, 11 Dec 2015 16:25:06 +0000 (16:25 +0000)
committerBrendan Le Foll <brendan.le.foll@intel.com>
Mon, 14 Dec 2015 10:52:27 +0000 (10:52 +0000)
This is an attempt to make the mraa work on wide boards with minimal
board setup.

Most of the arm boards with latest kernel have pinmux already setup by
the driver and its really not necessary for mraa to check each pin and
icheck if the pinmux is required or not. Having this flag would cut lot
of code in board support and its possible to add some generic board
support which can make use of mraa easily.

Without this patch each board support has to have pins setup in there
bus structure.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
include/mraa_internal_types.h

index 8350831..7212814 100644 (file)
@@ -260,6 +260,7 @@ typedef struct _board_t {
     unsigned int def_uart_dev; /**< Position in array of defult uart */
     unsigned int uart_dev_count; /**< Usable spi Count */
     mraa_uart_dev_t uart_dev[6]; /**< Array of UARTs */
+    mraa_boolean_t no_bus_mux; /**< i2c/spi/adc/pwm/uart bus muxing setup not required */
     int pwm_default_period; /**< The default PWM period is US */
     int pwm_max_period; /**< Maximum period in us */
     int pwm_min_period; /**< Minimum period in us */