Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1525544lqb; Sun, 26 May 2024 05:24:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUbTKSCbM59Q4+aVJYiBfqJqx/vydXPlqEoM70bMMYEnM7wqyIodTfEnh3agnJuTxDxn/qPhhtaOfTGpkL8OVbL2si2dwcQlOiHZ0A6Iw== X-Google-Smtp-Source: AGHT+IEwzFvEIxNvQq29qMxpXBi+Jpg+tr6x+op9r7vlf2Tgs78stwpcWU9e3pXncDeOBRHE4sOD X-Received: by 2002:a05:6a00:e8b:b0:6eb:40:6bff with SMTP id d2e1a72fcca58-6f8f3090175mr6772206b3a.14.1716726291385; Sun, 26 May 2024 05:24:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716726291; cv=pass; d=google.com; s=arc-20160816; b=frDdABfUPtMtrYoHzRA6j/mSvsvuHBF4OMVFU0/Llc7UI3P8h/jW/KwdHf+0v0gdjd fw9qCw8z25xikCgw6GnrT/rPLVs7YaNFnAXdxSYmFYjm8acEq2f6+AEv3m0nnvVOkUVU fp3iDsxYq9880u4bX/eYc93suAFpL1PdiQR5tDX7Ye0jhXp2GJ2RuPEaNliPKft7od7y AILb35LYod1q6EGocf6OmnoTnrGoo2Rnm3/VHGon1eihnHl5pgYtmpU8cbJ6Z1+Ejk66 lrWRt9Hnsa32nKfZ5Vz0aKXW3RxCrBU7Eeqgt5sNJfWJfgpfNSzlk73b+9rj3HKeEeFp EGLQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=A/Yfxih0STlM36pa2B5OvQoRResBFUpID2rVqeD5rOM=; fh=Eckryg7kSiBojjp/RjDJpnCMiHIjl0xQBE8uDqFg5p4=; b=oR38ilTvfDYc87RrH6rgNIvOMsFGkw3YtoogPS7dg3VGwGVXhsiWjh6MbSQpRNAzir l+GB2K8QZ7PJYQPisQzt2CpZ0K/ghtoq6y46UXy3U2FUa8I3eHBwRZPqelRPVp7MG2kg i8lNcyma4/rFRKdKhAOBokSqF7zaJoAcIJxNgkz1g68Zi5TTWY6dYEud35jjoC5i9a/Z gebOnyCSYGpGaDr6TftsaXvwnCuQS6cYvFxgOFxnr9q9MOpOBoSJsaVxrlM3Uncd77K2 WHihLGkj9b6N6a8mjClqwaxlZCwYT/BWlgO4nz9beZphdDSBm8FOARQ5Fgtehfbp1wRu HI1A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UUVz3q8B; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-189734-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189734-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f8fd4d4466si4472412b3a.266.2024.05.26.05.24.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 05:24:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189734-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UUVz3q8B; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-189734-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189734-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 06496281564 for ; Sun, 26 May 2024 12:24:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 82929DDDC; Sun, 26 May 2024 12:24:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UUVz3q8B" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ABBA2946C; Sun, 26 May 2024 12:24:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716726283; cv=none; b=gA5ur9H/iP3dgldhByRbfwEFV2cuo761avVEWI0A5xxm0YiiDL7IQCHRfPomuHfBZgEJDAdm3zGvVy/YUN4xO56SXzPxqZhR3JlxjExfG7yalsoUcrUrgSHLjyY5Ax8A72wgNbmRM5fBNgYMJnKUC0OrI1pzLTiZrOE7Vs0+wJM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716726283; c=relaxed/simple; bh=/R1zGog2Y9d65uHyn2AWHfkJj5rsRDkXSZ10XaoeueY=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=d9NPVkjJwM8JEEtIh520OeHHlgmyhDTFRqjrbT/uLdW29nq/XhhbXK9UsSfoAPc7P+l0Q693tBfHLxqvzXM+2fqfYr7wLxAEbRWJgDgUQz+RXXRedw+Cwmj5q78N969GG9D2xm/yWbNFHjxIlhW5pWinE8zf/7QJVME41GrPalY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UUVz3q8B; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3264FC2BD10; Sun, 26 May 2024 12:24:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716726283; bh=/R1zGog2Y9d65uHyn2AWHfkJj5rsRDkXSZ10XaoeueY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=UUVz3q8BybOqfnN/1OZi+mbEsB8fIIPlxUnjsX4rSf+zvGgutbI7Y8kyDFPq1uwVZ pCr3pDUB3bYECtGEBHOxqkOh/wnr/N9BtQaPTwkgIeWZs13jOj5GCfhCGsKdgX+MbU BnWhFkz6yNh7j8sKmsWS3ISMcZ8QhPKxAHhWIA1MUOBBJq2BfTLEigd2ENNvE7WXcw yqI6sB1f1g7WboKxjtDC+otPmzxOpzSSmQtd1q65rWNdZ60JBddiKP40NpwgV6eSWq OTp9GYEEfmroAcOjwfXPlQMMu1A1RXpOShNH6DmWemsWMCsRfbaFYBRJMMKaeU9tZI jZP3XstKHzhMw== Date: Sun, 26 May 2024 13:24:22 +0100 From: Jonathan Cameron To: Denis Benato Cc: Jagath Jog J , Lars-Peter Clausen , "Luke D . Jones" , Jonathan LoBue , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] iio: imu: bmi323: Use iio read_acpi_mount_matrix() helper Message-ID: <20240526132422.01d3855b@jic23-huawei> In-Reply-To: <20240523174736.16692-2-benato.denis96@gmail.com> References: <20240523174736.16692-1-benato.denis96@gmail.com> <20240523174736.16692-2-benato.denis96@gmail.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.42; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 23 May 2024 19:47:36 +0200 Denis Benato wrote: > bmi150-accel and bmi323-imu are declared in an almost identical way in the ACPI and in some devices such as the Asus RC71L the "ROTM" property can be found: parse and use the ACPI-defined mount-matrix. > > Co-developed-by: Luke D. Jones > Co-developed-by: Jonathan LoBue > Signed-off-by: Denis Benato Applied. Thanks, Jonathan > --- > drivers/iio/imu/bmi323/bmi323_core.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/iio/imu/bmi323/bmi323_core.c b/drivers/iio/imu/bmi323/bmi323_core.c > index 5d42ab9b176a..b391e5e701b1 100644 > --- a/drivers/iio/imu/bmi323/bmi323_core.c > +++ b/drivers/iio/imu/bmi323/bmi323_core.c > @@ -2083,9 +2083,11 @@ int bmi323_core_probe(struct device *dev) > if (ret) > return -EINVAL; > > - ret = iio_read_mount_matrix(dev, &data->orientation); > - if (ret) > - return ret; > + if (!iio_read_acpi_mount_matrix(dev, &data->orientation, "ROTM")) { > + ret = iio_read_mount_matrix(dev, &data->orientation); > + if (ret) > + return ret; > + } > > indio_dev->name = "bmi323-imu"; > indio_dev->info = &bmi323_info;