gbsim: define status in op header

This is the beginning of transitioning to support recording the
status of an operation request in the response message header
rather than in the response payload.

This adds the status field to the message, and uses it for
the common version operation.

Signed-off-by: Alex Elder <elder@linaro.org>
Acked-by: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Matt Porter <mporter@linaro.org>
gbsim: remove status from i2c response messages

This patch removes the status byte from i2c operation response
messages, filling it into the response header instead.

Signed-off-by: Alex Elder <elder@linaro.org>
Acked-by: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Matt Porter <mporter@linaro.org>
gbsim: remove status from gpio response messages

This patch removes the status byte from GPIO operation response
messages, filling it into the response header instead.

Signed-off-by: Alex Elder <elder@linaro.org>
Acked-by: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Matt Porter <mporter@linaro.org>
gbsim: remove status from PWM response messages

This patch removes the status byte from PWM operation response
messages, filling it into the response header instead.

Signed-off-by: Alex Elder <elder@linaro.org>
Acked-by: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Matt Porter <mporter@linaro.org>
gbsim: use little-endian in PWM requests

The PWM config request defines two 32-bit values using u32. All
over-the-wire values have to be in little-endian format.  Fix this.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
gbsim: fix byte order problems

All over-the-wire fields are required to be in little-endian format.
Most of our fields are one byte anyway, so they don't matter.
We're also working with little-endian architectures, so any
endianness problems in the code don't exhibit bad behavior.

But the code here is wrong, and this patch fixes all of the byte
order problems I could find.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
i2c: fix bug where the i2c-dev I2C_SLAVE call is executed unconditionally

In the i2c backend, the I2C_SLAVE ioctl is being executed even when running
in the software only backend mode. Make this conditional on the BeagleBone
Black backend flag to fix it.

Signed-off-by: Matt Porter <mporter@linaro.org>
gbsim: add missing copyright notice in gbsim.h

Missed the copyright notice in one file, fix that.

Signed-off-by: Matt Porter <mporter@linaro.org>