From patchwork Wed May 4 15:24:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markuss Broks X-Patchwork-Id: 569395 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AC9BC43217 for ; Wed, 4 May 2022 15:24:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352310AbiEDP20 (ORCPT ); Wed, 4 May 2022 11:28:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351814AbiEDP2W (ORCPT ); Wed, 4 May 2022 11:28:22 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46FE344A04; Wed, 4 May 2022 08:24:46 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id x18so2549191wrc.0; Wed, 04 May 2022 08:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HQbqkKFVhO0oYTCViggW509ZlaV6AfefEm9f3k12+eg=; b=I3V5xwc9mmJq9PbDd0vvDdHFo49dVPjTOVRWlp22XUQElQp0zzIOBiGS7b0ynHNI5Y BwjGbVvkEMSmalnyMryP7nneYZhAcm6vHowvvYE6n0fJ8K5HDt88esL6adDs7OOPw7sG mPK767DkFjwK1lK6DRPOiY3bhlBTG5l37G7dA2OEPfK3sDrnMU5t0fLAkItQ8teLwhqC ZpR67GAX9dKU16IKNP6/2WUsB2aVJ7ehlNOP9/mLj4rtzv6YyEBRMnJ4dVrwDZwmz4JZ OU1iw8EeAu+71o96y9De7kEeWsNyQO/1bKKe1eYPzZAQJSxDDex47/QpG8NvZKDFKD44 R7Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HQbqkKFVhO0oYTCViggW509ZlaV6AfefEm9f3k12+eg=; b=CD/IJWzJRkPNEMfr6ordz1MGtUZbalOSjOjuEv9StPFu2httFxzS7DsDAdUunN7Gg9 y9JJqhGi5mPPyVBJqwppKjxoIhwMHI5rheIe0KCoQLs4LSGGuUKckN27Rx5CUi0SeGSo T8nAndGpuqu3S78jbJ8cxWTocdm4G0ClKwBdm8U7JDCn4YcQ9DzM/pRZeeRSuROdUybt CmoRWQflb7RENcpVP5VI8Z4Ca1g3fLNThcG/OVPhSwNFp5MA/TR0qRnf+Y8BX++EZ028 PAZvxy5sCfrKl1W2Fi9OPJXm8tw4B9F+KiyOgQiLMUWnbcgQoykNfEZWXpOxvVdO6WiK JCFg== X-Gm-Message-State: AOAM5321hHb71tKIgWIHwlolmwVa5L8Sn56Kw9OIytBVAZ5kXDdQwzfh yIUmPp/jaLWctMrkvRtWxYmOv3gUqZM= X-Google-Smtp-Source: ABdhPJx1+G9RDiWmcUyMeC6S39k0ed5r/nxqS1nrwlLkRDOPOUOrL74l7Ui9N2K4sanMxhRsUk7IQA== X-Received: by 2002:a5d:6dac:0:b0:20c:5fbf:5c4d with SMTP id u12-20020a5d6dac000000b0020c5fbf5c4dmr12489091wrs.548.1651677884735; Wed, 04 May 2022 08:24:44 -0700 (PDT) Received: from nergzd-desktop.localdomain ([194.39.226.133]) by smtp.gmail.com with ESMTPSA id s14-20020adfa28e000000b0020c5253d91csm11541041wra.104.2022.05.04.08.24.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 May 2022 08:24:44 -0700 (PDT) From: Markuss Broks To: linux-kernel@vger.kernel.org Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Markuss Broks , Lin Meng-Bo , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Henrik Rydberg , linux-input@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 1/3] input/touchscreen: imagis: Correct the maximum touch area value Date: Wed, 4 May 2022 18:24:03 +0300 Message-Id: <20220504152406.8730-2-markuss.broks@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220504152406.8730-1-markuss.broks@gmail.com> References: <20220504152406.8730-1-markuss.broks@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org As specified in downstream IST3038B driver and proved by testing, the correct maximum reported value of touch area is 16. Signed-off-by: Markuss Broks --- drivers/input/touchscreen/imagis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen/imagis.c index e2697e6c6d2a..b667914a44f1 100644 --- a/drivers/input/touchscreen/imagis.c +++ b/drivers/input/touchscreen/imagis.c @@ -210,7 +210,7 @@ static int imagis_init_input_dev(struct imagis_ts *ts) input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_X); input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_Y); - input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0); + input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 16, 0, 0); touchscreen_parse_properties(input_dev, true, &ts->prop); if (!ts->prop.max_x || !ts->prop.max_y) { From patchwork Wed May 4 15:24:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markuss Broks X-Patchwork-Id: 570059 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A6ABC4321E for ; Wed, 4 May 2022 15:24:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352332AbiEDP21 (ORCPT ); Wed, 4 May 2022 11:28:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352075AbiEDP2X (ORCPT ); Wed, 4 May 2022 11:28:23 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DCBB44A08; Wed, 4 May 2022 08:24:47 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id u3so2521277wrg.3; Wed, 04 May 2022 08:24:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Kc5mcOct0oUOKk+U4jtRUliz/FH5+TKvkz3rnonQevw=; b=M5OerQS/g1OAy8dhJWns5hn2/kBwqRnvELSPqnDascuvrHXdsCYPC+eeAXr9wMUWZ1 BaOPdI09tKFF1m1/6NL12WRJPI1TXKB4BPCNaGlp/UQOY2R2mjvYyZ6yzFjThDU925HG DiMC1xzdgbs78MN4UJ+ym3PjMFXlf9Ml2rN/ucBqz+Gg5gvaszYv10KpceI3DarE7kCl R6NGYxMzhv/zpVymVBqOhpGacmAqvGOAig0WUZq8xk0IzCL7b3m2NXXN9msijGgwLtC2 QLzEuQdphbqc4Y2fLO9b8cPdrsGWeb3rZQtQ0mIjuMIBIge56WHkas29sdr2wAp8Njga I0Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Kc5mcOct0oUOKk+U4jtRUliz/FH5+TKvkz3rnonQevw=; b=ccAr/6Abm5HIN6jLt0FmoU72TR/353arjmVr6t1VTjrphFF0K2yNntkNP0dTl1Fu33 n1kkeQj5GOWBnrFsmvN+rkPSleFVe/+krz33svYwHmPuBGlLd+pqA7ZMLVovem3gWsne K7HVJjdF9rRzRoJiOPHUsVSKfdMBOiUME5kFDbfcq7wHNUB1Xul+jvTW4SHLze5IM2JV bGsRKWdSi6BOpeoqVymfdF8K2gxSexCTxkB6JuTR9r1gcy5Y30s9Xawr9H40spP4IhDU yJNOc7I1oXYaL0fO9DWIUYTsDkoy3kZRd5F35lZzUiTjwcfFimun8pvBF/r6JhZDvjC7 S7iQ== X-Gm-Message-State: AOAM530ZAUoZWxjNfUuCgOAKAWHPstGBDtPSz6+W7UcWYOC69GD/qq/L YzMhM3j4KPljq0CK9X0MKA/yOoKgpTE= X-Google-Smtp-Source: ABdhPJy5xEHkSlk48t7udQi38eCM+wUHzZKt73nfAymRjVCJgVFj7xoAfLUxKNwnLQyLNZPWAdk+GA== X-Received: by 2002:adf:f4d2:0:b0:20c:59b9:37bd with SMTP id h18-20020adff4d2000000b0020c59b937bdmr14286679wrp.677.1651677886125; Wed, 04 May 2022 08:24:46 -0700 (PDT) Received: from nergzd-desktop.localdomain ([194.39.226.133]) by smtp.gmail.com with ESMTPSA id s14-20020adfa28e000000b0020c5253d91csm11541041wra.104.2022.05.04.08.24.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 May 2022 08:24:45 -0700 (PDT) From: Markuss Broks To: linux-kernel@vger.kernel.org Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Markuss Broks , Lin Meng-Bo , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Henrik Rydberg , linux-input@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 2/3] dt-bindings: input/touchscreen: Add compatible for IST3038B Date: Wed, 4 May 2022 18:24:04 +0300 Message-Id: <20220504152406.8730-3-markuss.broks@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220504152406.8730-1-markuss.broks@gmail.com> References: <20220504152406.8730-1-markuss.broks@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Imagis IST3038B is a variant (firmware?) of Imagis IST3038 IC, add the compatible for it to the IST3038C bindings. Signed-off-by: Markuss Broks Acked-by: Rob Herring --- .../devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml index e3a2b871e50c..a283040cd2aa 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml +++ b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml @@ -18,6 +18,7 @@ properties: compatible: enum: + - imagis,ist3038b - imagis,ist3038c reg: From patchwork Wed May 4 15:24:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markuss Broks X-Patchwork-Id: 569394 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BE72C4167D for ; Wed, 4 May 2022 15:24:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352324AbiEDP22 (ORCPT ); Wed, 4 May 2022 11:28:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352299AbiEDP20 (ORCPT ); Wed, 4 May 2022 11:28:26 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75E4E4474B; Wed, 4 May 2022 08:24:49 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id a14-20020a7bc1ce000000b00393fb52a386so3446159wmj.1; Wed, 04 May 2022 08:24:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S0+dOonjyXB+u/RPDdGeIJKQE4fMwvUsn4WlnEiMshU=; b=YY9vBebDEgCZNjAmaLhjdYzaTqnAHEGlxSJawmMGqbg4pKN4YjtYcHCjw9OGiyf/ye vzqWImpXfFCqll276rqhRwlIiIwLSGTUBHEAhdvuq5ZkiQjBPZBXwxVJndESB6fcuBKY vohnEeNggv73lCZjTOpgdXdyn++4g8Sw1mbv8rhS8oeOPOaTHlaDOsDKPL3JQUg0CNj1 ktyCdYJJdzbw+nipTopjOCLDR3cShnhLL+ZpU+/SyJUUEyqrYsG4W+Cztfaso9JytgS1 q/O0Eilz3fkUYNUYYslcm08o9f7gZA1vzw95zwYIZZeUhVa1rQtPXGOHAt64SXzIL8sf pj1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=S0+dOonjyXB+u/RPDdGeIJKQE4fMwvUsn4WlnEiMshU=; b=WQgEPhrfRUqKrxg1u0pnuOH3QraeWR7YJHQzRn7osB8CY814y+rQvro+y4jsdVefGk +huisbL4JDtWG/74p59Uj4UjAUez1EcAfR0wgNKaZwlf3FQ5RzKMCQlVUnvWS7wjbK8R 92oktnSdnNzj9i+19qSpSj7dJX5Jpy/hGQ9MPwi5gBHZHTt10zDbyA5gTDMC6vxRijBk GRaEQO0/rV72uecxT08ikpVeAjOtQS8x84yIM7DcKXjcjXll1X/UkzDQRoDqk3M0Ti2D 0pT5tj3596sNUK7hfdWPAOg2H9QzoCOREHd2NqpOlLipMsmK8z30b705h0CsJ9xxvxq+ XEVw== X-Gm-Message-State: AOAM53059HknQzupbFZT/EEKV3XsdnxUe2KNNzBvg8OoPMQ41TL+0k3D ESJbjdvbSKhyJxt1wnugEDmKjc9ck00= X-Google-Smtp-Source: ABdhPJxuCA0jS5OuPVXnnGgLs8Hy3fEvmxK8UOE0o/zR+PYdbBt5zeS6/NiNrBZ7/rymeQnCRK/sZA== X-Received: by 2002:a05:600c:1f0d:b0:394:23f0:4530 with SMTP id bd13-20020a05600c1f0d00b0039423f04530mr18326wmb.30.1651677887892; Wed, 04 May 2022 08:24:47 -0700 (PDT) Received: from nergzd-desktop.localdomain ([194.39.226.133]) by smtp.gmail.com with ESMTPSA id s14-20020adfa28e000000b0020c5253d91csm11541041wra.104.2022.05.04.08.24.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 May 2022 08:24:47 -0700 (PDT) From: Markuss Broks To: linux-kernel@vger.kernel.org Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Markuss Broks , Lin Meng-Bo , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Henrik Rydberg , linux-input@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 3/3] input/touchscreen: imagis: Add support for Imagis IST3038B Date: Wed, 4 May 2022 18:24:05 +0300 Message-Id: <20220504152406.8730-4-markuss.broks@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220504152406.8730-1-markuss.broks@gmail.com> References: <20220504152406.8730-1-markuss.broks@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Imagis IST3038B is another variant of Imagis IST3038 IC, which has a different register interface from IST3038C (possibly firmware defined). This should also work for IST3044B (though untested), however other variants using this interface/protocol(IST3026, IST3032, IST3026B, IST3032B) have a different format for coordinates, and they'd need additional effort to be supported by this driver. Signed-off-by: Markuss Broks --- drivers/input/touchscreen/imagis.c | 58 ++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 11 deletions(-) diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen/imagis.c index b667914a44f1..57bb8f31ac1f 100644 --- a/drivers/input/touchscreen/imagis.c +++ b/drivers/input/touchscreen/imagis.c @@ -13,7 +13,7 @@ #define IST3038C_HIB_ACCESS (0x800B << 16) #define IST3038C_DIRECT_ACCESS BIT(31) -#define IST3038C_REG_CHIPID 0x40001000 +#define IST3038C_REG_CHIPID (0x40001000 | IST3038C_DIRECT_ACCESS) #define IST3038C_REG_HIB_BASE 0x30000100 #define IST3038C_REG_TOUCH_STATUS (IST3038C_REG_HIB_BASE | IST3038C_HIB_ACCESS) #define IST3038C_REG_TOUCH_COORD (IST3038C_REG_HIB_BASE | IST3038C_HIB_ACCESS | 0x8) @@ -31,8 +31,21 @@ #define IST3038C_FINGER_COUNT_SHIFT 12 #define IST3038C_FINGER_STATUS_MASK GENMASK(9, 0) +#define IST3038B_REG_STATUS 0x20 +#define IST3038B_REG_CHIPID 0x30 +#define IST3038B_WHOAMI 0x30380b + +struct imagis_properties { + unsigned int interrupt_msg_cmd; + unsigned int touch_coord_cmd; + unsigned int whoami_cmd; + unsigned int whoami_val; + bool protocol_b; +}; + struct imagis_ts { struct i2c_client *client; + const struct imagis_properties *tdata; struct input_dev *input_dev; struct touchscreen_properties prop; struct regulator_bulk_data supplies[2]; @@ -84,8 +97,7 @@ static irqreturn_t imagis_interrupt(int irq, void *dev_id) int i; int error; - error = imagis_i2c_read_reg(ts, IST3038C_REG_INTR_MESSAGE, - &intr_message); + error = imagis_i2c_read_reg(ts, ts->tdata->interrupt_msg_cmd, &intr_message); if (error) { dev_err(&ts->client->dev, "failed to read the interrupt message: %d\n", error); @@ -104,9 +116,13 @@ static irqreturn_t imagis_interrupt(int irq, void *dev_id) finger_pressed = intr_message & IST3038C_FINGER_STATUS_MASK; for (i = 0; i < finger_count; i++) { - error = imagis_i2c_read_reg(ts, - IST3038C_REG_TOUCH_COORD + (i * 4), - &finger_status); + if (ts->tdata->protocol_b) + error = imagis_i2c_read_reg(ts, + ts->tdata->touch_coord_cmd, &finger_status); + else + error = imagis_i2c_read_reg(ts, + ts->tdata->touch_coord_cmd + (i * 4), + &finger_status); if (error) { dev_err(&ts->client->dev, "failed to read coordinates for finger %d: %d\n", @@ -261,6 +277,12 @@ static int imagis_probe(struct i2c_client *i2c) ts->client = i2c; + ts->tdata = device_get_match_data(dev); + if (!ts->tdata) { + dev_err(dev, "missing chip data\n"); + return -EINVAL; + } + error = imagis_init_regulators(ts); if (error) { dev_err(dev, "regulator init error: %d\n", error); @@ -279,15 +301,13 @@ static int imagis_probe(struct i2c_client *i2c) return error; } - error = imagis_i2c_read_reg(ts, - IST3038C_REG_CHIPID | IST3038C_DIRECT_ACCESS, - &chip_id); + error = imagis_i2c_read_reg(ts, ts->tdata->whoami_cmd, &chip_id); if (error) { dev_err(dev, "chip ID read failure: %d\n", error); return error; } - if (chip_id != IST3038C_WHOAMI) { + if (chip_id != ts->tdata->whoami_val) { dev_err(dev, "unknown chip ID: 0x%x\n", chip_id); return -EINVAL; } @@ -343,9 +363,25 @@ static int __maybe_unused imagis_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(imagis_pm_ops, imagis_suspend, imagis_resume); +static const struct imagis_properties imagis_3038b_data = { + .interrupt_msg_cmd = IST3038B_REG_STATUS, + .touch_coord_cmd = IST3038B_REG_STATUS, + .whoami_cmd = IST3038B_REG_CHIPID, + .whoami_val = IST3038B_WHOAMI, + .protocol_b = true, +}; + +static const struct imagis_properties imagis_3038c_data = { + .interrupt_msg_cmd = IST3038C_REG_INTR_MESSAGE, + .touch_coord_cmd = IST3038C_REG_TOUCH_COORD, + .whoami_cmd = IST3038C_REG_CHIPID, + .whoami_val = IST3038C_WHOAMI, +}; + #ifdef CONFIG_OF static const struct of_device_id imagis_of_match[] = { - { .compatible = "imagis,ist3038c", }, + { .compatible = "imagis,ist3038b", .data = &imagis_3038b_data }, + { .compatible = "imagis,ist3038c", .data = &imagis_3038c_data }, { }, }; MODULE_DEVICE_TABLE(of, imagis_of_match);