iio_writedev: Skip input channels
iio_writedev: Skip input channels

Calling iio_writedev without any channels specified will enable all
channels of the device. Regardless whether the channel is an input or
output channel. Change this so that input channels are skipped.

Similarly ignore explicitly specified channels if they are an input
channel.

The main advantage of this change is that iio_writedev will now exit with an
error when it is accidentally called on an IIO input device, since no
output channels will be found.

But it also future-proofs the application for a time when there is support
for devices which have both input and output channels.

Signed-off-by: Lars-Peter Clausen <3318dc5ce3e4fb7c28a0b841b6801c884e1d0896@metafoo.de>

analogdevicesinc/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio