Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp2644480rwp; Fri, 14 Jul 2023 09:05:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlHkQmlaP6q90bn7PUTsAxiYP+9AkJr/aFHU8PPM1ZMkS3P/YWJGZ5KpwR3InPymYCYoBzyp X-Received: by 2002:a05:6512:247:b0:4f8:7960:f72 with SMTP id b7-20020a056512024700b004f879600f72mr3377594lfo.44.1689350755683; Fri, 14 Jul 2023 09:05:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689350755; cv=none; d=google.com; s=arc-20160816; b=HMLZJko1AnVdWPvv6BA2Jw68Ut7Y80tto5Hw9vLOKJogfA7ezNFRk2Ohi3zJ6g9QNw SwNqtLDyZlrSmcOp8wMuoUTEeLDhKebTHfVv5EBkC0w1cmMpxGmhZJ9ei4Y51ntH6nE/ HBjLAShYUxIEVZ9YXZ3M/DtH3IulC85t2KfMX7BH4ceqGyso2YX6BTf2AlwTtwxV/MxK PrszlEVwYfxxGQ7jZpvIXy65LcrTtgzm28UHWqRBbdGcoe05jVOi0AsE+7ffK0sL6e7V 2lg+4BXB4QgbkZLOSmoynZwXLiYj/EKGMyHg+jtDTkOjCUE8dvFme8gCIK4iNKIK6J19 jh6Q== 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:dkim-signature:from; bh=/w1RIyoPCQx2xmi8/6/rjLLvHgsqRXPqRvAiOoaPXr0=; fh=TPfc/j4r2grL253OtQsqvaOE0A1AVHAHFTa9AiQrOLI=; b=JXRbk61aB9WL5SPwUz8dBw/AotZwLdB0lPHbTXrGxkYqwUH/nklKrWHPe16YQvPUmn +LrrZ2LZ6u8AApAmLuKYBmKHlFV+X8rIg+inOqUhV5N/jZSFcH/MhLmOfeIn37V8QNPx +WY1ArwmOezEQesvWjd9UR5V4inPVKhj6DrXHgkS6PEVldGWKQC6D0cvkGiyClKd+h8O acadgJ35q8ZSz1taLPHAZD02dRdJGAsM5hHH3J+CuZSuSyVMjmYSk+4HEwMRLACikkjz grEjuax5FjqESL8rhHa1k78Fy5ArlEtfvzblL6jYPBtW3X7cWuec3t7L2qxFnR0vi0Wv lEsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dnyon.com header.s=mail header.b="QdOmk1/q"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dnyon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d8-20020a056402516800b0051de2148abdsi9196059ede.359.2023.07.14.09.05.31; Fri, 14 Jul 2023 09:05:55 -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=@dnyon.com header.s=mail header.b="QdOmk1/q"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dnyon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236035AbjGNPdv (ORCPT + 99 others); Fri, 14 Jul 2023 11:33:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235215AbjGNPdr (ORCPT ); Fri, 14 Jul 2023 11:33:47 -0400 Received: from dnyon.com (dnyon.com [142.132.167.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F0542D79; Fri, 14 Jul 2023 08:33:44 -0700 (PDT) From: Alejandro Tafalla DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dnyon.com; s=mail; t=1689348822; bh=tLyxCNmWIwYWdSdGf5y1A1OsDIoHBB6G7QnsWU5njsY=; h=From:To:Cc:Subject; b=QdOmk1/qtN3GaspEr5GT9PDVJxrE7ymkcV5fDpBmsF+pqmUPtdSLglfqzSBDwEbq5 KqX0pOM+TMoNuiHkXFCQCEMYLQPMPKS/4wKFuW7TDnELC/m4Nmkyqp7SfWUMjY/gkR YIx/WGqu1Qny/tXkzp2ca78sG7z7RXT+h+5bNQe+zmnT9vwK6or+F7fclH5V8ybBaG 2zBix2Y+QjIxw1KnVmrMfNJBcrFn2R7rUEmLrC1Rhvv1nbtFzp7U59nKLyNVCzmI+I 4pAOSMXqELFVpwJ7W6ODJ3DPhxx+1H20w6Yk22X08Az2P8DntdRjFEpu1q9qz2tKZ8 26XMf4xYTgnZ5mX1icafnMohlY5z5nGfn8UzTXDp+50qlVw0eXj4/2mGcrXMZlW3ZK yieSuRpmsK05rGeUe9PiffsJnjnEYGG7utdpV33SUoYO1wkvpJaCZBFytRSaAGrPAT 5Ca/3Rlv/MD+f7BdLDHqebFq4Y3/oZ+HhN24tV/tFXfDrESil8aRpGikSfaaHCyjgE 4AjEcNrd+O8GAouvjkIr8odKTcbLBIcKJ2NehUvAzAAVIaueblDgCW3aV5j0QYL/AZ eLU2LKTOxeye3CIutTJRCkUuWImVISqSYAblP+5zx53ILNrubrkRVTzXGsn7IdNDCH N0+RC67o0LM71HFBOWkgud/o= To: Lorenzo Bianconi , Jonathan Cameron , Lars-Peter Clausen Cc: Alejandro Tafalla , Jonathan Cameron , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3] iio: imu: lsm6dsx: Fix mount matrix retrieval Date: Fri, 14 Jul 2023 17:31:26 +0200 Message-ID: <20230714153132.27265-1-atafalla@dnyon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,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 function lsm6dsx_get_acpi_mount_matrix should return an error when ACPI support is not enabled to allow executing iio_read_mount_matrix in the probe function. Fixes: dc3d25f22b88 ("iio: imu: lsm6dsx: Add ACPI mount matrix retrieval") Signed-off-by: Alejandro Tafalla --- Changes in v3: - Removed unneeded check for err == -EOPNOTSUPP. Changes in v2: - Use of error codes instead of true/false drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c index 6a18b363cf73..b6e6b1df8a61 100644 --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c @@ -2687,7 +2687,7 @@ static int lsm6dsx_get_acpi_mount_matrix(struct device *dev, static int lsm6dsx_get_acpi_mount_matrix(struct device *dev, struct iio_mount_matrix *orientation) { - return false; + return -EOPNOTSUPP; } #endif -- 2.41.0