From: Ge Gao <ggao@invensense.com>
To: Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>
Cc: linux-iio@vger.kernel.org
Subject: RE: [PATCH] [PATCH V4] Invensense MPU6050 Device Driver.
Date: Mon, 14 Jan 2013 10:40:52 -0800 [thread overview]
Message-ID: <d57096712cb8f081022668d4751f12fd@mail.gmail.com> (raw)
In-Reply-To: <50C10BC2.4000704@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1323 bytes --]
RE: [PATCH] [PATCH V4] Invensense MPU6050 Device Driver.
Dear Jonanthan,
I submitted another version of driver for Invensense MPU6050 last
week. It basically fixed everything you said in the comments. It also
removed the inv_mpu_misc file, which is not useful while taking too much
spaces. However, only one thing I am not sure what to do with your comments. In
the trigger part, as the red part shown below, what that mean and what I am
supposed to do to make a “callback”. Thanks.
Best Regards,
Ge GAO
> +static int inv_mpu_data_rdy_trigger_set_state(struct iio_trigger *trig,
> + bool state)
> +{
> + struct iio_dev *indio_dev = trig->private_data;
> +
> + return set_inv_enable(indio_dev, state);
Combine the above into one line.
> +}
> +
> +static const struct iio_trigger_ops inv_mpu_trigger_ops = {
> + .owner = THIS_MODULE,
> + .set_trigger_state = &inv_mpu_data_rdy_trigger_set_state,
You need some callbacks to prevent this being attached to another
trigger...
> +};
> +
> +int inv_mpu_probe_trigger(struct iio_dev *indio_dev)
> +{
> + int ret;
> + struct inv_mpu_iio_s *st = iio_priv(indio_dev);
> +
> + st->trig = iio_trigger_alloc("%s-dev%d",
[-- Attachment #2: Type: text/html, Size: 4226 bytes --]
next prev parent reply other threads:[~2013-01-14 18:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-05 1:24 [PATCH] [PATCH V4] Invensense MPU6050 Device Driver Ge GAO
2012-12-05 12:39 ` Lars-Peter Clausen
2012-12-06 18:17 ` Ge Gao
2012-12-06 20:15 ` Lars-Peter Clausen
2012-12-06 21:18 ` Jonathan Cameron
2013-01-14 18:40 ` Ge Gao [this message]
2013-01-14 19:12 ` Jonathan Cameron
2012-12-07 23:55 ` Ge Gao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d57096712cb8f081022668d4751f12fd@mail.gmail.com \
--to=ggao@invensense.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).