All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: sergk sergk2mail <sergk.admin@gmail.com>
Cc: linux-input@vger.kernel.org, benjamin.tissoires@redhat.com,
	Gregor Riepl <onitake@gmail.com>
Subject: Re: How to setup Touchscreen IRQ mode?
Date: Wed, 30 Mar 2016 12:41:59 +0300	[thread overview]
Message-ID: <20160330094159.GQ2099@lahna.fi.intel.com> (raw)
In-Reply-To: <CA+V1LzqP+tzQ9b8=6xu9vjgYqM93zQXfJe5sUoYEArgzv+A5fw@mail.gmail.com>

On Wed, Mar 30, 2016 at 12:03:13AM +0000, sergk sergk2mail wrote:
> Hi Mika,
>  full acpidump of the machine is located here
> https://gitlab.com/SergK/icn8528/blob/master/DSDT/dsdt.dsl

OK, so there is only one touchscreen device and it has _STA method
looking like this:

	Method (_STA, 0, NotSerialized)  // _STA: Status
	{
		If ((OSSL & 0x80))
		{
			Return (Zero)
		}	

My guess is that that OSSL variable tells if the machine is in Android
or Windows mode or something like that. In your case it returns zero
here.

> >From Android:
> "What does 'ls -l /sys/bus/i2c/devices' show under android?"
> 1) sysi2cdev  /sys/bus/i2c/devices
> https://gitlab.com/SergK/icn8528/blob/master/Androiddata/sysi2cdev

And this explains why Android works. It initializes the I2C devices
directly from a board file.

So what you are doing probably works but instead of hardcoding in the
driver you can fill i2c_board_info from "platform specific" files like
for example here:

	arch/x86/platform/intel-mid/device_libs/platform_mpu3050.c

Translating the _CRS from ACPI TCS5 device it might look like:

	static const struct i2c_hid_platform_data pdata = {
		.hid_descriptor_address = 3, // from _DSM
	};

	static const struct i2c_board_info my_board_info[] = {
		{
			I2C_BOARD_INFO("hid", 0x30"),
			.irq = 0x44,
			.platform_data = &pdata,
		},
	};

	static int __init my_init(void)
	{
		i2c_register_board_info(3, my_board_info, ARRAY_SIZE(my_board_info));
	} 
	arch_initcall(my_init);

This should create new i2c device for i2c-hid.c.

  parent reply	other threads:[~2016-03-30  9:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21  0:43 How to setup Touchscreen IRQ mode? sergk sergk2mail
2016-03-21  0:51 ` Gregor Riepl
2016-03-27  0:05   ` sergk sergk2mail
2016-03-29  9:52     ` Mika Westerberg
2016-03-29 12:52       ` sergk sergk2mail
     [not found]       ` <CA+V1LzqzMyxoAQv=DDFvWr_MOTThVnhJwTt8uS_piwVhGJtWgQ@mail.gmail.com>
     [not found]         ` <20160329125642.GM2099@lahna.fi.intel.com>
     [not found]           ` <CA+V1Lzov4WXXjERAwAV03VdMEQKDC_=ADAgr2-0p-k=gYC8i3w@mail.gmail.com>
     [not found]             ` <20160329133307.GO2099@lahna.fi.intel.com>
2016-03-30  0:03               ` sergk sergk2mail
2016-03-30  0:09                 ` sergk sergk2mail
2016-03-30  9:41                 ` Mika Westerberg [this message]
2016-03-30 10:28                   ` sergk sergk2mail
2016-03-30 11:03                     ` Mika Westerberg

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=20160330094159.GQ2099@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=onitake@gmail.com \
    --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.