Private
Public Access
2
0

maa: change dependency on direction for muxs

* Will not error if cannot set direction, as some muxes are do not have
* the direction file. If the mux really isnt in output mode the
* following write would also fail.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
Thomas Ingleby
2014-06-19 13:54:19 +01:00
parent 84d1e3ba25
commit 76971c6b0b

View File

@@ -119,8 +119,7 @@ maa_setup_mux_mapped(maa_pin_t meta)
mux_i = maa_gpio_init_raw(meta.mux[mi].pin);
if (mux_i == NULL)
return MAA_ERROR_INVALID_HANDLE;
if (maa_gpio_dir(mux_i, MAA_GPIO_OUT) != MAA_SUCCESS)
return MAA_ERROR_INVALID_RESOURCE;
maa_gpio_dir(mux_i, MAA_GPIO_OUT);
if (maa_gpio_write(mux_i, meta.mux[mi].value) != MAA_SUCCESS)
return MAA_ERROR_INVALID_RESOURCE;
}