From nobody Sun Dec 14 12:02:54 2025 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.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 21DBE1C0057 for ; Fri, 28 Jun 2024 14:48:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586122; cv=none; b=VFouX3e3S92AH5CEEOYF+tp+cyNsACrs6SNUtqadc3StZMXncsyjjVSxdELnbV9mhj403C5rsmRcrmKOqOm0kHrP7uXQ0s05OAIibSErjYN9OfMGlqdyxFUbhUKFkRXcn2HBCiJam8M8E3NNJWe89V7cq9ar9bot44Omfx61lqU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586122; c=relaxed/simple; bh=PLtj7bSe++tHU1muE0ellbCUBsOVwaNLui/U8TXTses=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hQrb4nJdWH8l6lUsSOb0XJGwYITJLp0zr53SLLCvdsxGY1MwW+81GbBkueCH5KZkK2Tcyxv4wX6EdlYWJD2PRdvbJQHda1HEzz0aRBt7s1QmHJIyWezxfpKGybz6nqIiVIGPyF7G4qpHZLXJasgYsuiYI1CqGHc/z3MDI//C9TM= 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=v6jOUtlZ; arc=none smtp.client-ip=209.85.128.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="v6jOUtlZ" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4256aee6e4dso5304075e9.1 for ; Fri, 28 Jun 2024 07:48:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1719586118; x=1720190918; 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=uJg4U+PW9Snx8tG5VLs4l5kg/oNVaqq+3EVHHkcbQfc=; b=v6jOUtlZtIeACeLCCkYRk2O8ycfb6qRg/MEUNbSK0nsQ6wujLPYBGgHiKPJWTqjbz2 m7LspueVlAWnBhfoV7BBOAEwO5uORdW3RjH+qNHIwj99m5nExCisGlkPvOlFpMMbapcG e5tG5LIFzE+E8q0Ytn5RUsN2OYGGWehui86FNrSpP6IGbUtHZj8p9THStSUL8q+7F4N5 9mWHNSqrwVLxp73SAHWWRWUTHQSAUFBc/Wpa8pYkoKhYmP3uA0TIqnF3yqviKFg+bU/q k0CjSbL58MiJYm0KC7vGvuahzbvOPL6NSTur+KkqYu1fidzSe4jieagZWOmIFi7dhUFy ufKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719586118; x=1720190918; 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=uJg4U+PW9Snx8tG5VLs4l5kg/oNVaqq+3EVHHkcbQfc=; b=QSnobQAUQe3/h0eUAVKxZo2lQF7XjU9UtqbZS/FRSDiS4DPux27Q8s9dwAmaDY+MR5 R2UbhEHNRXCnHhLrfJXhR23gH+XdAsZmgXXpOpYS8o9FyKvuyT4HSNSOAU9R83bjrO5O xvE9yuOUIVfjVr8w3tIKZp2wiX6vsh5gZ7cbuaJj6OyU57SJitgaVr37MBiHYsFBAeGl 29g6gEYTQjjqQd0gmRLk99val4ysWseff65fBo+HnuLpvBV8paDjUET2yhxZxqWdJAc0 qYrKx9QU85qmlGsJ5B1UL3rOjBMeLKwk2rZnLegwFd0I/kVDy3pHwQKmPwDGzWlHj8MY uLbg== X-Forwarded-Encrypted: i=1; AJvYcCVPXRQOro4nHdDMa3fQs+YhrUTuu8lRAoQo6EHMTnb1Z1DmgU7wsNpW9deY0GXwt1fjeJjmWQCVxmXK/eUIU3fNurQPzvvsusRbtpKP X-Gm-Message-State: AOJu0Yx3Gt7DNePsiZxtYPuoj5f8FULUMfvFDjNEdOWuI36OzjJ7fBVz /Yf4TNOQEOgJX/LnmcV8dlnnWkAPghCWhNk2gStkSaOe3/3/2Njm4KJuCMedPeE= X-Google-Smtp-Source: AGHT+IFZJvZcGme5tYJIDm7Fn4HGpd/PyLd+v7/pwoRVXETsHGa6eBvd/qNPMGWqDBbSv0goSqbC5g== X-Received: by 2002:a05:600c:54cc:b0:425:624e:d80a with SMTP id 5b1f17b1804b1-425624ed961mr46300535e9.24.1719586118172; Fri, 28 Jun 2024 07:48:38 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256af55c0asm37972575e9.15.2024.06.28.07.48.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 07:48:37 -0700 (PDT) From: Guillaume Stols Date: Fri, 28 Jun 2024 14:48:19 +0000 Subject: [PATCH v2 01/10] dt-bindings: iio: adc: adi,ad7606: add missing datasheet link 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: <20240628-cleanup-ad7606-v2-1-96e02f90256d@baylibre.com> References: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> In-Reply-To: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Beniamin Bia , Stefan Popa Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Hennerich , linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org, Jonathan Cameron , Guillaume Stols , jstephan@baylibre.com, dlechner@baylibre.com X-Mailer: b4 0.14.0 Add AD7606-5 datasheet link. Signed-off-by: Guillaume Stols --- Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Do= cumentation/devicetree/bindings/iio/adc/adi,ad7606.yaml index 7fa46df1f4fb..d55c58400df5 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml @@ -11,6 +11,7 @@ maintainers: =20 description: | Analog Devices AD7606 Simultaneous Sampling ADC + https://www.analog.com/media/en/technical-documentation/data-sheets/AD76= 05-4.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/ad76= 06_7606-6_7606-4.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/AD76= 06B.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/AD76= 16.pdf --=20 2.34.1 From nobody Sun Dec 14 12:02:54 2025 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 81CEF1C007E for ; Fri, 28 Jun 2024 14:48:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586123; cv=none; b=hKbk5y3o+X1GRBeQZfGmDe20c0beexwTk3NYTLPsz4PVacLdf4MsWmUcAjXncpLHzm09We9+GF9+R0WNeLWcdsGeW85b4FzmVosI3cI8puvl7/VphjS0olzKKDAFjatZLz93lBLJzrNZeie5+0Nxly8OWr3VRmLXwjvKBM06Dlk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586123; c=relaxed/simple; bh=fMDqf1KM7W/RA77rezMz3nE602KNHtmJiEMO09XyypI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GqSZDQo2v7XFiWDLtikTUl5YjCt+ulqyHIPTDqflNvCCqr74vM4NZt1rVAmq8mmMztiMaxotbSrg4A3R5bEzFdFAUq/vQX37YdMfZ6TXYRxLXTPeepHtEui/T+iqodW22t2t01FBHFT0pD67VAvpWnMNBZRUoRAhoCGhFJ+9T6I= 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=rQDJLkCf; arc=none smtp.client-ip=209.85.128.54 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="rQDJLkCf" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-424adaa6ceeso4874065e9.1 for ; Fri, 28 Jun 2024 07:48:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1719586119; x=1720190919; 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=6PSO/1gMPYozHX3dfKEvclJiI5tF+MksrCbjn3VycYQ=; b=rQDJLkCfkKgZBhUyezQ/lYW8Bm2E98zhIHYDXpcmGmzwuGPkPKPrDNV0K2EFopvKN8 Dh6qbxDhP1CY1qZqDJpfGEIwiVeLM+OyL883tBiWGCDkjPpfoa/Zhf9B2KGoCgcsjtQT AONy8QGXS5M6RdwtTXqO/ixoTFKDrna/+/I0Z+RzpJTrAkVUbFKVdNv7AABjWSPXNkiX tuw/cbaM2EgkTQgkaQx1LMx7UyVH46WsKBPZKRTxcB4LTEfMCXahdUjkAbLCWAlC0UvP sx3r8Va61F5qhYEG29cy799StWXiIdtBzKcZRAMsGgoOrVN5vEX2j+6DNEsIlIAD3uFX fmlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719586119; x=1720190919; 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=6PSO/1gMPYozHX3dfKEvclJiI5tF+MksrCbjn3VycYQ=; b=poB8ze1kezr6dd+wwv7c2a8naIgk2jp/qXM/bI7Gf2/tiHw474XOvXjwtdHEj6YL3s un++OOZVCYgp6zveDRV7zoP//Z9qhPwf5eXR0mHWcZTIEjFFMhXobXiA21OrbneQzyVr 5wxVm7GrFIsjHOSjpUHMH6UB8A06mv+H64aHXp2KzqVv+8zii6M87fbsCpXdn5qmweTQ 87Ys56CoEwT9wT/CXZ9KZzpV/wHlyUiIRFqCJql/w1/0/pL95eragq/s4+Eh1YeEguZg t3p/XhuVOnzXl50D//Ec1jIZUA58aT2izXJCS1nXOsXQK9OSpSkTAfo9tGCgFxIBXliy Ge1Q== X-Forwarded-Encrypted: i=1; AJvYcCWZJYoP8830oHoYdjjztbgN74toqD4fJJzlIlTxo2DEYW+nzPKdwH2ss3y9czvwt87RSZLWZ8A4wxLb+oPsGx/KGlDcswevp3YFYZ27 X-Gm-Message-State: AOJu0YzUh51t0CZTrr2diI/ZZOvk0jmpkXxZZ1uHiRoPreEu76SVVK2N rqIZn5ov9eUCP3kTISvU08Ha7o/xJQmRugXosk0Pfic89L2E2ddbh/B4tLu44NwYmd4dFIOyxuR o X-Google-Smtp-Source: AGHT+IFAh8zWamkAmBF1B+P2cbfd5WXLJvJUkgL28xwo0GsXojl2TjxPdeR9K2+uX0bS9r7zxwwE2Q== X-Received: by 2002:a05:600c:438a:b0:425:5fa2:60a8 with SMTP id 5b1f17b1804b1-4255fa261c1mr53186065e9.24.1719586118790; Fri, 28 Jun 2024 07:48:38 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256af55c0asm37972575e9.15.2024.06.28.07.48.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 07:48:38 -0700 (PDT) From: Guillaume Stols Date: Fri, 28 Jun 2024 14:48:20 +0000 Subject: [PATCH v2 02/10] dt-bindings: iio: adc: adi,ad7606: comment and sort the compatible names 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: <20240628-cleanup-ad7606-v2-2-96e02f90256d@baylibre.com> References: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> In-Reply-To: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Beniamin Bia , Stefan Popa Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Hennerich , linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org, Jonathan Cameron , Guillaume Stols , jstephan@baylibre.com, dlechner@baylibre.com X-Mailer: b4 0.14.0 AD7606-8 is referred to as AD7606 by Analog Devices. This comment aims to avoid confusion. Also the compatible names were not sorted by alphabetical order. Signed-off-by: Guillaume Stols --- Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Do= cumentation/devicetree/bindings/iio/adc/adi,ad7606.yaml index d55c58400df5..00fdaed11cbd 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml @@ -20,9 +20,9 @@ properties: compatible: enum: - adi,ad7605-4 - - adi,ad7606-8 - - adi,ad7606-6 - adi,ad7606-4 + - adi,ad7606-6 + - adi,ad7606-8 # Referred to as AD7606 (without -8) in the datasheet - adi,ad7606b - adi,ad7616 =20 --=20 2.34.1 From nobody Sun Dec 14 12:02:54 2025 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 1B3EE1C0DC0 for ; Fri, 28 Jun 2024 14:48:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586123; cv=none; b=mPDkO6LkfMiQ9RKZ3CvyAnikDkHBXw5T2wmmz5o/eM1xBWNXxUnlOVOeRsWb6KJONmTjjrB3YYtv5ttNmGiI2lHmC6kpTA0sqlWzb1TRe7Kdh8VgmwDsK7kjSu1IVeqeFc9KRYqnMwW7aNsry1kQdjDlJtTHSC2aH0WFNb2DSqo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586123; c=relaxed/simple; bh=Q/6aXC/8+GSOxHhveuvUiLB8+gebFnjISImR+2r01po=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IRmIeSNu2Et1r4tgdUttKTpEx6z65t5e+iVZSuYG91jkY6Kmzeed7vxIgOFgawRW+86SetR7m4ouHWBXhWnbrh4ZFm4eVc3E4F0DdXK2yWsHu6LtfFwVjnE600kJZPgySS0xbNuO751GjX3fUhRf/Ti/b7N5mHg3U+oYoBp6jNo= 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=nIH4fxeq; arc=none smtp.client-ip=209.85.128.49 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="nIH4fxeq" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-424acfff613so7233285e9.0 for ; Fri, 28 Jun 2024 07:48:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1719586119; x=1720190919; 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=sYMEI/fziuNXffhOeErHosHLEBtp7W0eQI99xejXllE=; b=nIH4fxeqVNrqVL1Sv/VDbhWkEAVwTL4ZBqGZcjJwp6+XrWD7NPy0qP0WbL8ekFc1jW pfe+Pi+pw89o71JqvJURQroufVsSoOO9/IIoeETfevG0AReqahlcY6QdwMoObkKaLGN9 cEl4YGe0D3DMILEztWd9vqrBBixVMuA0mqjOUeWYDCwvhJonAbnbx28PZ2SkQolCJpgB tPyB83h+zqQ+OOcNADgIVSI0EH43IuKh9irvrOyOGY1Rgh182hGUd87yPySiRB40P7iW ret4AXNHZkxilVgEOHGcJRXvJZK6dV2YTpzImPorNZR38Zv0nNTDXjvhKeCiBxuRk0Hd CbOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719586119; x=1720190919; 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=sYMEI/fziuNXffhOeErHosHLEBtp7W0eQI99xejXllE=; b=Cpye/t8z04SGQuHqUO1dDvfkJPl8XtsnVfdLrB6xR49mqpX31IQqkZ/QjlqdK+jdeV vca4CwPQGbSAp2TW750ZGBp/WHKztdaIwuw8GeFe/PBy5eS7dt5OA4sDyL7ZLdVnhEnN lQLc0AGoFjUdFPQF/As/AxP2nd1Of5apkY8H1y2Swr9GWBcsr6/8m6WkenVZUkQ0pynX 9BUgw24fVCkQZSivdDbRDrStZVFuVLAXC2i8Rpa+M5mPf7zEZYah4ZVp6zHvc9r7ZYwA siJQCSbH87Mn2T2FXIhbo9arEHHJSslDEryF/l57ZhIhiHv+nmoAVKJ7gQvrMdCzP1bj fTxQ== X-Forwarded-Encrypted: i=1; AJvYcCUwq71brHvLXON757iXfxDxfFyXB35o7P3ci0YXhSuThAm47k38I3XaTbmOMTyAkFPxdjUyLSQ3ArJOxrUoCZ4BFcB9cfJyqHFUtcd7 X-Gm-Message-State: AOJu0YyFmNQFodVt8udJAs5e2QRSSascEbpDRE7SLj/Ztj4iydg1T/ce UCMU09VkW3ZDmubVFhaczhsb6rr3/k0yOLiFdx7GTOEZIhfsYmrNd+QbMsh6sb8= X-Google-Smtp-Source: AGHT+IFILz3MnOibJoF9YCDngKCqMwgGJJf7k5UXTYf47W6qKWVOpX3CUieTJt0QZHxktYEMu+FDvg== X-Received: by 2002:a05:600c:4306:b0:424:aa86:cc2a with SMTP id 5b1f17b1804b1-424aa86cc80mr85713655e9.20.1719586119386; Fri, 28 Jun 2024 07:48:39 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256af55c0asm37972575e9.15.2024.06.28.07.48.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 07:48:39 -0700 (PDT) From: Guillaume Stols Date: Fri, 28 Jun 2024 14:48:21 +0000 Subject: [PATCH v2 03/10] dt-bindings: iio: adc: adi,ad7606: normalize textwidth 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: <20240628-cleanup-ad7606-v2-3-96e02f90256d@baylibre.com> References: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> In-Reply-To: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Beniamin Bia , Stefan Popa Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Hennerich , linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org, Jonathan Cameron , Guillaume Stols , jstephan@baylibre.com, dlechner@baylibre.com X-Mailer: b4 0.14.0 Normalize textwidth to 80 columns on the descriptions. Signed-off-by: Guillaume Stols Acked-by: Rob Herring (Arm) --- .../devicetree/bindings/iio/adc/adi,ad7606.yaml | 50 +++++++++++-------= ---- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Do= cumentation/devicetree/bindings/iio/adc/adi,ad7606.yaml index 00fdaed11cbd..32caa9fc00e4 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml @@ -40,60 +40,58 @@ properties: =20 adi,conversion-start-gpios: description: - Must be the device tree identifier of the CONVST pin. - This logic input is used to initiate conversions on the analog - input channels. As the line is active high, it should be marked - GPIO_ACTIVE_HIGH. + Must be the device tree identifier of the CONVST pin. This logic inp= ut is + used to initiate conversions on the analog input channels. As the li= ne is + active high, it should be marked GPIO_ACTIVE_HIGH. maxItems: 1 =20 reset-gpios: description: - Must be the device tree identifier of the RESET pin. If specified, - it will be asserted during driver probe. As the line is active high, - it should be marked GPIO_ACTIVE_HIGH. + Must be the device tree identifier of the RESET pin. If specified, i= t will + be asserted during driver probe. As the line is active high, it shou= ld be + marked GPIO_ACTIVE_HIGH. maxItems: 1 =20 standby-gpios: description: - Must be the device tree identifier of the STBY pin. This pin is used - to place the AD7606 into one of two power-down modes, Standby mode or + Must be the device tree identifier of the STBY pin. This pin is used= to + place the AD7606 into one of two power-down modes, Standby mode or Shutdown mode. As the line is active low, it should be marked GPIO_ACTIVE_LOW. maxItems: 1 =20 adi,first-data-gpios: description: - Must be the device tree identifier of the FRSTDATA pin. - The FRSTDATA output indicates when the first channel, V1, is - being read back on either the parallel, byte or serial interface. - As the line is active high, it should be marked GPIO_ACTIVE_HIGH. + Must be the device tree identifier of the FRSTDATA pin. The FRSTDATA + output indicates when the first channel, V1, is being read back on e= ither + the parallel, byte or serial interface. As the line is active high,= it + should be marked GPIO_ACTIVE_HIGH. maxItems: 1 =20 adi,range-gpios: description: - Must be the device tree identifier of the RANGE pin. The polarity on - this pin determines the input range of the analog input channels. If - this pin is tied to a logic high, the analog input range is =C2=B110= V for - all channels. If this pin is tied to a logic low, the analog input r= ange - is =C2=B15V for all channels. As the line is active high, it should = be marked + Must be the device tree identifier of the RANGE pin. The polarity on= this + pin determines the input range of the analog input channels. If this= pin + is tied to a logic high, the analog input range is =C2=B110V for all= channels. + If this pin is tied to a logic low, the analog input range is =C2=B1= 5V for all + channels. As the line is active high, it should be marked GPIO_ACTIVE_HIGH. maxItems: 1 =20 adi,oversampling-ratio-gpios: description: - Must be the device tree identifier of the over-sampling - mode pins. As the line is active high, it should be marked - GPIO_ACTIVE_HIGH. + Must be the device tree identifier of the over-sampling mode pins. A= s the + line is active high, it should be marked GPIO_ACTIVE_HIGH. maxItems: 3 =20 adi,sw-mode: description: Software mode of operation, so far available only for ad7616 and ad7= 606b. - It is enabled when all three oversampling mode pins are connected to - high level. The device is configured by the corresponding registers.= If the - adi,oversampling-ratio-gpios property is defined, then the driver wi= ll set the - oversampling gpios to high. Otherwise, it is assumed that the pins a= re hardwired - to VDD. + It is enabled when all three oversampling mode pins are connected to= high + level. The device is configured by the corresponding registers. If t= he + adi,oversampling-ratio-gpios property is defined, then the driver wi= ll set + the oversampling gpios to high. Otherwise, it is assumed that the pi= ns are + hardwired to VDD. type: boolean =20 required: --=20 2.34.1 From nobody Sun Dec 14 12:02:54 2025 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 D70791C0DD6 for ; Fri, 28 Jun 2024 14:48:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586124; cv=none; b=RmDjRGLW+abArr+/stJ0nRRoMu4hGogzvGyePcFhfs7iFE/zGWSm88MW6Ci3AYb1dD45HwhyxRW7mbTdQLW7vAWW4kbYis4io/5DW1aIhP8SxSCc1AFr+qxOQmMDAaRJxQEh7+EFqJev4tRW3uWrmlhV8zVGEJeiByTJNtb71mQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586124; c=relaxed/simple; bh=pbVttNwmh0wXwB2M+J1lmKxK6g4AGHnPIqH7k9p554I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=X+R1fzQO/dgrdO10EPiwbQV2U5Ndr1htqTqtZiFEkPIUN56qejZ7QMJMXmafNwobasIhbhAnYIAqfoTX5ClAr5vO2LGnIRYmdE8KPmsRWRC/iTe0i6D4iHMnffrCBE1vkBZjfbmvOdAobWJDFLIlBahMxh6s+wi5S9AfVXSeMv8= 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=BLG46gih; arc=none smtp.client-ip=209.85.128.53 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="BLG46gih" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-42562a984d3so5456945e9.3 for ; Fri, 28 Jun 2024 07:48:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1719586120; x=1720190920; 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=twxKpEjx0LE+O9asNVqI6nlOWrql2lHpjBPHpnXyihY=; b=BLG46gihePOXsJ3H7nGHUOJ0B604VwZfR2b5mwP+toKSM5XCTpfZJqU2ALfSv6Vds2 OL/d6rkU0GWcQwcDKHlv8/InkUIY8fmLc9gCuv6vgfRgMzrZUX1bBOu8lVYnfBLHufBt A5MsqMQM/zA6xUem8O9xLE2qcXBVI1cVS7x0e4z1K6maA7swthZbtcsTaJyXV1XgOF34 9IjOxw4qEz+cu0f7d80z3lsbzPz26rkPhwM56WyULxAlNWw1P2DR616hyxbMs+X8g40E Y/1YGTOwhQossZ4u2FQb1kNAzPCVL9OMIQaPnG503xBlDStVDW1Qp1Zgz6qn+MkC/ZgN VyiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719586120; x=1720190920; 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=twxKpEjx0LE+O9asNVqI6nlOWrql2lHpjBPHpnXyihY=; b=mdDa9y3Z40I5tLT76s/LlYRKYgEA6d5pKVH/5gm0P1G53yefEiIRbeCP6RmhxoSk+s qoXc6g5OCg5yWPMCIy8wJrKCLgjLLuxudrW8z2pyoS4uKdXkHQZP64D4BZ2QwJzF8zEo +MwpdBGG39FdiqKTX/8b/WmOJG7stzQHIQgnmCyOW6lcj079P1yPa98C1gGM6BEi9/04 3Qru6I5UPEl3S7wIS0Dssim47ORzjMGmwa7k3gLN3aHtFZOJrK22AuGdWKN3An1/RGcM K6EGcEGDKBp9yKuswy1QRxT2Vir+9eft1k6fRxObphvYkE9JalemLQ3WeYe607s39rtU 797g== X-Forwarded-Encrypted: i=1; AJvYcCUTvJChMETi/36TTP+sZNinVk/Mj8p0+Ysrj3FoH0A8lRrVM64RRnKMgV94G5biaeaOAmkmkj1ECqu5BZlqz7TW0mVQWFUk/0/CcvXN X-Gm-Message-State: AOJu0YzmVsn9ae5lrrB3H2e9kG6MqDDYnVEOFu6elIEmFa99lBKwD5aw Od+/eXc4SUNyAfOm7JqOu9JiXu205IKyi90Vsf6DRpkUHOXfJTPBwvL5DFepEqc= X-Google-Smtp-Source: AGHT+IGDEJSqJJFi40+Iyz/doQiUT5xclEpI4r6XNNik0aXkd7H1+HKugVHcbyzlEMT+fDZMYSh51w== X-Received: by 2002:a05:600c:929:b0:425:65c5:79b4 with SMTP id 5b1f17b1804b1-42565c57b9amr38442305e9.26.1719586120001; Fri, 28 Jun 2024 07:48:40 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256af55c0asm37972575e9.15.2024.06.28.07.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 07:48:39 -0700 (PDT) From: Guillaume Stols Date: Fri, 28 Jun 2024 14:48:22 +0000 Subject: [PATCH v2 04/10] dt-bindings: iio: adc: adi,ad7606: improve descriptions 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: <20240628-cleanup-ad7606-v2-4-96e02f90256d@baylibre.com> References: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> In-Reply-To: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Beniamin Bia , Stefan Popa Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Hennerich , linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org, Jonathan Cameron , Guillaume Stols , jstephan@baylibre.com, dlechner@baylibre.com X-Mailer: b4 0.14.0 Reword a few descriptions, and normalize the text width to 80 characters. Signed-off-by: Guillaume Stols Reviewed-by: Rob Herring (Arm) --- .../devicetree/bindings/iio/adc/adi,ad7606.yaml | 33 +++++++++++++-----= ---- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Do= cumentation/devicetree/bindings/iio/adc/adi,ad7606.yaml index 32caa9fc00e4..509970922cda 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml @@ -36,6 +36,9 @@ properties: avcc-supply: true =20 interrupts: + description: + The BUSY pin falling edge indicates that the conversion is over, and= thus + new data is available. maxItems: 1 =20 adi,conversion-start-gpios: @@ -48,8 +51,9 @@ properties: reset-gpios: description: Must be the device tree identifier of the RESET pin. If specified, i= t will - be asserted during driver probe. As the line is active high, it shou= ld be - marked GPIO_ACTIVE_HIGH. + be asserted during driver probe. On the AD7606x, as the line is acti= ve + high, it should be marked GPIO_ACTIVE_HIGH. On the AD7616, as the li= ne is + active low, it should be marked GPIO_ACTIVE_LOW. maxItems: 1 =20 standby-gpios: @@ -62,36 +66,39 @@ properties: =20 adi,first-data-gpios: description: - Must be the device tree identifier of the FRSTDATA pin. The FRSTDATA + Must be the device tree identifier of the FRSTDATA pin. The FRSTDATA output indicates when the first channel, V1, is being read back on e= ither - the parallel, byte or serial interface. As the line is active high,= it + the parallel, byte or serial interface. As the line is active high, = it should be marked GPIO_ACTIVE_HIGH. maxItems: 1 =20 adi,range-gpios: description: - Must be the device tree identifier of the RANGE pin. The polarity on= this + Must be the device tree identifier of the RANGE pin. The state on th= is pin determines the input range of the analog input channels. If this= pin is tied to a logic high, the analog input range is =C2=B110V for all= channels. - If this pin is tied to a logic low, the analog input range is =C2=B1= 5V for all - channels. As the line is active high, it should be marked + On the AD760X, if this pin is tied to a logic low, the analog input = range + is =C2=B15V for all channels. As the line is active high, it should = be marked GPIO_ACTIVE_HIGH. maxItems: 1 =20 adi,oversampling-ratio-gpios: description: Must be the device tree identifier of the over-sampling mode pins. A= s the - line is active high, it should be marked GPIO_ACTIVE_HIGH. + line is active high, it should be marked GPIO_ACTIVE_HIGH. On the AD= 7606X + parts that support it, if all 3 pins are tied to a logic high, softw= are + mode is enabled. maxItems: 3 =20 adi,sw-mode: description: - Software mode of operation, so far available only for ad7616 and ad7= 606b. + Software mode of operation, so far available only for AD7616 and AD7= 606b. It is enabled when all three oversampling mode pins are connected to= high - level. The device is configured by the corresponding registers. If t= he - adi,oversampling-ratio-gpios property is defined, then the driver wi= ll set - the oversampling gpios to high. Otherwise, it is assumed that the pi= ns are - hardwired to VDD. + level for the AD7606B, or all two range selection pins are connected= to + high level for the AD7616. The device is configured by the correspon= ding + registers. If the adi,oversampling-ratio-gpios property is defined, = then + the driver will set the oversampling gpios to high. Otherwise, it is + assumed that the pins are hardwired to VDD. type: boolean =20 required: --=20 2.34.1 From nobody Sun Dec 14 12:02:54 2025 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 D4B5B1C2306 for ; Fri, 28 Jun 2024 14:48:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586125; cv=none; b=DfgfH4as0Nc/lmVEulS8tYVuq9vwtRTUnkUptqEMMIkSTpSYVCgufkfOnGkQ9jkrqTaVxCS4NewqUsyxFkco87ZymvLeaCYQhJ8tXrAVWQh+V/L4zcE0Sk3bktSPuzPWy9ZC5TOe1/epSQvRy8LK9xfxWBzuy04grJEdfnZPVbY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586125; c=relaxed/simple; bh=Me4ZAZeXpUEgoNz5XwlIttAMsS1eKUVKhBdpA0oqJm0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OM12D8jcnQn42f89v4KOIpc+scQLyM9wQCb+oj5UqxFKs3OnN2b/u1B6xU00NAip2tuZ3C5IbvPOMqN/RPWC6BaCQIFuKP2R80ZwJoQDNAhtD9/EBknwYi0ORR8WwSTJL1LVXaY0S24WDh1ihqgcrnTKesQruDoziMIwvNx4kzg= 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=QqHyZxc8; arc=none smtp.client-ip=209.85.167.54 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="QqHyZxc8" Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-52e743307a2so891613e87.0 for ; Fri, 28 Jun 2024 07:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1719586121; x=1720190921; 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=bXjkAZmosXV+EptKqWsfwFwF90aKrgxPO7Zqi4uv4Ng=; b=QqHyZxc8wpMmzLDhsjgX+4llEEm2rKzls2vcfl9Xlv6DxVA5XZqXB3s4PVUTYLbfGL xPWz5NYwEFSgijSnJBnEDEIwRsOfc79621g8T+034Y7pZskERdqxKuJknIuBrnFfzZR4 qpxxTmIevj8CJW348DgwUD2POJ8Se46WgOmyD8R+km3+faxmM8dm2uaSSTEMlxAV3K41 NyOzHKj0+Iy43yEO1BVcv9mV8t7mBCK9ar3QIqxpEwEALPgOUfla/XS9PTFc0Q55JsDS FtLVg/aKlNVK1c+1mMI/ASJLLRwUSXzFsgBBv/hfjNF1AAO2FwE4KzBNA5q8Mg5FzbUz msqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719586121; x=1720190921; 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=bXjkAZmosXV+EptKqWsfwFwF90aKrgxPO7Zqi4uv4Ng=; b=GbHF1yP/XUF4Pnt7cf1284RYNP06kVC++ejm7M+8xyb7XEwWLtRrXZfXTdZXztN4qb JbSzVR/tmeN1QuwqcH0o5HjUj4Ql6yuo1ruBq/Pe0dlDk7rNE0hVwLFV58QO71m4KCwg 2DcHhC891/BNWUQ+CjcXga7RxP0tne9qBJfmCS6CEng5oHsvzO517ZwtltH2qUoJ0XQQ m3GaWMCAW8Dvj8bMnjZ/7o7mFtKOp/7fbWz6QyOAwqw/MHnE969uqYaCUsqG4JXISxDe rlyDOrTcpEO4n8JvK9g+9R2EGQX/Wy0ANM3ikgtfu3Nl80ShglNZ/KrDzl1XOKDRFG/p o4fQ== X-Forwarded-Encrypted: i=1; AJvYcCWDeEMbmG0A7lA1/ymgSQ/PA5lkuiH/90P788oFbGTVQORd7henlGsKKhwoky2tF0CIOfsBn+6c9lmiXZsZUTlr/zp1n1V9HnuRlzTN X-Gm-Message-State: AOJu0YxGUwNqucPx0bb58lH1eRsRp2hBs3fmHaDHspnnUXDQwlvqI5y3 02gvZfLInvmcHhzjbUJULUHxeZKIAL9RAj2K2gizvDgi4Rt/WWxSDZt16/zDzR4= X-Google-Smtp-Source: AGHT+IErmCGJZr2n4zpPLQZf3axGy/KUUX5Ydi0z351aU/tY57diUN1hIBUy4+GUORXAl8m4HkV7Ow== X-Received: by 2002:a19:5f56:0:b0:52c:dd2f:2f2b with SMTP id 2adb3069b0e04-52ce1862743mr12666981e87.66.1719586120617; Fri, 28 Jun 2024 07:48:40 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256af55c0asm37972575e9.15.2024.06.28.07.48.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 07:48:40 -0700 (PDT) From: Guillaume Stols Date: Fri, 28 Jun 2024 14:48:23 +0000 Subject: [PATCH v2 05/10] dt-bindings: iio: adc: adi,ad7606: add supply properties 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: <20240628-cleanup-ad7606-v2-5-96e02f90256d@baylibre.com> References: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> In-Reply-To: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Beniamin Bia , Stefan Popa Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Hennerich , linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org, Jonathan Cameron , Guillaume Stols , jstephan@baylibre.com, dlechner@baylibre.com X-Mailer: b4 0.14.0 Add voltage supplies Signed-off-by: Guillaume Stols --- Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Do= cumentation/devicetree/bindings/iio/adc/adi,ad7606.yaml index 509970922cda..a1c38a5812f7 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml @@ -35,6 +35,15 @@ properties: =20 avcc-supply: true =20 + vdrive-supply: + description: + Determines the voltage level at which the interface logic pins will + operate. + + refin-supply: + description: + The voltage supply for optional external reference voltage. + interrupts: description: The BUSY pin falling edge indicates that the conversion is over, and= thus @@ -106,9 +115,11 @@ required: - reg - spi-cpha - avcc-supply + - vdrive-supply - interrupts - adi,conversion-start-gpios =20 + allOf: - $ref: /schemas/spi/spi-peripheral-props.yaml# =20 @@ -130,6 +141,7 @@ examples: spi-cpha; =20 avcc-supply =3D <&adc_vref>; + vdrive-supply =3D <&vdd_supply>; =20 interrupts =3D <25 IRQ_TYPE_EDGE_FALLING>; interrupt-parent =3D <&gpio>; --=20 2.34.1 From nobody Sun Dec 14 12:02:54 2025 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 E61D11C230A for ; Fri, 28 Jun 2024 14:48:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586124; cv=none; b=bDJCnylzaetTfzkePs7ujgwE50VsF80OhYw+4dfEEHQM24pcp+f5BdB6y0tRgCtkzpv3A4SLvhVgYYBB1uDhivKMyIQbuuswp/BC01RXkM0syHv6eJsQzA2EA3wpn7padOcN4y0O4kWOQ25pQhulO16gPvqVAiykMPc848CAd3c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586124; c=relaxed/simple; bh=KG+zFgPhZKlTNWnyTH8PVKe53m37TBYEzUhO1FprBcg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kMtIpWePCacATRvGrJP5EUV/VCl2QNrk9MSUeggeHJew5HbpNrkGNWMAW0meK7xoYpzg5DH4Yb+yrCrsbEE0+TavFkNz0xJ9W9YQtPKO8LUqfLsOvtOiJvoPDyqbrzXsqXc6xQAGcF0WmNsCiUNtqiEvwP589G7IhyLezYkvCuI= 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=rxFGujD1; arc=none smtp.client-ip=209.85.128.46 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="rxFGujD1" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-42565670e20so11362405e9.0 for ; Fri, 28 Jun 2024 07:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1719586121; x=1720190921; 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=MXCtOPPk0mXR2hghTWte0gDiaQ2iQV0q2v+Lpx73cVI=; b=rxFGujD15SqFodEFf7DGkR11ptD6VzTmG28EzJm4fxXmLwU/zM4kxOADRkka3ms0Wz j31PbaZ8Qpq08F/njmc40JoF1tGOBCwntP02BlaNR42nO2FY4aGLIl8yRT6MMbKQTsbl 1ThIQGZn+/MDrAFbvZijM+9tIw58puuySbTk/YJdn3KhgXQzIa74+fwN5ieqmSPNRG/o YYCYPYwmHnJ2ihQgrZqNOYs+qOOgMXmtSOkOcAuW1v2nc5blGGioOsM51jjV9IgyeW6D ZI5kb6InPQeBlLKAuhKiLtu4JYSYhVkpJO2V9+bcAlccsklyMrsYdiUMtl8vic7Xm5br 3t9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719586121; x=1720190921; 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=MXCtOPPk0mXR2hghTWte0gDiaQ2iQV0q2v+Lpx73cVI=; b=Sdo8E970CP6zzrhPOKYm8rqvNVa0L/6zC60eD/bP6X7G1JdsiFe6A+5bcci9CAl/LE 3PYsLdSBXn+o7UHWOQLxOURDqlsakOteJNaiHuWlCnCiF7M9oA9dSFKMkZ+uvdWJe30N q4Fghh2yCuiluEGIJtLyT7FuY+NILeaowgO0h9/FQdNjPqZyEZp9qC980BZoGpH+nFTy 0663NhwgW3QfPlDXXSaBcSTgpprhAFIlCNwe5WTyWGFdOgF45GZCvfVOJf5AnH0NTmb0 NnavGX2bOBvZ1z88rQUHrZkiOVr0pB/gQ+1yhKV5pN+FhL4Zj1GWBIbLFW7kpvppGtFD 2ddQ== X-Forwarded-Encrypted: i=1; AJvYcCXmLfuZYwQuEMgnFh1chDAg27/0mbouf9BAQmU3M4oUeagVb8V4jOZwlD7Eqds059z1udBvyNC1jhwVr9oag3tIL+DmkVZ/pqGlCXIg X-Gm-Message-State: AOJu0YxReE/bShOdV8rlzeZSTeEVyi5dEJrTacFEy7YQY5S+Enz2lyiB 77IT5VgUnVmF0WScnL+kpRrylvmVwad6j/PvEh6B6DoM11aFRuZnyXJO0N+Bwgw= X-Google-Smtp-Source: AGHT+IFUYH7Uc5K7rfzXLLQxOm6u8Fd/5RQ2WkQVjaTjQbpyYS7AwTX5otCgN3NSe8nB8PBMHiSj7Q== X-Received: by 2002:a05:600c:2489:b0:424:aa73:83e3 with SMTP id 5b1f17b1804b1-4256d53df10mr18738915e9.18.1719586121172; Fri, 28 Jun 2024 07:48:41 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256af55c0asm37972575e9.15.2024.06.28.07.48.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 07:48:40 -0700 (PDT) From: Guillaume Stols Date: Fri, 28 Jun 2024 14:48:24 +0000 Subject: [PATCH v2 06/10] dt-bindings: iio: adc: adi,ad7606: fix example 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: <20240628-cleanup-ad7606-v2-6-96e02f90256d@baylibre.com> References: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> In-Reply-To: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Beniamin Bia , Stefan Popa Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Hennerich , linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org, Jonathan Cameron , Guillaume Stols , jstephan@baylibre.com, dlechner@baylibre.com X-Mailer: b4 0.14.0 Example uses adi,ad7606-8 as compatible, but adi,sw-mode is not available for it. So remove this property from example. Signed-off-by: Guillaume Stols --- Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Do= cumentation/devicetree/bindings/iio/adc/adi,ad7606.yaml index a1c38a5812f7..626782ea00b3 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml @@ -153,7 +153,6 @@ examples: <&gpio 23 GPIO_ACTIVE_HIGH>, <&gpio 26 GPIO_ACTIVE_HIGH>; standby-gpios =3D <&gpio 24 GPIO_ACTIVE_LOW>; - adi,sw-mode; }; }; ... --=20 2.34.1 From nobody Sun Dec 14 12:02:54 2025 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 DE3AC1C232B for ; Fri, 28 Jun 2024 14:48:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586126; cv=none; b=F4BIknbBcwSTCm3mSCWKlHqgWyBZ8oIdmuWw9NyaLv3DUyxR7Bxw3xfRbl8hQmE3qT5ZmRTocwhKBwCxkAhLpvm3G9ofQW13J4l6S9R1fqzEORj1Nm/xfOoO+s68hTcif/af3i0uRH43jrAjWG/2tjnE/RxKMSzqa9dgaf2+zJ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586126; c=relaxed/simple; bh=6NkavYCS9KssnXRdhzuSjUIoOcS1DExNH94R1nY2LM4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QbefIiYmkLL8M/ZJ4GSronjziHCmts4kRwq8MXgJYYQ/t7dCOfxKzkjiqihko7UPs5pVSD1vmTdl3pCM2u0959ZzGMmVCX/eVKpbgXQzNkhl3iEfCqG/qMuGC9gUSThF2R9B/dfREsR7iq9ghCubCPG6dy7SKkVzHom5xme5lao= 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=Dpm+Tdhk; arc=none smtp.client-ip=209.85.128.47 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="Dpm+Tdhk" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-424ad289912so5231665e9.2 for ; Fri, 28 Jun 2024 07:48:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1719586122; x=1720190922; 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=EMkuNs3gcVUwYniv00+omCdhvDWOdn0nkqiQ69iJTAQ=; b=Dpm+TdhkkAcNb1Epwv7L6B827Q5BMjzBqr8tcnLtjiG8F0df1eGrijZfC2WlSNZ0VI gj6SfEyP0AL/0oTVWy59qwd96CFuoUKB3iggjrDIWDaU+zHXinnTfjuO6MsTNzNfMHdZ GjNTw3Q/Ug2jju3bXoVaVbdXFRCyLiNOD2BMZcFdUmuggjuDsKxW37KCvI0Sy2bavmHc BMUE57oRLMH05a8uHD2hCdlcOgkd7/WsIQdfSKKwnPVMq5KxTXfUF3RRCZiQ3FtYhWaO oKr8eJ1vycOuWWDiPpmRaQnAJOIlj/ZRh8dCbyD60QXZ5XvHk2FscT/Cilw8ExbvybJ/ sy9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719586122; x=1720190922; 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=EMkuNs3gcVUwYniv00+omCdhvDWOdn0nkqiQ69iJTAQ=; b=XswLy5c/c+j7h+5kF8NsSAL+wWea2o+BqG21Nr/hroqRum9hAt2Bdk9HLm4ij1EuuB pAF+aGbWLpIoVISDJ3+OJ23qJLhKYVwjsdgVUqHRiiBfftAsST6z6R49cHT8LrFNtBos ncKkDgworoHPk9tWMxMylILtCqbp20Z62J/AJQakasz4sW5dg8iej1KibVvj+grrc5wV /k1NSH5X7hBxIbPXCeazw7AxKpwDT7ZEAV33mHMRM+UppZBep7JpPvlUI8aj64Evl9i4 +RQghJfhDwhfxp3qMPJ4VJG//IDvFNujeKZF7URQrf9f6rhUa30arlzyE3pgbJsGhrV9 dI9g== X-Forwarded-Encrypted: i=1; AJvYcCU0geCmgEushyQcWeH8ATz+cbuuuttemuC+sCZLJSug46tZgDH3BFzyhcIxPOhsiYh/4dz6sS3SK4Eg40MggV8Hl42rUcKrOCMUISy0 X-Gm-Message-State: AOJu0YxpEi0+1R8J6wRc65RR6oaqr/NiVr7M9waA97Tr0VhHuZjUD4gr arJDGul7NxIOXem+YQaOXKP1ZPJ17Z97l1UWq3AdezG10ZJl3j8uQN0r+ZCBAh4= X-Google-Smtp-Source: AGHT+IGv7t12CAtqBhXhRtWXm5NI4VGvGPgv75bfLG43FiWdKz+JsYKTuXkHFmGZ6kYlz0q3drnk4A== X-Received: by 2002:a05:600c:1c8f:b0:425:5eff:7182 with SMTP id 5b1f17b1804b1-4255eff7411mr52274695e9.31.1719586121796; Fri, 28 Jun 2024 07:48:41 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256af55c0asm37972575e9.15.2024.06.28.07.48.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 07:48:41 -0700 (PDT) From: Guillaume Stols Date: Fri, 28 Jun 2024 14:48:25 +0000 Subject: [PATCH v2 07/10] dt-bindings: iio: adc: adi,ad7606: add conditions 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: <20240628-cleanup-ad7606-v2-7-96e02f90256d@baylibre.com> References: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> In-Reply-To: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Beniamin Bia , Stefan Popa Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Hennerich , linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org, Jonathan Cameron , Guillaume Stols , jstephan@baylibre.com, dlechner@baylibre.com X-Mailer: b4 0.14.0 Since the driver supports several parts that present differences in their layout and behaviour, it is necessary to describe the differences from one chip to another. Signed-off-by: Guillaume Stols Reviewed-by: Conor Dooley --- .../devicetree/bindings/iio/adc/adi,ad7606.yaml | 60 ++++++++++++++++++= +--- 1 file changed, 54 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Do= cumentation/devicetree/bindings/iio/adc/adi,ad7606.yaml index 626782ea00b3..f825a2c19a06 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml @@ -52,10 +52,11 @@ properties: =20 adi,conversion-start-gpios: description: - Must be the device tree identifier of the CONVST pin. This logic inp= ut is - used to initiate conversions on the analog input channels. As the li= ne is - active high, it should be marked GPIO_ACTIVE_HIGH. - maxItems: 1 + Must be the device tree identifier of the CONVST pin(s). This logic = input + is used to initiate conversions on the analog input channels. As the= line + is active high, it should be marked GPIO_ACTIVE_HIGH. + minItems: 1 + maxItems: 2 =20 reset-gpios: description: @@ -88,8 +89,11 @@ properties: is tied to a logic high, the analog input range is =C2=B110V for all= channels. On the AD760X, if this pin is tied to a logic low, the analog input = range is =C2=B15V for all channels. As the line is active high, it should = be marked - GPIO_ACTIVE_HIGH. - maxItems: 1 + GPIO_ACTIVE_HIGH. On the AD7616, there are 2 pins, and if the 2 pins= are + tied to a logic high, software mode is enabled, otherwise one of the= 3 + possible range values is selected. + minItems: 1 + maxItems: 2 =20 adi,oversampling-ratio-gpios: description: @@ -123,6 +127,50 @@ required: allOf: - $ref: /schemas/spi/spi-peripheral-props.yaml# =20 + - if: + properties: + compatible: + contains: + const: adi,ad7616 + then: + properties: + adi,first-data-gpios: false + standby-gpios: false + adi,range-gpios: + maxItems: 2 + else: + properties: + adi,range-gpios: + maxItems: 1 + + - if: + properties: + compatible: + contains: + enum: + - adi,ad7605-4 + - adi,ad7616 + then: + properties: + adi,oversampling-ratio-gpios: false + + - if: + properties: + compatible: + contains: + enum: + - adi,ad7605-4 + - adi,ad7606-4 + - adi,ad7606-6 + - adi,ad7606-8 + then: + properties: + adi,sw-mode: false + else: + properties: + adi,conversion-start-gpios: + maxItems: 1 + unevaluatedProperties: false =20 examples: --=20 2.34.1 From nobody Sun Dec 14 12:02:54 2025 Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (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 955031C6890 for ; Fri, 28 Jun 2024 14:48:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586126; cv=none; b=opKPtzrVrcQYKPZWR+aXVMeaY9qryTRE73BOpiX7cxHFvj/DWmOci/xn546lB3tFLWay3mJUcqOdwRwXDz/dCZxpGLHEC2HVET5BU2jHXkSCn1gaOq1Omk2/RbIOvwrwjVUMlQYDbcccruvhBE2TUdIxk54r5KQ7Wv4qDS8f7oo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586126; c=relaxed/simple; bh=RRVxrhmiJTmhlGYh89+GPwU4++bLSJaxdW8aC4AKucw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=d27EkJ+QinO8caYnYYSlEKAqKCmhlelC5MDCnkBKBGGrPmop9e6RGtHWTFoKvf4aLIJ42i/q+jwzrJKv+AVbeNbkpD4a/qqjkBERi0oWBguWXVUF8ersg2bvse6h5iR5qZ5xCvYZFaFPKHVtGQsljwjaCYJr2vliGRinX1BwcRg= 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=sdjG6zKE; arc=none smtp.client-ip=209.85.167.49 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="sdjG6zKE" Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-52e764bb3fbso893853e87.3 for ; Fri, 28 Jun 2024 07:48:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1719586122; x=1720190922; 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=IfIReJIeFXvHpoiQHEHuzoccsHNqOqmDnyW69xYvlNI=; b=sdjG6zKEGCjpZZT3n+bLMSLi1LVhn7HvOK5Gl7RAFAXoTsqxR1Gkmuq9wPrfbMl1qj dN8ASkjCFr90cCyn4U1AJQAs52aB9ew+F1xev3bPX7hTrV9+G+Ag4YT98JA3wrXvict1 HkzOkfqaeGMWi+Zeh0n1rK8faoZQpBopzW4+oNjo/QnbLglPxinal/n8EdUHgCIF4z5S qa5Qnr8MVQRLyQ4qLKrE40A63KYXuRiB4Yu8NsCjsCln2jBtRT9dT0tzV8d9sZGke0eP rf4KJL0KhRxTEE55+Jn8r/NxCenmYCaSCwYqwpkC/cYfG3ZFsxIZ26/2DXKPSFgmacZf 4Ohg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719586122; x=1720190922; 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=IfIReJIeFXvHpoiQHEHuzoccsHNqOqmDnyW69xYvlNI=; b=FYov0oVG7ZsCfgNjOLWFHXpreZGJPXGY20AFhZayh+PMFF2RSwqH/rUg1MnpybrymE IF2RmZ4KG7J55IlxMov0B0AiAiu4sXVf7B1fXDea/XRnwqn32Rt4beo5HZlClLnl/AcZ R/VUFeTwRPTs2LDKGi1/4dy022kn2zxsuevWXTdoEyC0UnRbl9xHvjCp24mR/m4Ft5B4 V0ZbQ1sq8t5EWxwD0byKHZ8OMhGbnavuizfuZbpvkQXD7X8DXg/Hrn1llKWyH56Y12cz 5utZRT8UJ+CwUEE/zgfL9+jupF69JJeXTWa/rXupuAKGEOW7/M4kFfbbfIL8jSRKfK5E iKKQ== X-Forwarded-Encrypted: i=1; AJvYcCUKW/5QE6j6upSgouWSVb8JEDWOxmbNQnMt6zc8uEeNVilONWOY/91IjpzL9U9eoYP4mY3iES++RLSJ9XWuLZzFM7NFIGsOrcHJs7n4 X-Gm-Message-State: AOJu0Yyh9wTWfX5qDrSpv7TB82KdzaXmCjENOalSHTm8X6QUxORRMCo3 qEDX3f5NWwnL2krH/IVLTJOGitphWk6wcac3rWaEGeBG9nA3alJ7CX7YfrDsaKM= X-Google-Smtp-Source: AGHT+IF81L4/up6bPW02mm70ucgyml0B1zImJ0pYtdBOId4ZIEAeB4DjvRZW4P6xwugwAET/wtM+1Q== X-Received: by 2002:a05:6512:2254:b0:52c:e17c:3753 with SMTP id 2adb3069b0e04-52ce18320e6mr12902911e87.5.1719586122396; Fri, 28 Jun 2024 07:48:42 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256af55c0asm37972575e9.15.2024.06.28.07.48.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 07:48:42 -0700 (PDT) From: Guillaume Stols Date: Fri, 28 Jun 2024 14:48:26 +0000 Subject: [PATCH v2 08/10] iio: adc: ad7606: fix oversampling gpio array 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: <20240628-cleanup-ad7606-v2-8-96e02f90256d@baylibre.com> References: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> In-Reply-To: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Beniamin Bia , Stefan Popa Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Hennerich , linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org, Jonathan Cameron , Guillaume Stols , jstephan@baylibre.com, dlechner@baylibre.com X-Mailer: b4 0.14.0 gpiod_set_array_value was misused here: the implementation relied on the assumption that an unsigned long was required for each gpio, while the function expects a bit array stored in "as much unsigned long as needed for storing one bit per GPIO", i.e it is using a bit field. Fixes: d2a415c86c6b ("iio: adc: ad7606: Add support for AD7606B ADC") Signed-off-by: Guillaume Stols --- drivers/iio/adc/ad7606.c | 4 ++-- drivers/iio/adc/ad7606_spi.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/iio/adc/ad7606.c b/drivers/iio/adc/ad7606.c index 3a417595294f..8cce1fad9763 100644 --- a/drivers/iio/adc/ad7606.c +++ b/drivers/iio/adc/ad7606.c @@ -236,9 +236,9 @@ static int ad7606_write_os_hw(struct iio_dev *indio_dev= , int val) struct ad7606_state *st =3D iio_priv(indio_dev); DECLARE_BITMAP(values, 3); =20 - values[0] =3D val; + values[0] =3D val & GENMASK(2, 0); =20 - gpiod_set_array_value(ARRAY_SIZE(values), st->gpio_os->desc, + gpiod_set_array_value(st->gpio_os->ndescs, st->gpio_os->desc, st->gpio_os->info, values); =20 /* AD7616 requires a reset to update value */ diff --git a/drivers/iio/adc/ad7606_spi.c b/drivers/iio/adc/ad7606_spi.c index 263a778bcf25..287a0591533b 100644 --- a/drivers/iio/adc/ad7606_spi.c +++ b/drivers/iio/adc/ad7606_spi.c @@ -249,8 +249,9 @@ static int ad7616_sw_mode_config(struct iio_dev *indio_= dev) static int ad7606B_sw_mode_config(struct iio_dev *indio_dev) { struct ad7606_state *st =3D iio_priv(indio_dev); - unsigned long os[3] =3D {1}; + DECLARE_BITMAP(os, 3); =20 + bitmap_fill(os, 3); /* * Software mode is enabled when all three oversampling * pins are set to high. If oversampling gpios are defined @@ -258,7 +259,7 @@ static int ad7606B_sw_mode_config(struct iio_dev *indio= _dev) * otherwise, they must be hardwired to VDD */ if (st->gpio_os) { - gpiod_set_array_value(ARRAY_SIZE(os), + gpiod_set_array_value(st->gpio_os->ndescs, st->gpio_os->desc, st->gpio_os->info, os); } /* OS of 128 and 256 are available only in software mode */ --=20 2.34.1 From nobody Sun Dec 14 12:02:54 2025 Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (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 39EF01C68AB for ; Fri, 28 Jun 2024 14:48:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586127; cv=none; b=RcqUt/JtXmeiWfUAV78BDQ0Md/1L0wPtoKmzJWxRD0BtTcF1befC6Pu5DTzdTxbi+NjyUIZ0dZMFAiPeS9wrxhujpMwNq9wWs/V68yFk8+Rknohje4H9hJUqj5r/26o++YXQj3CzEaOHIX/M5utjGF2Sz+kt3VpowH47Yv7kAA0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586127; c=relaxed/simple; bh=TIZIXKMsUIcBcBNX8jkDzeY8VA7Mhb/sJ7N5yvRpSuw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ilildtK0c6qifX0vTenlbRi0JjzQSl7z5Lqv1kp9bSFLY+F9o3HC+/QqIXdkdNu0DAuqwWZtNZTjqJ6EJ6/FQjmzkRcRpaS19g4J6lYZnosni8CiCbfi7sR2/ON8J+OGL8yCzOkLZdfYfptR0GKJpIo4zB1L44eHIaypi8PkxMg= 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=OmUH3gU2; arc=none smtp.client-ip=209.85.208.175 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="OmUH3gU2" Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2ec61eeed8eso8274621fa.0 for ; Fri, 28 Jun 2024 07:48:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1719586123; x=1720190923; 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=0syamWwYKEIgGFfBRP6mPS2Iu9QxWFGeekc+8eB0dRA=; b=OmUH3gU2HjJ08h9gcbgCvhKQ60f0zK7OETyEt+VYQlMd6YONKXyjpJtz+0tXymzTCj 9WPDx731RI9Bhiysus0vUGiw4MxjAvNRqEcdLHYu1iiDaClmcDHMsoOsUMArpdOzVsPb jgCO7LKDPkJD136yVvewajpVgvxfvh6H/I3H7DtNY25J5HZeOnUGLLkMDAvZokVjtyyu Vd3xVDTLsQxSYwG286oGlWr4hFC6WGQxnVqiN1mdbkQKypNvFnZC2xESUgKD1vP9K5GN MihOjbiFQnI8UbkETcPJvny+UGWyycPXAHQhp8sSHZmtIvtGfN9e0629V7775o/L3ROV MORg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719586123; x=1720190923; 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=0syamWwYKEIgGFfBRP6mPS2Iu9QxWFGeekc+8eB0dRA=; b=TpA/u9PCdW9nWuzp/8Mapd8ubPPkaas9Qz4LCdi2DNN3pAucv7qabafrra7DxuhM8j QLj7IgH25eCblP0yu14EoNh1JJzt25MQusK2evhe0eCeU8DPZkihLmjf+ggpdJZG+ctz BUUq+j27pxqkobtTZgbeWVoXWfRezd6H4myikirF6c2MRkBJzWSRvP4+FouZLqCQVy4X z/8UK2SMajek13iuEXqVKoA1zehEkkH+8LyLH1R3I7R6/4MXQWTmIkeW1xnZpxc+qM6A 63biSgHrAGcZ3yVOZlYl1Oa7ldl2AbMwoRkGw3zktWYEBJlK63W9EvCP4Jh38cC3mXkS fm+Q== X-Forwarded-Encrypted: i=1; AJvYcCVBpNxzXgRDOsDs3bKLvDi94YscQUqAC6y9ibBhTIEdgCJsv1RfhmdDYBG9qJwALHxueSPu20k+QZFiYxturaOwPAUsJDbkyD9BWVhX X-Gm-Message-State: AOJu0YzFTF33YDDwqGxw/lDkhIkScBkwo9ZXk0XkiUfhzWIbnKjWjWTc OpvzVEq0vhJeJGzjcoTT2oh2eCxNjq8zdImVcCV01ox8EwbwttzmqJnz+WDfHrw= X-Google-Smtp-Source: AGHT+IGdYd+dELr8zIKWmQcy9X5n0z09TSJbmVdeFrFpZc6IVQh56XrFpIW3yj6V8h5TPsPZTCvydg== X-Received: by 2002:a2e:8913:0:b0:2ec:6755:a0cf with SMTP id 38308e7fff4ca-2ec6755a196mr77843931fa.32.1719586123293; Fri, 28 Jun 2024 07:48:43 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256af55c0asm37972575e9.15.2024.06.28.07.48.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 07:48:42 -0700 (PDT) From: Guillaume Stols Date: Fri, 28 Jun 2024 14:48:27 +0000 Subject: [PATCH v2 09/10] iio: adc: ad7606: fix standby gpio state to match the documentation 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: <20240628-cleanup-ad7606-v2-9-96e02f90256d@baylibre.com> References: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> In-Reply-To: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Beniamin Bia , Stefan Popa Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Hennerich , linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org, Jonathan Cameron , Guillaume Stols , jstephan@baylibre.com, dlechner@baylibre.com X-Mailer: b4 0.14.0 The binding's documentation specifies that "As the line is active low, it should be marked GPIO_ACTIVE_LOW". However, in the driver, it was handled the opposite way. This commit sets the driver's behaviour in sync with the documentation Fixes: 722407a4e8c0 ("staging:iio:ad7606: Use GPIO descriptor API") Signed-off-by: Guillaume Stols --- drivers/iio/adc/ad7606.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/ad7606.c b/drivers/iio/adc/ad7606.c index 8cce1fad9763..50ccc245e314 100644 --- a/drivers/iio/adc/ad7606.c +++ b/drivers/iio/adc/ad7606.c @@ -443,7 +443,7 @@ static int ad7606_request_gpios(struct ad7606_state *st) return PTR_ERR(st->gpio_range); =20 st->gpio_standby =3D devm_gpiod_get_optional(dev, "standby", - GPIOD_OUT_HIGH); + GPIOD_OUT_LOW); if (IS_ERR(st->gpio_standby)) return PTR_ERR(st->gpio_standby); =20 @@ -686,7 +686,7 @@ static int ad7606_suspend(struct device *dev) =20 if (st->gpio_standby) { gpiod_set_value(st->gpio_range, 1); - gpiod_set_value(st->gpio_standby, 0); + gpiod_set_value(st->gpio_standby, 1); } =20 return 0; --=20 2.34.1 From nobody Sun Dec 14 12:02:54 2025 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (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 432901C8FB8 for ; Fri, 28 Jun 2024 14:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586128; cv=none; b=s5129F0wWFMQUaNV81eFSeIaFNXGE5NxjiJE4wdPTLRBzLQ1OR7fdcPO5b8Xxzm97xzLxDjijIorlIzZtnbE3MVTX/FyeTnFl+tSTy9VP9o/zEQPg+tgITt2ZCc2vHZu0uvBIYaJ7t3gfBjwe4KIv6zO6MElQ3tV+MLyaOyNIcg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719586128; c=relaxed/simple; bh=zkEo5EBrLX8I0YqEPhDKPXhiD1/9kd463rWFYg4+DxA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BtaY9DrzJQ6jrrWZcCNrmDkwys9F4SrzKsZc8PhDOWA9+vtOXNyG+9POqyNYDmIql2nZbbuRY2FCUySIUY7EGWts1SuDtRyBS0AlAo09BgbWHRC2exmpU1H2dSR46NlKaye7RxnbDrStdmdUqvZhE35bE461ePdoneOXcakv7o0= 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=qf+bZVby; arc=none smtp.client-ip=209.85.167.46 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="qf+bZVby" Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-52e7693c369so949684e87.3 for ; Fri, 28 Jun 2024 07:48:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1719586124; x=1720190924; 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=ADGaCoJBg3lwoGbw2zYEMfaAobfkeTksU5BYqolmCQE=; b=qf+bZVbyNSes7tLSAV5EO9TfTI1V0eiLsWoiPJXYw0qdnqlG7RaRESG4Xf6goLLAju Qtd7F+58tOsTVtrhWRuTc9gdzHMH2ciYw83KSu88UA2HRrMzYIWQJWropLnzFPvJl7O5 O7w7XgP3/9ErSpO6NMveRH+vteeOk4pt+CqmfDtmFU3xfAD3OigeJ5/mUzyUJ96MuxWc TOM+tfYw4fNHxfPkDEhW4qcFXYmPUL8WkeC5WmdW0FR/1qnucg5GSBmSXSdXjCMO5TOG i1lXmpKDramoz8bM9u5v2ctnWn8tBNGOC0LquRG65Zbg7jVDWCa1PpsDMbRmFLIYLqR4 nc6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719586124; x=1720190924; 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=ADGaCoJBg3lwoGbw2zYEMfaAobfkeTksU5BYqolmCQE=; b=XQs6MVRL8HkwtyDIeK2JC+MvbSr09HUJw95lmCF08lGNv2ON008sa+nD6nKXBfVwt2 dBudQVGf+tSvAnPLD5vPs2tCY33eGzyxz9RYWPsZ7y0zUMQvN5Hw7y+7s7Nz8grL2H91 By91RPzLfhAevSAWoZv2BOy5mVjjIXeJSHm8pQ28c1+4HkJCrTjmjAJLz0/T008kgkaU ij/jzghJBcPbNvNb1CrrXKGf11swLF9Bwhym6UzfTolf9wyP65Esv/HvgrH4uGAvvmQ9 1uBwrkQJnnuXGUB1pULr0MHUVWUykSFME190r8xOtmNmkk+in6/0jDvzgDCyhB/yZyIP yEJQ== X-Forwarded-Encrypted: i=1; AJvYcCV4sEe5xxA8YBrJUSc/G8ITO29Y9G9C1cRHqicQsLTLK38GJExV+v8IAwzvxxue2AQvGnFD/s0QX12cqcASstuXkiWKagvzhW6pwTL1 X-Gm-Message-State: AOJu0YzFOfYjz5vmycGFPMfa8npZsGJXS/VggNMWu73/Are3cA+yCYUP C8kwqvybP4MtXmt350j6H1Z3vkQiQM+Rf7lpZ8zWkuhk4VxsX2q+pQI6UDVQH0M= X-Google-Smtp-Source: AGHT+IHG9i2w/w79YYyodKkBuJIFAclGDdSXPjq2661d7wRgXl44XIteS1jVb5nqsYRQfGoKVOYCzw== X-Received: by 2002:a19:4310:0:b0:52c:b479:902d with SMTP id 2adb3069b0e04-52ce06105efmr12653810e87.4.1719586124217; Fri, 28 Jun 2024 07:48:44 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256af55c0asm37972575e9.15.2024.06.28.07.48.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 07:48:43 -0700 (PDT) From: Guillaume Stols Date: Fri, 28 Jun 2024 14:48:28 +0000 Subject: [PATCH v2 10/10] iio: adc: ad7606: switch mutexes to scoped_guard 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: <20240628-cleanup-ad7606-v2-10-96e02f90256d@baylibre.com> References: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> In-Reply-To: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com> To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Beniamin Bia , Stefan Popa Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Hennerich , linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org, Jonathan Cameron , Guillaume Stols , jstephan@baylibre.com, dlechner@baylibre.com X-Mailer: b4 0.14.0 Switching to scoped_guard simplifies the code and avoids to take care to unlock the mutex in case of premature return. Signed-off-by: Guillaume Stols --- drivers/iio/adc/ad7606.c | 60 ++++++++++++++++++++++----------------------= ---- 1 file changed, 27 insertions(+), 33 deletions(-) diff --git a/drivers/iio/adc/ad7606.c b/drivers/iio/adc/ad7606.c index 50ccc245e314..3c439787d130 100644 --- a/drivers/iio/adc/ad7606.c +++ b/drivers/iio/adc/ad7606.c @@ -69,19 +69,17 @@ static int ad7606_reg_access(struct iio_dev *indio_dev, struct ad7606_state *st =3D iio_priv(indio_dev); int ret; =20 - mutex_lock(&st->lock); + guard(mutex)(&st->lock); + if (readval) { ret =3D st->bops->reg_read(st, reg); if (ret < 0) - goto err_unlock; + return ret; *readval =3D ret; - ret =3D 0; + return 0; } else { - ret =3D st->bops->reg_write(st, reg, writeval); + return st->bops->reg_write(st, reg, writeval); } -err_unlock: - mutex_unlock(&st->lock); - return ret; } =20 static int ad7606_read_samples(struct ad7606_state *st) @@ -124,18 +122,18 @@ static irqreturn_t ad7606_trigger_handler(int irq, vo= id *p) struct ad7606_state *st =3D iio_priv(indio_dev); int ret; =20 - mutex_lock(&st->lock); + scoped_guard(mutex, &st->lock) { + ret =3D ad7606_read_samples(st); + if (ret) + goto error_ret; =20 - ret =3D ad7606_read_samples(st); - if (ret =3D=3D 0) iio_push_to_buffers_with_timestamp(indio_dev, st->data, iio_get_time_ns(indio_dev)); - - iio_trigger_notify_done(indio_dev->trig); - /* The rising edge of the CONVST signal starts a new conversion. */ - gpiod_set_value(st->gpio_convst, 1); - - mutex_unlock(&st->lock); +error_ret: + iio_trigger_notify_done(indio_dev->trig); + /* The rising edge of the CONVST signal starts a new conversion. */ + gpiod_set_value(st->gpio_convst, 1); + } =20 return IRQ_HANDLED; } @@ -259,17 +257,15 @@ static int ad7606_write_raw(struct iio_dev *indio_dev, =20 switch (mask) { case IIO_CHAN_INFO_SCALE: - mutex_lock(&st->lock); - i =3D find_closest(val2, st->scale_avail, st->num_scales); - if (st->sw_mode_en) - ch =3D chan->address; - ret =3D st->write_scale(indio_dev, ch, i); - if (ret < 0) { - mutex_unlock(&st->lock); - return ret; + scoped_guard(mutex, &st->lock) { + i =3D find_closest(val2, st->scale_avail, st->num_scales); + if (st->sw_mode_en) + ch =3D chan->address; + ret =3D st->write_scale(indio_dev, ch, i); + if (ret < 0) + return ret; + st->range[ch] =3D i; } - st->range[ch] =3D i; - mutex_unlock(&st->lock); =20 return 0; case IIO_CHAN_INFO_OVERSAMPLING_RATIO: @@ -277,14 +273,12 @@ static int ad7606_write_raw(struct iio_dev *indio_dev, return -EINVAL; i =3D find_closest(val, st->oversampling_avail, st->num_os_ratios); - mutex_lock(&st->lock); - ret =3D st->write_os(indio_dev, i); - if (ret < 0) { - mutex_unlock(&st->lock); - return ret; + scoped_guard(mutex, &st->lock) { + ret =3D st->write_os(indio_dev, i); + if (ret < 0) + return ret; + st->oversampling =3D st->oversampling_avail[i]; } - st->oversampling =3D st->oversampling_avail[i]; - mutex_unlock(&st->lock); =20 return 0; default: --=20 2.34.1