From nobody Thu Dec 18 08:38:47 2025 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 70D0316DC20 for ; Tue, 18 Jun 2024 14:02:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718719359; cv=none; b=uXcn8oZEb5LYzoI95kh1OvBbgjmAMFI2zxw1Xr/fWix4z+j4nKtieW4s9Jy3qDSTDXOtKPzPbNWJyGLsy7qeoHaC7KXrlPX5LQ5hXCCddpKtVHHwTfQKK0tzo6KxMxqCMdUwcaUPo25A+pa7QMp8AqjyR/hlsdPpqeN4KKq0ODI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718719359; c=relaxed/simple; bh=PLtj7bSe++tHU1muE0ellbCUBsOVwaNLui/U8TXTses=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WrLv0HIR1+xb731nZV0MmTH0hRwOxZ2osDkuOwN5PSmrXyRu2KfE3qM5ymANFmy1O3m6T8DwN1GY7Znd6KkDK3vGJBabmGG4571uiv40prHw1g8z/kG2ZJB6+CFHHV/QgrjuZxhwGPz71/M3EF/D95/DDc8CtrqLw0W9439A6D8= 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=vypcjnui; arc=none smtp.client-ip=209.85.221.42 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="vypcjnui" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-35f14af40c2so4574740f8f.0 for ; Tue, 18 Jun 2024 07:02:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718719355; x=1719324155; 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=vypcjnuiJke07aPcLopSP2JneN2mnNHmsXw7xgLzXa8jq9pBV2NnxEs9W+AMySMcgx FPkt95Cny9Mdqq2ai6lF+rlm1p1WW9eVGUSCXhQT3AM3GENw2atiJQXAW2GK+o4WOtZZ Q7oJWFTF6MilkHHPKrpD90AS2Dvl/4qG9RHqvCkun8W36XnGuCK2WEz0fL7QFdPUXWp0 rkKohkFRmS5HFQbKZsS7dFJI7iM5uv5J9+Nw5F/qasNfFHJS/vDk5zMpZE6cO0FT1m58 Z27OzAdR0/8QGEE+zIwpmy8iGhrz982wj7bLXgayPypcH9dCwNfb+z42JC1jhOQwIYFw IM2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718719355; x=1719324155; 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=p8LDhnV/sksBQWdccDzu+6a/TSNs+d4KDviizb8AqDdW7HRkU7R8kEPR6mNAAgNRs0 X3Y8RdHXXMo1T4f+3Y6bNBk7Ov6XNFksV9cHg7oe600vKl81e9L5olouH2RzrH6qU1kd OE5sqj8MRz79ZB8I59zCr6o/Jd+WTgckxLRnAibK+BIJN/mHPvZEXgZyHY+b/ZwBRh4K mbsBHDOQxYzOVuxqSc6QfhgOVnVTtERUAS6bHAcA0dRNhBRnKsZNE+8DKwfPZBllehZL ivCJAwkOMU1T3bur9Wgq6+naU2d1jMw89vv/nF0bvR1Bet32ZkwXZXCVz1Ql8drf0kmp AYzw== X-Forwarded-Encrypted: i=1; AJvYcCXcDWLq/j/puRdpYE1r92XLwTJEAktQxS7WzScau6yfk/gFcOGCrAuwn8wILOun+BAIWioPKAJQgN0DEGZzQKkJhWRoOm+t5satFlPh X-Gm-Message-State: AOJu0Yxe7pQuJkxpaqP7XwvndG+QifJLpt5bBKM9wQyyB4R0P9k0gEqd 6BBdS9sKL4b+qLJpnj1Jp07UVRPmEUpWVvE29rpFolfXrhjW+qP4R3fkfw6W5Bk= X-Google-Smtp-Source: AGHT+IEpUUcK2t2NT0uyE9LsIkX7F9ePlZPM6Wgs49S7h0PwgLnOw5XdUvtGqV7G0aa932wJUiWaZg== X-Received: by 2002:a5d:5607:0:b0:362:ea80:db0d with SMTP id ffacd0b85a97d-362ea80dc64mr155775f8f.11.1718719354954; Tue, 18 Jun 2024 07:02:34 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750f22absm14412546f8f.79.2024.06.18.07.02.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 07:02:34 -0700 (PDT) From: Guillaume Stols Date: Tue, 18 Jun 2024 14:02:33 +0000 Subject: [PATCH 1/9] 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: <20240618-cleanup-ad7606-v1-1-f1854d5c779d@baylibre.com> References: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@baylibre.com> In-Reply-To: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@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 Acked-by: Rob Herring (Arm) --- 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 Thu Dec 18 08:38:47 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 186AE16DEAE for ; Tue, 18 Jun 2024 14:02:36 +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=1718719359; cv=none; b=aBRW8UcAGiDK11ftXZVOz5FXsiGc95vcevoPPYKcQKYs+0XGPSN1I550eZZTW9G859P8gb7725BctG9BxqqiHEyV8MV0uSEwRPl6Bj1lMXDOkYoY6Cf8AVPfzcBu04cmXj8fJx1lXAvjWHn4CAMsFXNkXoowQTS9yD8YlZE9wB4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718719359; c=relaxed/simple; bh=fMDqf1KM7W/RA77rezMz3nE602KNHtmJiEMO09XyypI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mutdELBoTBpmmvvjX7TYuhuRVJye9muGUs8q3Birl1dLHkPb6XV18rs7a8ykG5L7ZRgQheI7hiBHDDQId0wgwMHvd6+3Ky9Ao8FIsHmd7u/h+5ruUEW7FDJVvjG/EeVCtA3zLIAxLEWcrVuTy4pWDo5jzkiMigZxzMBDTwtQJRw= 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=d/AcZIk2; 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="d/AcZIk2" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-424720e73e0so5084885e9.0 for ; Tue, 18 Jun 2024 07:02:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718719355; x=1719324155; 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=d/AcZIk2YDa3WRl/UOV0NtQC1qvlNk/wSJ34sT7HxPqQ6sXVSTyEHoYUf5jEaH8YDZ +Fe5FZs6ukS+12f9wYiXAejs2Jj5ESgMLYnGNvo8VjgeAMSNub4AQNh22cWafWxWlFq7 u2jHnoQi4OwtvBVVRcPVEgB5IQWNEjL0kHb5oojRfyFf06hKgBsN5jOZ7q0lb+U268iv dqLPP7tFBGI8kZSvDR/Z5qLNsg5yw/uo5dkraEHIrXOtIAlj95ry4zgTiyLCA7yHkYOO Bq0Fu/o1Ao9ux4Ugwaaf3obZJt0Lnys70HoVqgNLkNjusTe1UZnu/rD2qb6A38beUKoH 5STg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718719355; x=1719324155; 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=ZQskY2aKxMcoq43yOZHKxZLC0AvqdvndBCLTNDgHMLq6ZB2vkX++Lqa5o5t7mrAdef wZk2aKYXCGB0gfD8XlOr+NovLsTaptayDir+7DjlDymKNFlZS9ec5s008xesYjXuR3O7 pyoGIGHxr/6OQlhgQGMVegS8Yv6eXemq4XZRIZnk4vZVrEE3SSv17RQAWysVFwVbbckf lx+VTAwQqu+wWAaPLqLFO04/TEIKwFwZMKQPFAaZle5j8aIs9DpZrOvkLCRnQk4sig7F 9SDTXgkSRXtZGCS64OjQKNrwf3hbLqsWUXkEJzFllIDhvw9T58mx6EBxHIAp8j2O5s/Q Yo9A== X-Forwarded-Encrypted: i=1; AJvYcCXa1jYSqS8qFPhT9B6Xq5Zb6oP0cm+rd6ukqppTTj18gWrpkcRnLzrLcJJYR5XQxIbIxpO52oVPuslm4GZA1s12Q3Zjlgccn7LvAFsH X-Gm-Message-State: AOJu0YwhtXYnBxjq9Z/R3OS65VVOABvZ6qurO32aL4wNxOX/PuPAy0Z3 W4q3oY+g4sWtUtBPBBMldM4bxcCyW7UIPWzo7gPdkteeQ8R21P9W2rRHhjCS4QI= X-Google-Smtp-Source: AGHT+IFhaLPzqepPaG30Gpc5wKJD8gFH+IxtsauFUs+mCd/Kver+eAIQm2Ywl7oZ1ItrgT/c7vP4Wg== X-Received: by 2002:a5d:6192:0:b0:362:6e61:a342 with SMTP id ffacd0b85a97d-3626e61a39bmr1041071f8f.36.1718719355495; Tue, 18 Jun 2024 07:02:35 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750f22absm14412546f8f.79.2024.06.18.07.02.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 07:02:35 -0700 (PDT) From: Guillaume Stols Date: Tue, 18 Jun 2024 14:02:34 +0000 Subject: [PATCH 2/9] 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: <20240618-cleanup-ad7606-v1-2-f1854d5c779d@baylibre.com> References: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@baylibre.com> In-Reply-To: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@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 Acked-by: Rob Herring (Arm) --- 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 Thu Dec 18 08:38:47 2025 Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (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 3132416DED1 for ; Tue, 18 Jun 2024 14:02:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718719361; cv=none; b=WnQLC3P32N2Dhe/oZY612+B6vz3Hd9Q7BYWAg/04bc2srFgSWOSrDLPxgn7KZIyLkrVQnaAwU1HETc5svcvpigYSZsMWC7W7s1Wqfxd80iY8HGUxNe5Dze0An+sSdgGEfSUji/TUui/2R+4C5hSAHh0vPNrQXZ8qU0m5QchDN0k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718719361; c=relaxed/simple; bh=AeL4Pk19lY57evpSum6bOchrffJafZiZaW5AICh7VeE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TWt/JYXx7a4sTXjFWD+h6+NTkr77SZGKWkyPxCmSCUHXJWeOEeEXzj/eCICuUPpfeEsss8hDoOsDtUew58WPAtAtua5P/MENUzAAozuFeZj87OkMwQZzggF+Igw/UZJURF9dnsmqnMILYicIViqfNlR9Jhw3Ngjf6t0/mFPyGHY= 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=3d+5culG; arc=none smtp.client-ip=209.85.167.50 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="3d+5culG" Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-52c8ddc2b29so5944555e87.3 for ; Tue, 18 Jun 2024 07:02:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718719356; x=1719324156; 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=9SeP0fiD+XkWTbLmWwucHAiPV/yHkLPDQUL8k4EXkjc=; b=3d+5culGlVfvKz6fRwxst8suLhL5+V+rh7bisVfjUh2Rd1KBP74kxaXWvPEYWydgi6 30hiHcXFgBFPoyK65kb5y0nYsoviaFPs5aDZ7XXFhgBVkFsMlJdXr/b4PpXa0htnmmDF FIQOHJNng+W4sZrlmtjB5rzIHVq0GjljaCsQ1PrCWztkpaA44v6+Y4dH5I7V7cefdWYb dC5hMyxhqYUarHd7QGiIi5sKOz5pQO3izOtOcP9+OYR2PKS96xzJkRi9qG2Z17QFpS9i dQym1nWHGWvTgFBtEmnHjIucu+6DBzund11WhuAl3MsnH0EYKXOmKYAUNhPOy3qlrG8i bl7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718719356; x=1719324156; 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=9SeP0fiD+XkWTbLmWwucHAiPV/yHkLPDQUL8k4EXkjc=; b=pHnk5YXDFVzcArhEx9dlcq8ODxPZU7fwAXRvFUB08nY4AZ9W59IHubjWrrxxPeduX6 mQPoAxwCiho6DYs6yx6VvHlEClafU9J6ci4MYEwpaFbCmFyl4CietJ/mIBifNy36t/FH n1hehXOJaiT84EYgmiX15G+iom5sgAgNyFDkSxXfDSdSUpZmkW2c2I4zhQjJS/CYsQo4 1m3qqJ1YN4d+6fLo+f9XHYreKujkSRHFU9CRUFeHCRsdshB/E5eCdPzGyFBADn8Q6o3f ByWFjgmLXY7DmpUUCaZtsD4CQj9xBZi9osABzqYTomq0IOuw3V8ZlaOcarRMcJ1T2v2D IlZw== X-Forwarded-Encrypted: i=1; AJvYcCWXhBETLp7Ab8M8LsYRnOt6zDHwWwTaKJbu63Ub9TFUd1Oua+Mmo4qUERWqGe5aKn5OF/0KHVZq2AfS9UBso6FvThL6uk+0CxHRmvVr X-Gm-Message-State: AOJu0YwFh9aiinvxH6YFFvqG87/GS0wb6I1uTmiBpR2E/FXeMVXCBqbq FrOgkW5lgGnoOTy2o1wCIV0L+l2VbHrDyJ2nNHZ2MczlKrPjwYpu+FIOiZgrJcQ= X-Google-Smtp-Source: AGHT+IEY5B0LzHI9+FwCWaKQXo1GE1Kli8+qybz/4z9W/1TjwNEVska4Fq3q9/R21mxYrGGIzpCLCg== X-Received: by 2002:a05:6512:280d:b0:52c:adc4:137c with SMTP id 2adb3069b0e04-52cadc414a1mr10544387e87.20.1718719356086; Tue, 18 Jun 2024 07:02:36 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750f22absm14412546f8f.79.2024.06.18.07.02.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 07:02:35 -0700 (PDT) From: Guillaume Stols Date: Tue, 18 Jun 2024 14:02:35 +0000 Subject: [PATCH 3/9] 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: <20240618-cleanup-ad7606-v1-3-f1854d5c779d@baylibre.com> References: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@baylibre.com> In-Reply-To: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@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 --- .../devicetree/bindings/iio/adc/adi,ad7606.yaml | 61 ++++++++++++------= ---- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Do= cumentation/devicetree/bindings/iio/adc/adi,ad7606.yaml index 00fdaed11cbd..80866940123c 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml @@ -36,64 +36,71 @@ 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: 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(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. 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. 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: 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 + 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. + 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. + 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. 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. 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. - 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. + 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 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 Thu Dec 18 08:38:47 2025 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 484D916EB51 for ; Tue, 18 Jun 2024 14:02:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718719360; cv=none; b=nN3gxxFKBvhjsw6a/HK3iZhGUl/PuS6U2vR5a5Rpvqb5cUldmDF/WAK1t5zpB3pii3hYmcoepf0Bha0mcMmAUCLze+rVkPDu4TPFcy7Nl52ssH3ZqI4nHXqnrtplUhcnzaYwjgnSQESeQ0XNdiCHlxmO/rXVCEz9zmC9tQ18SPY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718719360; c=relaxed/simple; bh=cWqIUPEPN7Udkq4+lFTiE2RXC6AoRwx5p3drvRYtbjY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=b4ZSCg32VDasG4SxpGayihntxGgxl9UwY6hLy422tSWUOjlKR3pdUsfYVxc9tRo84H0c42FCcT8Q2+x5oVmCzgoyj6xQwTfalQRiCo+OaLNQZsiJsttIO+sXW1N71OXipwcN6MsBMLQEh6l0B/dVXm+tmwq6BarOJEAW76ojJ6c= 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=vHcANnZj; arc=none smtp.client-ip=209.85.221.45 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="vHcANnZj" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-3626c29d3f0so312814f8f.1 for ; Tue, 18 Jun 2024 07:02:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718719356; x=1719324156; 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=4Wrqm5DzrB9rfiL9awg4tiFTM9PHAHUELJgH4ibg92I=; b=vHcANnZjlBkre4EVmaL8tGKwfZYGinBHtZB2QV/GzNNqhcDLAxo+ykSOXMcHZNEx4F Q2jxQW1MAR/HA94+Z7CXpcGwyuW5QMQpSU3/wrCdUgtYwykd0/zznidOBimAsM+fMYZF 5X1/yZEs+iX323dApLuN/qg40Io1Lq9pPEvznmlPNaKKgFIzoyOWtS6GH2IBHjlFob6X d2J0c7JoQEOMGjDOG61XLqYS5+76WZFFDRiHDiqWP9xiGc3OxUk92hZnKmUX65HLzVM+ aBZwcSk7Bhg8EUrwhq4cGb3GzXrqP/cR7NYKyTULfZeVWdQUd6dfBsG9bGpeifWG5Rnu 1cOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718719356; x=1719324156; 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=4Wrqm5DzrB9rfiL9awg4tiFTM9PHAHUELJgH4ibg92I=; b=vbCtlq8Pm29N/sgDWPGJ6i3ol14rtNUamWrq+3yYtWsHAhERgnlQl78mLjc5TMQ4hf hkZWdEsHIwiDOnA690flkSnCv38M9jgl5Ah+HHHToBVWhJ0vaW37nXg88RTSsVmnL1YR l+RgJIq6iLTD+OMiCAfLP7Icib4WCBOz5YtcXFOUN4hsZK3EQ3tOeS4ATFNU7g/dvyCs kPNsjWYawviYM7lGuFpRH/PV0bzVqO9gJE1Jf8pllA0TaHTmLub5bKjBLLos5QolUNli JCna8uTffY6AgmNwpKtNriWj8M1nD0Q3KKjW5AgFx5qfmtTSX56F8p6E3GFCNdUOQdcP Z2mA== X-Forwarded-Encrypted: i=1; AJvYcCVYA9VyDLdTNQqhWnyff9bKPM2hoK70+rtrkZbqcxa2OYdNjkk2f0GVp78CXqn+q3z1xinBkGsxRSb9GXeXhMF5DhEkITndwjFyCnoP X-Gm-Message-State: AOJu0YxguVjENpHCTtFDsk/OS0SNRJwW1VMZGSLGhzl2o3A4kHqwPjkh urZS/KjDMhnoFuSCJI/4Y+emoUhX2s5pbgT4fbsvBybWX3FmnzJQM8+xrOG96Vg= X-Google-Smtp-Source: AGHT+IGeSMCl1GadLFgkDPuhpwEcL3FXopw0KUDqKdsouTUQDtdzzlakx+O+Eto4p6nRE0Ptb091YA== X-Received: by 2002:a05:6000:b42:b0:361:fd04:95ed with SMTP id ffacd0b85a97d-361fd0496a1mr1497363f8f.15.1718719356709; Tue, 18 Jun 2024 07:02:36 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750f22absm14412546f8f.79.2024.06.18.07.02.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 07:02:36 -0700 (PDT) From: Guillaume Stols Date: Tue, 18 Jun 2024 14:02:36 +0000 Subject: [PATCH 4/9] 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: <20240618-cleanup-ad7606-v1-4-f1854d5c779d@baylibre.com> References: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@baylibre.com> In-Reply-To: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@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 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Do= cumentation/devicetree/bindings/iio/adc/adi,ad7606.yaml index 80866940123c..e480c9a7c7ca 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 --=20 2.34.1 From nobody Thu Dec 18 08:38:47 2025 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 D0F6816EB58 for ; Tue, 18 Jun 2024 14:02:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718719361; cv=none; b=LeB0wPZsxi/Ib6dc0Gbm3Z14/T2nzW04GiQU54RJSEc9hYaQD170YFaatjUBl4FY1VgHrTKzfMtPoBkGLsAB5iGSo0mvcEudjeNE0HJKUSRBgefE2EwbMozGb0YbDalrAA4v5JPKJG5gjN/3RYQiisnLq9JNyZIM6egwrUcmn+w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718719361; c=relaxed/simple; bh=Dg4uCUMceVWgsRkJ2KhN7U4MEvxhzasTmCDw03bT0EE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Jcog20GkG1OAEylHxqPL91u19umGwsWjtsXsUg6n4OpOWv9HJ2+omOX1XBZhWYZaXL7WKTodVs0JXlBEX4PURyXMKA045KHz6qXbzDbeDMHsNs+GzzkxVtntD6CZ7aya/B20P9I8vh/56uwV5jo8INyq/nlFAPyXYSUz+CXs/ls= 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=xj0YLYiX; arc=none smtp.client-ip=209.85.128.43 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="xj0YLYiX" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-424746705bbso1707435e9.0 for ; Tue, 18 Jun 2024 07:02:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718719357; x=1719324157; 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=UGD/hgLLXAT/g5axsjVVgJLnf9y+tbpA9Y5GEUxIfgU=; b=xj0YLYiXLHxV4U/303CDwBc/IzVZDtF2GumC9oprxLUqcu/hVOAorem9Hs1ImxPZfJ QE4RRw6mB/4gUMIq/aWrd5e+bGDDwk8yTTNNkVt2n8pAkcnYSqRYqFFEdKEnq1m5Twqz T4D5hOUK4POcbZq/dweQ2yf6pW721TP/d4vgTXuDM6vI3Y3O4pCShNfm6KD0Oxdw9Wr+ XjeWHehc6i6wBDfn6ZvvIR47kMJJIES4Ju2CbWH3rIH24CRR7ZEN9olmhah16kNb95vR 1hbuwGLBiXCXdiKEgJ3e40Kjs2QCRum12IVwJQlLX0CZk607QdErt90OKegHkkuEMdhL NK6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718719357; x=1719324157; 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=UGD/hgLLXAT/g5axsjVVgJLnf9y+tbpA9Y5GEUxIfgU=; b=tppk8wzCginexotC/Tihw7q09iaMX/zC25TFhDBUlnx3vwQjIVKwy1f7Xk+xIy9tbQ Hj5XCZ2xDp1jgBHMObiKGqYyFweUcKZU+I6tqiMBkFXEg5a2WnWbwFgwtXaZHsWEB5+U WgPJDtWeVSBH92foPbULKnYiZty7WY+rsye10R98pnSkbAZwVTmwW1Jl5fzMF5M5KmOc LAKnRuGRQ2WwK357IoJHiOPjPoT5qjolSnVRWI8llZQPmELKjKoPde4gcZhAqH5Lgmvj zrR5r6+TTizCiszKQ5TM+bOXnJKDIbJF2XLGpBG2THigf6b+SjrZNUFC5+E8cJmlcqLk HFxw== X-Forwarded-Encrypted: i=1; AJvYcCXknPCVThTqLGkGBTw00RW10EnwAHBKfqWHfuvvT7Hnvd2CSRRzvBYnYrrQWhxIs5GkP3d/mExt6VDJFgnCM7oVvHOzAp/jsxU5Pv0G X-Gm-Message-State: AOJu0Yz9fKYvKkIOYf2yvFi3nNwdhjPfzkXWDvGk6XX7HFgJk5ReG9vG qx/NXxji10LHuNBlK0aoHFerQUjOrtCtJ2JNeELHwwExJYxSB9pVSQ1P9biJCfI= X-Google-Smtp-Source: AGHT+IHFuggadGWzuwPQ5BQ96caDqox/xXR0j4uFJ20Kej5bsP8G8KLJpvUeKbdPACifYPBZrEKCOg== X-Received: by 2002:a05:6000:1e90:b0:35f:1c3c:56b8 with SMTP id ffacd0b85a97d-3607a76242emr8887364f8f.36.1718719357245; Tue, 18 Jun 2024 07:02:37 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750f22absm14412546f8f.79.2024.06.18.07.02.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 07:02:36 -0700 (PDT) From: Guillaume Stols Date: Tue, 18 Jun 2024 14:02:37 +0000 Subject: [PATCH 5/9] 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: <20240618-cleanup-ad7606-v1-5-f1854d5c779d@baylibre.com> References: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@baylibre.com> In-Reply-To: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@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 | 50 ++++++++++++++++++= +++- 1 file changed, 48 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 e480c9a7c7ca..65d6ca5843d7 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml @@ -55,7 +55,8 @@ properties: 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. - maxItems: 1 + minItems: 1 + maxItems: 2 =20 reset-gpios: description: @@ -91,7 +92,8 @@ properties: 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. - maxItems: 1 + minItems: 1 + maxItems: 2 =20 adi,oversampling-ratio-gpios: description: @@ -123,6 +125,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 Thu Dec 18 08:38:47 2025 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 CE5F51A38D4 for ; Tue, 18 Jun 2024 14:02:39 +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=1718719362; cv=none; b=EhLXtfsmdMmZkvkmhU4txBOW+Q+nqNeNZm3vqqaZFnxlc9RFFP8MlfACcjnSwwb2GbITfb5bEEbg+igAR4Ounc9CewpGdOugqFoTj40/sflpN2Dkmyy7uRq/ZcMX9NNn7xqHOOXwIJjLUdaB0JjmLVpPZkKEOOnwRHCP5zgawWc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718719362; c=relaxed/simple; bh=A6kuif+EaXqoEMG7xaj25XS2KcSl5ZJh9WVTl3nCKxU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BSrnPma6BcmxigZrU8/ic1rMjd5nw9mrEwawJoEt7+yIzIzr8miLO8q+Mkf3wp4eigdxq8ByNkZnea0xydegWYrgG2ocH9/YuC7Cuur6qk2keKR3KdqMDXSXlKMl5pImgFdwao5036Q8zuVQS0023d18D4EkueHSCRHjDzt5bV8= 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=XXddTLld; 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="XXddTLld" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-35f1e35156cso4723015f8f.1 for ; Tue, 18 Jun 2024 07:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718719358; x=1719324158; 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=C7A2H1vn46bs7vzUe2mxoJ5kUKOzuhCfRLK3RT+N/4k=; b=XXddTLldNAA7MBCQpQPNTn7HWZjIRyinpb8AAxMUtd4gElKlQhSMTx4sSi3d6SMGcB z7vi3z2cl2NYZq1NymiN6u2YL/rWVYuJjka+SYKf2tQfF22dC9yPlXnSccHDjmzkl7mS Z0ffF6IhwVK/EdtDeF7FwyIcJEUoZ3GTSIPuhNzdYkWli7lZxYopsnJOWLObllj4Ggt/ 8Grns8DyRYzKSI54ZGrHTRbaF9VgIsvfu76RRVV4yylQBheSVSHy13QxSWEjg65A4By6 ypdzTTvCkfXBZ9Ap8xqb4JxXuhiuQqcIu4u2+3j9o4ThnXgUbas7su7/TNhT/4XFYW+3 dskQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718719358; x=1719324158; 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=C7A2H1vn46bs7vzUe2mxoJ5kUKOzuhCfRLK3RT+N/4k=; b=HpWEkEFhPGEB90KXcykp18xw98n4T17UbXmzSW5BNRFRxAspUz/FTXS39xIjvDSAZF UTaCEv0dTeu7/Z0SjzKJALjZVU/A3NRr7GIdn8b8RYrPSQFGiO2WmpBiTe0450YpvmhV W8cY7j5EoTtCX3nN/UUEWX79yXxBDTsTXGFgNMhV7KfElRejh8i0Xq9iQdAwZ1G9HgHn ZV4ZQdzzIfI9a+UnNRz7CEHe74o0z4+m6VFoO/8BeN9FXQ6R4ln98bE3xscCHWQMd7Rd /gy8OE4A+UoNUkyF42+lUppEtAhnu+LIGWe/Gj+9X8sEuNpg472xyOFCid8M3suxEiye LGxQ== X-Forwarded-Encrypted: i=1; AJvYcCVueuTnRTzfBeacE6a5I7f6RX/GborMT9Jua8233Cw5NbfT4kX1JdWJlsnD74ZrJXpMLYGtDLHt07jrHmBwepP074L1R7ISRzp6Z/YK X-Gm-Message-State: AOJu0Yy8YGkBD+gmG+MMwvWTc2qY3dH1NvCup6zDJmNgoJWcxsYQcN8m LZvXgvB/iFXQ6xyEjCCLoUMU4zE1Qqkt06lpu658DTyWXob538B/j7VAd+hBarQ= X-Google-Smtp-Source: AGHT+IFveMAeeYnGXlbgaKPbEE636y3oEz+xbQvRxeYUKyvxdbSUC2rC5BJCZhSUrFoLatWxvWuhBw== X-Received: by 2002:a5d:6901:0:b0:360:8269:5690 with SMTP id ffacd0b85a97d-36082695cdamr7690748f8f.17.1718719357775; Tue, 18 Jun 2024 07:02:37 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750f22absm14412546f8f.79.2024.06.18.07.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 07:02:37 -0700 (PDT) From: Guillaume Stols Date: Tue, 18 Jun 2024 14:02:38 +0000 Subject: [PATCH 6/9] 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: <20240618-cleanup-ad7606-v1-6-f1854d5c779d@baylibre.com> References: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@baylibre.com> In-Reply-To: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@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 Acked-by: Conor Dooley --- 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 65d6ca5843d7..a8fb0d926859 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml @@ -198,7 +198,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 Thu Dec 18 08:38:47 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 BDD121AB908 for ; Tue, 18 Jun 2024 14:02:39 +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=1718719363; cv=none; b=RU51qOiqpXLk0+H0f60hRBNdSfF+Wsi9YVMsN5VpIWQCTVXfF5ai3SOntoGzCHMtNi4eY1iQi9VOeaIOa6aCCxLlHEBhFRXk8V7W84iAK5Mh2A6e3ZdJ0iUHAc+2ypGq4ECKwMlBWFc8XKIpmIXIY4KoxEr5aBhxGySifGuaGNc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718719363; c=relaxed/simple; bh=QmIv781VGnh+ryUYXx1F6xEK9035NP0/VEuO/oa1M9c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hhAM9DQLl4BrAXI7AKEzp1mHnNkZIXcMNmGUE5qCkB4nAXz1HrUzwkjsjFTw8+7kQ57NlbxxTNTAon6aa4htFmLnzUjA/v5yTfNLUmZXdYdMxnQfoIg1ltkvtLVbLzdf12/W21rwEgoBmQ0bk/YXIxr1fcIP1yxGqC9CAaJ7iyo= 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=ohKtDfAW; 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="ohKtDfAW" Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-5295e488248so6029188e87.2 for ; Tue, 18 Jun 2024 07:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718719358; x=1719324158; 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=iI4ADRyyzg0pZX/pPb/PmIK3doCtooaUT1uP9pqm4FQ=; b=ohKtDfAWXiBKfE+4MAHaz94DbyynxLd/BJICDyyhmBA8gD0M4xYqBXpVmUNHUGeKWw DwT+gqU4bqqakAFMpG1vXkgMA3YJP/luCFOrYwC1nzQjSS/UUuXdSf2f6risr73DPEvz zOA+0KdRPZ8ubD+fgzRlhuRmB2kSRLeT1W+4xG57WnUkRaFomzQjALT2CNw5o0a5nz5x EX5ov+NKAykBjBlq9tD0Ff+xBHuFOxdv3L2QKrydl8003kJyoZUF9SND0hGk/7siknwJ tZx+0d97LU9niYpjuMexauD347ecvnZRpSYx3T1GtFuUi/qHuq6G9cBJSrqMgczbrZWM 82Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718719358; x=1719324158; 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=iI4ADRyyzg0pZX/pPb/PmIK3doCtooaUT1uP9pqm4FQ=; b=g5mJK3doeAQ6u4O/ZXWz/bZs3yK+X/IjNVfhj6g9xYaKDoNeqxmfZ0RQ9kODTRRvzd Bb4AIvnQSYdJQfDF9lC46gmLjj8AHx0TEekcwPv66slFh4Ienel182cgQp7yMIY6GS/1 QTpZrk8bu2PEw+DdEul7eCeC11tvdX1OAfFlPI5SHIJ0v5Hk3yeENENV1rzQLelny9Cw vnLVyLYXzNswh43/QXWFWfKy47MOCHzh1zSUMXRJx1FxfKS2e4wygMq7uP5EJCXABe7D ZfZhtGjepncBPZTUpqQSJZ0dWyxLTFqpqNrJFgNjM5tD4KKIKU1uyQsDJ5lHeka+9zWR 2vPQ== X-Forwarded-Encrypted: i=1; AJvYcCWWfm5AxQ3ksth3u4IN1sVu6B/BgI5QieSHrv3iiui/KjHH2t1aFnw2hK9+1K+FLbIv/NFQx1FzKcbr2bB+Gn5nLSo9lVoI9lYYz81m X-Gm-Message-State: AOJu0YzrX53VJRvVeYbqM1T+8NP+LgbspR66kVsSBR6NDzFSePbZx1ls rwE0/XdNKDMKFa7L03W3JWKT4NQFK6PAaA1A6AdFLVwNr72EciYjpQG2u0D37YE= X-Google-Smtp-Source: AGHT+IHBu4z952wNs7NhOwlF6llGWnDm5ZPTxh7b2obRWVw6BiFyuLwn+c+TGhzkzw2h3HLjRG9iow== X-Received: by 2002:ac2:58c8:0:b0:52c:9e25:978d with SMTP id 2adb3069b0e04-52ca6e8fe35mr7316607e87.45.1718719358335; Tue, 18 Jun 2024 07:02:38 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750f22absm14412546f8f.79.2024.06.18.07.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 07:02:38 -0700 (PDT) From: Guillaume Stols Date: Tue, 18 Jun 2024 14:02:39 +0000 Subject: [PATCH 7/9] 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: <20240618-cleanup-ad7606-v1-7-f1854d5c779d@baylibre.com> References: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@baylibre.com> In-Reply-To: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@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 | 71 ++++++++++++++++++++++----------------------= ---- 1 file changed, 33 insertions(+), 38 deletions(-) diff --git a/drivers/iio/adc/ad7606.c b/drivers/iio/adc/ad7606.c index 3a417595294f..e3426287edf6 100644 --- a/drivers/iio/adc/ad7606.c +++ b/drivers/iio/adc/ad7606.c @@ -69,19 +69,18 @@ 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); - if (readval) { - ret =3D st->bops->reg_read(st, reg); - if (ret < 0) - goto err_unlock; - *readval =3D ret; - ret =3D 0; - } else { - ret =3D st->bops->reg_write(st, reg, writeval); + scoped_guard(mutex, &st->lock) { + if (readval) { + ret =3D st->bops->reg_read(st, reg); + if (ret < 0) + return ret; + *readval =3D ret; + return 0; + } else { + return st->bops->reg_write(st, reg, writeval); + } } -err_unlock: - mutex_unlock(&st->lock); - return ret; + unreachable(); } =20 static int ad7606_read_samples(struct ad7606_state *st) @@ -124,18 +123,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 +258,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 +274,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 From nobody Thu Dec 18 08:38:47 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 8EF7F1AB902 for ; Tue, 18 Jun 2024 14:02:40 +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=1718719363; cv=none; b=MeE4qeuDG3MWqVViBJ5OaLLyu7XmyrkLVJV0aDsagWI+ua+wOQSno4qt1A8HLkcGu3m7NkReOJcAINQ1s8sqE+81VweW3IHFfr+R4czPNDKQSw8lXnl+b+FKOhFqDEstvn+ERQXwrGmUdu/tN/ups/3ZE5YZt8b7CNtvlClxsY4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718719363; c=relaxed/simple; bh=G0IEsc0YuwIVNtNFERXBYcEqbj6ugCGmrYZUFWavEKw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GbwUlN5w26YhlNr4Cba6UKv1E9iFBFNjKyK5f0rUyaWSrMJRi9Q9a59NXNmdqPJFXOUoUBeFnJxGG4mQ7Pi1entml6jOspUOMdpl6hYskFMZMltu3sRQjKWXb4PrEN5Bp/SaTJa7+5AXxd59n2zmdvmY/O1OJT/i4Odu1HkrkQ4= 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=yKpwXGxa; 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="yKpwXGxa" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4218008c613so41593275e9.2 for ; Tue, 18 Jun 2024 07:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718719359; x=1719324159; 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=U4plLXWkBuN6eMxbghss2+pJl9NpmXZN9/hM9oRoKCA=; b=yKpwXGxavEO16aGtNkPyaQeDdXMa8Mao3TIaEK/2WeAXLnmbkT/F9Excncq8FhncnG 7bz5He/bOYnAgw/Fyx5/ZRY73Nk2BbhLk0hjTtwOo7SS0J3qPsvn1ASOnV3XwfFAsRvv iWIRUaD8a77HuQyhz1irKVMU6z1adgkS15FdF3JcFU3VqIHucPaebrZYIkbUYY43CSsQ +tuqn5z8NkKxH2Pu/AXampd2EE1xIwJNoMKKGOWGQW1XwHgFNEBga3q0lRdUWHSabhHi gFJxwGyEH6CS/3j3lhzmwdOHlbIVJzQQiEysGmFIYYI5DqW87FH/wqRA+ardR3D6eOQj mh3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718719359; x=1719324159; 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=U4plLXWkBuN6eMxbghss2+pJl9NpmXZN9/hM9oRoKCA=; b=SAcxl4rvf7TMdf0aI4Sy8B7MEQDXSZ/CSBfeDKa1Xjzei5sya0FGsEx2dCWh+Jl9hE 4tZ3PM2HvRLIsy5WHASr6sI3vZJ8pvvapvQr56FFw2kyERhSWN1NhKClz9N2tED2Vh0J qqflz81kJpf/bQ9yopt++bk3fBaJ3STp7yUy8/i7PY8snRMU/0WfELcKgT+iUWmbfn8s Sp1y2u2mE5NHIInknmoEjwfnt1vQF1IIjzCK733izYfKZZoYZUTs1T4Bn7GzGDvLZdEm w2SXoRTZSDTI/8WF+nrIEvdDVG/eEcebGzGMcNkMjnckKaQ2E3fesxFdDRChJMWUp6Sv p70g== X-Forwarded-Encrypted: i=1; AJvYcCUIn82qkBszGQV5brsbZcS9kr1vbZ+mPsBqAvjzaMFUpnC3nu1SgbWKff0SoOVj/VJNibMPz/uBs6lesZALuNE/4yKb06os0QoiTLz1 X-Gm-Message-State: AOJu0YzLwoxC1YqCfkc5lRWaO57iocj0oI5m41lx5HzX2VwBX+2Dl0ej lqKZKoNleiI6Ou2BCjYasJgXxCu107EsCx+oBZ52RnWzsfhjdULr59bumgl7A+4= X-Google-Smtp-Source: AGHT+IHk8eAM+xd2EgGrv4q4Al8sZ5/FlQ4l+KMnzE7MbVO9g2hq92wev9EA4GAAkpJE4kMFyryK/A== X-Received: by 2002:adf:ea48:0:b0:35f:1128:250d with SMTP id ffacd0b85a97d-3607a7842e7mr8900419f8f.68.1718719358881; Tue, 18 Jun 2024 07:02:38 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750f22absm14412546f8f.79.2024.06.18.07.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 07:02:38 -0700 (PDT) From: Guillaume Stols Date: Tue, 18 Jun 2024 14:02:40 +0000 Subject: [PATCH 8/9] 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: <20240618-cleanup-ad7606-v1-8-f1854d5c779d@baylibre.com> References: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@baylibre.com> In-Reply-To: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@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 e3426287edf6..502344e019e0 100644 --- a/drivers/iio/adc/ad7606.c +++ b/drivers/iio/adc/ad7606.c @@ -235,9 +235,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 Thu Dec 18 08:38:47 2025 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 E1AAF1ABCB7 for ; Tue, 18 Jun 2024 14:02:41 +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=1718719364; cv=none; b=DslFlSazrIzhKiIR+hN+xRYDQQ+ybMX0NjoMfIOX2B5nQelyRguxrPgihwBljNhoypV8wupFWQKrxR3JSIwidrSOB2HOgUhvtNDd/uQ2r1FfKwjv537GrEOEEzdfJjByIj0wsR7g6wjzBpXacYa7EsuQR2xajUHLrj9Tn6kWUpo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718719364; c=relaxed/simple; bh=PO21rWTwSri6pXqW0QAoF3rRYxBHPQXcTMLtVuYPAPY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=l9Cm3oDiagtEyHZAO4ZG3M6i6TMaWIoi+noDJ4nCPJdjNMgfkFhgwaa6Q1awfYjIKMGt/NwmFb7gGD2+spuyDL2CCfG/9MbX6ZB81AfeJhSOCRqHwTolbrLBNqc83NbLCUdwTNFnAQAkz/xywHS+Eh5sSQ4uKs9a5EYrioqncCA= 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=MKexz67T; 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="MKexz67T" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-361785bfa71so272755f8f.2 for ; Tue, 18 Jun 2024 07:02:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718719360; x=1719324160; 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=SmU+WlwI0In7K1/gMjhndg/uoX9jW0QNIwYtnLhPUbw=; b=MKexz67Ty2ztXziEExBdmHVk87zPY7S6ofk/iXtqhacvTTxSsQXt06vuuQGxj5e8oV 7tsci5JrsG4hIBZPCI2asJwwf2ig6hdHZLHygUF6aMS0plVD4pRKrykHUXmaVYFTzSHA seeVsAMu1HeqzH2saOOgk9kof86rqUFFr7y0qPRH9UIw3D9LTciVu4yRxFrMFZhrDEwP RFiG3iuvSQCfu8l2VJ6ojXsqHjGQTV8pzXrS+q5FTp2RkXl5AKxDf4eAEklTRFVpfJUV IxkcGO/jnwHIjHEiNh3dIceMPIu5XtUKIgtzpmWHezR4a+mpGgy5JaE3FNufGgtdFLPQ KOtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718719360; x=1719324160; 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=SmU+WlwI0In7K1/gMjhndg/uoX9jW0QNIwYtnLhPUbw=; b=s2QErdt6TxNe+ACw4LEbTq+gcLXoEHsNsAB8GqT9Lc3+oNhErv2I1UndJnzt5wT4Tg 3290zGgFX/KM1PreGz/oC5aKzO29meDpIex1FztAiw3dhnK7PHBlMvx7vjjg+/aC2lQ2 J6oMjN4AWaGVZO4ccmTXze+ot33W1Cm2/niC12vgTcExh//WBnCErXrDkf/lZYHznyP9 MbM0lU1iWJt7vtQunYFAA7EwpVWc4U0CeanZxRB6N2x9lGRLGgM34RQgWs94fumdYWa4 NMZu/OBSea3UFzcI1RbkaSU8M4fPbGLArUfFbBS4INN5BssaPSaFc5qGnipjKvrpA5cX fZBg== X-Forwarded-Encrypted: i=1; AJvYcCVYiR+JFfsmWGYvTm7xu0Po/YFchNzSwOkWY1kYo5uEVUuwGvTm1MZtsue1krgRzxlvW0bvn/zj2ZTHoyjz9ELmMwP/tVTsGJPcUmja X-Gm-Message-State: AOJu0Yxq5jAg/M98YxDHQUfYvHXOhn3O2xpr5Bu1C9THjizye0cOTOmG UqUfbwbwODusDb7ef7Nch2Wg7i+8D8qNOdZTRept8TdlZhf0FFleNvyNtrMoUyM= X-Google-Smtp-Source: AGHT+IEtKN5tC6ABJu+hRBezT/QshYcfhWNrkTMUXMHmMGcpraUk52c+2mvByGaSZJu3f52D9bSM2A== X-Received: by 2002:a5d:5412:0:b0:35f:259c:cca2 with SMTP id ffacd0b85a97d-3607a768b42mr8062269f8f.34.1718719359438; Tue, 18 Jun 2024 07:02:39 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750f22absm14412546f8f.79.2024.06.18.07.02.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 07:02:39 -0700 (PDT) From: Guillaume Stols Date: Tue, 18 Jun 2024 14:02:41 +0000 Subject: [PATCH 9/9] 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: <20240618-cleanup-ad7606-v1-9-f1854d5c779d@baylibre.com> References: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@baylibre.com> In-Reply-To: <20240618-cleanup-ad7606-v1-0-f1854d5c779d@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 502344e019e0..05addea105f0 100644 --- a/drivers/iio/adc/ad7606.c +++ b/drivers/iio/adc/ad7606.c @@ -438,7 +438,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 @@ -681,7 +681,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