Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1584211rwl; Wed, 12 Apr 2023 15:38:59 -0700 (PDT) X-Google-Smtp-Source: AKy350ZkrBkL1PNydkaHZq1xJaYoJkYi42vZXgPaA/qrOcsx6mpvt8jf3/rdlDBKaK2gS2ManK4F X-Received: by 2002:a05:6a20:3b92:b0:eb:765d:e0cd with SMTP id b18-20020a056a203b9200b000eb765de0cdmr919835pzh.48.1681339139135; Wed, 12 Apr 2023 15:38:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681339139; cv=none; d=google.com; s=arc-20160816; b=mSaO4eqFMboihLZUdo4JOTJ6dlaiKyuJZa8wwWyO8StqePoyVezPIUGbSP/+fkTvsX zuVz7ISOb1BCcvkSjwQkREuEGRAe5srgWkgX0anX62cLPPaCh7nw+oi2aqMSzM0NYjHw rgiGUjh3A2mrNB9AY+9OUuq8+i3bpo3fegV7Ttfoxa33Pxqth6ywF5d0yp8KdtpUWebr IJcZ7H93pWzX3caYxc64gsUXueLjGpcv3YO7A1U/D0qHQagwhMM07hSB4KZamfVWOjgh meonDZRQJbOZR77JwBP8CG/AmhGfTdq00I+FgwNIvv+5ubmKr3Ku6HYJbFGk0L6HSKx9 jGVQ== 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=NLZaMASFM7Zk2iHOKzdzLhBxwDhzf9hvMJPzhzphBYY=; b=u9Y7kuyQwoo/0w5VvRXpVpC3lIpvHlgFID5no7tICQVeNiEHIHtcmPab6dq5rNxlFy T9qUcXmoAfw/bxPh0nfXDZfbtHzlpzbsCTiSO6+a8PEwsdZqVGm9c7pFxUUEw9KNNbkv 3S1wDIKPluKRAwHyQQU7SFd8q9Z3/CTXvIx1to1a4pOCDvOyvHR2zttUlckVXTcZbWuM cWKNyk/FsvTLyQmEdBKlOFzpH30KjkK2Ykp/SwZ85gVpTL7fLZhLYm/tBGiCWtpRRUll 8A+/wemOhCcFluLmS3Ax+3zUfYYr+jHhNUycRBtCwg9jSk3SB+hvuNyi6x7ouEK7fYFv RUTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mariushoch.de header.s=MBO0001 header.b=DttlIcYL; 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 t29-20020aa7947d000000b00622eb1028cesi10956708pfq.112.2023.04.12.15.38.47; Wed, 12 Apr 2023 15:38:59 -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=DttlIcYL; 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 S229886AbjDLWhM (ORCPT + 99 others); Wed, 12 Apr 2023 18:37:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229630AbjDLWhD (ORCPT ); Wed, 12 Apr 2023 18:37:03 -0400 Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 813F476A9; Wed, 12 Apr 2023 15:37:01 -0700 (PDT) Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (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-102.mailbox.org (Postfix) with ESMTPS id 4Pxcyg5SmKz9sjN; Thu, 13 Apr 2023 00:36:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mariushoch.de; s=MBO0001; t=1681339019; 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=NLZaMASFM7Zk2iHOKzdzLhBxwDhzf9hvMJPzhzphBYY=; b=DttlIcYLSXwiLqP/JM6G0kgtmUe+AXrUC+BIoPK2n9sLXgAqCms6Jx3BXtc/WPRjmNYZjt shZNmwOIJoQBxK30b1uj2BK/neMWMEMijOaibA/jKw/eu4YOexaindqh6fIBDQxcwt6Grx IBJcuTTF5Ba6x3mwID4yn5pB64cDPnG5qiIOVyK2SmQwHWZ0AL9YjCr+RmVGdKfAz6JgfB FBg4MwxlXM5BMkirrMF/6ARDJYUO5LDURqFBE67kW6aviEv7oxAcjYykIt7F2mtPAH00l1 d+4Mp8XUk0QI9C5R+PMZmLfWcsuw8lhr9RNPc8HV3/TRYXFMALZL3XaAW1ivSw== From: mail@mariushoch.de To: Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Hans de Goede , Marius Hoch Subject: [PATCH] iio: magnetometer: st_accel: Add LSM303D Date: Thu, 13 Apr 2023 00:36:23 +0200 Message-Id: <20230412223627.442963-3-mail@mariushoch.de> In-Reply-To: <20230412223627.442963-1-mail@mariushoch.de> References: <20230412223627.442963-1-mail@mariushoch.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Pxcyg5SmKz9sjN 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 From: Marius Hoch 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