Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1818675rwl; Wed, 12 Apr 2023 19:54:36 -0700 (PDT) X-Google-Smtp-Source: AKy350aP0yGFWAGe/QSohD6txhCePreZ5iTgk0XmXP35wZaQbqTOvsTPDMfrkxYUw7b2c+UVRiyc X-Received: by 2002:a17:906:3c16:b0:933:be1:8f4f with SMTP id h22-20020a1709063c1600b009330be18f4fmr990458ejg.9.1681354476660; Wed, 12 Apr 2023 19:54:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681354476; cv=none; d=google.com; s=arc-20160816; b=q7zWSU4R+xezdDEwpc9q2+b3qQuaMDGyK/zuk6tHf/bwNeAuSzfDkOfd2JKD4iJ17z j15QaXbwKfPTk4ecKFeXta5mMX76vQaPXX77H9GVqMuYmhutTv6zAFuv+LW1rBe2eBNl D4Si4BCK3LDp3e6fNYqzrRpYLaEKnvKcioU/gbgru4IQYFM7Y6X2mbaSmCTMqJtHq/Ho ALBB0GECI7XlDa4YLvQAawdErdy4jZ+PqinLyEpSr7Al5vUuyqhdop9arYgnjXhXYDva 2Hjpu2Fp2aq5X+As46vvbNixvmixr62+9hdo4FVHxiPCYLhiVRzGaemgNv2XnmkfMBAf md8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aaBdxoh2tTQE/D7UbYD1GfSy8FZRjzStnfxmiQyyUCU=; b=xBKe9oz1mlJ9K73Za8gUmVwOJaU1i/DW+cEUjzzeqhp56Y1AcDr1ulyMVcTBbbDkVz xci+CGKW8lL77FpIqXXRXFoZq2Ctkx8F0lpslUR05Z2P8JnRejRV7aP3tKyqWVq8jjMx wSB00gUNBjySYdz7cK1D3EO74HztJZyogT9i+27qYwEphtzHcqT92LYVtDqqjJ9u/sEc DMAC3Zlo9IMH+D8x8mh2lXqTpXWBUcy+pwxdLhR3wuOYz2SRlxKmDFMeN05YWxcbBOtD mhiObLnvQPvxJUqYN+GM+iHsv+GBLGzraVg4ybTfrlQsbJXseyiXl1PSOcZfHxki8KS8 RQXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mariushoch.de header.s=MBO0001 header.b=DxoskY+i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v8-20020a1709060b4800b0094a45f9e0e8si615860ejg.721.2023.04.12.19.54.11; Wed, 12 Apr 2023 19:54:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mariushoch.de header.s=MBO0001 header.b=DxoskY+i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230526AbjDMCoF (ORCPT + 99 others); Wed, 12 Apr 2023 22:44:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231344AbjDMCnv (ORCPT ); Wed, 12 Apr 2023 22:43:51 -0400 Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [IPv6:2001:67c:2050:0:465::101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7313B46B; Wed, 12 Apr 2023 19:42:13 -0700 (PDT) Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4PxkN22BQlz9sbr; Thu, 13 Apr 2023 04:40:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mariushoch.de; s=MBO0001; t=1681353650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aaBdxoh2tTQE/D7UbYD1GfSy8FZRjzStnfxmiQyyUCU=; b=DxoskY+i2dbZ/tkqUH4kPxL2ephBrr4AA5K4PTbhRxM5SZrYFyk2oYMEojAxi9tSgvC3XZ 5vbs8TiuawzJNAv9rv7qXbXEWbFavWB1gUYjjmUyY9Km7UWKoDQi9qpRbGz9lekFnif5Qq kQyW0Y3TKK1SU+adYQF4g+zhXaA6Zg655RMCR2hqOfPS6hPFk3CvtGPlpo6gU/Gd7mt2aB MYj67gwB7+ME+gAYW2fuP56iieDh6z8GZCTJdfZXS69rZn3Xo6O14P8H5p2S7ZPtuN3HPX 4NAl+rr0ZUAvPbwwDjV6lM/JXubywo7uYRrL5eRfkQ1VPpG9R0KhiCASRCfEOQ== From: Marius Hoch To: Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Hans de Goede , Marius Hoch Subject: [PATCH v2 2/6] iio: magnetometer: st_accel: Add LSM303D Date: Thu, 13 Apr 2023 04:40:09 +0200 Message-Id: <20230413024013.450165-3-mail@mariushoch.de> In-Reply-To: <20230413024013.450165-1-mail@mariushoch.de> References: <20230413024013.450165-1-mail@mariushoch.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4PxkN22BQlz9sbr X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The lsm303d has the same register mapping as the lsm9ds0, thus we can just re-use that. Tested on a Lenovo Yoga Tablet 2 1051-F. Signed-off-by: Marius Hoch --- drivers/iio/magnetometer/st_magn_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c index 8faa7409d9e1..6cc0dfd31821 100644 --- a/drivers/iio/magnetometer/st_magn_core.c +++ b/drivers/iio/magnetometer/st_magn_core.c @@ -427,6 +427,7 @@ static const struct st_sensor_settings st_magn_sensors_settings[] = { .wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS, .sensors_supported = { [0] = LSM9DS0_IMU_DEV_NAME, + [1] = LSM303D_IMU_DEV_NAME, }, .ch = (struct iio_chan_spec *)st_magn_4_16bit_channels, .odr = { -- 2.39.2