From patchwork Thu Apr 13 02:40:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Hoch X-Patchwork-Id: 13209707 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 7D55AC77B6C for ; Thu, 13 Apr 2023 02:44:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231310AbjDMCoE (ORCPT ); Wed, 12 Apr 2023 22:44:04 -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 X-Rspamd-Queue-Id: 4PxkN22BQlz9sbr Precedence: bulk List-ID: X-Mailing-List: linux-iio@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 = {