Commit Graph

649590 Commits

Author SHA1 Message Date
Simon Beginn
dd09367e7a Input: goodix - add upside-down quirk for Teclast X98 Pro tablet
[ Upstream commit cffdd6d904 ]

The touchscreen on the Teclast x98 Pro is also mounted upside-down in
relation to the display orientation.

Signed-off-by: Simon Beginn <linux@simonmicro.de>
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Link: https://lore.kernel.org/r/20201117004253.27A5A27EFD@localhost
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Change-Id: Id643f6a3314b4808d3ec98e92107ab719a17dd7c
2022-10-27 15:09:42 +09:00
Hans de Goede
c5557f488f Input: goodix - add upside-down quirk for Teclast X89 tablet
commit df5b5e555b upstream.

The touchscreen on the Teclast X89 is mounted upside down in relation to
the display orientation (the touchscreen itself is mounted upright, but the
display is mounted upside-down). Add a quirk for this so that we send
coordinates which match the display orientation.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Bastien Nocera <hadess@hadess.net>
Link: https://lore.kernel.org/r/20191202085636.6650-1-hdegoede@redhat.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: Idab48cdbdf6791021543aa4b33d87d341c9ab0e8
2022-10-27 15:09:18 +09:00
Marcin Niestroj
f467f6e1a0 Input: goodix - use generic touchscreen_properties
Use touchscreen_properties structure instead of implementing all
properties by our own. It allows us to reuse generic code for parsing
device-tree properties (which was implemented manually in the driver for
now). Additionally, it allows us to report events using generic
touchscreen_report_pos(), which automatically handles inverted and
swapped axes.

This fixes the issue with the custom code incorrectly handling case where
ts->inverted_x and ts->swapped_x_y were true, but ts->inverted_y was
false. Assuming we have 720x1280 touch panel, ts->abs_x_max == 1279 and
ts->abs_y_max == 719 (because we inverted that in goodix_read_config()).
Now let's assume that we received event from (0:0) position (in touch
panel original coordinates). In function goodix_ts_report_touch() we
calculate input_x as 1279, but after swapping input_y takes that value
(which is more that maximum 719 value reported during initialization).

Note that since touchscreen coordinates are 0-indexed, we now report
touchscreen range as (0:size-1).

Developed and tested on custom DT-based device with gt1151 touch
panel.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
[dtor: fix endianness annotation reported by sparse, handle errors when
 initializing MT slots]
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Change-Id: I3fdd49b7357ca94111fde041c295a4a548ba109b
2022-10-27 15:08:57 +09:00
Marcin Niestroj
9875ffd457 Input: goodix - support gt1151 touchpanel
Support was added based on Goodix GitHub repo [1]. There are two major
differences between gt1151 and currently supported devices (gt9x):
 * CONFIG_DATA register has 0x8050 address instead of 0x8047,
 * config data checksum has 16-bit width instead of 8-bit.

Also update goodix_i2c_test() function, so it reads ID register (which
has the same address for all devices) instead of CONFIG_DATA (because
its address is known only after reading ID of the device).

[1] https://github.com/goodix/gt1x_driver_generic

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Change-Id: I12f2f9e745c2f14ff45b3f967fbf91e629230989
2022-10-27 15:08:32 +09:00
Paul Cercueil
9a8c3734c3 Input: goodix - poll the 'buffer status' bit before reading data
The Goodix panel triggers an interrupt on touch events. However, its
registers will contain the valid values a short time after the
interrupt, and not when it's raised. At that moment, the 'buffer status'
bit is set.

Previously, if the 'buffer status' bit was not set when the registers
were read, the data was discarded and no input event was emitted,
causing "finger down" or "finger up" events to be missed sometimes.

This went unnoticed until v4.9, as the DesignWare I2C driver commonly
used with this driver had enough latency for that bug to never trigger
until commit 2702ea7dbe ("i2c: designware: wait for disable/enable only
if necessary").

Now, in the IRQ handler we will poll (with a timeout) the 'buffer status'
bit and process the data of the panel as soon as this bit gets set.

Note that the Goodix panel will send a few spurious interrupts after the
'finger up' event, in which the 'buffer status' bit will never be set.

Cc: Bastien Nocera <hadess@hadess.net>
Cc: russianneuromancer@ya.ru
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
[hdegoede@redhat.com: Change poll loop to use jiffies,
                      add comment about typical poll time]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[dtor: rearranged control flow a bit to avoid explicit goto and double
check]
Reviewed-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Change-Id: I3fa771b0b07cf811b157cb76e1c1deba6bf4e4ea
2022-10-27 15:08:12 +09:00
Sergei A. Trusov
b8c1122b2c Input: goodix - add support for capacitive home button
On some x86 tablets with a Goodix touchscreen, the Windows logo on the
front is a capacitive home button. Touching this button results in a touch
with bit 4 of the first byte set, while only the lower 4 bits (0-3) are
used to indicate the number of touches.

Report a KEY_LEFTMETA press when this happens.

Note that the hardware might support more than one button, in which
case the "id" byte of coor_data would identify the button in question.
This is not implemented as we don't have access to hardware with
multiple buttons.

Signed-off-by: Sergei A. Trusov <sergei.a.trusov@ya.ru>
Acked-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Change-Id: I30f0248bca9de921d25b19bf823698ab6dc3eb3f
2022-10-27 15:07:51 +09:00
Chris
b663de2fe6 ODROID-N2L: Fix for meson64_odroidn2l_android
Change-Id: I3cd142446b5cb69d0629f66125b0c8020f09272f
2022-10-27 15:07:09 +09:00
Chris
7a26dca174 ODROID-N2L: rev_1.0 20220426 USB VBUS Power modify.
Change-Id: I819ddb2551fc6d76582ed77f27c14617856f61da
2022-10-24 10:28:33 +09:00
Chris
6179a9c421 ODROID-N2/N2L: Fill uuid if not exists.
If uuid is empty, it will be replaced by CPU id.

Change-Id: Iae971a089bb317817574eb26119c931dbbc7856c
2022-10-12 12:42:20 +09:00
Dongjin Kim
aec190bed7 ODROID-N2/N2Plus: simple compare 'Hardkernel ODROID-N2'
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I59f599211b89805c17881099a209f07a9089006c
2022-10-12 12:41:59 +09:00
Chris
24555490c0 ODROID-N2L: Introduce new SBC board 'ODROID-N2L'
Change-Id: Ie5bad34edb436ec551932d9d4a985a03967ea14d
2022-10-12 12:41:16 +09:00
Luke Go
2c99989c75 ODROID: arm64/dts: overlay: Add keymatrix exmaple.
- this Exampel support keyboard matrix driver.
  Added 4 by 4 gpio, and 11 key map.

Signed-off-by: Luke Go <sangch.go@gmail.com>
Change-Id: If7d0c801756885c28f316d56a797425b1a8385b4
2022-08-31 14:38:49 +09:00
Luke Go
7cfa86f4fd ODROID: arm64/configs: Add KEYBOARD_MATRIX to C4 and N2. matrix keypad
support polling feature.

Change-Id: Ibef25334c09987e09916b951297c10c2b8e3051c
Signed-off-by: Luke Go <sangch.go@gmail.com>
2022-08-31 14:38:42 +09:00
Chris
26ee82a010 ODROID-C4: Fix to disappear boot logo.
Change-Id: I4867e437e00eb7ab99e62abce836e04288111dc2
2022-07-20 12:33:21 +09:00
Chris
d07dda58d2 ODROID-COMMON: Fix not to display recovery screen.
Change-Id: I3e7a341f182b793784d8870956eae1d30d46921e
2022-07-20 12:32:35 +09:00
Chris
ed726fcebe ODROID-COMMON: Fix to disappear boot logo.
Change-Id: I89fe590a492866ca4f9e595d3c3da17d74dc1463
2022-07-20 12:25:53 +09:00
Chris
c618899067 ODROID-COMMON: Remove unused module drivers.
Change-Id: I9dc8ab3f7a5ebbf8717c5ff22471efe93ba96274
2022-07-19 16:51:39 +09:00
ckkim
fa571b1da5 ODROID-COMMON:UART minimum baud rate modify(110).
Signed-off-by: ckkim <changkon12@gmail.com>
Change-Id: Iad06bdf188ac4c7c1184ffb93dccbb5bc7c334bf
2022-07-19 16:51:32 +09:00
Chris
d7a6341e6b ODROID-G12: Modified pwm_backlight.dts
Change-Id: Ic9c5d462a9d5b0d36ba84f5eabd28e5a3771cbb6
2022-03-15 09:22:46 +09:00
Chris
62633eabb8 ODROID-COMMON:VU7C EDID modify. Display Product name : HK_VU7C
Change-Id: I7528b1a655ce385cc5f0fc3a55f4e4d1a08fd830
2022-03-15 09:22:36 +09:00
Chris
bb003fb072 ODROID-G12: Fix display_vu7c dts for Android kernel.
Change-Id: I3011d2fbc86e6041ce137960250a849183ca3c44
2022-03-15 09:22:25 +09:00
Chris
5365d4d696 ODROID-G12: Fix pwm_X-backlight dtbo.
Add pwm_backlight in overlay to use.

Change-Id: Ib7857060e6286aebdcc0ed3c7f2c6dda5cc337d2
2022-03-15 09:22:15 +09:00
Chris
c61ed7813a ODROID-C4: Add CONFIG_BACKLIGHT_PWM.
Change-Id: I622d94c50ffbbb079d94d435b59b1dfe5c0030b3
2022-03-15 09:22:05 +09:00
Chris
5aa82a6eee ODROID-G12: Add goodix touch driver.
Change-Id: I8978800841ce88ce771be62330941050993b0d1d
2022-03-15 09:21:55 +09:00
Chris
7f6a89b43a ODROID-N2: Fix auge_sound to odroid_hdmi: odroid_hdmi.
We fixed auge_sound label for vu7c support before commit.

Change-Id: I7519741be654884f88ed30c337dd46994df5bb50
2022-03-15 09:21:44 +09:00
ckkim
278ba2e58d ODROID-C4:dts/dtbo:Add support display_vu7c
1024x600p60hz TFT display
	goodix.gt911 touch panel
	pwm-backlight
	i2s_to_hdmi audio + Boom Bonnet

Signed-off-by: ckkim <changkon12@gmail.com>
Change-Id: Ie9c74d0ef52e0851bc8af8b018e392dc22f7ab67
2022-03-15 09:21:32 +09:00
ckkim
4238ff4393 ODROID-COMMON:touchscreen gpio interrupt for amlogic INTC
Signed-off-by: ckkim <changkon12@gmail.com>
Change-Id: I013b0640fd9d32f641170562829d05bb9336772b
2022-03-15 09:21:20 +09:00
Chris
382003407b ODROID-COMMON:Add LT8619C HDMI to LVDS converter driver
Change-Id: I387b9ca86b0f3ec34f3da6d82ab9d57dadf8e84b
2022-03-15 09:21:07 +09:00
Chris
c92d7f2b90 ODROID-G12: Make hid-multitouch and dwav-usb-mt driver as mouldes.
Change-Id: I9b3a8973c7d0d89bcf52e22b6e690cdc14a24e6c
2022-03-15 09:20:56 +09:00
Chris
a3da637359 ODROID-G12: Make btrtl btusb to module.
We have the issue for B/T USB initialization.
So after boot complete, we will load b/t modules.

Change-Id: Ie15da10ba4930362ccee113da7406aaa3bbb884e
2022-03-15 09:20:41 +09:00
Chris
18fa0b1d2e ODROID-G12: Fix ignorecec args.
If ignorecec args is true, then skip check_confilct().

Change-Id: Ia88e4981c55b6298682d4f459db16a243363e36c
2022-03-15 09:20:25 +09:00
Chris
3ed9c6db47 ODROID-G12: Support 3840x1080 UI for C4.
Change-Id: If7f2e1482b79d05c4ba723197bc32c4ee390d67b
2021-12-27 14:49:06 +09:00
Chris
78b8383a33 ODROID-G12: Fix scale bug for special aspect ratio.
The 3840 x 1080 resolution has a problem scaling up for OSD layer.

Change-Id: I7baadd1aa34a2332952fc42260f8f3ec766a6ca6
2021-12-27 14:48:54 +09:00
Chris
72d371dcd0 Revert "ODROID-COMMON: hdmitx: Add new hdmi resolution."
This reverts commit 44a7c003fa.

Change-Id: I01d01cc0090005fdea4d4097320ee720e5347210
2021-12-27 14:48:32 +09:00
Chris
1149a2a45b ODROID-G12: Fix some CSR b/t dongle problem.
Some CSR dongle send HCI_EV_CMD_COMPLETE first,
then send HCI_EV_HARDWARE_ERROR.

ex) ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

But We figure out that it is not real hardware error.
We ignore event for HCI_EV_HARDWARE_ERROR.

Change-Id: Iea5421100c64ee6942f0a30f6237eb4b1f6351cb
(cherry picked from commit ea13b65cdc)
2021-12-01 10:53:25 +09:00
Chris
217c36a9c3 ODROID-G12: Add ignorecec bootargs.
Some monitors with CEC takes too long time to check conflict.
If igonrecec is added in bootargs, we will skip to check confilct.

Change-Id: If6c77421d77e2beffe5c3c9bec62ab239f8b8995
(cherry picked from commit 971287c681)
2021-12-01 10:51:59 +09:00
Chris
44a7c003fa ODROID-COMMON: hdmitx: Add new hdmi resolution.
3840x1080p50hz

Change-Id: I1f1deb6d2e6a45000284f7d5b150deeeb74d11fb
g12_9.0.0_32_20210930
2021-09-29 12:27:00 +09:00
Chris
21e4b47954 ODROID: Add multitouch v/pid.
/* NEXTWINDOW HDMI capacitive Screen */
 #define USB_VENDOR_ID_NEXTWINDOW   0x1926
 #define USB_DEVICE_ID_NEXTWINDOW_TOUCHSCREEN_0006   0x0006

Change-Id: I8ca1eafb4cddaa80d622816409a9e5208ce89903
2021-09-24 15:26:15 +09:00
Chris
fae99d2f59 ODROID: Add multitouch v/pid.
/* UPERFECT HDMI capacitive Screen */
 #define USB_VENDOR_ID_UPERFECT^I^I0x27c0
 #define USB_DEVICE_ID_UPERFECT^I^I0x0818

Change-Id: I9f0d004c2d88fb02e04e9d3f1a50ae7e94190319
2021-09-24 15:23:59 +09:00
Chris KIM
143d91bc4b ODROID: Add multitouch v/pid.
/* DELL HDMI capacitive Screen */
 #define USB_VENDOR_ID_DELL_P2418HT 0x1fd2
 #define USB_DEVICE_ID_DELL_P2418HT 0x6103

Change-Id: If441a2046dd7d6e452c28a8ddf05c95530e2f6bd
2021-09-24 15:23:49 +09:00
Chris
ac8a064ec1 ODROID-G12: Fix otg_host_mode overlay.
The current kernel does not suppport for delete-property
in overlay dts.

Change-Id: I027dd5d0eca17c9084f1a0326290944fe82ab982
2021-06-30 14:03:45 +09:00
Chris
ecd0d93467 Revert "ODROID-G12: Fix gpio-vbus-power bug."
This reverts commit 1b9dab97c0.

Change-Id: I2b325897b9ba93a49cb3ba73798cb9ef48f6052d
2021-06-25 17:28:07 +09:00
Chris
1b9dab97c0 ODROID-G12: Fix gpio-vbus-power bug.
Change-Id: I234cb5c31a9be9a79f3513b3b50deb2c11698e11
2021-06-25 14:16:14 +09:00
Chris
cf601bc946 Revert "ODROID-N2: Fix otg_host_mode dtbo."
This reverts commit 6ab89e367c.

Change-Id: I76d0b7c8f9fe8432d6b3aa8cd65c37bf26b2574a
2021-06-25 14:14:43 +09:00
Chris
5d5150a84b ODROID-N2: Fix otg_host_mode dtbo.
Change-Id: I71bddad59ea15863b96b9881e638971cdac51dc2
(cherry picked from commit 6ab89e367c)
2021-06-24 10:54:42 +09:00
Chris
ee279c7c6e ODROID-G12: Add to dtbo for otg.
Change-Id: I6aae8f62570f7aebdc5a53094c14abf52022eac0
2021-06-23 11:08:12 +09:00
Deokgyu Yang
7a0897d45e ODROID-C4: arm64/dts: Add uart_AO_B DTBO for the 7pin header
Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: I2d3609283b8dac5db71388e8b6f36dd2cf94da58
2021-06-01 10:04:21 +09:00
Luke go
64237f45aa ODROID-C4: dts/amlogic: GPIOH_5 is dedicated to GPIO pin header.
Change-Id: I4f34841e66f3273750bd755556f9be8c6d1d4c8f
Signed-off-by: Luke go <sangch.go@gmail.com>
2021-06-01 09:54:44 +09:00
Deokgyu Yang
47aba52ad8 ODROID-COMMON: arm64/dts: Add GPIO pinctrl for PWM pins back
This ensures where the PWM pins located to which GPIO pins so that the
unexpected error showing without this patch once unexport a PWM pin does
not occurs

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: I854e2f8d12ded46bb079fb1c6fe80cb1eb82a358
2021-06-01 09:54:42 +09:00
Luke go
776851b1c8 ODROID: arm64/dts: overlay: add codec_mm_cma alloc-arange.
Change-Id: I48d5e508cc9da25ca46e2d64ea8c5d770a236c2d
2021-04-27 12:23:40 +09:00