Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1243681 > unrolled thread
| Started by | Wolfram Sang <wsa@the-dreams.de> |
|---|---|
| First post | 2015-10-09 23:50 +0200 |
| Last post | 2015-10-10 00:00 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [RFC v2 1/1] i2c: acpi: scan ACPI enumerated I2C mux channels Wolfram Sang <wsa@the-dreams.de> - 2015-10-09 23:50 +0200
Re: [RFC v2 1/1] i2c: acpi: scan ACPI enumerated I2C mux channels Wolfram Sang <wsa@the-dreams.de> - 2015-10-10 00:00 +0200
Re: [RFC v2 1/1] i2c: acpi: scan ACPI enumerated I2C mux channels Dustin Byford <dustin@cumulusnetworks.com> - 2015-10-10 00:00 +0200
| From | Wolfram Sang <wsa@the-dreams.de> |
|---|---|
| Date | 2015-10-09 23:50 +0200 |
| Subject | Re: [RFC v2 1/1] i2c: acpi: scan ACPI enumerated I2C mux channels |
| Message-ID | <qhNI7-655-21@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
On Fri, Aug 14, 2015 at 12:31:33PM -0700, Dustin Byford wrote:
>
> Set an ACPI companion for I2C mux channels enumerated through ACPI and
> ensure they are scanned for devices.
>
> Signed-off-by: Dustin Byford <dustin@cumulusnetworks.com>
Mika, is this one okay with you?
> ---
> drivers/i2c/i2c-core.c | 10 ++++++++++
> drivers/i2c/i2c-mux.c | 8 ++++++++
> 2 files changed, 18 insertions(+)
>
> diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
> index c83e4d1..23cc8e9 100644
> --- a/drivers/i2c/i2c-core.c
> +++ b/drivers/i2c/i2c-core.c
> @@ -171,8 +171,18 @@ static void acpi_i2c_register_devices(struct i2c_adapter *adap)
> if (!adap->dev.parent)
> return;
>
> + /*
> + * Determine where to start walking the ACPI namespace. The common
> + * case is to start at the adapter's parent device. However, in
> + * the case of a "virtual" I2C adapter created to represent a mux
> + * channel the parent dev (pointing to the mux device) does not
> + * have an ACPI handle. Walk starting at the adapter instead.
> + */
> handle = ACPI_HANDLE(adap->dev.parent);
> if (!handle)
> + handle = ACPI_HANDLE(&adap->dev);
> +
> + if (!handle)
> return;
>
> status = acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, 1,
> diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c
> index 2ba7c0f..2731b99 100644
> --- a/drivers/i2c/i2c-mux.c
> +++ b/drivers/i2c/i2c-mux.c
> @@ -25,6 +25,7 @@
> #include <linux/i2c.h>
> #include <linux/i2c-mux.h>
> #include <linux/of.h>
> +#include <linux/acpi.h>
>
> /* multiplexer per channel data */
> struct i2c_mux_priv {
> @@ -173,6 +174,13 @@ struct i2c_adapter *i2c_add_mux_adapter(struct i2c_adapter *parent,
> }
> }
>
> + /*
> + * Now try to populate the mux adapter's ACPI node.
> + */
> + if (has_acpi_companion(mux_dev))
> + acpi_preset_companion(&priv->adap.dev, ACPI_COMPANION(mux_dev),
> + chan_id);
> +
> if (force_nr) {
> priv->adap.nr = force_nr;
> ret = i2c_add_numbered_adapter(&priv->adap);
> --
> 2.1.4
>
[toc] | [next] | [standalone]
| From | Wolfram Sang <wsa@the-dreams.de> |
|---|---|
| Date | 2015-10-10 00:00 +0200 |
| Message-ID | <qhNRN-6gk-5@gated-at.bofh.it> |
| In reply to | #1243681 |
[Multipart message — attachments visible in raw view] — view raw
> I'm working on a revision that incorporates Mika's suggested patch I > think you'll want to wait just a bit for that. I'll happily do. Thanks!
[toc] | [prev] | [next] | [standalone]
| From | Dustin Byford <dustin@cumulusnetworks.com> |
|---|---|
| Date | 2015-10-10 00:00 +0200 |
| Message-ID | <qhNRN-6gk-7@gated-at.bofh.it> |
| In reply to | #1243681 |
Hi Wolfram, On Fri Oct 09 22:42, Wolfram Sang wrote: > On Fri, Aug 14, 2015 at 12:31:33PM -0700, Dustin Byford wrote: > > > > Set an ACPI companion for I2C mux channels enumerated through ACPI and > > ensure they are scanned for devices. > > > > Signed-off-by: Dustin Byford <dustin@cumulusnetworks.com> > > Mika, is this one okay with you? I'm working on a revision that incorporates Mika's suggested patch I think you'll want to wait just a bit for that. Thanks, --Dustin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web