From patchwork Wed Oct 19 12:52:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Mitja_=C5=A0pes?= X-Patchwork-Id: 5596 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp365790wrs; Wed, 19 Oct 2022 07:43:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7LkoY+ize7f1e/q6IpAI4l80Qli0R5iH9JKctoNROU5TZZbk1sfdu3MDMhpNtk1NQpgSSt X-Received: by 2002:a05:6402:1356:b0:459:3c9e:81d4 with SMTP id y22-20020a056402135600b004593c9e81d4mr7990424edw.148.1666190595954; Wed, 19 Oct 2022 07:43:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666190595; cv=none; d=google.com; s=arc-20160816; b=PNaTMZRcwGt05MfIVRIf78VsnNKVaktFa/cO9JpENnK17MCzJa7kh5TDIrydrNck1f 3obGY+aJWfocjSzXevHDChZSBlYOSUuJ9lY7QBxryDV3zc4Mz6exME0SHlI5G/yz704o GP04wUxHrJjTjsgxHCsfszC1cRWdLTHDqTOcezCWHm/A/Kb/CoKnuhyG+35sKHgkkoiG 1FB9E1cDdAjyTNlnVozaUMuXLRFm9EwBsSu5+1M9nn4tO7sLR03pyzmsRf0MGrHwnvyQ QnHYV2hFbbGUzuaxLlkcR2wGarDRa0dhPQSVX+KjPjgYG6Qd7uJV3wEKfu3NfIN0V175 a1+g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=t4Yaw2ZLuxRrXeXgMKdBXuSmh/kxDmx/nG04x9JTVpY=; b=pvQKJUc7oNVzE55owHOdcdxuBb0dver/kBry+Qnc5Fxfno3EGZIoJPVcXtAX8SwsMM 5drjI5/cwWrlcZ6cpygQUThFvkMiAjn86O9dLSTJ+hC8PPInFjI4kX1+VBZQGpDDNCqF XkXi0frdbma+fPObMyw1QK9Xgj3wdsVYcZHUIwiOxuXBIvnS+xSPaYH+2DXJoaJxFYzv VYkQ1nsZoUc+0o1Z0HwfsuQ7b+HLrLtHJ3tTccqiyUbQpVJHlJB9BqKYBvImSEDF113z ObEwWt2Am9HYyiOYBjtwk8vJqD0ad2VIeA31OnxbJ/Xtn8rI63UReawut7ooGT1OSQjP Qa6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lxnav.com header.s=dhl header.b=jRHmYMff; 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=REJECT sp=REJECT dis=NONE) header.from=lxnav.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e11-20020a056402104b00b004587cd5a5bdsi12906914edu.81.2022.10.19.07.42.47; Wed, 19 Oct 2022 07:43:15 -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=@lxnav.com header.s=dhl header.b=jRHmYMff; 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=REJECT sp=REJECT dis=NONE) header.from=lxnav.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233597AbiJSOWe (ORCPT + 99 others); Wed, 19 Oct 2022 10:22:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233690AbiJSOWD (ORCPT ); Wed, 19 Oct 2022 10:22:03 -0400 Received: from dhl.lxnav.com (dhl.lxnav.com [IPv6:2a01:4f8:c010:2f07::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B39A1BB95A; Wed, 19 Oct 2022 07:05:39 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 2582B4068C; Wed, 19 Oct 2022 14:55:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lxnav.com; s=dhl; t=1666184103; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding; bh=t4Yaw2ZLuxRrXeXgMKdBXuSmh/kxDmx/nG04x9JTVpY=; b=jRHmYMffIWRnfbrYiOqE4kr4qmjAgByvauE5ssWejiTP7a6P6B6ll2wjJEIpCZ5RVfYRjJ IVQB5jk1ReSBD+vK9HtY4vqB1hv39FaWRG4UtSefk8bJpa92P5XmOsOv5uPAZp530/zcGm 4ZKyox1WtgeC9E0uSmhghMI2X2IvI5DmNJ5nae9r7pTNEqOUQ6UOML6VmFepGOY9V5LdVD WIrR9Ik3ejI3FE9ZdcN8/6Wnrha+8Mp79bT2K7Aycm6j3KOsKqCTLTwwOW/L8XxegRmvm1 /G8gUc8C97Nrr1jetQ9GDdVvmNRBNPuYER1DVcqJ3C39QDAGasqQwNWIDVn7rQ== From: Mitja Spes To: linux-iio@vger.kernel.org, Jonathan Cameron Cc: Mitja Spes , Lars-Peter Clausen , Rob Herring , Andy Shevchenko , Tomasz Duszynski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] iio: pressure: ms5611: fixed value compensation bug Date: Wed, 19 Oct 2022 14:52:50 +0200 Message-Id: <20221019125254.952588-1-mitja@lxnav.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747123630263947363?= X-GMAIL-MSGID: =?utf-8?q?1747127470329008341?= When using multiple instances of this driver the compensation PROM was overwritten by the last initialized sensor. Now each sensor has own PROM storage. Signed-off-by: Mitja Spes --- drivers/iio/pressure/ms5611.h | 12 +++---- drivers/iio/pressure/ms5611_core.c | 51 ++++++++++++++++-------------- 2 files changed, 31 insertions(+), 32 deletions(-) diff --git a/drivers/iio/pressure/ms5611.h b/drivers/iio/pressure/ms5611.h index cbc9349c342a..550b75b7186f 100644 --- a/drivers/iio/pressure/ms5611.h +++ b/drivers/iio/pressure/ms5611.h @@ -25,13 +25,6 @@ enum { MS5607, }; -struct ms5611_chip_info { - u16 prom[MS5611_PROM_WORDS_NB]; - - int (*temp_and_pressure_compensate)(struct ms5611_chip_info *chip_info, - s32 *temp, s32 *pressure); -}; - /* * OverSampling Rate descriptor. * Warning: cmd MUST be kept aligned on a word boundary (see @@ -50,12 +43,15 @@ struct ms5611_state { const struct ms5611_osr *pressure_osr; const struct ms5611_osr *temp_osr; + u16 prom[MS5611_PROM_WORDS_NB]; + int (*reset)(struct ms5611_state *st); int (*read_prom_word)(struct ms5611_state *st, int index, u16 *word); int (*read_adc_temp_and_pressure)(struct ms5611_state *st, s32 *temp, s32 *pressure); - struct ms5611_chip_info *chip_info; + int (*compensate_temp_and_pressure)(struct ms5611_state *st, s32 *temp, + s32 *pressure); struct regulator *vdd; }; diff --git a/drivers/iio/pressure/ms5611_core.c b/drivers/iio/pressure/ms5611_core.c index 717521de66c4..c564a1d6cafe 100644 --- a/drivers/iio/pressure/ms5611_core.c +++ b/drivers/iio/pressure/ms5611_core.c @@ -85,7 +85,7 @@ static int ms5611_read_prom(struct iio_dev *indio_dev) struct ms5611_state *st = iio_priv(indio_dev); for (i = 0; i < MS5611_PROM_WORDS_NB; i++) { - ret = st->read_prom_word(st, i, &st->chip_info->prom[i]); + ret = st->read_prom_word(st, i, &st->prom[i]); if (ret < 0) { dev_err(&indio_dev->dev, "failed to read prom at %d\n", i); @@ -93,7 +93,7 @@ static int ms5611_read_prom(struct iio_dev *indio_dev) } } - if (!ms5611_prom_is_valid(st->chip_info->prom, MS5611_PROM_WORDS_NB)) { + if (!ms5611_prom_is_valid(st->prom, MS5611_PROM_WORDS_NB)) { dev_err(&indio_dev->dev, "PROM integrity check failed\n"); return -ENODEV; } @@ -114,21 +114,20 @@ static int ms5611_read_temp_and_pressure(struct iio_dev *indio_dev, return ret; } - return st->chip_info->temp_and_pressure_compensate(st->chip_info, - temp, pressure); + return st->compensate_temp_and_pressure(st, temp, pressure); } -static int ms5611_temp_and_pressure_compensate(struct ms5611_chip_info *chip_info, +static int ms5611_temp_and_pressure_compensate(struct ms5611_state *st, s32 *temp, s32 *pressure) { s32 t = *temp, p = *pressure; s64 off, sens, dt; - dt = t - (chip_info->prom[5] << 8); - off = ((s64)chip_info->prom[2] << 16) + ((chip_info->prom[4] * dt) >> 7); - sens = ((s64)chip_info->prom[1] << 15) + ((chip_info->prom[3] * dt) >> 8); + dt = t - (st->prom[5] << 8); + off = ((s64)st->prom[2] << 16) + ((st->prom[4] * dt) >> 7); + sens = ((s64)st->prom[1] << 15) + ((st->prom[3] * dt) >> 8); - t = 2000 + ((chip_info->prom[6] * dt) >> 23); + t = 2000 + ((st->prom[6] * dt) >> 23); if (t < 2000) { s64 off2, sens2, t2; @@ -154,17 +153,17 @@ static int ms5611_temp_and_pressure_compensate(struct ms5611_chip_info *chip_inf return 0; } -static int ms5607_temp_and_pressure_compensate(struct ms5611_chip_info *chip_info, +static int ms5607_temp_and_pressure_compensate(struct ms5611_state *st, s32 *temp, s32 *pressure) { s32 t = *temp, p = *pressure; s64 off, sens, dt; - dt = t - (chip_info->prom[5] << 8); - off = ((s64)chip_info->prom[2] << 17) + ((chip_info->prom[4] * dt) >> 6); - sens = ((s64)chip_info->prom[1] << 16) + ((chip_info->prom[3] * dt) >> 7); + dt = t - (st->prom[5] << 8); + off = ((s64)st->prom[2] << 17) + ((st->prom[4] * dt) >> 6); + sens = ((s64)st->prom[1] << 16) + ((st->prom[3] * dt) >> 7); - t = 2000 + ((chip_info->prom[6] * dt) >> 23); + t = 2000 + ((st->prom[6] * dt) >> 23); if (t < 2000) { s64 off2, sens2, t2, tmp; @@ -342,15 +341,6 @@ static int ms5611_write_raw(struct iio_dev *indio_dev, static const unsigned long ms5611_scan_masks[] = {0x3, 0}; -static struct ms5611_chip_info chip_info_tbl[] = { - [MS5611] = { - .temp_and_pressure_compensate = ms5611_temp_and_pressure_compensate, - }, - [MS5607] = { - .temp_and_pressure_compensate = ms5607_temp_and_pressure_compensate, - } -}; - static const struct iio_chan_spec ms5611_channels[] = { { .type = IIO_PRESSURE, @@ -433,7 +423,20 @@ int ms5611_probe(struct iio_dev *indio_dev, struct device *dev, struct ms5611_state *st = iio_priv(indio_dev); mutex_init(&st->lock); - st->chip_info = &chip_info_tbl[type]; + + switch (type) { + case MS5611: + st->compensate_temp_and_pressure = + ms5611_temp_and_pressure_compensate; + break; + case MS5607: + st->compensate_temp_and_pressure = + ms5607_temp_and_pressure_compensate; + break; + default: + return -EINVAL; + } + st->temp_osr = &ms5611_avail_temp_osr[ARRAY_SIZE(ms5611_avail_temp_osr) - 1]; st->pressure_osr = From patchwork Wed Oct 19 12:52:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Mitja_=C5=A0pes?= X-Patchwork-Id: 5588 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp354609wrs; Wed, 19 Oct 2022 07:21:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6zBrxgmdXJTyg8UMs3Jwmg4ZjiK0y94t880u0t94mH/MkrB0F43hHGZYMzMi0qoQKgvpcf X-Received: by 2002:a17:907:6d9b:b0:78d:ce6a:3300 with SMTP id sb27-20020a1709076d9b00b0078dce6a3300mr6627331ejc.91.1666189261139; Wed, 19 Oct 2022 07:21:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666189261; cv=none; d=google.com; s=arc-20160816; b=IpqyduZvfaTIb67uwt+YtJiB4svii5HQ3zWSGzCuIvA8MUbt9q2hlwzztkj7aHmjRX DgwyBrIMdUfLHlPdb7iXy2J3WLw9YRRwp/9RmFhEncmqN3CBp0dUG4Xhf6DhXu6AB5Js bbdiL4XYEwUEzCTh9B1c5lgaFChcsSFyYBfZd11PNG6UNovxGzxrc8w3lGQevYEG6GiZ POWKNx8nvXp2haaSoem+UFpnZM7gvJaJ3VySmxFD+acZ1+Jcv2xbBLxzal2H1pwu37St KO4KWPL5o+MKJQDDeNJTD2l46vPBKZYJEQ8eliv5wn0FjW9QPbOhdMgYFZXgEFT6Vgol 7kzw== 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:date:subject:cc:to:from :dkim-signature; bh=tbxh/dg1kBGR8qv4q7dWhiVWhYX5Ix6vXLZzG/XL/Uo=; b=CfDSTVMr7Vg7XVRddZle4A8T9t71dWCBZO9N5e5WHK237+0cnWtflhmJ6/Ou7choMv wCQ7z4iqmZ0DnKflvCY9x81iT5FRjoTWVfJ5ZSB+oiWMpUodF9Nw38X8mwcBRq5fOtYb qOAzb91KfnQpAuHbQkNXTsXPmNouc4XwJp690s3WTwmADz9uhOOfwfZBiWsPlpnycXr3 oOtWoty1ZJMXUDD9MgT2cmwUNfAhprgp72zjeZvY2zFZC15ujcz1NbRw9tM/qZAVAyou s9tLjnqz+N0r4jT2Qsv0OUI3A2vHC/r84PeuU20Ix3IaF5jiYGKZzaiXUjdVuC+XKVZw PkTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lxnav.com header.s=dhl header.b=XLHEk3Qe; 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=REJECT sp=REJECT dis=NONE) header.from=lxnav.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id di8-20020a170906730800b00783de095de7si15135902ejc.847.2022.10.19.07.20.35; Wed, 19 Oct 2022 07:21:01 -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=@lxnav.com header.s=dhl header.b=XLHEk3Qe; 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=REJECT sp=REJECT dis=NONE) header.from=lxnav.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233533AbiJSOSW (ORCPT + 99 others); Wed, 19 Oct 2022 10:18:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231723AbiJSOSA (ORCPT ); Wed, 19 Oct 2022 10:18:00 -0400 Received: from dhl.lxnav.com (dhl.lxnav.com [IPv6:2a01:4f8:c010:2f07::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 037A810534E; Wed, 19 Oct 2022 07:00:58 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id B87354075F; Wed, 19 Oct 2022 14:55:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lxnav.com; s=dhl; t=1666184107; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=tbxh/dg1kBGR8qv4q7dWhiVWhYX5Ix6vXLZzG/XL/Uo=; b=XLHEk3QeyltKS238jCQJpZHaq3jm0Hez3iYBBdx33JXw3DQLK5WICZnmVbcC5gOPOGbmIS 7bxCQt97sv9fO2FGoxly4BVil9dro75v7bLC2H42cREVaJUmdJitFOYr9vxatwy06wwVin /NWdHT+91SSH84tb2k/V0C+RhVECzw7VyM6DnBQCpv4s6L1XDPbmNR2M2lh1N4R4qileEx r1YFJ8+bpCE+einx4wbLw4aWf1mnksaJ5vEV4zISpdUt5UzRFjaZWEJJYDhNJ0SPOMK0MK W3NlBch+RruaQ3eJjDCIyrZXmMD2V1Dbqw7XgKcbsokAth96nNBCO+L0z4AJ8g== From: Mitja Spes To: linux-iio@vger.kernel.org, Jonathan Cameron Cc: Mitja Spes , Lars-Peter Clausen , Rob Herring , Andy Shevchenko , Tomasz Duszynski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] iio: pressure: ms5611: changed hardcoded SPI speed to value limited Date: Wed, 19 Oct 2022 14:52:51 +0200 Message-Id: <20221019125254.952588-2-mitja@lxnav.com> In-Reply-To: <20221019125254.952588-1-mitja@lxnav.com> References: <20221019125254.952588-1-mitja@lxnav.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747126070706869223?= X-GMAIL-MSGID: =?utf-8?q?1747126070706869223?= Don't hardcode the ms5611 SPI speed, limit it instead. Signed-off-by: Mitja Spes --- drivers/iio/pressure/ms5611_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/pressure/ms5611_spi.c b/drivers/iio/pressure/ms5611_spi.c index 281b08398720..1b1e863783ec 100644 --- a/drivers/iio/pressure/ms5611_spi.c +++ b/drivers/iio/pressure/ms5611_spi.c @@ -91,7 +91,7 @@ static int ms5611_spi_probe(struct spi_device *spi) spi_set_drvdata(spi, indio_dev); spi->mode = SPI_MODE_0; - spi->max_speed_hz = 20000000; + spi->max_speed_hz = min(spi->max_speed_hz, 20000000U); spi->bits_per_word = 8; ret = spi_setup(spi); if (ret < 0) From patchwork Wed Oct 19 12:52:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Mitja_=C5=A0pes?= X-Patchwork-Id: 5585 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp354061wrs; Wed, 19 Oct 2022 07:19:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6+zwYojvEzYXEQuc8e5AeyxcvdqGHClZ1yLoJLYefsHmUefvJah155p8RLNGcdtjcx6XMv X-Received: by 2002:a17:902:7404:b0:17f:7fe6:7197 with SMTP id g4-20020a170902740400b0017f7fe67197mr8748438pll.94.1666189192639; Wed, 19 Oct 2022 07:19:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666189192; cv=none; d=google.com; s=arc-20160816; b=WVGuc+UFzDjD+DGFcavJyRoIcCCxUapwW4eyNtKooS8FBLNQZr0LDAiUcBDxAOi6xJ QuZTtOuUhCoXc+V7GJ4VfXPBr39AM/d9y8llyKzDJQRX2TOFrE7001PBDC1AdXU1kVbL 8bgXGYf3flpaiXLVeFLD4e1qAEH6qNFolT4Zq+KiM3zx41y6EXDa6J5MqCXeRo/9Sg7r /f2MCCGYiwyaDskcBbZ3a21tjKW0M4bF8VS0zA4QvzdFPSyh04KZNuMVaa88F0ajNCyr E56DiFGwJsdXE71MokQCDO+Gnb7OmcYQ1Tgyd2Ww6t8R2sBqBe9jO8bYf+6GN2ym6t3+ wO2A== 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:date:subject:cc:to:from :dkim-signature; bh=URJvSDdj3A8sCZTu24AcBhZBWiNAekT3eymuvA4CTvQ=; b=XHL7BnFTEt6Rhv38kr5QADyT2ltKPsuo/D/Pk1cXbBwadHTFHlbzuk5VB+Orgtbv1u vaW3V+sJ/xHtRe9bRluDHTKFfpMICi/f1Y0EOoqbEscn27UjkN4Fw+iaQ1EFoWwhueM4 NLdUIv5QQsqDksyWGxrw0p6JZVgzlIMFW4DoErSR9E3GuCzbEOa8T9iUY38BsjSdm35D S3PViZc6O/D2fpOMzMeGyU8a767j2FFIseRYdU3MJL/x25xk6qpiFj881dHMcNeKyCW6 iO5fcMZJ+Rq7PPrGnb3+BxPW1cx9Hk9YqrHmuirntoRXSEcmxSej9JtnC9VmfAx9DO8A m28A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lxnav.com header.s=dhl header.b=nk5pD0nB; 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=REJECT sp=REJECT dis=NONE) header.from=lxnav.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b5-20020a170902e94500b00176d89d640asi17683226pll.440.2022.10.19.07.19.36; Wed, 19 Oct 2022 07:19:52 -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=@lxnav.com header.s=dhl header.b=nk5pD0nB; 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=REJECT sp=REJECT dis=NONE) header.from=lxnav.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233102AbiJSOSD (ORCPT + 99 others); Wed, 19 Oct 2022 10:18:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232229AbiJSORp (ORCPT ); Wed, 19 Oct 2022 10:17:45 -0400 X-Greylist: delayed 2124 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 19 Oct 2022 07:00:53 PDT Received: from dhl.lxnav.com (dhl.lxnav.com [IPv6:2a01:4f8:c010:2f07::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9126EC09AD; Wed, 19 Oct 2022 07:00:52 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id E7D5E40760; Wed, 19 Oct 2022 14:55:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lxnav.com; s=dhl; t=1666184110; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=URJvSDdj3A8sCZTu24AcBhZBWiNAekT3eymuvA4CTvQ=; b=nk5pD0nBky1Ni3TLvDrlFvI6m6eWQGc6nEoWEDZdiTKwoJmeJfKGBk2EjaojXTPaDgb3Jj xVXTiL6+DVMOh/YH2zjkuiS80pqpW5hKPZwmWAr7OubLfLzo9YqHa6Ym1Ytd1RKM+V7gmA Elr0EfpItibsuX0WgFeVlqXw/Wq/kFivh7TqvACLES4SND+3Ph0fWzM8X3Gc/ZlVzIxKEM VNn9Lt4139dmnJyd1IGOjDHTrdfqZ5lvg8FolIcVEBXlnLp5nN9iP0RZ1SEZWWjPXxPwFA 1I4kD0uVVLY3IF9sOIc9gPoUW87g7rKZI0TChJQgApFNuPcQUo9Sye6fHOr5bQ== From: Mitja Spes To: linux-iio@vger.kernel.org, Jonathan Cameron Cc: Mitja Spes , Lars-Peter Clausen , Rob Herring , Andy Shevchenko , Tomasz Duszynski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] doc: iio: pressure: ms5611: added max SPI frequency setting to the example Date: Wed, 19 Oct 2022 14:52:52 +0200 Message-Id: <20221019125254.952588-3-mitja@lxnav.com> In-Reply-To: <20221019125254.952588-1-mitja@lxnav.com> References: <20221019125254.952588-1-mitja@lxnav.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747123501643737425?= X-GMAIL-MSGID: =?utf-8?q?1747125998732615249?= Added max SPI frequency setting to the example. It is now honored by the driver. Signed-off-by: Mitja Spes --- Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml b/Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml index 4f06707450bf..08bd06e6dabe 100644 --- a/Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml +++ b/Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml @@ -52,6 +52,7 @@ examples: compatible = "meas,ms5611"; reg = <0>; vdd-supply = <&ldo_3v3_gnss>; + spi-max-frequency = <20000000>; }; }; ...