aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-intel-mid.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-intel-mid.c')
-rw-r--r--drivers/i2c/busses/i2c-intel-mid.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/i2c/busses/i2c-intel-mid.c b/drivers/i2c/busses/i2c-intel-mid.c
index c71492782bbd..e828ac85cfa7 100644
--- a/drivers/i2c/busses/i2c-intel-mid.c
+++ b/drivers/i2c/busses/i2c-intel-mid.c
@@ -170,8 +170,8 @@ struct intel_mid_i2c_private {
170/* Raw Interrupt Status Register */ 170/* Raw Interrupt Status Register */
171#define IC_RAW_INTR_STAT 0x34 /* Read Only */ 171#define IC_RAW_INTR_STAT 0x34 /* Read Only */
172#define GEN_CALL (1 << 11) /* General call */ 172#define GEN_CALL (1 << 11) /* General call */
173#define START_DET (1 << 10) /* (RE)START occured */ 173#define START_DET (1 << 10) /* (RE)START occurred */
174#define STOP_DET (1 << 9) /* STOP occured */ 174#define STOP_DET (1 << 9) /* STOP occurred */
175#define ACTIVITY (1 << 8) /* Bus busy */ 175#define ACTIVITY (1 << 8) /* Bus busy */
176#define RX_DONE (1 << 7) /* Not used in Master mode */ 176#define RX_DONE (1 << 7) /* Not used in Master mode */
177#define TX_ABRT (1 << 6) /* Transmit Abort */ 177#define TX_ABRT (1 << 6) /* Transmit Abort */
@@ -375,7 +375,7 @@ static int intel_mid_i2c_disable(struct i2c_adapter *adap)
375 * I2C should be disabled prior to other register operation. If failed, an 375 * I2C should be disabled prior to other register operation. If failed, an
376 * errno is returned. Mask and Clear all interrpts, this should be done at 376 * errno is returned. Mask and Clear all interrpts, this should be done at
377 * first. Set common registers which will not be modified during normal 377 * first. Set common registers which will not be modified during normal
378 * transfers, including: controll register, FIFO threshold and clock freq. 378 * transfers, including: control register, FIFO threshold and clock freq.
379 * Check APB data width at last. 379 * Check APB data width at last.
380 */ 380 */
381static int intel_mid_i2c_hwinit(struct intel_mid_i2c_private *i2c) 381static int intel_mid_i2c_hwinit(struct intel_mid_i2c_private *i2c)
@@ -455,7 +455,7 @@ static inline bool intel_mid_i2c_address_neq(const struct i2c_msg *p1,
455 * 455 *
456 * By reading register IC_TX_ABRT_SOURCE, various transfer errors can be 456 * By reading register IC_TX_ABRT_SOURCE, various transfer errors can be
457 * distingushed. At present, no circumstances have been found out that 457 * distingushed. At present, no circumstances have been found out that
458 * multiple errors would be occured simutaneously, so we simply use the 458 * multiple errors would be occurred simutaneously, so we simply use the
459 * register value directly. 459 * register value directly.
460 * 460 *
461 * At last the error bits are cleared. (Note clear ABRT_SBYTE_NORSTRT bit need 461 * At last the error bits are cleared. (Note clear ABRT_SBYTE_NORSTRT bit need
@@ -469,7 +469,7 @@ static void intel_mid_i2c_abort(struct intel_mid_i2c_private *i2c)
469 469
470 /* Single transfer error check: 470 /* Single transfer error check:
471 * According to databook, TX/RX FIFOs would be flushed when 471 * According to databook, TX/RX FIFOs would be flushed when
472 * the abort interrupt occured. 472 * the abort interrupt occurred.
473 */ 473 */
474 if (abort & ABRT_MASTER_DIS) 474 if (abort & ABRT_MASTER_DIS)
475 dev_err(&adap->dev, 475 dev_err(&adap->dev,
@@ -569,7 +569,7 @@ static int xfer_read(struct i2c_adapter *adap, unsigned char *buf, int length)
569 * Return Values: 569 * Return Values:
570 * 0 if the read transfer succeeds 570 * 0 if the read transfer succeeds
571 * -ETIMEDOUT if we cannot read the "raw" interrupt register 571 * -ETIMEDOUT if we cannot read the "raw" interrupt register
572 * -EINVAL if a transfer abort occured 572 * -EINVAL if a transfer abort occurred
573 * 573 *
574 * For every byte, a "WRITE" command will be loaded into IC_DATA_CMD prior to 574 * For every byte, a "WRITE" command will be loaded into IC_DATA_CMD prior to
575 * data transfer. The actual "write" operation will be performed when the 575 * data transfer. The actual "write" operation will be performed when the
@@ -697,7 +697,7 @@ static int intel_mid_i2c_setup(struct i2c_adapter *adap, struct i2c_msg *pmsg)
697 * @num: number of i2c_msg 697 * @num: number of i2c_msg
698 * 698 *
699 * Return Values: 699 * Return Values:
700 * + number of messages transfered 700 * + number of messages transferred
701 * -ETIMEDOUT If cannot disable I2C controller or read IC_STATUS 701 * -ETIMEDOUT If cannot disable I2C controller or read IC_STATUS
702 * -EINVAL If the address in i2c_msg is invalid 702 * -EINVAL If the address in i2c_msg is invalid
703 * 703 *