Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp2287357rwe; Sat, 15 Apr 2023 16:12:46 -0700 (PDT) X-Google-Smtp-Source: AKy350Y4+P0RMEywIe8bl8mDDq5xF7/u/VcckTA2zFI3SUx4UfffSEKU8maYZGRR5SwKQ0wVi4hI X-Received: by 2002:a17:903:41c3:b0:1a6:3799:ec36 with SMTP id u3-20020a17090341c300b001a63799ec36mr8118392ple.33.1681600366082; Sat, 15 Apr 2023 16:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681600366; cv=none; d=google.com; s=arc-20160816; b=hiAv8WkbKvhcHPJ3DjKS9L4YcrLr+tnWz2rMv2aLHPVD9dN5uS4JCgtHbk+3iWKhEk diByC3KgKIw77e+AJlw0nlvLdTUqCj8DhWi8fQa68IPUGG/KgUmTRiTtS4f5fFFTbRrs ++Xuon5EV3amcGpqyBSyS4eEUwg1zOdRx9tarru2v67dMvLMnlVDhQpSU5jSJsKwlzL5 63bCeul6Z0j+KQhU5EZi1ODDNXGQzLelPxneOYB5KCOux1fhKPWu0unMS1iKo1f+JMC0 ZIApTT5beknRfYvzeHOmSNxMpKvKDw1z0svjz6tpmV8olIHclpojsniQWncCAI5YWa8l HEqQ== 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=vSvEeYiR6GPU1bXLYVSLoLbGQwvE/JFqR3Uy1RDU/mu3QCMNY7ORifibolnhVL/W26 Ls5ikvFQkENyxPxobbFpm6SXkumO+7rR0vbv5f45HeLthAOyBeOT0VZSAdZHdqOEYHi4 qUT8d2yi1BRtDImbcBpf4S8ohAPZQnVTIBfCxnq1PFXYrmEEPwb6Hr2Dk7X9CCXUYGJw evU1yfJ74djAgAfeAes5NG7VOwoLRsTrwulhjZqxJwBg9MZy9JAyeI49WGQB8lFc4bET jUoTCK+3FJIzdUZeRqzRdIiXc6vit3w9+cSIFIDA1IaWLIehSf3nQmC/yIaanWGuqBWm fZhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mariushoch.de header.s=MBO0001 header.b=NQW5ku21; 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 y19-20020a1709029b9300b001a67ffb3546si1608786plp.231.2023.04.15.16.12.33; Sat, 15 Apr 2023 16:12:46 -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=NQW5ku21; 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 S230019AbjDOXML (ORCPT + 99 others); Sat, 15 Apr 2023 19:12:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229600AbjDOXMK (ORCPT ); Sat, 15 Apr 2023 19:12:10 -0400 Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [IPv6:2001:67c:2050:0:465::202]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 507C3D8; Sat, 15 Apr 2023 16:12:09 -0700 (PDT) Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (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-202.mailbox.org (Postfix) with ESMTPS id 4PzTbn6F4Qz9t4h; Sun, 16 Apr 2023 01:12:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mariushoch.de; s=MBO0001; t=1681600325; 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=NQW5ku21w7BMbgJTUa80Ynbqp9OYOavkA84NeF+zHMi4NI/V2JyL85JW1nqS9++ECVkNdQ iH6apcmiAHqXV10IpdotW1T7FOE3jHmVT0fOzkowmicWhd+3Y0yBN1x0HTMdWPzEVc5BdB svV0qGXn9/qg9Wm8BDEOcP+ktAeM3f7ty5rIn8p0WzN41YECFr4alK5NwBwKp7akTldDP3 jNhiz2Kt1oQxOlNkz5VWJtPy6ulXTZvJy6xfqhsxeMBr7Ba0tgzsWNd5hB3ClvZAs078aO ITegTcZoyfkQPNj0yRguIBh/v68S/j4jc4XoCP4v5N9xT/vmewub4eutQM5Qtw== From: Marius Hoch To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Denis Ciocca , Linus Walleij , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Hans de Goede , Marius Hoch Subject: [PATCH v3 2/6] iio: magnetometer: st_accel: Add LSM303D Date: Sun, 16 Apr 2023 01:11:26 +0200 Message-Id: <20230415231130.115094-3-mail@mariushoch.de> In-Reply-To: <20230415231130.115094-1-mail@mariushoch.de> References: <20230415231130.115094-1-mail@mariushoch.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4PzTbn6F4Qz9t4h 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