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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user