Skip to content

Commit 5e91cef

Browse files
kaecheledtor
authored andcommitted
Input: himax_hx83112b - add support for HX83100A
The HX83100A is a bit of an outlier in the Himax HX831xxx series of touch controllers as it requires reading touch events through the AHB interface of the MCU rather than providing a dedicated FIFO address like the other chips do. This patch implements the specific read function and introduces the HX83100A chip with an appropriate i2c ID and DT compatible string. The HX83100A doesn't have a straightforward way to do chip identification, which is why it is not implemented in this patch. Tested on: Lenovo ThinkSmart View (CD-18781Y) / Innolux P080DDD-AB2 LCM Signed-off-by: Felix Kaechele <[email protected]> Tested-by: Paul Gale <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent aa9007e commit 5e91cef

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

drivers/input/touchscreen/himax_hx83112b.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
*
55
* Copyright (C) 2022 Job Noorman <[email protected]>
66
*
7+
* HX83100A support
8+
* Copyright (C) 2024 Felix Kaechele <[email protected]>
9+
*
710
* This code is based on "Himax Android Driver Sample Code for QCT platform":
811
*
912
* Copyright (C) 2017 Himax Corporation.
@@ -35,6 +38,8 @@
3538

3639
#define HIMAX_REG_ADDR_ICID 0x900000d0
3740

41+
#define HX83100A_REG_FW_EVENT_STACK 0x90060000
42+
3843
#define HIMAX_INVALID_COORD 0xffff
3944

4045
struct himax_event_point {
@@ -288,6 +293,12 @@ static int himax_read_events(struct himax_ts_data *ts,
288293
length);
289294
}
290295

296+
static int hx83100a_read_events(struct himax_ts_data *ts,
297+
struct himax_event *event, size_t length)
298+
{
299+
return himax_bus_read(ts, HX83100A_REG_FW_EVENT_STACK, event, length);
300+
};
301+
291302
static int himax_handle_input(struct himax_ts_data *ts)
292303
{
293304
int error;
@@ -394,20 +405,26 @@ static int himax_resume(struct device *dev)
394405

395406
static DEFINE_SIMPLE_DEV_PM_OPS(himax_pm_ops, himax_suspend, himax_resume);
396407

408+
static const struct himax_chip hx83100a_chip = {
409+
.read_events = hx83100a_read_events,
410+
};
411+
397412
static const struct himax_chip hx83112b_chip = {
398413
.id = 0x83112b,
399414
.check_id = himax_check_product_id,
400415
.read_events = himax_read_events,
401416
};
402417

403418
static const struct i2c_device_id himax_ts_id[] = {
419+
{ "hx83100a", (kernel_ulong_t)&hx83100a_chip },
404420
{ "hx83112b", (kernel_ulong_t)&hx83112b_chip },
405421
{ /* sentinel */ }
406422
};
407423
MODULE_DEVICE_TABLE(i2c, himax_ts_id);
408424

409425
#ifdef CONFIG_OF
410426
static const struct of_device_id himax_of_match[] = {
427+
{ .compatible = "himax,hx83100a", .data = &hx83100a_chip },
411428
{ .compatible = "himax,hx83112b", .data = &hx83112b_chip },
412429
{ /* sentinel */ }
413430
};

0 commit comments

Comments
 (0)