Commit 37dff380 authored by Alessandro Rubini's avatar Alessandro Rubini

spec-fmc: disable output driver if bit is input

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 717fca7a
......@@ -181,6 +181,7 @@ static int spec_cfg_pin(struct fmc_device *fmc, int pin, int mode, int imode)
return -EINVAL;
if (mode & GPIOF_DIR_IN) {
/* 1 = input */
gennum_mask_val(spec, bit, 0, GNGPIO_OUTPUT_ENABLE);
gennum_mask_val(spec, bit, bit, GNGPIO_DIRECTION_MODE);
ret = !!(gennum_readl(spec, GNGPIO_INPUT_VALUE) & bit);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment