Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1576212rwb; Sun, 14 Aug 2022 07:06:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR73zCFg9JXqIdI/lMUovAxRgUb7cH4R7DCCFaFzo6i0EPSDDilog7tgfuHa5zpceWH6EdbM X-Received: by 2002:a17:902:8305:b0:170:9fda:af45 with SMTP id bd5-20020a170902830500b001709fdaaf45mr12847319plb.57.1660485986831; Sun, 14 Aug 2022 07:06:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660485986; cv=none; d=google.com; s=arc-20160816; b=acbf1a66wLs1lE9ilNUlirkVSQFc5gYfN1m5M7aGaVoBc7MjvP6ktER08VrupdPlrb CJ3WJkfxunXcUNtymKlUQZa7O7mv5WzouiBF9xbMd2DiPYjb8OJ3QBxb5XnElsH7NzuA ojvj8nAnLX3vFO1RujopslgXcytFehP2RiX8hdBGsmWVJhuAn4CwbgSZhI0sxq428HCj O8SpfjFsbBzc7QMVwPELqjSDpLI2SnUDIpl15Hs44ig0J3ix4UTRr+uk5oScm3syBuoL x036Ra4cOm1I0Zkej6m0j7K2SIrsqdeA7leSdXwKeqb5m8Pbxtuoud2ksoGvUXmfKx3q wiww== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=1ijZib93eQ8w+Mm7gn4b6c+bsFuvcamHMZVMyOYgEyQ=; b=lezgdVja153afirxc5qbBjxcOaob4zbB/DB2R6OaPnDXY/yBMTz7gzI/bch8N0FqFx 16Vz3diUBP3MwMoySoLUkLdyQ2K3Vs10mftUQH6xFi248j4TL59Ne5OZQXq3a/HQhWbx 3jjPs1jHiNAN9uzMzxtPpk1cIEi/sR8lIwhGQYiaCgMz2fnXbOYM75rZiAwdtdPd3iuL dh8p3mNVN174t99hFON4CjmwAOhtx0tk+A0L05eyJByf9dCcPb4tmpjbDBvrPCJxO/9d NO248YEt+jZwa/IEiW3lkCROxwS4opbev6c/dlHbd40OsED4010+JGLCRsjOE/yuyFQD wsdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IhSUvjJS; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hk15-20020a17090b224f00b001f73769ac63si9068455pjb.126.2022.08.14.07.06.14; Sun, 14 Aug 2022 07:06:26 -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=@kernel.org header.s=k20201202 header.b=IhSUvjJS; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238271AbiHNOEt (ORCPT + 99 others); Sun, 14 Aug 2022 10:04:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229634AbiHNOEr (ORCPT ); Sun, 14 Aug 2022 10:04:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8239260F; Sun, 14 Aug 2022 07:04:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2BD90601C5; Sun, 14 Aug 2022 14:04:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01197C433D6; Sun, 14 Aug 2022 14:04:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660485885; bh=Ly4O0mOylSo1e7bqqPQz8OkjRFjE9+N+Pi2tqeszdVs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=IhSUvjJSY0EH+ADokfbq1kq4yEhlNsCMNMUa+AWc++XxuWiT8mX4++apsCN4eS89V 7JiYEzebDW31JM+MJuNH7XNUOuL7/ynYQ/5MXKjtEr+z62f2euYdzih7fPOf/+V5lj PvKb5VeO6CEXMqbmrBPAaeCtjrtmGr6EsndDdnbpmNUeTothXTVM7FpzbWF/Y1UQal u1gx/I+5CVCsP4kzpPWdClf0ymiz6GInqCsQLEyjXIp7w1mK8zoT0aeFi+1rgkh3ss lVWdFXG+80UQyAvrSQOiOgP1E+vbes/88LmBnQY3Zi2oPn/BW8p1mvnFO6iYM+onRd flYQbbW/sq5xQ== Date: Sun, 14 Aug 2022 15:15:12 +0100 From: Jonathan Cameron To: Angel Iglesias Cc: linux-iio , Lars-Peter Clausen , Andy Shevchenko , Nikita Yushchenko , Ulf Hansson , "Rafael J. Wysocki" , Paul Cercueil , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 3/5] iio: pressure: bmp280: Add support for BMP380 sensor family Message-ID: <20220814151512.097c7779@jic23-huawei> In-Reply-To: <462251c4bca30b53f06307043ad52d859eb8d5c1.1659872590.git.ang.iglesiasg@gmail.com> References: <462251c4bca30b53f06307043ad52d859eb8d5c1.1659872590.git.ang.iglesiasg@gmail.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Sun, 7 Aug 2022 13:55:52 +0200 Angel Iglesias wrote: > Adds compatibility with the new generation of this sensor, the BMP380 > > Includes basic sensor initialization to do pressure and temp > measurements and allows tuning oversampling settings for each channel. > > The compensation algorithms are adapted from the device datasheet and > the repository https://github.com/BoschSensortec/BMP3-Sensor-API > > Signed-off-by: Angel Iglesias One additional comment from me inline. Thanks, Jonathan > } > @@ -1124,6 +1471,13 @@ int bmp280_common_probe(struct device *dev, > return -EINVAL; > } > > + /* BMP3xx requires soft-reset as part of initialization */ > + if (chip_id == BMP380_CHIP_ID) { I'd prefer this to be based on a flag in chip_info so that we can trivially add it to future devices by just setting that flag for the chip_info added for the new device. > + ret = bmp380_cmd(data, BMP380_CMD_SOFT_RESET); > + if (ret < 0) > + return ret; > + } > + > ret = data->chip_info->chip_config(data); > if (ret < 0) > return ret;