Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4538133rwd; Sun, 4 Jun 2023 07:24:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7zqilIZCKd0aImqbS7TuTfgFnvAyTrnOY0p1O+7cKVln6iJ3kfWpDQROUO18g2v4oRF7aa X-Received: by 2002:a17:902:7008:b0:1ab:eee:c5d7 with SMTP id y8-20020a170902700800b001ab0eeec5d7mr2560099plk.48.1685888643427; Sun, 04 Jun 2023 07:24:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685888643; cv=none; d=google.com; s=arc-20160816; b=QCwqBWBTXQlFpVPnteh5ulhAQK0JhXNwCEXC3J2JtppBZawVu1mBbFBcI4Nowgd2aj SXC558vgd45MIbHJoAK5uTwAnsmBsoOBNDvei+Pcbs11SYzc9GpySgEtd4CT2JYNUjxx yq/0MZkT5DnK4G411J9flBMNmcNqnkTqv6PU2Rpp9jSU7OMJS9bKjAF7ALiFzqkUPNTN g5Hqo+Ag5r+qTN72TvlZ91JnUml/Q5hY7u6QAIP6OlJiXLpL4XY0XFSF8unZ2aZ0ppgx XoF9+keQzVT4lippZH36Z1qghwJ0m/hWsoIBDdL9Y5wJ5Oe/C+/J8EJtnS0Ff5WqJU0w /lSg== 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=ZxLo4X9481tOOhLufontvIB4n3OZ48B0z/PQBDKbEe0=; b=0Vi8ydPWAgphkNfKH5EfXbAstIzzyd76P6EocoNdpXCk0xYCWVC87alLT1K6xA5zC7 J3gLBIrUg2ulEDhQGHYLKUdrcPd47zJe0IYdyq4nw0RwY4WH2p05Xx6iTp2vb7+fX2FX Om5MYxtunXPYGhx9ZlrOJViBjOVeMwUrK6j4KDi6JT48UBLXKU+ToMHzPkdNb0rPBmhv ipaeEvWXgjYjQUdFO1iZ0Rklp/kZtwXQxnCG88/uC2gBSuOr2jOrOKeFRK12tca3N9y3 kmsr2dN5Ae+6rDfauESColF578EP25koNkkp8p+CPp2B2KnurAlXfJR7TcJS19qlBIxX 233Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=L36Et4KU; 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 h2-20020a170902f54200b001addf547a59si4145835plf.0.2023.06.04.07.23.43; Sun, 04 Jun 2023 07:24:03 -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=L36Et4KU; 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 S231805AbjFDNH2 (ORCPT + 99 others); Sun, 4 Jun 2023 09:07:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbjFDNH2 (ORCPT ); Sun, 4 Jun 2023 09:07:28 -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 5D1EDB1; Sun, 4 Jun 2023 06:07:27 -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 E1B7560ECC; Sun, 4 Jun 2023 13:07:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 861F3C433D2; Sun, 4 Jun 2023 13:07:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685884046; bh=0P33fMw15N/rBZGu2NM+90HF89luwm9sJg51r4dQ4ks=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=L36Et4KUtUDohC5eMsKNMO0QBkJcZHH0MQsrrvnO7I1K3AQQf5UtDKB/WL1F6VteV tFJ0ygW7y+odH+jYP24sWUh4nOvf1W1AUOZ25zA6sSUM6bnjQxFnGjNYhFM1/Qz7he Ke6417XTlv9ZyPZbsdVcgXklbfJPEiQcCoH6ov/L/NxYQwDAJeVmyp61/kbwAUjyEC Xfe9XQK5R5NV7vcQQ7F12ZQKSdCDxgzzqvOmDpPOJc11e1Rd2aupwg9XfPeBC12Ir7 Z5o58q6jTu9UIzqfABSefzfeB9VEJiuKeUG/kOvFebn5H7Xh7ceFV05Fc/pU2B5AV9 1z41ziHNzdzog== Date: Sun, 4 Jun 2023 14:07:22 +0100 From: Jonathan Cameron To: andy.shevchenko@gmail.com Cc: Andreas Klinger , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Angel Iglesias , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/3] iio: pressure: Honeywell mprls0025pa pressure sensor Message-ID: <20230604140722.5eef740b@jic23-huawei> In-Reply-To: References: X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; 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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 > > > + if (dev_fwnode(dev)) { > > Why not simply use defaults? Potential for inconsistent set if a firmware provides some but not others? (at least that was my assumption that could well be wrong) > > > + ret = device_property_read_u32(dev, "honeywell,pmin-pascal", > > + &data->pmin); > > + if (ret) > > + return dev_err_probe(dev, ret, > > + "honeywell,pmin-pascal could not be read\n"); > > + ret = device_property_read_u32(dev, "honeywell,pmax-pascal", > > + &data->pmax); > > + if (ret) > > + return dev_err_probe(dev, ret, > > + "honeywell,pmax-pascal could not be read\n"); > > + ret = device_property_read_u32(dev, > > + "honeywell,transfer-function", &data->function); > > + if (ret) > > + return dev_err_probe(dev, ret, > > + "honeywell,transfer-function could not be read\n"); > > + if (data->function > MPR_FUNCTION_C) > > + return dev_err_probe(dev, -EINVAL,