Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1584120rwl; Wed, 12 Apr 2023 15:38:53 -0700 (PDT) X-Google-Smtp-Source: AKy350YC4Rt49wexlL9PIzHIFyFgyPO0z7J/5dsqEpzEq/EMDlbuzdXX2YUsSxdcMVzrFRQChBou X-Received: by 2002:a05:6a00:1402:b0:62d:e966:ffcb with SMTP id l2-20020a056a00140200b0062de966ffcbmr732868pfu.0.1681339132897; Wed, 12 Apr 2023 15:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681339132; cv=none; d=google.com; s=arc-20160816; b=sJb031APZQuC4Zc79nOWJRtN43yE+OETZAUrRZML9f1BIsS/kPaW7vH4oH64J3lSUH vNFmxPdv/mUygwy1ovYtu4jpLk7XbVL78ZW7jjqJJChooAb3NjexMWN9W2oRpaIui0QP Yu/FOOdVQ0YL4ymJnGfjP3Y23QybTNSbJJyqvcujN5O1RMJ/AN1lc8m37aNfmtBF3ZeZ G11cVG6l2nG1b+vrLXmBPyCPWolDIiCPu6GXboWOS8Z2WukXNwUl36xNT5OZObs2bB1c mro5oRYtoNZRY3KpGeKLaaqbTuojuFKB0ArczEjPnL6/j9wNP/f/YuwRpmbTK5n0biL9 TiYQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=8mgjeVjD9sRPII4svu+aADfY4kCFBWLziUbj6NK6oOs=; b=l2evB8qNAR0iUnFErogPOFW9WYWhQ6xk+/End6rVUYqiVx9nE9cGS2zSefUN4BqxHG w3bcDbv2+c1hoZKWJ6Wr08/IOsIoqjtt092N5Nv7FT4XIsprR0fOVYnsuR6yjBZ4Bpsy uNHk/ImqoI6etAwxsjlD0Tm2rFM/4qSABb4OWSekv+r7HkDxAyx5BjLepj3RfzIKdWfv ekj6DY+xq+w9XmNV8cSBZkqAOlq+mvY/nrcQsynA4K/qZ8powibJqxKBjj9KqIqBkCC6 9ITI44nKrFDfcSYk9/cRzVCLW8c7o3iPDnDKeRohGM554O1kPrcPVNS+TZaE/lk6yVPK s5Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mariushoch.de header.s=MBO0001 header.b=P8Fo76BP; 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 y21-20020aa79af5000000b00636b6e10ed4si9903705pfp.85.2023.04.12.15.38.41; Wed, 12 Apr 2023 15:38:52 -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=P8Fo76BP; 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 S229616AbjDLWhG (ORCPT + 99 others); Wed, 12 Apr 2023 18:37:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjDLWhC (ORCPT ); Wed, 12 Apr 2023 18:37:02 -0400 Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EDC340D3; Wed, 12 Apr 2023 15:37:00 -0700 (PDT) Received: from smtp202.mailbox.org (unknown [10.196.197.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-202.mailbox.org (Postfix) with ESMTPS id 4Pxcyf1p09z9spl; Thu, 13 Apr 2023 00:36:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mariushoch.de; s=MBO0001; t=1681339018; 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; bh=8mgjeVjD9sRPII4svu+aADfY4kCFBWLziUbj6NK6oOs=; b=P8Fo76BPo3QvCyGmspEq0DUx91nBvLxrWka/EeqyrkXu41DCG/kyPBvxvQjr1seYO68dMR hs6HbLRspT5uezHHMtioCgiBpTrwz4vBjupDeUfQxatGlbi3UwPZK6IaUxkalREatcj0fn MFpzJ9JAkG+qBUcm/7DZ6VKhBeOq+O20W3z8sUjMvCdJsTGD+nK5O5lrb/bdWARZXQYdHg Jv5INJTrzwx5HSpjp59fvWcxGPl3WNbr+nNFCL+Dj6qYh5gkX5IvtXZeEGM5MFqwpJzQyQ XHji0q0sPGGD7xlDVyzFoJCPCmmjw6GmZzxx8GHRU9iPO1SZGtWyJI5IrwVj5Q== 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: st_sensors: Add lsm303d support Date: Thu, 13 Apr 2023 00:36:21 +0200 Message-Id: <20230412223627.442963-1-mail@mariushoch.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Hi! This patch series adds support for the LSM303D accelerometer and magnetometer. As the LSM303D is basically, as far as I can tell, the LSM9DS0 without gyroscope, we can easily re-use its definitions. This was tested on a Lenovo Yoga Tablet 2 1051-F. Cheers, Marius Marius Hoch (6): iio: accel: st_accel: Add LSM303D iio: magnetometer: st_accel: Add LSM303D iio: st_sensors: Add lsm303d support to the LSM9DS0 IMU driver iio: st_sensors: Add ACPI support for lsm303d to the LSM9DS0 IMU driver iio: Comment that the LSM303D also has the Magnetometer DRDY dt-bindings: iio: st-sensors: Add LSM303D accelerometer+magnetometer .../devicetree/bindings/iio/st,st-sensors.yaml | 1 + drivers/iio/accel/st_accel_core.c | 1 + drivers/iio/imu/st_lsm9ds0/Kconfig | 3 ++- drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c | 15 +++++++++++++++ drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c | 15 +++++++++++++++ drivers/iio/magnetometer/st_magn_core.c | 1 + include/linux/iio/common/st_sensors.h | 1 + include/linux/platform_data/st_sensors_pdata.h | 2 +- 8 files changed, 37 insertions(+), 2 deletions(-) -- 2.39.2