Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3816729rdh; Fri, 29 Sep 2023 03:18:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH7IAs6i3YFC09d3WXtbEret05OcH2xJwQyikb0DR4sw7pIM1PbQWI3bLMAFV76wlTRQl4U X-Received: by 2002:a17:902:e741:b0:1c4:1cd3:8068 with SMTP id p1-20020a170902e74100b001c41cd38068mr6085874plf.5.1695982730485; Fri, 29 Sep 2023 03:18:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695982730; cv=none; d=google.com; s=arc-20160816; b=CjQMf6E69H7fchpGfozQXKyyTlDteC+j9WyrQUr9VANrbUxa+6Sq5d9V+3j7DdIfeu N/90QRf8txexkS1dQnnBlyhjRkX2y60RpJiT8lrrO2MYcp9zOlgfKreu2HMHKGtgZBqH nmIWvumfY42gOUQAaszyt1SOcPspO/ptCF5PlHLHgs7r+3cQYZjJHwXFgvAqSPDbwG1V JbxVlzxko9P2n1yv1jQie5GqjzgrSUheSA9tT9llm8WMyWCH/is0/2CKnW1XHgXntMsi lzgFtKCm/uHfmQW423VBV/xPVMcenyTTZpHa1G9iblOtex1v3AuuJXyH2KJyRTRU+FAW PQXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=DSP8isM0GoS6W9oufJSrOdk6wkTwTTXRU6nx8T2M560=; fh=9q1NM3dLPjxd/tQ28szK12pr9TsOwgeiL+OKgQH072I=; b=d10yWZk/J7B3FopuLz2tzA+im7RRgpId/3CWCODewYNqjEQY1tjCsC9M2EA69IUL+7 JGzSvXavQOhSB1AX5e/r5F3BDuFrMN3ocnkiawaEMcLGPHDiwh2GsyWj+LwrRAkhVmkD z8Tci0ROyXaD8rkXZKyFyOwF7vVVBEQ7yxoM1ErsbA+EMCy0GvkFyO4RpoPC7AzsycXk rugR0Z+fnZXd6WOCxA5D3ryXYNTMfCXNlyhAX20bC0q7xzzHLZVfg3d9trJcPPI8idPw 2O9tZGrndhBQINz1te4zJG3RWSL0Z5zxQEiEsvExTiXUsAGU90OFgRpE+55A7PqJJD1K 5CaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TqOQFvWe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id j2-20020a63e742000000b00578b8bd30b0si20086499pgk.205.2023.09.29.03.18.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 03:18:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TqOQFvWe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 1A7E48293C87; Fri, 29 Sep 2023 00:59:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232621AbjI2H73 (ORCPT + 99 others); Fri, 29 Sep 2023 03:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229754AbjI2H72 (ORCPT ); Fri, 29 Sep 2023 03:59:28 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 282701A5; Fri, 29 Sep 2023 00:59:27 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-9b0168a9e05so1543741266b.3; Fri, 29 Sep 2023 00:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695974365; x=1696579165; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=DSP8isM0GoS6W9oufJSrOdk6wkTwTTXRU6nx8T2M560=; b=TqOQFvWeqCAjPZBkApTlerDt/aj8vVF3LK3/PeHcyoCaNxsUJhpg64TVN6FGjjuTNL /WHoU/g5ZgG8kSDGGp/a10NpgqKjbSbhhdYLNwzWQ+l5pqZYgvDS1sIFmOHsDG12KRP3 Aa2jVAOxb015RfYj9ecskgnasxEAQsMqmzK1Rl0Bhfi+DFlSjWtyyrrnCy8ypvNs5FT4 +OTFjUzKf+LSWfwKwTAK7UzKSs2ddJYAOp1o2GqzFz9qjYLI+xY907h8/JAGPY/Wo0qf HL+/iwFQHqPUxWVlE5h+SKamv/WzgusCl875t3AaL35QFJTty2NjEzy/PxrR+ugW7r7v LHGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695974365; x=1696579165; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DSP8isM0GoS6W9oufJSrOdk6wkTwTTXRU6nx8T2M560=; b=mufamnFHjChmuk/jbS+uO9/ZWTxpzewWUjR8LJy2o3LpfibwDokrg8tl/855cMcLiN EF74NhfcOrMTbiquUEY0n/BEkg87oqeEspV42i5U7bkDWgCCflHhn6PFTejxrD/g8GJe vG65anprRDy/tgYysZMlhAmoBIHFDkpZOa9j4JepNMze/Ys2aJKQedfK6hu0sR9Y/eJC T4Tm+w8GEABzBZ0z7x1g5RmqJCzbqNAUplEtO4IrrInw71K5BcDJNOQRfGjkG6LwnCSk gpc2q+lcKqs2tQ0Rze6AalFR/VFoGYg68sGh9CRhiR5cZ2SYWVc2Hzwmqd/qzrU1XoDY SYyw== X-Gm-Message-State: AOJu0YyAIkH8Qx+h5JesxLyXUehCZ7YynxDBLenf7CuhkSAKQTWnrasQ 1us0YaaCmtVzilK11bidwya8qI56nBJKcI/6M0M= X-Received: by 2002:a17:906:530b:b0:9ae:6632:a8cc with SMTP id h11-20020a170906530b00b009ae6632a8ccmr3209343ejo.54.1695974365173; Fri, 29 Sep 2023 00:59:25 -0700 (PDT) MIME-Version: 1.0 References: <20230918080314.11959-1-jagathjog1996@gmail.com> <20230918080314.11959-3-jagathjog1996@gmail.com> <20230924153055.0b3486f9@jic23-huawei> <5eb148b4-25eb-460d-9ec8-0a40bec1dc6f@gmail.com> In-Reply-To: <5eb148b4-25eb-460d-9ec8-0a40bec1dc6f@gmail.com> From: Jagath Jog J Date: Fri, 29 Sep 2023 13:29:13 +0530 Message-ID: Subject: Re: [RFC 2/2] iio: imu: Add driver for BMI323 IMU To: Denis Benato Cc: Jonathan Cameron , andriy.shevchenko@linux.intel.com, lars@metafoo.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 29 Sep 2023 00:59:44 -0700 (PDT) Hi Denis, On Thu, Sep 28, 2023 at 2:55=E2=80=AFAM Denis Benato wrote: > > Hello, > > Some devices (as my asus rog ally) have an ACPI node describing a BOSC020= 0 sensor. The IC being used in those devices is a bmi323 but as a result o= f how the ACPI table reports that device, it is detected by the existing ke= rnel module and we have no way of differentiating until after the chip ID p= robe. > > The module loaded is bmc150-accel-i2c.c which currently doesn't support t= he bmi323 and the loading of the module just fails at chip check. bmc150 driver supports multiple accelerometer sensors such as bma222, bma280, bmi055 and all of them are having similar register map, but the bmi323 register map is completely different from bmc150. > > I have solved the problem by expanding the current bmc150-accel-i2c.c and= bmc150-accel-core.c files to handle that IC in almost every part: gyroscop= e, accelerometer and temperature sensor. > > What is the best way of organizing code to have this module mainlined? Is= it correct leaving files called bmc150-accel-* even if it is managing anot= her IC and and not just the accelerometer part anymore? > > TIA for your time. > > Best regards, > Denis Benato Regards Jagath