From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 D3E1934404A for ; Sat, 30 May 2026 20:42:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780173761; cv=none; b=RJp8jkOKA8WWqMuCbsWpdOVpx+7lU7uKQKvfgUpDUWzKOk2NZmE+YlAb7khYxD54IN7Nu7EEjpGqWO/LAglWRLWH4NCLHA/kwDyGt+yYiTSD0uEif/LJVc63kmA3gVbaLBGu0aCmE7DolmYVdxmAb1iX8HNa6BVvyvu7LGULaQg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780173761; c=relaxed/simple; bh=nCy5H0yYPO0n7/jb3nTGCKwYSi+iROuyCfMWemB6VAY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=sY8oe5KVXsSRXyHlNvjJVQW0bUQ/Snayfzue8chd8i6OZm1xQJYDefoWDLsfxr6GfM1y1Pb3UYEOWIfnB6uCTqlbYHVLQpOTbtgQH08dNzMWe5JrKjdIdNGDM3BE0G6wzThzEOH1umjeJbftl8VAb/xBNI8u9kLP2mg1LwnlvNs= 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=pV6KNqea; arc=none smtp.client-ip=209.85.128.42 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="pV6KNqea" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-49039a8851fso92228895e9.2 for ; Sat, 30 May 2026 13:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780173758; x=1780778558; 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=5sGWvr4odaFr/sdFXxkB9IZN4+afYuvFDh8G38c3Kek=; b=pV6KNqea5NvIkh38p5abpZTcJEHj9H0kFCkvQXNGmLzfdU/iI29dsYwj1xwTaYd18v vkgst27x4Qop6HDQ68ef1gc4m6qWjqb4HzgAVBUJNH0LKLrA24jGWDgzAs9jAN+Nq8DK S1UiMzeeMY0PAF3zXinNxPgDse7gWq2XE9yDynUB973IkupozRRyVowFflW0BNCo5qko Ggcdo837dz21x4qoVZ7UkQZCPWAjf7IAp2OI7RGTZO1p0bXhsRtuJxMzP61KJLChIE1c 0re2R2119cXz6hDDv/uIl6BWD+GueiFGGk5q0wfRRuyxnGFnV6NfKvSVVfdqV6i4WrxQ GWdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780173758; x=1780778558; 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=5sGWvr4odaFr/sdFXxkB9IZN4+afYuvFDh8G38c3Kek=; b=Va7J4IRPZTCt+K0fTYxUOKKsZnXoabxWDtQw8sRBvOCI+iWrXg0oXU1v8paP9TpwR1 VEaonGalrQ8SKnNa+RH/lUeDLCxaffwtUsJCzSr5Woz65e5b3k4E46yRAoRaGWo3F116 EjM3YIwqgW2qUkQDd6v7V+3INZDB7sTbqTS/S/XB3c5zY+Kt3Y+STNwi56Cdv5SsFj4f vRKHwns9fndFCX3SKg7f+UAAb2GOahCjiAjd1Ba5tBQu+F33xngAybldf/YM1bPRAIM7 eW/BGnFDWhJ/yTrkwyWcXwG350GyfyxY+p1Z6Z8/4vNw1UQR/tDyYjQofTQzY7jkW6MG yGyg== X-Forwarded-Encrypted: i=1; AFNElJ/ww+s6OIGjdbqnnhntyVU3+MCdOFJlKKY2YS4CJ5Hx29MgkESrdHnUWpdXwzICEDlxdkQlaHmyfiT4ZvY=@vger.kernel.org X-Gm-Message-State: AOJu0YzLxXKwCcy761JgbAmsDLV1uTSmFvlECTKXCU9S2IGpXw4UK/tt pDKzTEhc9AOk2g9Ex4Fi66wZBxFCheKjX5nxuUPwsrkVsgQgKBWmIBMj X-Gm-Gg: Acq92OE4CPwgioqyClm8TT5qRfU4GhMQMqaUeNpSKm2iTZXR32dNouXs/lDPbxT6qpq xBgztYb7E7ImJakl0knEYHRWh9PZywdpFBuSrDqgeWmSACbnncHxC8mTz1fvStsj2RX4J2YkUHO nGmge8k7sv3f5R8nEXd2NPI2mTI5XWq5+S2v1XNYwyGW6/NbSeuY/YWcQ5XqyiKdV+0wuQaRW3r dtn1cYw63ZiCjD6xFDMUodpi3oOLXfuV7hlCXEKG+/mXQgaKNUElXorCT+mYXv3iGYgkZ+Q9Dx5 8U5ObS5kFslYn+8IOUYsbmnNnSVAD0DZO1FWheqj/PADCTNBosVjsudADyAKX1vIwYxMl83kwaM gwcDK8nJ8R1S79z1t50AEuDi/LWPa/kFSGP0ZrpLeEMlfyR6VUqj55bdgzFmgVkcJyCggUETSjr UT8BMa/1PyK8iiQgw= X-Received: by 2002:a05:600d:8494:10b0:490:47e3:929a with SMTP id 5b1f17b1804b1-490a29122ffmr64554585e9.6.1780173758235; Sat, 30 May 2026 13:42:38 -0700 (PDT) Received: from sefo-laptop ([2a02:8071:50c5:5c0::361b]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45ef356a4c4sm13944636f8f.31.2026.05.30.13.42.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 May 2026 13:42:37 -0700 (PDT) From: Wadim Mueller To: Jonathan Cameron Cc: Wadim Mueller , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Lars-Peter Clausen , Andy Shevchenko , David Lechner , Nuno Sa , Rodrigo Alencar <455.rodrigo.alencar@gmail.com>, Maxwell Doose Subject: Re: [PATCH v2 3/3] iio: flow: add Sensirion SLF3S liquid flow sensor driver Date: Sat, 30 May 2026 22:42:06 +0200 Message-ID: X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260528122244.2e408dd3@jic23-huawei> References: <20260527184257.141635-1-wafgo01@gmail.com> <20260527184257.141635-4-wafgo01@gmail.com> <20260528122244.2e408dd3@jic23-huawei> 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=UTF-8 Content-Transfer-Encoding: 8bit On Thu, 28 May 2026 12:22:44 +0100 Jonathan Cameron wrote: Thanks for the review (and to Rodrigo for jumping in). Inline replies, will address all of it in v3. > Check these. I'd expect dev_printk.h for instance. > Follow IWYU (approximately) for includes. Will go through the includes and add the missing ones for what is used directly. > I don't think this [SLF3S_MEAS_LEN] constant being a define is > that useful. [...] use ARRAY_SIZE() for the loop Will move the literal to the buf declaration and use ARRAY_SIZE(buf). > I'd put this value [SLF3S_TEMP_SCALE_MILLIC] inline with the > comment. Will inline at the call site and drop the define. > Probably more readable with 600 * MICRO / 30 * MICRO / 1920 * MILLI Ack, will do. > I'd be consistent and have const u8 block[at_least 3] > [...] Use at_least, not static for kernel code Will switch both helpers to [at_least N]. > wrap at 80 chars Will reflow. > If this happens I'd go with the detection over the dt provided. > And dev_info for the mismatch [...] Will invert: detection wins, DT is fallback for unknown sub-type, mismatch goes to dev_info. > More than likely we need some level of sleep here for the device to > wake up. Is there anything in the datasheet? Yes, tPU = 25 ms max (time to sensor ready). Will add fsleep(25000) after the regulator enable. Also tw = 60 ms typ (warm-up until output within spec), so will bump the existing SLF3S_MEAS_START_DELAY_US from 12 ms to 60 ms. > How useful is the generic compatible? Will be dropped in v3 (agreed with Krzysztof in the binding thread). Also moving sensirion,medium out of DT into a sysfs attribute, since it's runtime config. > Sashiko (probably correctly) identifies that the formatting that the > IIO core does for an IIO_VAL_FRACTIONAL only goes to 9 decimal places. > [...] maybe switch to using IIO_VAL_DECIMAL64_PICO > +CC Rodrigo Confirmed, the SLF3S-0600F scale (~1.67e-9 l/s/LSB) gets truncated to 1 digit, the 1300F loses some precision too. I would prefer waiting for Rodrigo's IIO_VAL_DECIMAL64_PICO over bumping the FRACTIONAL formatter, since pico covers all variants and avoids changing core behaviour for everyone. Plan would be to send v3 with all other points addressed and respin to v4 once PICO is in mainline. Ok with you, or would you rather see the FRACTIONAL bump now? Thanks again, Wadim