Re: [v6 12/14] iio: imu: add BNO055 serdev driver

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

 



On Mon, Jun 13, 2022 at 2:05 PM <andrea.merello@xxxxxx> wrote:
>
> From: Andrea Merello <andrea.merello@xxxxxx>
>
> Add a serdev driver for communicating to a BNO055 IMU via serial bus, and
> enable the BNO055 core driver to work in this scenario.

...

> + * This driver is besed on

based

> + *     Plantower PMS7003 particulate matter sensor driver
> + *     Which is
> + *     Copyright (c) Tomasz Duszynski <tduszyns@xxxxxxxxx>

...

> +/*
> + * Read operation overhead:
> + *  4 bytes req + 2byte resp hdr.
> + *  6 bytes = 60 bit (considering 1start + 1stop bits).
> + *  60/115200 = ~520uS + about 2500mS dealay -> ~3mS

delay

> + * In 3mS we could read back about 34 bytes that means 17 samples, this means
> + * that in case of scattered read in which the gap is 17 samples or less it is

reads

> + * still convenient to go for a burst.
> + * We have to take into account also IMU response time - IMU seems to be often
> + * reasonably quick to respond, but sometimes it seems to be in some "critical
> + * section" in which it delays handling of serial protocol. Because of this we
> + * round-up to 22, which is the max number of samples, always bursting indeed.
> + */

...

> +/*
> + * Sends a read or write command.

Send

...

> +/*
> + * Handler for received data; this is called from the reicever callback whenever

receiver

> + * it got some packet from the serial bus. The status tell us whether the

tells

> + * packet is valid (i.e. header ok && received payload len consistent wrt the
> + * header). It's now our responsability to check whether this is what we

responsibility

> + * expected, of whether we got some unexpected, yet valid, packet.
> + */

...

> +               /*
> +                * New packet.
> +                * Check for its 1st byte, that identifies the pkt type.

byte that

> +                */

-- 
With Best Regards,
Andy Shevchenko



[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