Skip to content

Commit

Permalink
iio: imu: st_lsm6dsx: rename st_lsm6dsx_shub_read_reg in st_lsm6dsx_s…
Browse files Browse the repository at this point in the history
…hub_read_output

Rename st_lsm6dsx_shub_read_reg routine in st_lsm6dsx_shub_read_output
since it is used to read from sensorhub channel0 output register

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  • Loading branch information
Lorenzo Bianconi authored and Jonathan Cameron committed Dec 29, 2019
1 parent 5b8343e commit 111b087
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ static void st_lsm6dsx_shub_wait_complete(struct st_lsm6dsx_hw *hw)
}

/**
* st_lsm6dsx_shub_read_reg - read i2c controller register
* st_lsm6dsx_shub_read_output - read i2c controller register
*
* Read st_lsm6dsx i2c controller register
*/
static int
st_lsm6dsx_shub_read_reg(struct st_lsm6dsx_hw *hw, u8 *data,
int len)
st_lsm6dsx_shub_read_output(struct st_lsm6dsx_hw *hw, u8 *data,
int len)
{
const struct st_lsm6dsx_shub_settings *hub_settings;
int err;
Expand Down Expand Up @@ -243,7 +243,8 @@ st_lsm6dsx_shub_read(struct st_lsm6dsx_sensor *sensor, u8 addr,

st_lsm6dsx_shub_wait_complete(hw);

err = st_lsm6dsx_shub_read_reg(hw, data, len & ST_LS6DSX_READ_OP_MASK);
err = st_lsm6dsx_shub_read_output(hw, data,
len & ST_LS6DSX_READ_OP_MASK);

st_lsm6dsx_shub_master_enable(sensor, false);

Expand Down Expand Up @@ -725,7 +726,7 @@ st_lsm6dsx_shub_check_wai(struct st_lsm6dsx_hw *hw, u8 *i2c_addr,

st_lsm6dsx_shub_wait_complete(hw);

err = st_lsm6dsx_shub_read_reg(hw, &data, sizeof(data));
err = st_lsm6dsx_shub_read_output(hw, &data, sizeof(data));

st_lsm6dsx_shub_master_enable(sensor, false);

Expand Down

0 comments on commit 111b087

Please sign in to comment.