diff options
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/designware_i2c.c | 8 | ||||
-rw-r--r-- | drivers/i2c/designware_i2c.h | 2 | ||||
-rw-r--r-- | drivers/i2c/i2c-uclass.c | 4 | ||||
-rw-r--r-- | drivers/i2c/mvtwsi.c | 30 | ||||
-rw-r--r-- | drivers/i2c/octeon_i2c.c | 30 | ||||
-rw-r--r-- | drivers/i2c/s3c24x0_i2c.c | 2 |
6 files changed, 38 insertions, 38 deletions
diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c index d95f77649e..1aae6b64ba 100644 --- a/drivers/i2c/designware_i2c.c +++ b/drivers/i2c/designware_i2c.c @@ -57,7 +57,7 @@ enum { * * @ic_clk: Input clock in Hz * @period_ns: Period to represent, in ns - * @return calculated count + * Return: calculated count */ static uint calc_counts(uint ic_clk, uint period_ns) { @@ -123,7 +123,7 @@ static const struct i2c_mode_info info_for_mode[] = { * @ic_clk: IC clock speed in Hz * @spk_cnt: Spike-suppression count * @config: Returns value to use - * @return 0 if OK, -EINVAL if the calculation failed due to invalid data + * Return: 0 if OK, -EINVAL if the calculation failed due to invalid data */ static int dw_i2c_calc_timing(struct dw_i2c *priv, enum i2c_speed_mode mode, int ic_clk, int spk_cnt, @@ -202,7 +202,7 @@ static int dw_i2c_calc_timing(struct dw_i2c *priv, enum i2c_speed_mode mode, * @speed: Required i2c speed in Hz * @bus_clk: Input clock to the I2C controller in Hz (e.g. IC_CLK) * @config: Returns the config to use for this speed - * @return 0 if OK, -ve on error + * Return: 0 if OK, -ve on error */ static int calc_bus_speed(struct dw_i2c *priv, struct i2c_regs *regs, int speed, ulong bus_clk, struct dw_i2c_speed_config *config) @@ -271,7 +271,7 @@ static int calc_bus_speed(struct dw_i2c *priv, struct i2c_regs *regs, int speed, * @i2c_base: Registers for the I2C controller * @speed: Required i2c speed in Hz * @bus_clk: Input clock to the I2C controller in Hz (e.g. IC_CLK) - * @return 0 if OK, -ve on error + * Return: 0 if OK, -ve on error */ static int _dw_i2c_set_bus_speed(struct dw_i2c *priv, struct i2c_regs *i2c_base, unsigned int speed, unsigned int bus_clk) diff --git a/drivers/i2c/designware_i2c.h b/drivers/i2c/designware_i2c.h index b56d7dd22f..a9c50c90ac 100644 --- a/drivers/i2c/designware_i2c.h +++ b/drivers/i2c/designware_i2c.h @@ -223,7 +223,7 @@ int designware_i2c_of_to_plat(struct udevice *bus); * @dev: I2C bus to check * @speed_hz: Requested speed in Hz * @config: Returns config to use for that speed - * @return 0 if OK, -ve on error + * Return: 0 if OK, -ve on error */ int dw_i2c_gen_speed_config(const struct udevice *dev, int speed_hz, struct dw_i2c_speed_config *config); diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c index 71bc2b5b8a..5539becc19 100644 --- a/drivers/i2c/i2c-uclass.c +++ b/drivers/i2c/i2c-uclass.c @@ -53,7 +53,7 @@ void i2c_dump_msgs(struct i2c_msg *msg, int nmsgs) * @offset: Byte offset within chip * @offset_buf: Place to put byte offset * @msg: Message buffer - * @return 0 if OK, -EADDRNOTAVAIL if the offset length is 0. In that case the + * Return: 0 if OK, -EADDRNOTAVAIL if the offset length is 0. In that case the * message is still set up but will not contain an offset. */ static int i2c_setup_offset(struct dm_i2c_chip *chip, uint offset, @@ -268,7 +268,7 @@ int dm_i2c_reg_clrset(struct udevice *dev, uint offset, u32 clr, u32 set) * @bus: Bus to probe * @chip_addr: Chip address to probe * @flags: Flags for the chip - * @return 0 if found, -ENOSYS if the driver is invalid, -EREMOTEIO if the chip + * Return: 0 if found, -ENOSYS if the driver is invalid, -EREMOTEIO if the chip * does not respond to probe */ static int i2c_probe_chip(struct udevice *bus, uint chip_addr, diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c index ff21e3c52b..bad4b1484f 100644 --- a/drivers/i2c/mvtwsi.c +++ b/drivers/i2c/mvtwsi.c @@ -177,7 +177,7 @@ enum mvtwsi_ack_flags { * calc_tick() - Calculate the duration of a clock cycle from the I2C speed * * @speed: The speed in Hz to calculate the clock cycle duration for. - * @return The duration of a clock cycle in ns. + * Return: The duration of a clock cycle in ns. */ inline uint calc_tick(uint speed) { @@ -192,7 +192,7 @@ inline uint calc_tick(uint speed) * twsi_get_base() - Get controller register base for specified adapter * * @adap: Adapter to get the register base for. - * @return Register base for the specified adapter. + * Return: Register base for the specified adapter. */ static struct mvtwsi_registers *twsi_get_base(struct i2c_adapter *adap) { @@ -251,7 +251,7 @@ enum mvtwsi_error_class { * @lc: The last value of the control register. * @ls: The last value of the status register. * @es: The expected value of the status register. - * @return The generated error code. + * Return: The generated error code. */ inline uint mvtwsi_error(uint ec, uint lc, uint ls, uint es) { @@ -264,7 +264,7 @@ inline uint mvtwsi_error(uint ec, uint lc, uint ls, uint es) /* * twsi_wait() - Wait for I2C bus interrupt flag and check status, or time out. * - * @return Zero if status is as expected, or a non-zero code if either a time + * Return: Zero if status is as expected, or a non-zero code if either a time * out occurred, or the status was not the expected one. */ static int twsi_wait(struct mvtwsi_registers *twsi, int expected_status, @@ -312,7 +312,7 @@ static int twsi_wait(struct mvtwsi_registers *twsi, int expected_status, * @expected_status: The I2C bus status expected to be asserted after the * operation completion. * @tick: The duration of a clock cycle at the current I2C speed. - * @return Zero if status is as expected, or a non-zero code if either a time + * Return: Zero if status is as expected, or a non-zero code if either a time * out occurred or the status was not the expected one. */ static int twsi_start(struct mvtwsi_registers *twsi, int expected_status, @@ -335,7 +335,7 @@ static int twsi_start(struct mvtwsi_registers *twsi, int expected_status, * @expected_status: The I2C bus status expected to be asserted after the * operation completion. * @tick: The duration of a clock cycle at the current I2C speed. - * @return Zero if status is as expected, or a non-zero code if either a time + * Return: Zero if status is as expected, or a non-zero code if either a time * out occurred or the status was not the expected one. */ static int twsi_send(struct mvtwsi_registers *twsi, u8 byte, @@ -360,7 +360,7 @@ static int twsi_send(struct mvtwsi_registers *twsi, u8 byte, * @ack_flag: Flag that determines whether the received byte should * be acknowledged by the controller or not (sent ACK/NAK). * @tick: The duration of a clock cycle at the current I2C speed. - * @return Zero if status is as expected, or a non-zero code if either a time + * Return: Zero if status is as expected, or a non-zero code if either a time * out occurred or the status was not the expected one. */ static int twsi_recv(struct mvtwsi_registers *twsi, u8 *byte, int ack_flag, @@ -391,7 +391,7 @@ static int twsi_recv(struct mvtwsi_registers *twsi, u8 *byte, int ack_flag, * * @twsi: The MVTWSI register structure to use. * @tick: The duration of a clock cycle at the current I2C speed. - * @return Zero if the operation succeeded, or a non-zero code if a time out + * Return: Zero if the operation succeeded, or a non-zero code if a time out * occurred. */ static int twsi_stop(struct mvtwsi_registers *twsi, uint tick) @@ -422,7 +422,7 @@ static int twsi_stop(struct mvtwsi_registers *twsi, uint tick) * * @n: Parameter 'n' for the frequency calculation algorithm. * @m: Parameter 'm' for the frequency calculation algorithm. - * @return The I2C frequency corresponding to the passed m and n parameters. + * Return: The I2C frequency corresponding to the passed m and n parameters. */ static uint twsi_calc_freq(const int n, const int m) { @@ -458,7 +458,7 @@ static void twsi_reset(struct mvtwsi_registers *twsi) * @twsi: The MVTWSI register structure to use. * @requested_speed: The desired frequency the controller should run at * in Hz. - * @return The actual frequency the controller was configured to. + * Return: The actual frequency the controller was configured to. */ static uint __twsi_i2c_set_bus_speed(struct mvtwsi_registers *twsi, uint requested_speed) @@ -500,7 +500,7 @@ static uint __twsi_i2c_set_bus_speed(struct mvtwsi_registers *twsi, * @slaveadd: The I2C address to be set for the I2C master. * @actual_speed: A output parameter that receives the actual frequency * in Hz the controller was set to by the function. - * @return Zero if the operation succeeded, or a non-zero code if a time out + * Return: Zero if the operation succeeded, or a non-zero code if a time out * occurred. */ static void __twsi_i2c_init(struct mvtwsi_registers *twsi, int speed, @@ -539,7 +539,7 @@ static void __twsi_i2c_init(struct mvtwsi_registers *twsi, int speed, * @addr: The address byte to be sent. * @tick: The duration of a clock cycle at the current * I2C speed. - * @return Zero if the operation succeeded, or a non-zero code if a time out or + * Return: Zero if the operation succeeded, or a non-zero code if a time out or * unexpected I2C status occurred. */ static int i2c_begin(struct mvtwsi_registers *twsi, int expected_start_status, @@ -571,7 +571,7 @@ static int i2c_begin(struct mvtwsi_registers *twsi, int expected_start_status, * @twsi: The MVTWSI register structure to use. * @chip: The chip address to probe. * @tick: The duration of a clock cycle at the current I2C speed. - * @return Zero if the operation succeeded, or a non-zero code if a time out or + * Return: Zero if the operation succeeded, or a non-zero code if a time out or * unexpected I2C status occurred. */ static int __twsi_i2c_probe_chip(struct mvtwsi_registers *twsi, uchar chip, @@ -610,7 +610,7 @@ static int __twsi_i2c_probe_chip(struct mvtwsi_registers *twsi, uchar chip, * a size of at least 'length' bytes). * @length: The amount of data to be read from the chip in bytes. * @tick: The duration of a clock cycle at the current I2C speed. - * @return Zero if the operation succeeded, or a non-zero code if a time out or + * Return: Zero if the operation succeeded, or a non-zero code if a time out or * unexpected I2C status occurred. */ static int __twsi_i2c_read(struct mvtwsi_registers *twsi, uchar chip, @@ -659,7 +659,7 @@ static int __twsi_i2c_read(struct mvtwsi_registers *twsi, uchar chip, * @data: The buffer containing the data to be sent to the chip. * @length: The length of data to be sent to the chip in bytes. * @tick: The duration of a clock cycle at the current I2C speed. - * @return Zero if the operation succeeded, or a non-zero code if a time out or + * Return: Zero if the operation succeeded, or a non-zero code if a time out or * unexpected I2C status occurred. */ static int __twsi_i2c_write(struct mvtwsi_registers *twsi, uchar chip, diff --git a/drivers/i2c/octeon_i2c.c b/drivers/i2c/octeon_i2c.c index ea2cc33f9d..50199ff46e 100644 --- a/drivers/i2c/octeon_i2c.c +++ b/drivers/i2c/octeon_i2c.c @@ -193,7 +193,7 @@ static int twsi_stop(void *base); * * @code status code * @final_read true if this is the final read operation - * @return true if arbitration has been lost, false if it hasn't been lost. + * Return: true if arbitration has been lost, false if it hasn't been lost. */ static int twsi_i2c_lost_arb(u8 code, int final_read) { @@ -249,7 +249,7 @@ static int twsi_i2c_lost_arb(u8 code, int final_read) * * @base Base address of i2c registers * @val value to write - * @return 0 for success, otherwise error + * Return: 0 for success, otherwise error */ static u64 twsi_write_sw(void __iomem *base, u64 val) { @@ -274,7 +274,7 @@ static u64 twsi_write_sw(void __iomem *base, u64 val) * * @base Base address of i2c registers * @val value for eia and op, etc. to read - * @return value of the register + * Return: value of the register */ static u64 twsi_read_sw(void __iomem *base, u64 val) { @@ -316,7 +316,7 @@ static void twsi_write_ctl(void __iomem *base, u8 data) * Reads the TWSI Control Register * * @base Base address for i2c - * @return 8-bit TWSI control register + * Return: 8-bit TWSI control register */ static u8 twsi_read_ctl(void __iomem *base) { @@ -334,7 +334,7 @@ static u8 twsi_read_ctl(void __iomem *base) * Read i2c status register * * @base Base address of i2c registers - * @return value of status register + * Return: value of status register */ static u8 twsi_read_status(void __iomem *base) { @@ -350,7 +350,7 @@ static u8 twsi_read_status(void __iomem *base) * Waits for an i2c operation to complete * * @param base Base address of registers - * @return 0 for success, 1 if timeout + * Return: 0 for success, 1 if timeout */ static int twsi_wait(void __iomem *base) { @@ -384,7 +384,7 @@ static int twsi_start_unstick(void __iomem *base) * Sends an i2c start condition * * @base base address of registers - * @return 0 for success, otherwise error + * Return: 0 for success, otherwise error */ static int twsi_start(void __iomem *base) { @@ -415,7 +415,7 @@ static int twsi_start(void __iomem *base) * Sends an i2c stop condition * * @base register base address - * @return 0 for success, -1 if error + * Return: 0 for success, -1 if error */ static int twsi_stop(void __iomem *base) { @@ -439,7 +439,7 @@ static int twsi_stop(void __iomem *base) * @slave_addr address of slave to write to * @buffer Pointer to buffer to write * @length Number of bytes in buffer to write - * @return 0 for success, otherwise error + * Return: 0 for success, otherwise error */ static int twsi_write_data(void __iomem *base, u8 slave_addr, u8 *buffer, unsigned int length) @@ -537,7 +537,7 @@ static void twsi_unblock(void __iomem *base) * @slave_addr i2c bus address to read from * @buffer buffer to read into * @length number of bytes to read - * @return 0 for success, otherwise error + * Return: 0 for success, otherwise error */ static int twsi_read_data(void __iomem *base, u8 slave_addr, u8 *buffer, unsigned int length) @@ -605,7 +605,7 @@ static int twsi_read_data(void __iomem *base, u8 slave_addr, * @speed Speed to set * @m_div Pointer to M divisor * @n_div Pointer to N divisor - * @return 0 for success, otherwise error + * Return: 0 for success, otherwise error */ static void twsi_calc_div(struct udevice *bus, ulong sclk, unsigned int speed, int *m_div, int *n_div) @@ -651,7 +651,7 @@ static void twsi_calc_div(struct udevice *bus, ulong sclk, unsigned int speed, * * @base Base address of twsi registers * @slave_addr I2C slave address to configure this controller to - * @return 0 for success, otherwise error + * Return: 0 for success, otherwise error */ static int twsi_init(void __iomem *base, int slaveaddr) { @@ -681,7 +681,7 @@ static int twsi_init(void __iomem *base, int slaveaddr) * @bus i2c bus to transfer data over * @msg Array of i2c messages * @nmsgs Number of messages to send/receive - * @return 0 for success, otherwise error + * Return: 0 for success, otherwise error */ static int octeon_i2c_xfer(struct udevice *bus, struct i2c_msg *msg, int nmsgs) @@ -718,7 +718,7 @@ static int octeon_i2c_xfer(struct udevice *bus, struct i2c_msg *msg, * * @bus i2c bus to transfer data over * @speed Speed in Hz to set - * @return 0 for success, otherwise error + * Return: 0 for success, otherwise error */ static int octeon_i2c_set_bus_speed(struct udevice *bus, unsigned int speed) { @@ -773,7 +773,7 @@ static const struct octeon_i2c_data i2c_octeontx2_data = { * Driver probe function * * @dev I2C device to probe - * @return 0 for success, otherwise error + * Return: 0 for success, otherwise error */ static int octeon_i2c_probe(struct udevice *dev) { diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c index e0f499d759..aaccb3aa22 100644 --- a/drivers/i2c/s3c24x0_i2c.c +++ b/drivers/i2c/s3c24x0_i2c.c @@ -27,7 +27,7 @@ DECLARE_GLOBAL_DATA_PTR; * Wait til the byte transfer is completed. * * @param i2c- pointer to the appropriate i2c register bank. - * @return I2C_OK, if transmission was ACKED + * Return: I2C_OK, if transmission was ACKED * I2C_NACK, if transmission was NACKED * I2C_NOK_TIMEOUT, if transaction did not complete in I2C_TIMEOUT_MS */ |