From: Hartmut Knaack <knaack.h@gmx.de>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
jic23@kernel.org
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH v1 1/2] iio: imu: inv_mpu6050: Add i2c mux for by pass
Date: Wed, 26 Nov 2014 22:43:51 +0100 [thread overview]
Message-ID: <54764997.5050708@gmx.de> (raw)
In-Reply-To: <1416333184-1367-2-git-send-email-srinivas.pandruvada@linux.intel.com>
Srinivas Pandruvada schrieb am 18.11.2014 um 18:53:
> This chip has a mode in which this chipset can be i2c master. But
> the current upstream driver doesn't support such mode as there is
> some limited support of clients, which can be connected.
>
> To attach such clients to main i2c bus chip has to be set up in
> bypass mode. Creates an i2c mux, which will enable/disable this mode.
> This was discussed for a while in mailing list, this was the decision.
>
> This change also provides an API, which allows clients to be created for
> this mux adapter.
>
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
<...>
> @@ -720,6 +871,10 @@ static int inv_mpu_probe(struct i2c_client *client,
> goto out_remove_trigger;
> }
>
> + result = inv_mpu6050_create_mux(indio_dev);
> + if (result)
> + goto out_remove_trigger;
At this point, iio_device_register(indio_dev) has successfully been called, so I think you should add an extra label and the entry iio_device_unregister(indio_dev) to the error path.
> +
> return 0;
>
> out_remove_trigger:
> @@ -734,6 +889,7 @@ static int inv_mpu_remove(struct i2c_client *client)
> struct iio_dev *indio_dev = i2c_get_clientdata(client);
> struct inv_mpu6050_state *st = iio_priv(indio_dev);
>
> + inv_mpu6050_destroy_mux(indio_dev);
> iio_device_unregister(indio_dev);
> inv_mpu6050_remove_trigger(st);
> iio_triggered_buffer_cleanup(indio_dev);
next prev parent reply other threads:[~2014-11-26 21:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 17:53 [PATCH v1 0/2] iio: imu: inv_mpu6050: Add i2c mux for by pass Srinivas Pandruvada
2014-11-18 17:53 ` [PATCH v1 1/2] " Srinivas Pandruvada
[not found] ` <1416333184-1367-2-git-send-email-srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2014-11-22 11:58 ` Jonathan Cameron
2014-11-22 11:58 ` Jonathan Cameron
[not found] ` <54707A80.90809-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-11-22 13:08 ` Wolfram Sang
2014-11-22 13:08 ` Wolfram Sang
2014-11-22 20:20 ` Srinivas Pandruvada
2014-11-22 20:20 ` Srinivas Pandruvada
2014-11-26 21:43 ` Hartmut Knaack [this message]
2014-11-18 17:53 ` [PATCH v1 2/2] iio: magnetometer: ak8975: remove INVN6500 enumeration Srinivas Pandruvada
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=54764997.5050708@gmx.de \
--to=knaack.h@gmx.de \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.