From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.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 E650B39184A for ; Tue, 2 Jun 2026 11:42:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780400572; cv=none; b=d8drADA7TNePo9+/ODJECWJXnIr1I0NcmZP/zzgdzkMXOATHXdZ+n3hfy6eoYFtZwRt+4jHTd7OZkfZk73SR0V9MJTtaAhlaDFMK+wnq84t4U2wS6ruyNNB8aWOiHPmUqHwnzsiaOAEzQOOf+RyxtRayVIIIPhJemDSo3K051Lc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780400572; c=relaxed/simple; bh=Qqa7quuFUGxOZHeycKFVTiZCmNmQh4Y1IFeUEExbxWQ=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:To:From:Subject: References:In-Reply-To; b=IwvUSaVIoDr8pRtyib4HpwsFdeeC4bKtlJd60q9zahNe0ZWYYqGTlmdqhf15UhMdnEpqj0U+6P4bH8GTtWOrIrRWtAR8iDFeAC0RZSd83EVrmZNj3ta67VPKxk+66FWwmTVb/3RKp6U5SUj9fOGPsnXirR67w0GWlqgBpuwsDJw= 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=FXCcF+QJ; arc=none smtp.client-ip=209.85.128.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="FXCcF+QJ" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-490ae94a89eso13927675e9.1 for ; Tue, 02 Jun 2026 04:42:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780400567; x=1781005367; darn=vger.kernel.org; h=in-reply-to:references:subject:from:to:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=89aeVXXs2STJVpXGsIdEuOvDZI5VpWNiQnZYewdJlX0=; b=FXCcF+QJTa8+LxZOrDua7doGBLx4bPh8i3YVXaaj4SqpPQ450zwWE062Ga+acGJD4J wJPix7Oi/HkRqFmU+FZ9L6nOtDZhuctRTngG9630aB9UDKLGCn45qKMrkYj2p/S5gbKz 2yRTp0Ho/3Ln3EC2qsIMBFJiyjXDPygQVYNbmWpbXARYnHjKiWqvMkwkX5pHoH47Q4xY RL7mwFw3SpO51M7J+mWP4cISTFD/H0kjBZYyDDxtca/EVBVxm0Xnux1V2FHTE4QBj2c3 oFl2l4d7vebacpTD3uMGS/WrVLnzif5MgNBvuwiEEgnD4WgDrheAgZbWJkfv7czi9T+i SP2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780400567; x=1781005367; h=in-reply-to:references:subject:from:to:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=89aeVXXs2STJVpXGsIdEuOvDZI5VpWNiQnZYewdJlX0=; b=Y4rUOC+jRp7IIOTrASPb52Y/WQAmc0Z2PpsVrrSTLl9XCmKvB9l4NY+A1EGpt8KGCK WChUe6X3Ofs0s0wTaO5eSbNPafWU8s/HMOTClVc9bk/HGxZlwSPKGIp3Ams6j5JMKZzm JH9JWVtPCktfHlOKvxtXQ9JKzz/YyhzNHpsqnkSHXolF+Fjh6g4Gurt90v+176r8vliY /VJ7Hq6h3yDny1oRbOvl/Ngy2tH4TIlp4doXqC30HYf7Qrr4UdrO8gtf9DkaryhuI+QL uhfS8H2X/uHhKX0pvwTNw/fqiP6VDnL08/g2lJHZkcYRQ65Tatq6VM5t8e5BFBfPDGFC 6iwQ== X-Forwarded-Encrypted: i=1; AFNElJ/lykRX2iPX7vZzcoqAV48NVhTVp4gSPEtn3U6ex0kw9YMmiC1ihDS6HqEroMei9qLMP98g7GUWLgAAXx8=@vger.kernel.org X-Gm-Message-State: AOJu0Yw9GEe56s/ZRzQC1inwq5yOENzcmyShWSa6EaPbrllgnN/Yb5eZ 0t7wsoGWB5OzI1onY5mwMOenJUiGvX88nEO9A3k1QyZRiznBndbfg1Mz X-Gm-Gg: Acq92OH2BVsmshXIGYl8xoeHRjiy58aL7+YLm3wCKC/uloZSJCTUFwxJ5zSLQx4YuZK 94h/NBUDiTOBSrwgpJ03fXuOoMYknf1pRTH84EUMoP7NR34791ztJkwkhqHafxzNhNVxBqXPoij Y2wOGuRfEy4oiiRlK1kL4iLjTHZnzar2X13M6bnQB+5JJyQ3ljo/FfK8ZYX1M8UktNNa0NlOXjm ONzL4Oz9MQ58FKwfTend7CpeojHlhGs2Th5k2jYyBp1mU5MkGZW5/M3yI1503YRwMkN1HQQUscZ lkV6n+eaQFipSae7+t730kqRVUhKimpbN+kJSfYNF6gg0/PxZ1bhH8rB16klbOJhA+raih3sxhT QdZRLD4C/1MfjUCSaWOrJVVF5qrpneDHYC6rRK6rcbpIrU8e8Rwd55Z4ywZ9Gx666zodnGdBx3n VcXlmWi2KSiZ1VjBQiWqIN8X2mf3i5F1TnDJOo9aiWRXAQYm8= X-Received: by 2002:a05:600c:82c3:b0:490:59cc:999f with SMTP id 5b1f17b1804b1-490a2901c21mr286995725e9.4.1780400567217; Tue, 02 Jun 2026 04:42:47 -0700 (PDT) Received: from localhost ([2001:4bb8:152:df59:3b69:56ea:a39b:adb4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45ef35874b7sm33027728f8f.35.2026.06.02.04.42.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Jun 2026 04:42:46 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 02 Jun 2026 13:42:44 +0200 Message-Id: Cc: "Jonathan Cameron" , "Lars-Peter Clausen" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Rishi Gupta" , "David Lechner" , =?utf-8?q?Nuno_S=C3=A1?= , "Andy Shevchenko" , "Matti Vaittinen" , , , To: "Andy Shevchenko" , "Javier Carrasco" From: "Javier Carrasco" Subject: Re: [PATCH v4 2/4] iio: light: add support for veml6031x00 ALS series X-Mailer: aerc 0.21.0-143-g2f3a2e260c09 References: <20260531-veml6031x00-v4-0-e64f7fdce38d@gmail.com> <20260531-veml6031x00-v4-2-e64f7fdce38d@gmail.com> In-Reply-To: On Tue Jun 2, 2026 at 1:12 PM CEST, Andy Shevchenko wrote: > On Tue, Jun 02, 2026 at 12:45:35PM +0200, Javier Carrasco wrote: >> On Tue Jun 2, 2026 at 12:01 PM CEST, Andy Shevchenko wrote: >> > On Sun, May 31, 2026 at 09:58:22PM +0200, Javier Carrasco wrote: > > ... > >> > + array_size.h >> > >> >> +#include >> >> +#include >> >> +#include >> > >> >> +#include >> >> +#include >> > >> > In C locale it seems wrong order. >> > >> >> +#include >> >> +#include >> >> +#include >> > >> > + types.h >> >> Do you know any tool to automate this beyond asking an AI? Manual >> auditing is not very reliablo and it is not that difficult to miss a >> header that has been indirectly included. Building with W=3D1 and simila= r >> stuff did not help. > > `iwyu`, but it needs a custom configuration. Even with that it's quite fa= r from ideal. > The custom config had been shared in the linux-iio@ mailing list this yea= r. > Thanks, I'll take a look at it in case it finds some more missing headers. >> >> +#include > > ... > >> >> + /* integration time + 10 % to ensure completion */ >> > >> > fsleep() adds up to 25%, isn't it enough? >> >> The problem is that it adds UP to 25%, but that is not guaranteed. If >> almost no extra delay is added, it will be below the margin I added, >> which was necessary when I tested this delay with real hardware. > > Noted. Can it_usec be precalculated already to include that 10%? > Yes, that is possible. I'll add it to V5. >> >> + fsleep(it_usec + (it_usec / 10)); > > ... > >> >> + pm_runtime_put_autosuspend(dev); >> > >> > Hmm... But why? Wouldn't this be problematic with reference count on t= he failed >> > devm_iio_device_register() below? >> >> I could move this a bit further down after devm_iio_device_register(), >> but as I replied to a Sashiko complaint, the reference count will never >> underflow in this configuration. > > Please, add a comment elaborating on that, it's not clear at glance. I will provide the link to the message where I explained this instead of copying the explanation to keep the discussion in one place. The mail belongs to the discussion thread for [2/4] (this patch) anyway: https://lore.kernel.org/all/20260531-veml6031x00-v4-0-e64f7fdce38d@gmail.co= m/ Best regards, Javier