From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B08033EAF3 for ; Wed, 27 May 2026 14:35:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892522; cv=none; b=oRHUwHFb+V9Hfjq1g8XGqgDh0dTr4/YDRYCSz+rICaQcnjCWDWDcuXecdLe1q6K0cgWXKmEZooNiDdDZ4ofpDmyy8/kqPNRssSLA/uoF4hhLYINbGvTjQiuv19zl44WyxCqJsop3PO1uETaYdV+G/4TOFzpKoN/I5dLa488G6R0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779892522; c=relaxed/simple; bh=MLaGajL0dv5Rl6YmJd3uu1+U4BhprKGs7QN1vKZx0x0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VcZvwXl3IWeXw+I4aNHmab7sBVfLdoUx1Li+75DdJOCEFywMJICUQOu9I9wBLKg5Dd8/8g+8/kIbjIAkvFq6TE52qEezdlnrZResvSTB7pYFqmhzufQh0kvsafXvtGLtHjYD5p7wxxSQwBzpxxrTb9SY6LkcdCqnxXJNLMfBHTo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CyfbAFX0; arc=none smtp.client-ip=209.85.221.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CyfbAFX0" Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-45ed9336049so1520222f8f.0 for ; Wed, 27 May 2026 07:35:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779892519; x=1780497319; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SXHVO11XsXQ2J5E7IFkROjo+IhfcHlRoeu2sTpJXq7o=; b=CyfbAFX0HzSL9ZPWQrlvcC9RKh+rZzd2Zn/81/ZGmYUXShubgV7RNX5S/YXzeQdQMY 2hpiLayvLw7y23VdS9VFldN31CCrzrzg85K5bGQriH4g4hmhltyR3UQ9EU++Qx3cu/EE /s6nZDz9kwl3/qFm8/BPb5Y1AMiXjjSFU4juCF9CMYtkrwRo3GqXyNy+5NfD53xFs097 ksQYBGdwnuq7wOIGq45qcs7Un9BZhEYZDGfv3XYXclWlnlqzB7OWQjbD9z9bCf5/9UPF LujE91Gve4ehlJoJAEG7zr2JT69aYs3ZOZH5rVgo8vg5S+k3CwUKlFKMJ9J7Vh3+W/xr 2wpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779892519; x=1780497319; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=SXHVO11XsXQ2J5E7IFkROjo+IhfcHlRoeu2sTpJXq7o=; b=j5WrklRH/3BRszHoeRK+6iIpvShDawdZBkiQpba8bafnLfCVfZrThHwKSxdeUxGs36 mwkq6ogDofBsotY/7+anpRe8+djeeUhOCPxWZTjGaPvKKq9DdVyA2gTkc22cwpjAd4mO LhPhVFlo1IPrwTCesUxLbdyYjY+Otb61RR/rIqyYmhO0fpDCB5UiuAFPs73HlnFIrPSh BoLxooQQQ2m6I9ejXwfd9GYtEiPst5kRR3V4+c+GpV4nAc4ng/lQxgNmH1SIH0ldAQlc ZOdTBDdZG5dysVldb/J511SbV3ds6LBzYg8JAfmYL9JrcPUTnJ9QCNUx8QPIJYQNvvjM Ql6Q== X-Forwarded-Encrypted: i=1; AFNElJ8061wQlstkuS5wdB+5ua6cSvNHgv/sVp/poVJIdaH37ZSmoNBfs9ApD8mH8tX3mRtuGbjjG02kLhCTq6M=@vger.kernel.org X-Gm-Message-State: AOJu0YxvOTL9X0RaOB9o1Ingm93vksrkwde19u63jnnZyvIo4mSprE7U 43ZNi9ykOctXjFk5BznY1U4Fy91E9ctE2V5NK1W2xcnR4nfZzZi2ms5x X-Gm-Gg: Acq92OFQ3n6q3nb05VBVvmSuFdPM6shrMLdJdhl4TcKTuBDydm8aWhTMMcvCp/o37Is rmV56ZuFInbeTfXRYrxmWK4p8ErATCAlwSy/twJTry+ZcFICsozUpXzyKckzi77f7THmf5DIPRn 9SDdTteEW5uYlDAtjup4ctQrL3dyq7geA+jsSmm3Hm9mUrYhIIau9Z8oK1KIWw6l+2FncKCB0B/ MpAa5mTJXCCC4affsjTsW7jw5OxnzaBSp4A6zuD3FNO1qeeCeocHZ6MBRIlqbj/ew6MNpaVwVj/ wLK8qQoKm2/OpLGKboIda65j+lPqB/vGA6DGZ/Uu5ROc+z4cJnqAh4059rc9057/nieCNrsZCmg IvNyCNKUmvqII1byyYrFVuVjqC5tEhj4rbE89+kBvF/XDIOl2b/q9ZR4pixRn7mfdAGVe1HcM1l jbzZ7xbwiVi/wdnT0= X-Received: by 2002:a05:6000:4804:b0:44a:be4:d0e4 with SMTP id ffacd0b85a97d-45eb36ac4b7mr38832146f8f.25.1779892518554; Wed, 27 May 2026 07:35:18 -0700 (PDT) Received: from sefo-laptop ([2a02:8071:50c5:5c0::361b]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45edb5584b8sm6239763f8f.11.2026.05.27.07.35.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2026 07:35:18 -0700 (PDT) From: Wadim Mueller To: Jonathan Cameron Cc: lars@metafoo.de, dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, linux@roeck-us.net, jdelvare@suse.com, ak@it-klinger.de, linux-iio@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v1 3/4] iio: flow: add Sensirion SLF3x liquid flow sensor driver Date: Wed, 27 May 2026 16:34:59 +0200 Message-ID: <20260527143515.102794-2-wafgo01@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260526174229.7c7414ae@jic23-huawei> References: <20260524205112.26638-1-wafgo01@gmail.com> <20260524205112.26638-4-wafgo01@gmail.com> <20260526174229.7c7414ae@jic23-huawei> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Tue, 26 May 2026 17:42:29 +0100 Jonathan Cameron wrote: > Also see: > https://sashiko.dev/#/patchset/20260524205112.26638-1-wafgo01%40gmail.com > It may well not be correct in all cases, but it often is! Thanks for the pointer - went through the Sashiko output and folded the actionable items in (bool returns, unsigned ints in loops, fallback-compatible cleanup etc.); the rest is in v2. > The value of _scale seems like a plausible issue to me. > We have discussed expanding the range further than 9 decimal places > in the past. Seems like this might be the time we need to do it. > There is some work under review at the moment to allow more complex > fixed point handling but not sure it applies usefully here. Going back to the datasheets, v1 had the SLF3S-0600F and -4000B scale_den values wrong; the SLF3S-1300F entry I added was just carried over from 0600F as a placeholder. v2 now uses the published scale factors (Table 16 for 0600F, Table 15 for 1300F and 4000B): SLF3S-0600F: 10 (ul/min)^-1 -> 1 / 600 000 000 (l/s)/LSB SLF3S-1300F: 500 (ml/min)^-1 -> 1 / 30 000 000 (l/s)/LSB SLF3S-4000B: 32 (ml/min)^-1 -> 1 / 1 920 000 (l/s)/LSB So the SLF3S-4000B scale_den drops from ~1.67e9 to 1.92e6 and the INT_MAX concern is gone. Happy to follow up on top if the extended fixed-point work lands in a useful form. > I also missed the crc table is global. Easy solution is take a copy. Done in v2 - the table lives now in struct slf3s_data and crc8_populate_msb() runs per-instance in probe(). > Suspend / resume one is a value add for the future. Acknowledged, parked for now. Easy to add as soon as there is a user for it. Thanks, Wadim