All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gregor Riepl <onitake@gmail.com>
To: sergk sergk2mail <sergk.admin@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: How to use ACPI for touchscreen
Date: Tue, 1 Mar 2016 23:56:05 +0100	[thread overview]
Message-ID: <56D61E05.3060407@gmail.com> (raw)
In-Reply-To: <CA+V1LzpzJ1P3E_Rm4bRRegV0+ZMLs9befCXmA7PTSEn8umQsBw@mail.gmail.com>

> So, my questions are:
> 
> 1) Am I right when I am registering i2c client  mentioned in .probe
> function should be called immediately ?

Please clarify: Are you trying to configure any i2c stuff from user space? You
shouldn't do that, as the kernel will take care of everything.

The probing procedure works like this, I believe:
- Module has an ACPI HID or OF/DT matching table
- Kernel finds an entry in the DSDT or DT
- Kernel loads module with corresponding entry (if not loaded)
or
- Module is loaded manually
- Kernel calls probe() with the preconfigured device structure
- probe() fetches i2c, gpio and irq information from device structure
- probe() configures gpio, irq handler, internal stuff and input devices
- probe() starts up the device
- probe() returns

If your probe routine isn't called, there may be a mismatch, or someone
claimed the device already. Try a reboot, perhaps.

> 2) how to ensure and output all info that was taken from ACPI, as
> minimum i2cbus number and address,
>     irq

You shouldn't have to worry about that.

This line should print all the interesting information:
>     dev_warn(&client->dev, "%s: got a device named %s at address 0x%x,
> IRQ %d, flags 0x%x\n", __func__, client->name, client->addr,
> client->irq, client->flags);
If it doesn't something may have gone wrong.

> 3) how to ensure that gpios are taken? from where was taken name
> "power" for gpio?  Why exactly the name "power" ?    Looks also like I
> need one more gpio that is "reset".

"power" is a name I gave to the wakeup pin. The DSDT does not contain named
GPIOs, and AFAIK direct use of unnamed GPIOs is deprecated.

> 4) How will be created i2c-dev ? is this should be done by kernel
> automatically? I mean there is no any direct creation of device on
> predefined i2c-bus at predefined address.

Yes, the kernel will take care of that whenever it finds a matching device.



  reply	other threads:[~2016-03-01 22:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-28 22:30 How to use ACPI for touchscreen sergk sergk2mail
2016-03-01 10:02 ` Gregor Riepl
2016-03-01 16:30   ` sergk sergk2mail
2016-03-01 16:55     ` sergk sergk2mail
2016-03-02 17:52       ` Dmitry Torokhov
2016-03-02 18:13         ` sergk sergk2mail
2016-03-02 18:25           ` Gregor Riepl
2016-03-02 19:00             ` sergk sergk2mail
2016-03-02 19:01               ` sergk sergk2mail
2016-03-02 19:11               ` sergk sergk2mail
2016-03-02 21:19           ` Dmitry Torokhov
2016-03-02 23:01             ` sergk sergk2mail
2016-03-13  0:15               ` sergk sergk2mail
2016-03-01 22:32   ` sergk sergk2mail
2016-03-01 22:56     ` Gregor Riepl [this message]
2016-03-02 12:50       ` sergk sergk2mail
2016-03-02 13:07         ` Gregor Riepl
2016-03-02 15:17           ` sergk sergk2mail
2016-03-02 16:49             ` Gregor Riepl
2016-03-02 15:56           ` sergk sergk2mail

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=56D61E05.3060407@gmail.com \
    --to=onitake@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=sergk.admin@gmail.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.