Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1245720rdh; Mon, 25 Sep 2023 07:19:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGn4JdwgBqvmPTGEFIrjDKM9ZusQo4EpYQYznDwftENChVxZxbVGg8JEVI7zMMIzS/N3iBS X-Received: by 2002:a05:6358:9312:b0:143:8984:50c2 with SMTP id x18-20020a056358931200b00143898450c2mr5917590rwa.32.1695651560043; Mon, 25 Sep 2023 07:19:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695651560; cv=none; d=google.com; s=arc-20160816; b=xOX3gUlfYLpXXV70dONd18cp7U2BpnZHLTx7yJLKDvb3kBzv8kof370Veva/Xt8CMP Hfvc0r/DIuI0OsxUOz+j+uZMPtpLo7VLruLfHEmd/Jnv9HWP94Kupqj7yZOwJyzGpFst P7V8W1i22INO3OO0hxMcwAcwRtxBSgCKvZyHNrHeHduSaWenl1XS2rRg44zRZhP45qn8 CH6sg+jo7IepaZ1de1jeQUqMJuq+kY25oU09UiKn2MQ3LOz8WvOX3vPPk6PmemZ6fhPv LXrBELukTvhtrH+hxxkxl90brrxhjp1whbQW3eIv3mzMJ/uzduH5TT5i+59SfhxwdHfy FNdg== 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=KhksRDH5+3gqX7xxC5k77QH+a4l6ggBxkAUvbHIGKz0=; fh=odcvW/XwDjF4VEKl907wxbs/cVZNO/aFVNvz3+WJNf0=; b=QTvmLUUv4JEIel3kJtPYlU9PJuls0JSPv4JzuB/3a0gU6z/giozm6LaSgVBRdQcz47 qYc0f4qTXasZG2vG+3rOmUvMWsDe5JQqf0NcgH7qwyF8xK/UkAS8UM4at2Nu/uGpIWoP wWZg6b+aFvRcCVzBy06ITHVHQkUrJvl4EUNRrWevsaFiUPncPj5zjRd3cQN263xqqYCZ nC0amyQML0rZIPQYASgOEvSu+ghTzPstOoRseBmYwSEWWhU5RcfC2Zz+wVJy9f1IBH8H mFiJ/mpKTrfVNkzdTUegsdf1XsaX8oB7VBV8Uroj9s54h+wjPyVD6ZQUw7n/hJw8NjHE AHTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="nEQLn/FD"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id n129-20020a632787000000b00573f9d84ecbsi10254590pgn.387.2023.09.25.07.19.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 07:19:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="nEQLn/FD"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 437B48026381; Mon, 25 Sep 2023 04:09:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229595AbjIYLIq (ORCPT + 99 others); Mon, 25 Sep 2023 07:08:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229556AbjIYLIl (ORCPT ); Mon, 25 Sep 2023 07:08:41 -0400 Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C3ACC0; Mon, 25 Sep 2023 04:08:35 -0700 (PDT) Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-57b72cef02bso2620197eaf.2; Mon, 25 Sep 2023 04:08:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695640114; x=1696244914; 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=KhksRDH5+3gqX7xxC5k77QH+a4l6ggBxkAUvbHIGKz0=; b=nEQLn/FDGU+Iop6gChSODERS3OcXfZmBewzE+Y1vdp5NPoKv2C9GwO6b2iv6p3FXb/ AbrOpukAzvCXxEssVjmVvkXZ/XPViYgW8guqngZSQ4oKvODeEZ63NqezU5L32SL4t8Ig J19UOUYBOsF8ny/Uuz0Zr8jmo7wxo2LW0mOqwV1ZLW4K/y5AF6CzI780jFXmlnjk23XU l0K54k9K8uFtdmvgaw7f30yNsnMr8TrCG5GIqqX/RKyC/8eIWZzno8rkldPQep5TWjqV jPpMWaU/PLpVo3NjZBQYzny1wl33z2h6Tz8l2HExoqqmZeEz+fx5Dg8JKzg69ApYhbFL FMpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695640114; x=1696244914; 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=KhksRDH5+3gqX7xxC5k77QH+a4l6ggBxkAUvbHIGKz0=; b=YeprHjTkbZUdADGe9NKzaaS+cBwA61rVXiahdWDjp7mc6ghsFjum3BgmeKPJFYxpUD Ua4CPMNgV2FvgTZuRb5CfD3hiEn+f7f25We+0Aqj7FzDHwdBQG7NexFh+41G8dFyLbQs fMs12uAmTYPZeEQguxkhQhrtX485PTvmKq+3CmfCqaLfuZh7WkCP0/iUqs2bNqJUHWD8 JYjctfrfzMs4fHkToCpRPCkYfBgOFWeoUXUHGL8UyPGwXUOxX/EEKtak1GW1dXirGFE8 WpUgB4M5GWoi0V3vDVLV5vdjgCbJ+ETNxVnLIp59Iy9yfz+sGc3zjoJS+Jk/st+cqShe +siQ== X-Gm-Message-State: AOJu0YxxATgr/uB8dMk5cwM8AHjdyazxYJ0DtHZahki3OhhAhOLyYVj8 bvQY+uX8cQNv5qxvdWBE29fcGKzzIFinLcfAV08= X-Received: by 2002:a4a:6c03:0:b0:57b:cbc2:79ff with SMTP id q3-20020a4a6c03000000b0057bcbc279ffmr1999532ooc.4.1695640114280; Mon, 25 Sep 2023 04:08:34 -0700 (PDT) MIME-Version: 1.0 References: <20230924222559.2038721-1-andreas@kemnade.info> <20230924222559.2038721-3-andreas@kemnade.info> In-Reply-To: <20230924222559.2038721-3-andreas@kemnade.info> From: Andy Shevchenko Date: Mon, 25 Sep 2023 14:07:58 +0300 Message-ID: Subject: Re: [PATCH 2/3] iio: imu: mpu6050: add level shifter flag To: Andreas Kemnade Cc: jic23@kernel.org, lars@metafoo.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, bcousson@baylibre.com, tony@atomide.com, jean-baptiste.maneyrol@tdk.com, chenhuiz@axis.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@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 groat.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 (groat.vger.email [0.0.0.0]); Mon, 25 Sep 2023 04:09:08 -0700 (PDT) On Mon, Sep 25, 2023 at 1:26=E2=80=AFAM Andreas Kemnade wrote: > > Some boards fail in magnetometer probe if flag is not set. Which flag? Can you elaborate a bit more? Does it deserve the Fixes tag? ... > unsigned int val; > int ret; > + ret =3D regmap_update_bits(st->map, 0x1, 0x80, > + st->level_shifter ? 0x80 : 0); This is a bit cryptic, what does 1 stand for? Also unsigned int mask =3D BIT(7); ... val =3D st->level_shifter ? mask : 0; > + if (ret) > + return ret; ... > + st->level_shifter =3D device_property_present(dev, > + "invensense,level-shi= fter"); It was a recommendation to use _read_bool() when reading the value, while the result will be the same. -- With Best Regards, Andy Shevchenko