From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B4822FAC12 for ; Mon, 19 Jan 2026 21:21:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768857713; cv=none; b=UNmbhaMW9r9ObHKOJJCXbF9uC6mVcVACm1XvOZLyMUiHIhQp0aBJ/j6/ydGaUWBe0bqUHrTKjcs8IEyIPqLNXNsuc4vDW2N2cgXvlBpM4jeobYxSAaAwhmdw4fgYXL2RevfxQFW7jcD1kjnpcsesE0AONXDVC6q45u7syJA96Sw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768857713; c=relaxed/simple; bh=FdSO5wpQATGLHDpytquCGXO+KI/DQ8qJRt5u4ewqpJQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VBpzO8n0xzdLrwMP8v/jCRQwy0/43ruVWyKaKqFG04r3u4C6mDNQxRKYlu+CleomBAydn7RuzMaIbfQZ6TTwdtwwOF5LVcPiNyaKGykXbucrdlh9GMNwzETecnIt1mdIT1SHQsdC+dc9dYraZYkBKgVK7KaqZbJwb4yf/Q8mO30= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Hribfq3w; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Hribfq3w" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7115C19422; Mon, 19 Jan 2026 21:21:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768857712; bh=FdSO5wpQATGLHDpytquCGXO+KI/DQ8qJRt5u4ewqpJQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hribfq3wlxMvAW0Hu3MIxLvx1JvBcmnHo1Nw51OAxVk2QSDzu1BTO+e3fm6QrH+5N Efe5SnLIvK3S9la5LjnOQXoThIwJACpXohiuD+3FNJAd0aZAkyryj9o/8Y1EwhkvNJ YveUcUeOFtnjni6J77qDvhH4XBeoHyzL6Pjmk6RYMbY36PNLxa/MyxenrLNmXzpvtO mO7alyeGx38ayDuDzcnvbx3aHNn3wpocjBCId3OCgSEObeuSq2/oeBKy/pXDN+ESxz QQGPKetZwIxgQAGSeHrVA570N9EzApkF6lvKoten+FRuRpcMRXNr2r2iSA/XJCc6p5 KHIlTglLXi2KA== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Andy Shevchenko Cc: David Lechner , =?UTF-8?q?Nuno=20S=C3=A1?= , Mike Looijmans , Liam Beguin , Miquel Raynal , Ibrahim Tilki , Cosmin Tanislav , Alisa-Dariana Roman , Jonathan Cameron Subject: [PATCH 06/11] iio: adc: max11410: Improve relevance of includes Date: Mon, 19 Jan 2026 21:21:05 +0000 Message-ID: <20260119212110.726941-7-jic23@kernel.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260119212110.726941-1-jic23@kernel.org> References: <20260119212110.726941-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Jonathan Cameron Drop kernel.h in favor of more specific headers and add other headers that were previously only indirectly included. Also add a forwards definition of struct regulator as it is only used as an opaque pointer type in this file. Justification for new headers from iwyu: #include // for ARRAY_SIZE #include // for BIT, GENMASK, __clear_bit #include // for guard #include // for __aligned #include // for complete, init_completion #include // for iio_chan_spec, iio_chan_info... #include // for read_poll_timeout #include // for msecs_to_jiffies #include // for kstrtobool #include // for order_base_2 #include // for DIV_ROUND_CLOSEST #include // for clamp_val, __cmp_op_max #include // for of_device_id, spi_device_id #include // for class_mutex_constructor, mut... #include // for fwnode_property_read_u32 #include // for NULL, true #include // for sysfs_emit, attribute_group #include // for u32, u8, bool, ssize_t, alig... struct regulator; Signed-off-by: Jonathan Cameron Cc: Ibrahim Tilki --- drivers/iio/adc/max11410.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/max11410.c b/drivers/iio/adc/max11410.c index 511b2f14dfaf..c8a9718c4e4b 100644 --- a/drivers/iio/adc/max11410.c +++ b/drivers/iio/adc/max11410.c @@ -4,20 +4,36 @@ * * Copyright 2022 Analog Devices Inc. */ +#include +#include #include +#include +#include +#include #include #include #include #include -#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include #include #include #include - +#include +#include +#include #include #include +#include #include #include #include @@ -130,6 +146,8 @@ struct max11410_channel_config { bool buffered_vrefn; }; +struct regulator; + struct max11410_state { struct spi_device *spi_dev; struct iio_trigger *trig; -- 2.52.0