From nobody Wed Feb 11 02:14:51 2026 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (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 B0CB81D90DB for ; Wed, 29 Jan 2025 11:05:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738148710; cv=none; b=jrIrIu2p1u53oGcFCsnlPkv36Z4kIydMzdxVkz/pbDkjhxdAeZ7rk8fYfTNEO5fTqRlQSu0WjnM0Kcph2AuIO/0AVODZ08A7UtfzIqpmySaSv4gjJspc+Oxk5MxdDD0woWtoIVDAJVHbF54I0BXzVHF5P/LB7sApvk2pb1EmX+0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738148710; c=relaxed/simple; bh=dioqZv2txBsr2G2NsI3KTjuvSsHBK1WMQvxJwpSgCpc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PppkdLH4hDa6JRqI7ureRTS6wo/5W+DGDBwH8pqAkvoTJAqEcSyDNHKRMcZjjLS9X25ywUDm6wbDU2nb5iMBKfuTHzK18r/IOe9KnITR1XPbmnBL3DwYUBHqkKAZJ5Of1Az5HxQESmN4Bn7NTUyerM5PkTw2065phx7XvUxjUaY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=Bz4/49AJ; arc=none smtp.client-ip=209.85.221.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="Bz4/49AJ" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-385d7f19f20so3359834f8f.1 for ; Wed, 29 Jan 2025 03:05:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1738148707; x=1738753507; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=wlrP600R/ci5wFmyR+m1ecPzb5qUkdneDDlwcUEYxOc=; b=Bz4/49AJauD3c1+DEMoSQiC3Xk7fs9jDbGBSu3wh7rpGRxNCqMJwGm7ju8Uh9SYXDR kEbg/tC1MnZZJWPFYjIMzyaoS0yhHrhy1TSjyg+BhZCGCwta12lRMEBtKkFP3T2FbDBw jfaEFSG6A1jYqCPOK587causGRetL2/mhatMG4uRoaQJizw4olV2GlrkoCkgad+PqfhM h6DK0uXNCF/nMUaXrMdCIUbB/MduVNd+F/bGbLI67v0xV5O1J/IYyNfuRxwumu45YH7+ MBcMC5NtFm1dunSlK9+99ugEgMDi3QSN7BqtXtKK9ljl2m5Q+CaVUiWOoxfzu250Rk4I PMiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738148707; x=1738753507; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wlrP600R/ci5wFmyR+m1ecPzb5qUkdneDDlwcUEYxOc=; b=vCA7tbzCBOrS3u60LZNvSgMVrZtNpP5DESoDM1HiYLi8pAJ+izPBSAK4SPFLuTXAZA 1zUs3enkYtvRQ7VRpeayKbSZ62C5pudqYEKzLl4H9JvUjAyuYQO9Hl8HjV9e0UPglILN ZpSQmlYoXr9vnu97zkrK1jvMTDn79sQxQ7uwhv4nLVC/JlYJtgUaOCZ6p4jaFl4FmDNn J7NaA106zzsGFLr8cRXfNa/b4B9S2PaJ5U4Kgt8p/zGqdP2klWIXdbpeA47Z33R2FFy7 9yummf+TKLZR2QWp3GqsaOOHBqT1psez3fvGitHALxgjeM8+oQrn+Xafh7HCY7UCihEV MYAA== X-Forwarded-Encrypted: i=1; AJvYcCXX9pz9Q0GDwWSkPl/kGgu8UCzM9SbPSa00c1/FkF10Va4CFHtW9YELUOZpUQSEFS2v9KCoV6ssgdYhP9s=@vger.kernel.org X-Gm-Message-State: AOJu0YxBWwoszn1rKwjclTFo+7ELMcpaPQ6Y1YbRrJsIf5Tf9rmNyJSU 4ysHlycxP9WyopiW254do0XKzJsMCQjo3ofwLoSocBVdS9G5o8b1TljD/a20C6E= X-Gm-Gg: ASbGnctBs1zzzKc7apSloi1vH/bhkLSso1SMVTk3dF0bvuBMYHLOvsT1ohcazNXHcK2 dC7QmemkTtIYMsYS5bbuIT55SbN4AL0CLQahlt+3rIKxLGNjYp45W6Ov2wLLT4trpNWKN0zGrA2 VZOvm8q0vO+Ur2aprZnqQOB82NsBliosKvgipiO70eZWff1KIqmpJS1C/8UHZQF685AutQ7ZMIf HMxL2JNmSAK4IuNwy0KJowrskKNk1l3Mj9BHcqEzKBYuwYUAHfoKhB6RldeI4Jzbi4p1VWcgB4J TTszWX1DYni/VgmaQa2R54QjdjPtfWvJ8pCOyWhGMsF85COiyh/dtrGjKUgWzLSmKOHKQCk= X-Google-Smtp-Source: AGHT+IE2sAMHKOfuQ1fuQ2nuVuYnw/aDn5EAlessm0idPWhiV/TrPf3r9aU7XQvRQSZJ/cTuX/bYWw== X-Received: by 2002:a5d:6149:0:b0:386:373f:47c4 with SMTP id ffacd0b85a97d-38c520b0473mr1757557f8f.49.1738148706878; Wed, 29 Jan 2025 03:05:06 -0800 (PST) Received: from [127.0.1.1] (host-95-245-235-245.retail.telecomitalia.it. [95.245.235.245]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a17d7a7sm17107364f8f.32.2025.01.29.03.05.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jan 2025 03:05:05 -0800 (PST) From: Angelo Dureghello X-Google-Original-From: Angelo Dureghello Date: Wed, 29 Jan 2025 12:03:05 +0100 Subject: [PATCH v3 04/10] iio: adc: ad7606: move the software mode configuration 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: quoted-printable Message-Id: <20250129-wip-bl-ad7606_add_backend_sw_mode-v3-4-c3aec77c0ab7@baylibre.com> References: <20250129-wip-bl-ad7606_add_backend_sw_mode-v3-0-c3aec77c0ab7@baylibre.com> In-Reply-To: <20250129-wip-bl-ad7606_add_backend_sw_mode-v3-0-c3aec77c0ab7@baylibre.com> To: Michael Hennerich , Lars-Peter Clausen , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alexandru Ardelean , David Lechner Cc: Jonathan Cameron , linux-fbdev@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Guillaume Stols , Angelo Dureghello X-Mailer: b4 0.14.1 From: Guillaume Stols This is a preparation for the intoduction of the sofware functions in the iio backend version of the driver. The software mode configuration must be executed once the channels are configured, and the number of channels is known. This is not the case before iio-backend's configuration is called, and iio backend version of the driver does not have a timestamp channel. Also the sw_mode_config callback is configured during the iio-backend configuration. For clarity purpose, I moved the entire block instead of just the concerned function calls. Signed-off-by: Guillaume Stols --- drivers/iio/adc/ad7606.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/iio/adc/ad7606.c b/drivers/iio/adc/ad7606.c index d39354afd539..376c808df11c 100644 --- a/drivers/iio/adc/ad7606.c +++ b/drivers/iio/adc/ad7606.c @@ -1246,17 +1246,6 @@ int ad7606_probe(struct device *dev, int irq, void _= _iomem *base_address, return -ERESTARTSYS; } =20 - st->write_scale =3D ad7606_write_scale_hw; - st->write_os =3D ad7606_write_os_hw; - - ret =3D ad7606_sw_mode_setup(indio_dev); - if (ret) - return ret; - - ret =3D ad7606_chan_scales_setup(indio_dev); - if (ret) - return ret; - /* If convst pin is not defined, setup PWM. */ if (!st->gpio_convst) { st->cnvst_pwm =3D devm_pwm_get(dev, NULL); @@ -1334,6 +1323,17 @@ int ad7606_probe(struct device *dev, int irq, void _= _iomem *base_address, return ret; } =20 + st->write_scale =3D ad7606_write_scale_hw; + st->write_os =3D ad7606_write_os_hw; + + ret =3D ad7606_sw_mode_setup(indio_dev); + if (ret) + return ret; + + ret =3D ad7606_chan_scales_setup(indio_dev); + if (ret) + return ret; + return devm_iio_device_register(dev, indio_dev); } EXPORT_SYMBOL_NS_GPL(ad7606_probe, "IIO_AD7606"); --=20 2.47.0