From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (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 41725DDCD for ; Sat, 9 May 2026 14:22:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778336559; cv=none; b=t21cT200kMFQG6g3KmQ575s7FXgJamJ/QTrYLSe/DarFl8KwYBMIXbHhE3RrjdVdRd0Puxjfjwzd+USeJzvQ46qDRi4GL6EVjOGfCnUvzp5CRpyFMF7Ue00MC6uxYWCxrjRhlCVaeD2jb8SrMJYd+Xbi6lkumJfuupudhXdufpQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778336559; c=relaxed/simple; bh=PDCyqrDp2cpLbVPkx9BU3X2g2fgR0bLaGYNic8cU7jk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=XGV/+hPwk2FJeIoVvf9mlD6f/1WQJ3BrcgjVACxl0F0vtjG9rb+XCSfI7ZAceXgPmakiv/J01V9O0tMAYuzxigi6suja4l6dv0QOYIO3u3ULGFTqO6VV/YFAJPwTbZX5Y+FlPUXALeRlubZ/ggap6ci16w2VrjNlSBfseIlD/L0= 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=spAxBN7m; arc=none smtp.client-ip=209.85.221.51 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="spAxBN7m" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-43fe3e22e33so1712473f8f.0 for ; Sat, 09 May 2026 07:22:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778336555; x=1778941355; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Jmvg0x6dnke6aX/zgSP8+qEtU0AMd7QFkbsuhFZV/2w=; b=spAxBN7mv0K3wkMBiAMhHIWrux5lHfD+4i037NDzDIR13zqnafvlh+YR3y+TJctIOF UtJht7surudSP5b+3/cwVEblZnft/l+DcULrXUg8O1ZCKeJ9R2YZ+QowBrr1Nb/AqOX8 bLMnd71mFYCxEYuMa73m/iYvuYU7QG9HQBg3xIgdYi3vt0E8RKwnAwCWdr80ZuQMntRy 87aFn0bTania+yxkrixgifACVIc+mnmJ4jKaQPWP11CVx8Eur4C6xTmqVUxOsaJMwayl 2iktRsy3wfXAVPply5mEuIsqWUObQKKgSsZ+FwcZFqkWBKu/e/lmJqjefhbRG3rckjal uxcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778336555; x=1778941355; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Jmvg0x6dnke6aX/zgSP8+qEtU0AMd7QFkbsuhFZV/2w=; b=VH5yJpu/Hx+7IYoENkut5BNHWA7/T0oS6T2y6ee1I3BA3pD7VAVQSd2opI1tbD76EW wrC8ob7iabLK1i//BpMC2bIDe3TR736adhM8VqNNkscnA5+12lGorOu8W1ud6CXYEoTY w4eZi5EUfl/LR0OGCoOeUQmn/iOoFdlBTjw1QVPoHpLWkdkcpdj+M1trmObT1fv7+ZuN Np/rsnxrAgqcpIIx1HxrxVlwl7W1T9oDUjO/HgyR15wUiDHMpXsIvWEnrSWlCGOlmuTg 0YZuMj9M/bGkxanLtj24fEZvqmvalykZ1hZD2RQopo4hBa8aIfz9sup+0D5s9Lh1zSHJ 8UYQ== X-Forwarded-Encrypted: i=1; AFNElJ9nOxu6ytSX9D+xv9vrUHmQYgEcbT/uZYZoY0yl253ciHAap0irnrnNEKXr5aIXFHB5vhVYXbkwU3+ZT5M=@vger.kernel.org X-Gm-Message-State: AOJu0YwR/pSVOQLeAJNBsSM/EdVWN53Fbve3GXT0H15b6L2ppXX5XFeo ftSePT9uNgpinzd9e5H7Kwu7GWou8kjtKj6te6DnLNA1uBg9KT/r7yFu X-Gm-Gg: Acq92OFxr9K13bQSne1Z8kqrZ2l31k2wYMEdtxGvKdrCQiT3Lwafu/BbNQeIlDM/t3p EPfF02WMy/ihFfinyKmg7shCkK+pSKA2K20TiQmQxM57VIaKCeMJWF6DV7tJMChQMivBIve9EUe IzuWLiU7CtzvaxomrzNhPdor1z2BbqWdVarn7nCbL3TGv4nuJFCyv3U5u9blI9GpinKtcSmDxlR ikDZwzoYyFydMcKZkrksFI+KEJaCXP/4SQjbJpuvigey/9bLjuV4vjWSbRTYjO76VzPk9KQyuKQ rMshXaAy4nTr87kgaQ7i0oLCra0QmrFUNf3bhHYxdXVF5sI4g8Ts4PEdgSfpqsSXCMwKSdFQLPj xDp0amvQG/6hM01nYJW+XXA/859kxEJ7q4PJCvFk9F+0wXtFH098VKKwdQnzbF240oolKbCR8BE bbCc8NvEobdyGoOKPTISneyfZRCOpf5AKWfQXvizuOo99tC3aqpY1y3BDMPg== X-Received: by 2002:a05:6000:2403:b0:441:2381:b630 with SMTP id ffacd0b85a97d-4515c575330mr26533311f8f.24.1778336554291; Sat, 09 May 2026 07:22:34 -0700 (PDT) Received: from DB-07.1337.ma ([197.230.240.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45492271510sm15127763f8f.37.2026.05.09.07.22.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 May 2026 07:22:33 -0700 (PDT) From: Taha Ed-Dafili <0rayn.dev@gmail.com> To: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org, skhan@linuxfoundation.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Taha Ed-Dafili <0rayn.dev@gmail.com> Subject: [PATCH v3 0/5] iio: dac: ad5504: bindings, cleanups, and scale fixes Date: Sat, 9 May 2026 15:20:38 +0100 Message-ID: <20260509142047.30302-1-0rayn.dev@gmail.com> X-Mailer: git-send-email 2.47.3 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 Hi everyone, First, I want to sincerely apologize for the long delay between v2 and v3. I had to step away to focus on finishing my last year studies, but I am back now to get this series over the finish line! This v3 series addresses the feedbacks from the v2 review, specifically focusing on strict DT validation, dropping unnecessary driver code, and making sure the driver works perfectly at every individual commit. Testing & Hardware Proof: The series has been physically verified on an ARM64 Raspberry Pi 5 using a custom Device Tree overlay. The AD5504 is a 12-bit DAC. The hardware scale outputs now perfectly match the DT inputs: Testing the 60V path (output-range-microvolt = <0 60000000>): $ cat /sys/bus/iio/devices/iio:device0/out_voltage_scale 14.648437500 (60000mV / 4096) Testing the 30V path (output-range-microvolt = <0 30000000>): $ cat /sys/bus/iio/devices/iio:device0/out_voltage_scale 7.324218750 (30000mV / 4096) Additionally, providing invalid DT configurations (e.g., 70V) successfully triggers the strict bounds checking and cleanly aborts the probe with -EINVAL. Changes in v3: * Dropped the patch adding GPIO control for /CLR and /LDAC. As pointed out by Nuno Sá, since the driver does not actively handle or toggle these pins, requesting them in the driver is dead code. They remain documented in the bindings. * Combined the pdata removal, regulator _enable swap, and DT parsing into a single atomic commit (Patch 5) so the driver compiles and runs cleanly at every step of the git history. * Restored the -ENODEV check for the regulator to maintain ACPI compatibility. * Implemented strict min/max array bounds validation for the 'output-range-microvolt' property. * Included missing , , and headers for full IWYU compliance. * Reordered commits to group cleanups before functional changes. * Dropped Suggested-by tags for standard review feedback. Changes in v2: * Replaced vendor-specific adi,output-range-volts with the standard output-range-microvolt property array. * Replaced adi,output-range-gpios with standard range-sel-gpios. * Split header updates into two patches: alphabetical sorting and IWYU compliance. * Used MILLI and MICRO macros to replace hardcoded values. * Introduced a local dev pointer to respect the 80-character limit and realigned function arguments. Previous versions: v2: https://lore.kernel.org/linux-iio/20260310174835.24209-1-0rayn.dev@gmail.com/ v1: https://lore.kernel.org/linux-iio/20260212181955.42724-1-0rayn.dev@gmail.com/ RFC: https://lore.kernel.org/linux-iio/20260210121032.4630-1-0rayn.dev@gmail.com/ Thank you to Jonathan Cameron, Krzysztof Kozlowski, Andy Shevchenko, Nuno Sá, and David Lechner for the extensive reviews, schema guidance, and C optimizations throughout this series. Taha Ed-Dafili Taha Ed-Dafili (5): dt-bindings: iio: dac: ad5504: add output-range and missing gpios iio: dac: ad5504: sort headers alphabetically iio: dac: ad5504: Align headers with IWYU principle iio: dac: ad5504: introduce local dev pointer iio: dac: ad5504: fix scale via output-range-microvolt .../bindings/iio/dac/adi,ad5504.yaml | 39 +++++++++++- drivers/iio/dac/ad5504.c | 63 +++++++++++-------- 2 files changed, 74 insertions(+), 28 deletions(-) -- 2.47.3