From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 18D85393DFB for ; Tue, 2 Jun 2026 11:42:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780400573; cv=none; b=nGGRvDm0aJ+w+CtG1ge/sxoJiTvEouuWYkhl6S48vYhT1D71MZqecMcXK1Ro1yZ9+NNDbuSLVrXvtduYC/IOVsLNaIyCqUkhObH4MPVzf3u5WeXTLi8fpwsM9Q6l3UcGIqfVzTOQwn66trKiuyKmSMgswTc5C1LW1qHQxz+1tV8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780400573; c=relaxed/simple; bh=Qqa7quuFUGxOZHeycKFVTiZCmNmQh4Y1IFeUEExbxWQ=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:To:From:Subject: References:In-Reply-To; b=CgY/AkmiZSu6ozKtqOqhfvrpKefeow7UDcI21wU0G8OGsxu7YSjFhZYJw+6hBXESo+nN+C1FEqLXEOuNpNo2x705svN1eIMlYgKEUqDuslRF2LVsJvnTLkIDd4z1EKSq7jk+U3r4GQHyHFk+nAUrmsgu6vCoKj9g87EcK/QLzRQ= 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.48 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-f48.google.com with SMTP id 5b1f17b1804b1-490a76757e5so18644805e9.2 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=cHt/4IzrmcfexfjPGGmuH03MO3FtuRaoN7JdP2eO/czY6nFHhi78VYEGvj8G/dY9dT zICmGEvm7PINbuXv+3eUedPC7qW0BP1GJvcc0dbthiCwjbfMgZbgxIrARU4Eyw2in7Zm V3qBg2YAtnW7QDcESDYQk/ftwLL8fgTCsrMsZIeRCIRe0OvShpwFrZFiqifJSm0l8l8t vtomNMW7LU86QVnpaslj2reIim5FPWY64h53TenZ7+LEpabAb1Z+0KyftoIr+yLuyEpK Q/7peCk9GS2sPJ+ygOPz10teusGemm8rj3US/u8MQEOXR8ksyOGqusZMX88j7Qwb8Wxs Fp1A== X-Forwarded-Encrypted: i=1; AFNElJ8KsQNAUQoJX4uZu2yeADleN/G35ZrE4wsIg2DUKM35+h+INuX8wHLxEgNy4IlzMlOCT+rpDLQyW7O2@vger.kernel.org X-Gm-Message-State: AOJu0YxJTP3SQ2H0xhCY2m0tUZv+UgCHEDod9UhiTB0blW0MY52JDrCV yVjHZ8BgrXZUEOtwv1iaxmmUd5Wqo+/pOJ3t/7CQRshomUssTqvJCXbv X-Gm-Gg: Acq92OE//a3v4rbsTB2LtMD/Ahq1VmVcG0PxIpfhZvI01tdoO/xzcGMM2iZLRQ+G8AL Dip3TMyI98sjlKm8mIsRBu2GbNc7CxShWoKjn5KpEGKmH8tszmGB6NNmBsVPxe4p0K61ztxsLfj Lcd/6Kuy5ihbQ3hVCVhsCx0O3O7LwHSPOIMSZsTGzk/XnZM+dKDydaIRIffUTnjFWt/VIopDoxr thyLdLW7M3MLc8oJV4TMVggvGUsrhcPH8EVt2c5Ea3LfqqyuuZgTpc7+1haQDrvNMCCBAnCXuYE Z4sSJ2lMbPfNhJNI0rQV52fl1g0B6aEyLB9nULl/GU0Y6Sjts4GeuBMCR/xptRhVBexFjD414/f Y5SRHJRQG6wHRtfbGY82dHox2w3G26qCFXchoxCB/930aof7KUhyuKtgATa/UJd/iAgP9z07fzV BXKG4x3x0E8ZTwJJOv0lEsF1Q0WIdZkU8ew7cQeUfz6XyUo0A= 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: devicetree@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