STM32: i2c_lld: Fix i2c slave restart behavior

When performing random reads, multiple start conditions are encountered
before a stop condition.  If this happens, txcount or rxcount will be
nonzero.

Ordinarily, this would cause the current buffer to get dropped.  Modify
the i2c LLD code to instead call the callback (if one exists) if we
get a STARTF condition when data has been received.

Signed-off-by: Sean Cross <xobs@kosagi.com>
senoko-i2c: Add header definitions for i2c logging

Since we're running without JTAG, it can be difficult to monitor
what's going on with I2C.  Add definitions to allow for logging of
I2C operations.

Define I2C_LOGGING in order to enable.

Signed-off-by: Sean Cross <xobs@kosagi.com>
senoko-i2c: Add logging support

If logging is enabled, copy records into the log buffer as I2C slave
events occur.

Signed-off-by: Sean Cross <xobs@kosagi.com>
cmd-i2clog: Add i2c log dumping command

The I2C subsystem now supports logging commands to a buffer.  Add a
command to dump this buffer.

Signed-off-by: Sean Cross <xobs@kosagi.com>
senoko-shell: Add i2clog command

Signed-off-by: Sean Cross <xobs@kosagi.com>
i2c-test: Add simple command to test I2C

Signed-off-by: Sean Cross <xobs@kosagi.com>