Hi Scott,
On Wed, May 10, 2017 at 2:22 AM, Scott Liu <
scot...@emc.com.tw> wrote:
> Because of I have project that porting Chromium os onto x86 win10 platform
> for touchscreen device. The device interface is i2c-hid and its i2c address,
> hid-descritpor address is also passed from BIOS to chomium's data struct.
> Because it is from BIOS so that I don't need to set device information(eg:
> i2c address, IRQ, Reset GPIO...) to DSDT.
DSDT is a part of BIOS and contains description of hardware present in
the system, including i2c addresses, interrupts, etc. The kernel ACPI
subsystem parses DSDT and initializes the devices accordingly. This is
pretty much the only way for BIOS to communicate details of
non-discoverable devices to the operating system, so I am not sure why
you think you do not need to touch DSDT.
As I mentioned in another e-mail, you can introduce a quick hack and
instantiate i2c device by hand, like
drivres/platform/chrome/chromeos-laptop.c does for some older systems,
but that has nothing to do with BIOS.
>
> Above is my imagine, please correct me if wrong.
>
> Now I would like to understand how acpi pass data to chromium data struct,
> which file I can refer. Because of my device is not able to be detected by
> chromium os and I'd like to debug it. Any advise would be appreciate,
> thanks.
See drivers/hid/i2c-hid/i2c-hid.c::i2c_hid_acpi_pdata() to see how
i2c-hid driver parses ACPI data to fetch HID descriptor address. The
client address and interrupts are parsed in the generic i2c code, see
drivers/i2c/i2c-core.c::acpi_i2c_add_device().
Thanks,
Dmitry