Re: How to use ACPI for touchscreen

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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.


--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux