Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1033827lqo; Sat, 11 May 2024 04:59:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWyQcUy287naR6QGQzkis5rUhUdt6N93oT4vuAxPTkz44mccsVocELkOoeo88Sy7Vblp1MJwP5oE27eORzAG8tksO/0FCrdEHDPV2sZCQ== X-Google-Smtp-Source: AGHT+IHcm/2sfzo4d/H+ee+VFThSDI63zaSlgmv5BQORufRhlpgICQwScLDHj8EgpjEc/vf050bD X-Received: by 2002:a05:6830:1217:b0:6f0:37af:bf10 with SMTP id 46e09a7af769-6f0e90f582emr6464684a34.3.1715428773041; Sat, 11 May 2024 04:59:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715428773; cv=pass; d=google.com; s=arc-20160816; b=GkHW+LrnKJbkn2a6qzb19/WuUiCD5p33Ax4c3Aj486doQymfoPpv4Lwa3PIABFLmel zQgBLySWUkCSH+5WVW9tKTm1uVkBMRw0PX0zCF1O2LZ9qY53LldqXDieFcFPh+qdE5Bj h/eopRo8R2qO/1uO5CaOe1okk5fvJKkrOQp99BnTn0rirwVJYaoGbcSyxoh4QdVK1FAY kvmXKNdJS6ES7r04mMP4dg7kCVOJB9Bi8+tiM7+yzxo2IRx8XmKH+2vvNSQWHlcAvoYU 6UY28JpudDJBQPkzfT/7KJuLD0e6J7HCKA/v929eIK0Edyl+slPQm8Lr/XeyPIUgkQmB uXNQ== 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=gNoZWwbJ8Y94oNKWnw2Izj3NNWj5bwqNUBBo/tQ3aiE=; fh=71P7xph+8GO8vWjY70M9iQdi6XujRHrVi8QlwoT6Ul4=; b=q0crXctKvqZi+XBh+pgJigYEGU+qhU8NkmUTkhP4Y6pyemRb7Xr4qD+ZKCgX9pahNu zE7/9/7m4wE+AIUUGotpTQly0REdpALFhMGxr+hmPE2jxKwNhq5V0qHFYMtfqlD/4Bo8 k0q7BxOMr3FQ1Tz8vhv/21T6W4tdGfCEs0rdQFBwi5vXxR1ppbQa4FhwLdiM4vFNFMHJ KE9NX0fcbLsRqJsNuYCYLFkJMFZScWOCyCv4zTKT84nyzRlWanxOBNRIuRLSzmRhhFwe 5oka8aSBC5SwKRw1+riY+lG0nT2TwuXB8ygofmJDDDm4QcW8caL+01FFssjbMskbOVXT E9OA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aay+PLzq; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176522-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176522-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 41be03b00d2f7-63411530b8esi5580560a12.466.2024.05.11.04.59.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 04:59:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176522-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=aay+PLzq; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176522-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176522-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 756B02811CF for ; Sat, 11 May 2024 11:59:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4EDC855E45; Sat, 11 May 2024 11:59:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aay+PLzq" 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 6358F2F26; Sat, 11 May 2024 11:59:23 +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=1715428763; cv=none; b=mxvAJWBAcbHZe26vsbPbiD1x9pDwliYIoI0QwWZLoGesk6vRjNm1DlsQ+xaqTF3qb/I8HpJC2Os0s5t4bEQbRS6fGQSbjdS9itgmzBD3NGBvfWKk2zrjUzJLqIcGq/61uPbuSaXf5SxFONqhJ7+m1mQsWqGyNNFoQ4wlLFXnGXc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715428763; c=relaxed/simple; bh=ewewQeHMxrtOWqA/HQOi5zrRUH//pG5ayxcyfM2myGQ=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Cj49vWK8yl7AYk6FRyWPLtEekCe6tEd/rVOjg8KA4zV1rOiZCceiT/YY2fpGQ4bhie+5eSeFk1lQIupCkCPzk1Ba9bfsQgThJUCvYyl43b535cUUJjF1+oWbbdNh/VnoEl0KLfdgW/n0ep6GKoMdzNg3lJ8Cfrl6T2fbgT6dlwA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aay+PLzq; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F830C2BBFC; Sat, 11 May 2024 11:59:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715428762; bh=ewewQeHMxrtOWqA/HQOi5zrRUH//pG5ayxcyfM2myGQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=aay+PLzqN9AOAKa5kSJmgKxh3pCYgtHWOpK0jF5l3SUAWofElY4pLrThFlW/BPxeq 6Nholz9eM4457oAomxiP61F6J+81IzZnWcB9WroRh4Zwx5CYz1F6UEIJ3+sQT9Ld+c mf7ZE3US00rSsUTJnrqIkC+lDxFsl00nFjHein2MoEX6AZxToR1kNT0D9aRcAHUeGb wVS2ms1bq4kafEzgng4ZBLPL6RJKIsENA1SziUGkkCHHv/KKhFwHCa10px3Qq3hLuA qBJUHdLLz5g/MUp5WmMz9CJ8lsFuc3fr0geKKeDg0ek5Y80giO5FXJEzXauEqVMPR9 Lc1ehBkKWdbXw== Date: Sat, 11 May 2024 12:59:10 +0100 From: Jonathan Cameron To: David Lechner Cc: =?UTF-8?B?QmFybmFiw6FzIEN6w6ltw6Fu?= , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Danila Tikhonov Subject: Re: [PATCH v2 1/2] iio: imu: bmi160: add support for bmi120 Message-ID: <20240511125910.18e874cf@jic23-huawei> In-Reply-To: <20240511125436.520e3ff4@jic23-huawei> References: <20240504-bmi120-v2-0-3b3ce6e1c3c6@gmail.com> <20240504-bmi120-v2-1-3b3ce6e1c3c6@gmail.com> <20240511125436.520e3ff4@jic23-huawei> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; 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 > > > > > + } > > > + > > > + return -ENODEV; > > > +} > > > + > > > static int bmi160_chip_init(struct bmi160_data *data, bool use_spi) > > > { > > > int ret; > > > @@ -737,12 +753,10 @@ static int bmi160_chip_init(struct bmi160_data *data, bool use_spi) > > > dev_err(dev, "Error reading chip id\n"); > > > goto disable_regulator; > > > } > > > - if (val != BMI160_CHIP_ID_VAL) { > > > - dev_err(dev, "Wrong chip id, got %x expected %x\n", > > > - val, BMI160_CHIP_ID_VAL); > > > - ret = -ENODEV; > > > - goto disable_regulator; > > > - } > > > + > > > + ret = bmi160_check_chip_id(val); > > > + if (ret) > > > + dev_warn(dev, "Chip id not found: %x\n", val); > > > > This changes the error with probe failure to a warning, but the commit > > message doesn't explain why. We always want to know why changes were > > made. :-) > > > > Should also probably be in a separate patch since changing the > > behavior here is a separate change from adding support for a new chip. > True, separate patch would be ideal as maybe someone will backport this change and > not the rest. Given I'd already picked up v3, I added a note on this to the commit rather than splitting it. I doubt anyone will care about dragging in bmi120 IDs along with the relaxation of matching if they just want the relaxation. Jonathan > > > > > > > > ret = bmi160_set_mode(data, BMI160_ACCEL, true); > > > if (ret) > > > > ... > >