Re: [PATCH v2 3/4] platform/chrome: Add cros_ec_accel_legacy driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/27/17 09:22, Thierry Escande wrote:
> From: Gwendal Grignou <gwendal@xxxxxxxxxxxx>
> 
> diff --git a/drivers/iio/accel/cros_ec_accel_legacy.c b/drivers/iio/accel/cros_ec_accel_legacy.c
> new file mode 100644
> index 0000000..3fc8185
> --- /dev/null
> +++ b/drivers/iio/accel/cros_ec_accel_legacy.c

Please use proper kernel-doc notation (or don't use /** to indicate kernel-doc).

> +/**
> + * read_ec_until_not_busy - read from EC status byte until it reads not busy.
> + *
> + * @st Pointer to state information for device.
> + * @return 8-bit status if ok, -ve on error
> + */
> +static int read_ec_until_not_busy(struct cros_ec_accel_legacy_state *st)
> +{
...
> +}

> +/**
> + * read_ec_accel_data_unsafe - read acceleration data from EC shared memory.
> + *
> + * @st Pointer to state information for device.
> + * @scan_mask Bitmap of the sensor indices to scan.
> + * @data Location to store data.
> + *
> + * Note this is the unsafe function for reading the EC data. It does not
> + * guarantee that the EC will not modify the data as it is being read in.
> + */
> +static void read_ec_accel_data_unsafe(struct cros_ec_accel_legacy_state *st,
> +				      unsigned long scan_mask, s16 *data)
> +{
...
> +}
> +

> +/**
> + * read_ec_accel_data - read acceleration data from EC shared memory.
> + *
> + * @st Pointer to state information for device.
> + * @scan_mask Bitmap of the sensor indices to scan.
> + * @data Location to store data.
> + * @return 0 if ok, -ve on error
> + *
> + * 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.
> + */
> +static int read_ec_accel_data(struct cros_ec_accel_legacy_state *st,
> +			      unsigned long scan_mask, s16 *data)
> +{
...
> +}

> +
> +/**
> + * accel_capture - the trigger handler function
> + *

This one is closer, but the function name is shortened.

> + * @irq: the interrupt number
> + * @p: private data - always a pointer to the poll func.
> + *
> + * On a trigger event occurring, if the pollfunc is attached then this
> + * handler is called as a threaded interrupt (and hence may sleep). It
> + * is responsible for grabbing data from the device and pushing it into
> + * the associated buffer.
> + */
> +static irqreturn_t cros_ec_accel_legacy_capture(int irq, void *p)
> +{


Thanks.
-- 
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux