i2c: deprecate use of union dev_config

There are several issues with the dev_config union used as a
convenience when calling the i2c_configure api.  One, the union is well
name spaced protected and doesn't convey use with just i2c.  Second
there are assumptions of how the bits might get packed by the union
which can't be guaranteed.  Since the API takes a u32_t lets change in
tree uses to using the macros to setup a u32_t and make the union as
deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
diff --git a/include/i2c.h b/include/i2c.h
index fc014a4..9e51957 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -45,12 +45,12 @@
 /** I2C Ultra Fast Speed */
 #define I2C_SPEED_ULTRA			(0x5)
 
-/** @cond INTERNAL_HIDDEN */
 #define I2C_SPEED_SHIFT			(1)
+#define I2C_SPEED_SET(speed)		(((speed) << I2C_SPEED_SHIFT) \
+						& I2C_SPEED_MASK)
 #define I2C_SPEED_MASK			(0x7 << I2C_SPEED_SHIFT) /* 3 bits */
 #define I2C_SPEED_GET(cfg) 		(((cfg) & I2C_SPEED_MASK) \
 						>> I2C_SPEED_SHIFT)
-/** @endcond  */
 
 /** Use 10-bit addressing. */
 #define I2C_ADDR_10_BITS		(1 << 0)
@@ -94,7 +94,7 @@
 	u8_t		flags;
 };
 
-union dev_config {
+union __deprecated dev_config {
 	u32_t raw;
 	struct __bits {
 		u32_t        use_10_bit_addr : 1;