linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: David Scully <dscully@sbimagingsystems.com>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Subject: Re: Kernel Oops while loading I2C SSDT overlay with Designware I2C adapter
Date: Fri, 18 Nov 2016 11:38:40 +0200	[thread overview]
Message-ID: <20161118093840.GX1446@lahna.fi.intel.com> (raw)
In-Reply-To: <6d74862a-8920-f09e-6aac-d9a24614a3a3@linux.intel.com>

On Fri, Nov 18, 2016 at 11:20:36AM +0200, Jarkko Nikula wrote:
> Hi
> 
> On 16.11.2016 00:01, David Scully wrote:
> > I have written an overlay based on a mix of the DSDT for Lenovo 100s and the example in the ssdt-overlay documentation which binds the audio codec to an i2c interface using  the Synopsys Designware I2C adapter. I have attempted to load the driver via the EFI method as well as the configfs method in the documentation, but both cause an immediate kernel oops. The overlay does not cause an oops if I target bus not controlled by the DesignWare adapter.
> > 
> ...
> > SSDT Overlay: https://gist.github.com/anonymous/eddfbb85aebcda2d547ee61873fa7117
> 
> I didn't point anything obviously wrong in your SSDT but I Cc'ed also Mika
> if he notices something.

It should not have _ADR field but that is a separate thing.

> I tested the configfs method with ADXL345 on Intel Joule board which is also
> using Designware I2C adapter and on it I was able dynamically add the chip.
> I tried both v4.9.0-rc5 and v4.8.3.
> 
> > If I'm interpreting the disassembly correctly, I believe that the problem is that the aic31xx_i2c_probe's i2c_client argument is null for the i2c_adapter pointer.
> > 
> One way to debug this is to build tlv320aic31xx into the kernel with
> CONFIG_DEBUG_INFO=y and use "addr2line -e vmlinux [address]" to see the
> source line where it oopsed. I often also add debug prints around to see
> pointer values etc.
> 

If I2C device is enumerated by ACPI the i2c_device_id pointer passed to
probe function is NULL. You need to call acpi_match_device() and friends
to find out the matching entry.

BTW, as an alternative you can stick the SSDT with initrd like we do
here:

https://github.com/westeri/meta-acpi

It includes ASL samples for Joule and the machinery to generate initrd
automatically.

      reply	other threads:[~2016-11-18  9:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15 22:01 Kernel Oops while loading I2C SSDT overlay with Designware I2C adapter David Scully
2016-11-18  9:20 ` Jarkko Nikula
2016-11-18  9:38   ` Mika Westerberg [this message]

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=20161118093840.GX1446@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=dscully@sbimagingsystems.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=linux-i2c@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).