linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: simon-wM4F9T/ekXmXDw4h08c5KA@public.gmane.org
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Poulsbo I2C - /dev/i2c not seen when loading i2c-dev
Date: Wed, 6 Apr 2011 19:20:59 +0200	[thread overview]
Message-ID: <20110406192059.369c3143@endymion.delvare> (raw)
In-Reply-To: <22a6003c213a91452d2a7312e4e5ad32.squirrel-N82HvsEaY4mscnXkh+DeetBPR1lH4CV8@public.gmane.org>

On Tue, 5 Apr 2011 16:34:04 -0400, simon-wM4F9T/ekXmXDw4h08c5KA@public.gmane.org wrote:
> > Thanks for the suggestion, unfortunately there is an issue with lpc_sch
> > loading, and error is reported via dmesg.
> > --
> > [  403.809826] ACPI: resource (null) [io  0x0480-0x04bf] conflicts with
> > ACPI region PHO_ [io 0x4bc-0x4bc]
> > [  403.809834] ACPI: If an ACPI driver is available for this device, you
> > should use it instead of the native driver
> > [  403.809921] lpc_sch: probe of 0000:00:1f.0 failed with error -16
> > --
> 
> I got a bit further, if I boot the device with the 'acpi=off' kernel
> option then I can modprobe both lpc_sch and i2c_dev, at which point
> i2c-detect works fine.

As expected. but acpi=off is a little harsh. acpi_enforce_resources=no
would work too, and is less risky.

> 
> This (and the error above) suggests that something else related to ACPI is
> grabbing the interface and blocking it from use for userland i2c, hence
> "16      /* Device or resource busy */" error.
> 
> This is a prototype board, the only thing on the SMBus/I2C is a PCI-E
> socket, which shouldn't be required by ACPI. I've attached the output of
> dmidecode and acpidump, in case they contain any clues..

>From your ACPI DSDT table:

    OperationRegion (PHO, SystemIO, 0x04BC, One)
    Field (PHO, ByteAcc, NoLock, Preserve)
    {
            ,   1, 
            ,   1, 
        GPB2,   1, 
            ,   1, 
            ,   1, 
            ,   1, 
            ,   1, 
                Offset (0x01)
    }

GPB2 is used later:

    Scope (_GPE)
    {
        Method (_L0E, 0, NotSerialized)
        {
            If (PBTS)
            {
                Store (One, GPB2)
                Notify (\_SB.PWRB, 0x80)
                Store (One, PBTS)
            }
        }
    }

I don't see _L0E being called anywhere, but maybe it's a standard name
called by generic acpi subsystem code. I have no clue what this code is
doing... Maybe twiddling a GPIO bit when entering some low power mode?

Anyway, this all means two things:
* As I seem to understand that the board is developed by your own
  company, you should ask the BIOS developers what they are up to. They
  should be able to tell you if the ACPI code above is intended and
  needed, or if it can be dropped (together with the PHO operation
  region.)
* The lpc_sch driver fails to load if _any_ if its subdevices fail to
  register. In your case, it seems that the gpio subdevice couldn't get
  registered, but maybe the smbus subdevice registration would have
  succeeded. I think this behavior of the mfd subsystem is discussable.
  I would expect mfd_add_devices to register as many devices as
  possible. If this isn't going to change then I suggest changing the
  lpc_sch driver so that it registers subdevices individually and only
  fails if no subdevice could be registered.

-- 
Jean Delvare

  parent reply	other threads:[~2011-04-06 17:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-31 22:07 Poulsbo I2C - /dev/i2c not seen when loading i2c-dev simon-wM4F9T/ekXmXDw4h08c5KA
     [not found] ` <fb407773c6a76f3ffef06ff357df2118.squirrel-N82HvsEaY4mscnXkh+DeetBPR1lH4CV8@public.gmane.org>
2011-04-01 10:10   ` Jean Delvare
     [not found]     ` <20110401121027.49ce012b-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-04-05 17:05       ` simon-wM4F9T/ekXmXDw4h08c5KA
     [not found]         ` <b9ff3e86cbf2aa2c34f614adf80e7ffb.squirrel-N82HvsEaY4mscnXkh+DeetBPR1lH4CV8@public.gmane.org>
2011-04-05 20:34           ` simon-wM4F9T/ekXmXDw4h08c5KA
     [not found]             ` <22a6003c213a91452d2a7312e4e5ad32.squirrel-N82HvsEaY4mscnXkh+DeetBPR1lH4CV8@public.gmane.org>
2011-04-06 17:20               ` Jean Delvare [this message]
     [not found]                 ` <20110406192059.369c3143-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-04-08 20:11                   ` simon-wM4F9T/ekXmXDw4h08c5KA

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=20110406192059.369c3143@endymion.delvare \
    --to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=simon-wM4F9T/ekXmXDw4h08c5KA@public.gmane.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).