Hi Mika,
full acpidump of the machine is located here
https://gitlab.com/SergK/icn8528/blob/master/DSDT/dsdt.dsl
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
2) sysbusacpidev - /sys/bus/acpi/devices
https://gitlab.com/SergK/icn8528/blob/master/Androiddata/sysbusacpidev
there is no nothing with CHPN0001 as it is under vanilla linux 4.2.2
3) Dmesg https://gitlab.com/SergK/icn8528/blob/master/Androiddata/andrdmesg
please note - there is also in it focal_tech mention - it strange but
the guys from Chuwi declared every possible variant in sysfs and only
that is present in tablet revision (my is rev11 with chipone
icn8528.h) is initialized through corresponding linux module.
<6> : input: chipone-ts as /devices/virtual/input/input3
quoted
cat /devices/virtual/input/input3/modalias gives
input:b000v0000p0000e0000-e0,1,3,k8B,9E,D9,ra2F,30,32,35,36,39,m1sfw
- I guess the key is m1sfw which means loaded firmware.
4) /proc/bus/input/devices
https://gitlab.com/SergK/icn8528/blob/master/Androiddata/procbusinputdevices
Kind regards,
Serge Kolotylo
Sorry forgotten to add: Windows driver for TS reports that ACPI CHPN0001 device!
I have both Win 8 and Androis on my Chuwi Vi10 with this icn8528 TS.
Regards,
Serge.
On Wed, Mar 30, 2016 at 12:03 AM, sergk sergk2mail
[off-list ref] wrote:Hi Mika,
full acpidump of the machine is located here
https://gitlab.com/SergK/icn8528/blob/master/DSDT/dsdt.dsl
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
2) sysbusacpidev - /sys/bus/acpi/devices
https://gitlab.com/SergK/icn8528/blob/master/Androiddata/sysbusacpidev
there is no nothing with CHPN0001 as it is under vanilla linux 4.2.2
3) Dmesg https://gitlab.com/SergK/icn8528/blob/master/Androiddata/andrdmesg
please note - there is also in it focal_tech mention - it strange but
the guys from Chuwi declared every possible variant in sysfs and only
that is present in tablet revision (my is rev11 with chipone
icn8528.h) is initialized through corresponding linux module.
<6> : input: chipone-ts as /devices/virtual/input/input3
quoted
quoted
cat /devices/virtual/input/input3/modalias gives
input:b000v0000p0000e0000-e0,1,3,k8B,9E,D9,ra2F,30,32,35,36,39,m1sfw
- I guess the key is m1sfw which means loaded firmware.
4) /proc/bus/input/devices
https://gitlab.com/SergK/icn8528/blob/master/Androiddata/procbusinputdevices
Kind regards,
Serge Kolotylo
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.
quoted
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.
Hi Mika,
"This should create new i2c device for i2c-hid.c."
Ok - provided code registered platform device, looks like hid device
and what will be next then? where and how will be setuped irq mode for
touchscreen? the problem was from the begining - I could not setup irq
for this touch due absence of gpio or the way of puting it into irq
mode.
Kind regards,
Serge Kolotylo.
On Wed, Mar 30, 2016 at 9:41 AM, Mika Westerberg
[off-list ref] wrote:On Wed, Mar 30, 2016 at 12:03:13AM +0000, sergk sergk2mail wrote:
quoted
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.
quoted
quoted
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.
On Wed, Mar 30, 2016 at 10:28:14AM +0000, sergk sergk2mail wrote:
"This should create new i2c device for i2c-hid.c."
Ok - provided code registered platform device, looks like hid device
and what will be next then? where and how will be setuped irq mode for
touchscreen? the problem was from the begining - I could not setup irq
for this touch due absence of gpio or the way of puting it into irq
mode.
It will create an I2C device for you with the ->irq assigned so
i2c-hid.c should be happy. At least worth a try.
It may be that the interrupt number needs to be passed through
acpi_register_gsi() if it does not work.