From patchwork Wed Feb 2 23:50:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 12733540 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 22911C4332F for ; Wed, 2 Feb 2022 23:51:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348137AbiBBXvF (ORCPT ); Wed, 2 Feb 2022 18:51:05 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:41693 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241124AbiBBXux (ORCPT ); Wed, 2 Feb 2022 18:50:53 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id C586B5C0103; Wed, 2 Feb 2022 18:50:52 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 02 Feb 2022 18:50:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; bh=Y4pzDtLO4vUepP7Uh68a3ypkFiKmDj xHf96nex3DW40=; b=CNg4SLD7rgwPkGjZF3UUq4/+O0T7FRClwVbWnJNIO6fwRk lcc1AWTuBwVwKTJ05PZWrWH+o0SJIQ1/OO8cNPvafXwj3e6PwH4pCEkzY8cPU09z 92Z+sZ95qwwaOuib8fStDG38PEeP+A3Ku8OIxunm3n7kFtNSHOsNf+7SBab0oEFm eEQOQa1XjBiH13zqgfXPE53YlkEd60HKWdIstXH1/nQgl2o7LzFdpAcDdOL0CIF1 KQxVVCstj30Y3ECZCQLMBT1rDJf3jrlQwl5gWTJwxyx99T925J2nhKPBij7ZVyYP t+hglVlN38rmaXbpXTf+LAKRFW2nldC1cXbwVfnQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=Y4pzDt LO4vUepP7Uh68a3ypkFiKmDjxHf96nex3DW40=; b=lTzTA9o9RDigso8X4eWERB EOipfZxPOKxTov5vk4Pon/+vM+TBMQE3TV36xNLLPv9QX6I5jflA0dDCaUp/5jZU rklQMkhr05UnJNYxB1BevN2fPGQ8d0np/K8gMWw7r8a9hWcNoNO2AMSIEHaEdBxY 1axiYWzK0rdlXeV8ocw0XmeS0WgJtw1FHhTd+zN8oBq/Hztsq6liIEEjam+/97cj g1S8v4/T9b3JdicAf3gAEB64sR7HCh3DLDi6iAjbfcLOxMiDauLX+rkuBkUFsU9L kn9w6mUn8XFtV2RPqaWuhlD0fZT3FNBAvaCJNgjlm2cYc6mkPym0kM5Id3Pzldpg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrgeeigddufecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrf grthhtvghrnhepvdeiteevueettdehuedvueduhfelhffgjeduleeiudevhedugfdttefg heelhefhnecuffhomhgrihhnpehsihhlrghnrdgtohhmrdgtnhenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmuhgvlhesshhhohhllhgr nhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 2 Feb 2022 18:50:52 -0500 (EST) From: Samuel Holland To: Jonathan Cameron , Lars-Peter Clausen , Denis Ciocca , Linus Walleij , Rob Herring , devicetree@vger.kernel.org Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Samuel Holland Subject: [PATCH v2 1/3] dt-bindings: vendor-prefixes: Add silan vendor prefix Date: Wed, 2 Feb 2022 17:50:46 -0600 Message-Id: <20220202235049.8051-2-samuel@sholland.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220202235049.8051-1-samuel@sholland.org> References: <20220202235049.8051-1-samuel@sholland.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Hangzhou Silan Microelectronics Co., Ltd. (http://www.silan.com.cn/) is a manufacturer of ICs, including MEMS sensors. Signed-off-by: Samuel Holland Reviewed-by: Linus Walleij Acked-by: Rob Herring --- (no changes since v1) Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 294093d45a23..b923be2c8172 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -1082,6 +1082,8 @@ patternProperties: description: Silicon Image "^silabs,.*": description: Silicon Laboratories + "^silan,.*": + description: Hangzhou Silan Microelectronics Co., Ltd. "^silead,.*": description: Silead Inc. "^silergy,.*": From patchwork Wed Feb 2 23:50:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 12733541 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 C7C88C4167B for ; Wed, 2 Feb 2022 23:51:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348145AbiBBXvH (ORCPT ); Wed, 2 Feb 2022 18:51:07 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:58279 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348129AbiBBXuy (ORCPT ); Wed, 2 Feb 2022 18:50:54 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 413405C0112; Wed, 2 Feb 2022 18:50:54 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 02 Feb 2022 18:50:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; bh=Qb1BuHwJZ6FFKPaD1otK7ZGteevZ9K auHoztuJpNNp0=; b=HLjqgB17ytoJKhuxLVZTe7b8JyaN0/ssnyxZ6y41lbqpL5 3iL0HfuZfwxIxjnBH++t83h5oZGltEdCVMfQFyzvi0WD3L+OXSoF67cy4bMgtpOG 6ke0q/BNSN+ZGmYEw/3awzBzx93pxukWPJJDAgdtKdcrHpyztFUeuKckchdfEd9x zXdhej4fuqPgXVMCvnKzDdp8d3/HBrt4AzZb+piZsqhCV0R+t0mO84S2R0LDRBpB bKCB8v6vpTMH5nnhh4VnqoERDMK/lVgACcXxNGVs8+go2q+ukBpJP4Rmnbpmoo30 X/WpMh1iiK/qm4yvR80DltnKEZ74cNOiAXmvub6A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=Qb1BuH wJZ6FFKPaD1otK7ZGteevZ9KauHoztuJpNNp0=; b=alnMiUqX59yZUAOY4lN09t ruO6r71fOyakaaUD0AD2dqzjwONaF9X3WXFcRSimq3wWp1QnNInTGI+fOiJpMW3g Vc4fN+1xwjIxQirOjobcjb8SJrjjo6QN0cDO6yYmJwNMF26Uc7wGriLpuELNaodo psYVuXZnvwVK+mvDIdTXczIAPIIhdRKWNF0R2OvhD1juI74k2RFgx5FbJS+VTs/l XRlvxv3zPHS81VjRtGfiPW2CuNj895UtTKnSRgTiR8dzfG58nxFJq+2b7o0k6v/U Fayhz1RyhjyXYv+hqKARMKoKZ2KKh+OmPlO1qxaaAFWLybxGzdNPeZ3m8i1dNxkg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrgeeigdduvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrf grthhtvghrnhepudfhjeefvdfhgfefheetgffhieeigfefhefgvddvveefgeejheejvdfg jeehueeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 2 Feb 2022 18:50:53 -0500 (EST) From: Samuel Holland To: Jonathan Cameron , Lars-Peter Clausen , Denis Ciocca , Linus Walleij , Rob Herring , devicetree@vger.kernel.org Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Samuel Holland Subject: [PATCH v2 2/3] dt-bindings: iio: st: Add Silan SC7A20 accelerometer Date: Wed, 2 Feb 2022 17:50:47 -0600 Message-Id: <20220202235049.8051-3-samuel@sholland.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220202235049.8051-1-samuel@sholland.org> References: <20220202235049.8051-1-samuel@sholland.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org This chip is not an ST part, but it appears to be register-compatible with the LIS2DH, so it can use the same binding. Signed-off-by: Samuel Holland Reviewed-by: Linus Walleij Acked-by: Rob Herring --- Changes in v2: - Move the new compatible to its own section Documentation/devicetree/bindings/iio/st,st-sensors.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml index 71de5631ebae..9735a2048255 100644 --- a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml +++ b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml @@ -46,6 +46,9 @@ properties: - st,lsm330d-accel - st,lsm330dl-accel - st,lsm330dlc-accel + - description: Silan Accelerometers + enum: + - silan,sc7a20 - description: STMicroelectronics Gyroscopes enum: - st,l3g4200d-gyro From patchwork Wed Feb 2 23:50:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 12733542 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 5A90FC43217 for ; Wed, 2 Feb 2022 23:51:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348141AbiBBXvG (ORCPT ); Wed, 2 Feb 2022 18:51:06 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:46345 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348134AbiBBXu4 (ORCPT ); Wed, 2 Feb 2022 18:50:56 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A099F5C0114; Wed, 2 Feb 2022 18:50:55 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 02 Feb 2022 18:50:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; bh=Y4Guu71RDilBzG o2ggKBceNSjzOtu1j8s5y8c9QFFGs=; b=REJlAgpV/D931cY5p/+UCEaeFRCcbQ CVCXeXMAEOrRqLagTfw0+oxg+uFY7Z+vz6vM6JreAE00qEsibBCspLpvO4kUaHEI nrV8ZLlFcNpJU/T/Wl6RhpUTTvg5a4EAmFLIuGURWRw/l+ZhU6NuXMiBN/AuCWhW EuoiSoE2M432MSdDO5NS6j4zXGok10EL/DWaqWjImmDx6FZP+4dBu7oHoGsXJJGL 67CyvXmuNHRpYEPTHGkmkuMDRwJ1LJMHoquUuBUZDoMgB7BNzxxJnfCsDN5gC0Uz mGJfZeBxj8xHVhCyprKjVbleZ4EsjL7vZOdV407cupcvD8huepm7RkbQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=Y4Guu71RDilBzGo2ggKBceNSjzOtu1j8s5y8c9QFF Gs=; b=Goy9bjzJcCXGDrNV+AtxUP5YgXSq+/UE8rKKpHnE4v5HaEnY/z/Ubh10B y8bazeN0e0YQs6MmXIZlrIokJhkynjykFS4hZ1g0iUSodVnTqqrClQ8ZccfJ6ewu +DvYD0f6JefwDKZHJ9d5tvYAz14TYiDP5VfBkj2nlAgX8uWU93EYNgRka+HbgoRC iL4ghDQte9isKXcE2kfbeaPFNMEJbRiZIpbNkbW7SV/aJWhEvbZ2cR7WDJDYTu/e zFAV0s/LxHvaNAYgOvAJzXiZ0vkIGeXRNHseqxUStbMmEjUALh0k1+l+Zm1oATcT rlE8wzE7pLLRVBtY97D1DawWTK/jg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrgeeigdduvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeettdejhfejjedvfeelieffteduueevgeethedvjefhkeeigfejhfet udffiefhfeenucffohhmrghinheplhhinhhugidqtghhvghngihinhhgrdhorhhgpdhsih hithgvkhdrtghomhdrtghnnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 2 Feb 2022 18:50:55 -0500 (EST) From: Samuel Holland To: Jonathan Cameron , Lars-Peter Clausen , Denis Ciocca , Linus Walleij , Rob Herring , devicetree@vger.kernel.org Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Samuel Holland Subject: [PATCH v2 3/3] iio: accel: st_accel: Add support for Silan SC7A20 Date: Wed, 2 Feb 2022 17:50:48 -0600 Message-Id: <20220202235049.8051-4-samuel@sholland.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220202235049.8051-1-samuel@sholland.org> References: <20220202235049.8051-1-samuel@sholland.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org This chip appears to be register-compatible with the LIS2DH. The new description is a copy of the LIS2DH's description with a different WAI value. Datasheet: http://linux-chenxing.org/silan/SC7A20-SilanMicroelectronics.pdf Datasheet: http://www.siitek.com.cn/Upfiles/down/SC7A20说明书_0.92(智能穿戴).pdf Signed-off-by: Samuel Holland Reviewed-by: Linus Walleij --- Changes in v2: - Add a comment about the WAI value - Update commit messages drivers/iio/accel/st_accel.h | 2 + drivers/iio/accel/st_accel_core.c | 83 +++++++++++++++++++++++++++++++ drivers/iio/accel/st_accel_i2c.c | 5 ++ 3 files changed, 90 insertions(+) diff --git a/drivers/iio/accel/st_accel.h b/drivers/iio/accel/st_accel.h index 8750dea56fcb..00e056c21bfc 100644 --- a/drivers/iio/accel/st_accel.h +++ b/drivers/iio/accel/st_accel.h @@ -36,6 +36,7 @@ enum st_accel_type { LIS3DHH, LIS2DE12, LIS2HH12, + SC7A20, ST_ACCEL_MAX, }; @@ -61,6 +62,7 @@ enum st_accel_type { #define LIS3DE_ACCEL_DEV_NAME "lis3de" #define LIS2DE12_ACCEL_DEV_NAME "lis2de12" #define LIS2HH12_ACCEL_DEV_NAME "lis2hh12" +#define SC7A20_ACCEL_DEV_NAME "sc7a20" #ifdef CONFIG_IIO_BUFFER int st_accel_allocate_ring(struct iio_dev *indio_dev); diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c index 31ea19d0ba71..2ada8d6fb503 100644 --- a/drivers/iio/accel/st_accel_core.c +++ b/drivers/iio/accel/st_accel_core.c @@ -1087,6 +1087,89 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = { .multi_read_bit = true, .bootime = 2, }, + { + /* + * Not an ST part. Register-compatible with the LIS2DH, even + * though the WAI value is different. + */ + .wai = 0x11, + .wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS, + .sensors_supported = { + [0] = SC7A20_ACCEL_DEV_NAME, + }, + .ch = (struct iio_chan_spec *)st_accel_12bit_channels, + .odr = { + .addr = 0x20, + .mask = 0xf0, + .odr_avl = { + { .hz = 1, .value = 0x01, }, + { .hz = 10, .value = 0x02, }, + { .hz = 25, .value = 0x03, }, + { .hz = 50, .value = 0x04, }, + { .hz = 100, .value = 0x05, }, + { .hz = 200, .value = 0x06, }, + { .hz = 400, .value = 0x07, }, + { .hz = 1600, .value = 0x08, }, + }, + }, + .pw = { + .addr = 0x20, + .mask = 0xf0, + .value_off = ST_SENSORS_DEFAULT_POWER_OFF_VALUE, + }, + .enable_axis = { + .addr = ST_SENSORS_DEFAULT_AXIS_ADDR, + .mask = ST_SENSORS_DEFAULT_AXIS_MASK, + }, + .fs = { + .addr = 0x23, + .mask = 0x30, + .fs_avl = { + [0] = { + .num = ST_ACCEL_FS_AVL_2G, + .value = 0x00, + .gain = IIO_G_TO_M_S_2(1000), + }, + [1] = { + .num = ST_ACCEL_FS_AVL_4G, + .value = 0x01, + .gain = IIO_G_TO_M_S_2(2000), + }, + [2] = { + .num = ST_ACCEL_FS_AVL_8G, + .value = 0x02, + .gain = IIO_G_TO_M_S_2(4000), + }, + [3] = { + .num = ST_ACCEL_FS_AVL_16G, + .value = 0x03, + .gain = IIO_G_TO_M_S_2(12000), + }, + }, + }, + .bdu = { + .addr = 0x23, + .mask = 0x80, + }, + .drdy_irq = { + .int1 = { + .addr = 0x22, + .mask = 0x10, + }, + .addr_ihl = 0x25, + .mask_ihl = 0x02, + .stat_drdy = { + .addr = ST_SENSORS_DEFAULT_STAT_ADDR, + .mask = 0x07, + }, + }, + .sim = { + .addr = 0x23, + .value = BIT(0), + }, + .multi_read_bit = true, + .bootime = 2, + }, }; /* Default accel DRDY is available on INT1 pin */ diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c index c0ce78eebad9..7f5888570e87 100644 --- a/drivers/iio/accel/st_accel_i2c.c +++ b/drivers/iio/accel/st_accel_i2c.c @@ -107,6 +107,10 @@ static const struct of_device_id st_accel_of_match[] = { .compatible = "st,lis2hh12", .data = LIS2HH12_ACCEL_DEV_NAME, }, + { + .compatible = "silan,sc7a20", + .data = SC7A20_ACCEL_DEV_NAME, + }, {}, }; MODULE_DEVICE_TABLE(of, st_accel_of_match); @@ -142,6 +146,7 @@ static const struct i2c_device_id st_accel_id_table[] = { { LIS3DE_ACCEL_DEV_NAME }, { LIS2DE12_ACCEL_DEV_NAME }, { LIS2HH12_ACCEL_DEV_NAME }, + { SC7A20_ACCEL_DEV_NAME }, {}, }; MODULE_DEVICE_TABLE(i2c, st_accel_id_table);