diff mbox series

[v11,33/56] Input: atmel_mxt_ts - delay enabling IRQ when not using regulators

Message ID 20200508055656.96389-34-jiada_wang@mentor.com (mailing list archive)
State New, archived
Headers show
Series atmel_mxt_ts misc | expand

Commit Message

Wang, Jiada May 8, 2020, 5:56 a.m. UTC
The path of enabling the IRQ in the probe function is not safe in level
triggered operation, if it was already powered up and there is a message
waiting on the device (eg finger down) because the object table has not yet
been read. This forces the ISR into a hard loop.

Delay enabling the interrupt until it is first needed, by set flag
IRQ_NOAUTOEN.

Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
CC: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/input/touchscreen/atmel_mxt_ts.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Dmitry Osipenko May 11, 2020, 1:05 a.m. UTC | #1
08.05.2020 08:56, Jiada Wang пишет:
> The path of enabling the IRQ in the probe function is not safe in level
> triggered operation, if it was already powered up and there is a message
> waiting on the device (eg finger down) because the object table has not yet
> been read. This forces the ISR into a hard loop.
> 
> Delay enabling the interrupt until it is first needed, by set flag
> IRQ_NOAUTOEN.
> 
> Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
> CC: Dmitry Osipenko <digetx@gmail.com>
> ---
>  drivers/input/touchscreen/atmel_mxt_ts.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
> index 7c9a738e633a..ab4eceac8fe7 100644
> --- a/drivers/input/touchscreen/atmel_mxt_ts.c
> +++ b/drivers/input/touchscreen/atmel_mxt_ts.c
> @@ -3822,6 +3822,7 @@ static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id)
>  		return error;
>  	}
>  
> +	irq_set_status_flags(client->irq, IRQ_NOAUTOEN);
>  	error = devm_request_threaded_irq(&client->dev, client->irq,
>  					  NULL, mxt_interrupt, IRQF_ONESHOT,
>  					  client->name, data);
> @@ -3831,17 +3832,19 @@ static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id)
>  	}
>  
>  	if (data->suspend_mode == MXT_SUSPEND_REGULATOR) {
> +		enable_irq(data->irq);

Hello Jiada,

This change contradicts to the commit's message since enabling IRQ until
hardware has been fully powered-on and reset is not allowed.

>  		error = mxt_probe_regulators(data);
>  		if (error)
>  			return error;
> +
> +		disable_irq(data->irq);
>  	} else if (data->reset_gpio) {
>  		msleep(MXT_RESET_GPIO_TIME);
>  		gpiod_set_value(data->reset_gpio, 1);
>  		msleep(MXT_RESET_INVALID_CHG);
>  	}
>  
> -	disable_irq(data->irq);
> -
>  	error = mxt_initialize(data);
>  	if (error)
>  		return error;
> 

Secondly, I gave a try to this version of the series and unfortunately
it doesn't work at all:

[  125.928709] INFO: task systemd-udevd:184 blocked for more than 61
seconds.
[  125.929130]       Not tainted
5.7.0-rc4-next-20200508-00189-g0fe7f91d4a66-dirty #2206
[  125.929474] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[  125.929900] systemd-udevd   D    0   184    173 0x00000080
[  125.929921] [<c098b995>] (__schedule) from [<c098bdc1>]
(schedule+0x65/0xc0)
[  125.929965] [<c098bdc1>] (schedule) from [<c0166ce3>]
(synchronize_irq+0x5b/0x7c)
[  125.930001] [<c0166ce3>] (synchronize_irq) from [<c067e0f9>]
(mxt_stop+0x51/0xe0)
[  125.930016] [<c067e0f9>] (mxt_stop) from [<c067e1d3>]
(mxt_input_close+0x13/0x34)
[  125.930042] [<c067e1d3>] (mxt_input_close) from [<c0664b19>]
(input_close_device+0x3d/0x5c)
[  125.930063] [<c0664b19>] (input_close_device) from [<c066b9df>]
(evdev_release+0xa7/0xbc)
[  125.930088] [<c066b9df>] (evdev_release) from [<c025a871>]
(__fput+0x91/0x198)
[  125.930121] [<c025a871>] (__fput) from [<c0136efb>]
(task_work_run+0x73/0x90)
[  125.930138] [<c0136efb>] (task_work_run) from [<c0108fa9>]
(do_work_pending+0x381/0x430)
[  125.930149] [<c0108fa9>] (do_work_pending) from [<c01000d1>]
(slow_work_pending+0x9/0x18)
[  125.930153] Exception stack(0xedd0ffb0 to 0xedd0fff8)

Please test everything properly and fix it in the next version.

BTW, it won't hurt to apply a spell-checker to the commit messages to
fix small typos.
Wang, Jiada May 11, 2020, 2:05 a.m. UTC | #2
Hello Dmitry

Thanks for your comment and test,

can you let me know which platform (board) you are using for test,
and DTS changes if you have added any.

Thanks,
Jiada

On 2020/05/11 10:05, Dmitry Osipenko wrote:
> 08.05.2020 08:56, Jiada Wang пишет:
>> The path of enabling the IRQ in the probe function is not safe in level
>> triggered operation, if it was already powered up and there is a message
>> waiting on the device (eg finger down) because the object table has not yet
>> been read. This forces the ISR into a hard loop.
>>
>> Delay enabling the interrupt until it is first needed, by set flag
>> IRQ_NOAUTOEN.
>>
>> Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
>> CC: Dmitry Osipenko <digetx@gmail.com>
>> ---
>>   drivers/input/touchscreen/atmel_mxt_ts.c | 7 +++++--
>>   1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
>> index 7c9a738e633a..ab4eceac8fe7 100644
>> --- a/drivers/input/touchscreen/atmel_mxt_ts.c
>> +++ b/drivers/input/touchscreen/atmel_mxt_ts.c
>> @@ -3822,6 +3822,7 @@ static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id)
>>   		return error;
>>   	}
>>   
>> +	irq_set_status_flags(client->irq, IRQ_NOAUTOEN);
>>   	error = devm_request_threaded_irq(&client->dev, client->irq,
>>   					  NULL, mxt_interrupt, IRQF_ONESHOT,
>>   					  client->name, data);
>> @@ -3831,17 +3832,19 @@ static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id)
>>   	}
>>   
>>   	if (data->suspend_mode == MXT_SUSPEND_REGULATOR) {
>> +		enable_irq(data->irq);
> 
> Hello Jiada,
> 
> This change contradicts to the commit's message since enabling IRQ until
> hardware has been fully powered-on and reset is not allowed.
> 
>>   		error = mxt_probe_regulators(data);
>>   		if (error)
>>   			return error;
>> +
>> +		disable_irq(data->irq);
>>   	} else if (data->reset_gpio) {
>>   		msleep(MXT_RESET_GPIO_TIME);
>>   		gpiod_set_value(data->reset_gpio, 1);
>>   		msleep(MXT_RESET_INVALID_CHG);
>>   	}
>>   
>> -	disable_irq(data->irq);
>> -
>>   	error = mxt_initialize(data);
>>   	if (error)
>>   		return error;
>>
> 
> Secondly, I gave a try to this version of the series and unfortunately
> it doesn't work at all:
> 
> [  125.928709] INFO: task systemd-udevd:184 blocked for more than 61
> seconds.
> [  125.929130]       Not tainted
> 5.7.0-rc4-next-20200508-00189-g0fe7f91d4a66-dirty #2206
> [  125.929474] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
> disables this message.
> [  125.929900] systemd-udevd   D    0   184    173 0x00000080
> [  125.929921] [<c098b995>] (__schedule) from [<c098bdc1>]
> (schedule+0x65/0xc0)
> [  125.929965] [<c098bdc1>] (schedule) from [<c0166ce3>]
> (synchronize_irq+0x5b/0x7c)
> [  125.930001] [<c0166ce3>] (synchronize_irq) from [<c067e0f9>]
> (mxt_stop+0x51/0xe0)
> [  125.930016] [<c067e0f9>] (mxt_stop) from [<c067e1d3>]
> (mxt_input_close+0x13/0x34)
> [  125.930042] [<c067e1d3>] (mxt_input_close) from [<c0664b19>]
> (input_close_device+0x3d/0x5c)
> [  125.930063] [<c0664b19>] (input_close_device) from [<c066b9df>]
> (evdev_release+0xa7/0xbc)
> [  125.930088] [<c066b9df>] (evdev_release) from [<c025a871>]
> (__fput+0x91/0x198)
> [  125.930121] [<c025a871>] (__fput) from [<c0136efb>]
> (task_work_run+0x73/0x90)
> [  125.930138] [<c0136efb>] (task_work_run) from [<c0108fa9>]
> (do_work_pending+0x381/0x430)
> [  125.930149] [<c0108fa9>] (do_work_pending) from [<c01000d1>]
> (slow_work_pending+0x9/0x18)
> [  125.930153] Exception stack(0xedd0ffb0 to 0xedd0fff8)
> 
> Please test everything properly and fix it in the next version.
> 
> BTW, it won't hurt to apply a spell-checker to the commit messages to
> fix small typos.
>
Dmitry Osipenko May 11, 2020, 11:13 p.m. UTC | #3
11.05.2020 05:05, Wang, Jiada пишет:
> Hello Dmitry
> 
> Thanks for your comment and test,
> 
> can you let me know which platform (board) you are using for test,
> and DTS changes if you have added any.

That's this device-tree [1] without any extra changes.

[1]
https://patchwork.ozlabs.org/project/linux-tegra/patch/20200505022517.30523-2-digetx@gmail.com/

The v10 was working fine. I'm take a more detailed look at the problem
later this week.
Wang, Jiada May 13, 2020, 5:07 a.m. UTC | #4
Hello Dmitry

On 2020/05/12 8:13, Dmitry Osipenko wrote:
> 11.05.2020 05:05, Wang, Jiada пишет:
>> Hello Dmitry
>>
>> Thanks for your comment and test,
>>
>> can you let me know which platform (board) you are using for test,
>> and DTS changes if you have added any.
> 
> That's this device-tree [1] without any extra changes.
> 
I am using Samsung Chromebook Pro for testing,
but obviously some of the use cases it can't cover.

I also would like to test on same device you are using,
would you please let me know how to boot Acer Iconia Tab A500
with custom images. Are you booting Linux or Android on it?

> [1]
> https://patchwork.ozlabs.org/project/linux-tegra/patch/20200505022517.30523-2-digetx@gmail.com/
> 
> The v10 was working fine. I'm take a more detailed look at the problem
> later this week.
>
Thanks, it is very helpful

Thanks,
Jiada
Dmitry Osipenko May 14, 2020, 4:53 a.m. UTC | #5
13.05.2020 08:07, Wang, Jiada пишет:
> Hello Dmitry
> 
> On 2020/05/12 8:13, Dmitry Osipenko wrote:
>> 11.05.2020 05:05, Wang, Jiada пишет:
>>> Hello Dmitry
>>>
>>> Thanks for your comment and test,
>>>
>>> can you let me know which platform (board) you are using for test,
>>> and DTS changes if you have added any.
>>
>> That's this device-tree [1] without any extra changes.
>>
> I am using Samsung Chromebook Pro for testing,
> but obviously some of the use cases it can't cover.
> 
> I also would like to test on same device you are using,
> would you please let me know how to boot Acer Iconia Tab A500
> with custom images. Are you booting Linux or Android on it?

I'm using Ubuntu 20.04 on it at the moment. In order to boot custom
images you'll need at least to install a custom recovery, which will
allow to flash boot.img on eMMC storage.

Ideally, you'll need to install an unlocked bootloader that will enable
Android's fastboot, and thus, allow to easily boot kernel zImage without
messing with flashing boot images.

Could you please tell what is the current state of yours device: does it
have a stock Android installed? is it rooted? is custom recovery installed?

My device was unlocked about 8+ years ago, so I'm not sure what's the
best way to do it nowadays. The XDA forums [1] could be a good starting
point, I may give you some advises once you'll tell what's the current
status of yours device.

[1] https://forum.xda-developers.com/iconia-a500
Wang, Jiada May 17, 2020, 3:32 a.m. UTC | #6
Hello Dmitry

On 2020/05/14 13:53, Dmitry Osipenko wrote:
> 13.05.2020 08:07, Wang, Jiada пишет:
>> Hello Dmitry
>>
>> On 2020/05/12 8:13, Dmitry Osipenko wrote:
>>> 11.05.2020 05:05, Wang, Jiada пишет:
>>>> Hello Dmitry
>>>>
>>>> Thanks for your comment and test,
>>>>
>>>> can you let me know which platform (board) you are using for test,
>>>> and DTS changes if you have added any.
>>>
>>> That's this device-tree [1] without any extra changes.
>>>
>> I am using Samsung Chromebook Pro for testing,
>> but obviously some of the use cases it can't cover.
>>
>> I also would like to test on same device you are using,
>> would you please let me know how to boot Acer Iconia Tab A500
>> with custom images. Are you booting Linux or Android on it?
> 
> I'm using Ubuntu 20.04 on it at the moment. In order to boot custom
> images you'll need at least to install a custom recovery, which will
> allow to flash boot.img on eMMC storage.
> 
> Ideally, you'll need to install an unlocked bootloader that will enable
> Android's fastboot, and thus, allow to easily boot kernel zImage without
> messing with flashing boot images.
> 
> Could you please tell what is the current state of yours device: does it
> have a stock Android installed? is it rooted? is custom recovery installed?
> 
Thanks for your information

By following instructions found in XDA forums,
now I am able to install an unlocked bootloader,
boot among primary kernel, recovery kernel or fastboot,
an Android custom stock rom also has been installed

Could you please let me know how to install local built ubuntu images

Thanks,
Jiada

> My device was unlocked about 8+ years ago, so I'm not sure what's the
> best way to do it nowadays. The XDA forums [1] could be a good starting
> point, I may give you some advises once you'll tell what's the current
> status of yours device.
> 
> [1] https://forum.xda-developers.com/iconia-a500
>
Dmitry Osipenko May 17, 2020, 1:08 p.m. UTC | #7
17.05.2020 06:32, Wang, Jiada пишет:
> Hello Dmitry
> 
> On 2020/05/14 13:53, Dmitry Osipenko wrote:
>> 13.05.2020 08:07, Wang, Jiada пишет:
>>> Hello Dmitry
>>>
>>> On 2020/05/12 8:13, Dmitry Osipenko wrote:
>>>> 11.05.2020 05:05, Wang, Jiada пишет:
>>>>> Hello Dmitry
>>>>>
>>>>> Thanks for your comment and test,
>>>>>
>>>>> can you let me know which platform (board) you are using for test,
>>>>> and DTS changes if you have added any.
>>>>
>>>> That's this device-tree [1] without any extra changes.
>>>>
>>> I am using Samsung Chromebook Pro for testing,
>>> but obviously some of the use cases it can't cover.
>>>
>>> I also would like to test on same device you are using,
>>> would you please let me know how to boot Acer Iconia Tab A500
>>> with custom images. Are you booting Linux or Android on it?
>>
>> I'm using Ubuntu 20.04 on it at the moment. In order to boot custom
>> images you'll need at least to install a custom recovery, which will
>> allow to flash boot.img on eMMC storage.
>>
>> Ideally, you'll need to install an unlocked bootloader that will enable
>> Android's fastboot, and thus, allow to easily boot kernel zImage without
>> messing with flashing boot images.
>>
>> Could you please tell what is the current state of yours device: does it
>> have a stock Android installed? is it rooted? is custom recovery
>> installed?
>>
> Thanks for your information
> 
> By following instructions found in XDA forums,
> now I am able to install an unlocked bootloader,
> boot among primary kernel, recovery kernel or fastboot,
> an Android custom stock rom also has been installed

Awesome!

> Could you please let me know how to install local built ubuntu images

Sure, please follow these steps:

1. Download rootfs from
http://cdimage.ubuntu.com/ubuntu-base/releases/20.04/release/ubuntu-base-20.04-base-armhf.tar.gz

2. Extract it wherever you want yours root to be, like ExternalSD card
or eMMC /data partition or even NFS directory if you'll use usbnet.

3. Clone this kernel https://github.com/grate-driver/linux which is a
recent upstream linux-next + work-in-progress patches that haven't been
merged into upstream yet. For example DRM bridges and Tegra Partition
Table patches are under review now.

4. Select tegra_defconfig:

	ARCH=arm make tegra_defconfig

5. Compile kernel:

	ARCH=arm make

6. Append DTB to zImage:

	cat arch/arm/boot/zImage
arch/arm/boot/dts/tegra20-acer-a500-picasso.dtb > arch/arm/boot/zImage-dtb

7. Turn on A500 and select 'fastboot' option in the bootloader's menu.

8. Boot compiled kernel:

	fastboot -c "root=/dev/mmcblk2p8 gpt tegraboot=sdmmc" boot
arch/arm/boot/zImage-dtb

9. Grab touchscreen/WiFi/Bluetooth firmware files from
https://github.com/digetx/linux-firmware

10. Grab ALSA UCM rule from https://github.com/digetx/alsa-ucm-conf

11. Enjoy!

Please let me know you'll experience any problems, I'll be glad to help.
Dmitry Osipenko May 17, 2020, 1:26 p.m. UTC | #8
17.05.2020 16:08, Dmitry Osipenko пишет:
> 17.05.2020 06:32, Wang, Jiada пишет:
>> Hello Dmitry
>>
>> On 2020/05/14 13:53, Dmitry Osipenko wrote:
>>> 13.05.2020 08:07, Wang, Jiada пишет:
>>>> Hello Dmitry
>>>>
>>>> On 2020/05/12 8:13, Dmitry Osipenko wrote:
>>>>> 11.05.2020 05:05, Wang, Jiada пишет:
>>>>>> Hello Dmitry
>>>>>>
>>>>>> Thanks for your comment and test,
>>>>>>
>>>>>> can you let me know which platform (board) you are using for test,
>>>>>> and DTS changes if you have added any.
>>>>>
>>>>> That's this device-tree [1] without any extra changes.
>>>>>
>>>> I am using Samsung Chromebook Pro for testing,
>>>> but obviously some of the use cases it can't cover.
>>>>
>>>> I also would like to test on same device you are using,
>>>> would you please let me know how to boot Acer Iconia Tab A500
>>>> with custom images. Are you booting Linux or Android on it?
>>>
>>> I'm using Ubuntu 20.04 on it at the moment. In order to boot custom
>>> images you'll need at least to install a custom recovery, which will
>>> allow to flash boot.img on eMMC storage.
>>>
>>> Ideally, you'll need to install an unlocked bootloader that will enable
>>> Android's fastboot, and thus, allow to easily boot kernel zImage without
>>> messing with flashing boot images.
>>>
>>> Could you please tell what is the current state of yours device: does it
>>> have a stock Android installed? is it rooted? is custom recovery
>>> installed?
>>>
>> Thanks for your information
>>
>> By following instructions found in XDA forums,
>> now I am able to install an unlocked bootloader,
>> boot among primary kernel, recovery kernel or fastboot,
>> an Android custom stock rom also has been installed
> 
> Awesome!
> 
>> Could you please let me know how to install local built ubuntu images
> 
> Sure, please follow these steps:
> 
> 1. Download rootfs from
> http://cdimage.ubuntu.com/ubuntu-base/releases/20.04/release/ubuntu-base-20.04-base-armhf.tar.gz
> 
> 2. Extract it wherever you want yours root to be, like ExternalSD card
> or eMMC /data partition or even NFS directory if you'll use usbnet.
> 
> 3. Clone this kernel https://github.com/grate-driver/linux which is a
> recent upstream linux-next + work-in-progress patches that haven't been
> merged into upstream yet. For example DRM bridges and Tegra Partition
> Table patches are under review now.
> 
> 4. Select tegra_defconfig:
> 
> 	ARCH=arm make tegra_defconfig
> 
> 5. Compile kernel:
> 
> 	ARCH=arm make
> 
> 6. Append DTB to zImage:
> 
> 	cat arch/arm/boot/zImage
> arch/arm/boot/dts/tegra20-acer-a500-picasso.dtb > arch/arm/boot/zImage-dtb
> 
> 7. Turn on A500 and select 'fastboot' option in the bootloader's menu.
> 
> 8. Boot compiled kernel:
> 
> 	fastboot -c "root=/dev/mmcblk2p8 gpt tegraboot=sdmmc" boot
> arch/arm/boot/zImage-dtb
> 
> 9. Grab touchscreen/WiFi/Bluetooth firmware files from
> https://github.com/digetx/linux-firmware
> 
> 10. Grab ALSA UCM rule from https://github.com/digetx/alsa-ucm-conf
> 
> 11. Enjoy!
> 
> Please let me know you'll experience any problems, I'll be glad to help.
> 

Also, there is an Ubuntu PPA for Tegra20/30 devices with drivers from
GRATE-driver project:
https://launchpad.net/~grate-driver/+archive/ubuntu/ppa

Please keep in mind that there is no GL driver that work with upstream
kernel.

I'd recommend to use KDE Plasma 5 for the desktop environment. For the
good experience you'll need to tell Qt to use software render, the
easiest way is to set required env variables globally:

echo -e
"QT_QUICK_BACKEND=software\nLIBGL_ALWAYS_SOFTWARE=1\nQT_IM_MODULE=qtvirtualkeyboard"
>> /etc/security/pam_env.conf
Wang, Jiada May 25, 2020, 2:51 p.m. UTC | #9
Hello Dmitry

On 2020/05/17 22:26, Dmitry Osipenko wrote:
> 17.05.2020 16:08, Dmitry Osipenko пишет:
>> 17.05.2020 06:32, Wang, Jiada пишет:
>>> Hello Dmitry
>>>
>>> On 2020/05/14 13:53, Dmitry Osipenko wrote:
>>>> 13.05.2020 08:07, Wang, Jiada пишет:
>>>>> Hello Dmitry
>>>>>
>>>>> On 2020/05/12 8:13, Dmitry Osipenko wrote:
>>>>>> 11.05.2020 05:05, Wang, Jiada пишет:
>>>>>>> Hello Dmitry
>>>>>>>
>>>>>>> Thanks for your comment and test,
>>>>>>>
>>>>>>> can you let me know which platform (board) you are using for test,
>>>>>>> and DTS changes if you have added any.
>>>>>>
>>>>>> That's this device-tree [1] without any extra changes.
>>>>>>
>>>>> I am using Samsung Chromebook Pro for testing,
>>>>> but obviously some of the use cases it can't cover.
>>>>>
>>>>> I also would like to test on same device you are using,
>>>>> would you please let me know how to boot Acer Iconia Tab A500
>>>>> with custom images. Are you booting Linux or Android on it?
>>>>
>>>> I'm using Ubuntu 20.04 on it at the moment. In order to boot custom
>>>> images you'll need at least to install a custom recovery, which will
>>>> allow to flash boot.img on eMMC storage.
>>>>
>>>> Ideally, you'll need to install an unlocked bootloader that will enable
>>>> Android's fastboot, and thus, allow to easily boot kernel zImage without
>>>> messing with flashing boot images.
>>>>
>>>> Could you please tell what is the current state of yours device: does it
>>>> have a stock Android installed? is it rooted? is custom recovery
>>>> installed?
>>>>
>>> Thanks for your information
>>>
>>> By following instructions found in XDA forums,
>>> now I am able to install an unlocked bootloader,
>>> boot among primary kernel, recovery kernel or fastboot,
>>> an Android custom stock rom also has been installed
>>
>> Awesome!
>>
>>> Could you please let me know how to install local built ubuntu images
>>
>> Sure, please follow these steps:
>>
>> 1. Download rootfs from
>> http://cdimage.ubuntu.com/ubuntu-base/releases/20.04/release/ubuntu-base-20.04-base-armhf.tar.gz
>>
>> 2. Extract it wherever you want yours root to be, like ExternalSD card
>> or eMMC /data partition or even NFS directory if you'll use usbnet.
>>
>> 3. Clone this kernel https://github.com/grate-driver/linux which is a
>> recent upstream linux-next + work-in-progress patches that haven't been
>> merged into upstream yet. For example DRM bridges and Tegra Partition
>> Table patches are under review now.
>>
>> 4. Select tegra_defconfig:
>>
>> 	ARCH=arm make tegra_defconfig
>>
>> 5. Compile kernel:
>>
>> 	ARCH=arm make
>>
>> 6. Append DTB to zImage:
>>
>> 	cat arch/arm/boot/zImage
>> arch/arm/boot/dts/tegra20-acer-a500-picasso.dtb > arch/arm/boot/zImage-dtb
>>
>> 7. Turn on A500 and select 'fastboot' option in the bootloader's menu.
>>
>> 8. Boot compiled kernel:
>>
>> 	fastboot -c "root=/dev/mmcblk2p8 gpt tegraboot=sdmmc" boot
>> arch/arm/boot/zImage-dtb
>>
>> 9. Grab touchscreen/WiFi/Bluetooth firmware files from
>> https://github.com/digetx/linux-firmware
>>
>> 10. Grab ALSA UCM rule from https://github.com/digetx/alsa-ucm-conf
>>
>> 11. Enjoy!
>>
>> Please let me know you'll experience any problems, I'll be glad to help.
>>
> 
> Also, there is an Ubuntu PPA for Tegra20/30 devices with drivers from
> GRATE-driver project:
> https://launchpad.net/~grate-driver/+archive/ubuntu/ppa
> 
> Please keep in mind that there is no GL driver that work with upstream
> kernel.
> 
> I'd recommend to use KDE Plasma 5 for the desktop environment. For the
> good experience you'll need to tell Qt to use software render, the
> easiest way is to set required env variables globally:
> 
> echo -e
> "QT_QUICK_BACKEND=software\nLIBGL_ALWAYS_SOFTWARE=1\nQT_IM_MODULE=qtvirtualkeyboard"
>>> /etc/security/pam_env.conf

Thanks for detailed information to help me boot ubuntu on acer tab a500,
now I am able to boot it with ubuntu and reproduced the issue with v11 
patch-set.

I will start to investigate the root cause,
from now on, my update patch-set will be tested on both samsung 
chromebook pro and acer tab a500

Thanks for your help

Thanks,
Jiada
Dmitry Osipenko May 26, 2020, 5:36 p.m. UTC | #10
25.05.2020 17:51, Wang, Jiada пишет:
> Hello Dmitry
...
> 
> Thanks for detailed information to help me boot ubuntu on acer tab a500,
> now I am able to boot it with ubuntu and reproduced the issue with v11
> patch-set.
> 
> I will start to investigate the root cause,
> from now on, my update patch-set will be tested on both samsung
> chromebook pro and acer tab a500
> 
> Thanks for your help

That's awesome!

I haven't had a chance yet to investigate the problem of v11, maybe
later this week. Please feel free to beat me to it :)
diff mbox series

Patch

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 7c9a738e633a..ab4eceac8fe7 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -3822,6 +3822,7 @@  static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id)
 		return error;
 	}
 
+	irq_set_status_flags(client->irq, IRQ_NOAUTOEN);
 	error = devm_request_threaded_irq(&client->dev, client->irq,
 					  NULL, mxt_interrupt, IRQF_ONESHOT,
 					  client->name, data);
@@ -3831,17 +3832,19 @@  static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id)
 	}
 
 	if (data->suspend_mode == MXT_SUSPEND_REGULATOR) {
+		enable_irq(data->irq);
+
 		error = mxt_probe_regulators(data);
 		if (error)
 			return error;
+
+		disable_irq(data->irq);
 	} else if (data->reset_gpio) {
 		msleep(MXT_RESET_GPIO_TIME);
 		gpiod_set_value(data->reset_gpio, 1);
 		msleep(MXT_RESET_INVALID_CHG);
 	}
 
-	disable_irq(data->irq);
-
 	error = mxt_initialize(data);
 	if (error)
 		return error;