Skip to content

Commit

Permalink
iio: cros_ec: Add kernel-doc for cros_ec_sensors_read_lpc
Browse files Browse the repository at this point in the history
Document cros_ec_sensors_read_lpc, adding an additional note to explain
that this is the safe function for reading the EC data.

Signed-off-by: Gwendal Grignou <[email protected]>
Signed-off-by: Enric Balletbo i Serra <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
  • Loading branch information
gwendalcr authored and jic23 committed Apr 4, 2019
1 parent b921d92 commit ad9cc62
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,17 @@ static int cros_ec_sensors_read_data_unsafe(struct iio_dev *indio_dev,
return 0;
}

/**
* cros_ec_sensors_read_lpc() - read acceleration data from EC shared memory.
* @indio_dev: pointer to IIO device.
* @scan_mask: bitmap of the sensor indices to scan.
* @data: location to store data.
*
* Note: this is the safe function for reading the EC data. It guarantees
* that the data sampled was not modified by the EC while being read.
*
* Return: 0 on success, -errno on failure.
*/
int cros_ec_sensors_read_lpc(struct iio_dev *indio_dev,
unsigned long scan_mask, s16 *data)
{
Expand Down

0 comments on commit ad9cc62

Please sign in to comment.