From patchwork Fri May 10 14:18:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Dureghello X-Patchwork-Id: 13661662 Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (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 1339012C47F for ; Fri, 10 May 2024 14:19:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350760; cv=none; b=HgWUHJblK1QN41YB9MaQdqOIMRFHJTUjtKgYtQnRBt7c4echZSnG4vSe8xp0M9ZYgQhW9ouDo5+SLkXtB6xYEq4Thas3rwNkqzwmFCKfa+ZNG1LK6fU6PPLzu5o5IVB7iTI3iiG1l8Y4y6cL/FARGCKfHWbqJF7OYoxOalOu7Ik= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350760; c=relaxed/simple; bh=xxx4t59lacJdCYKqV1TwqAC4SVodzhIeAGYW6khLtXE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=upp10eqhDk5aoexgtCaGuSkTPBUNuA1gYEkk7jUdK8FtQJHwvmV3CjS5GuXToLwVDP2xfqq5hUtNxEZkYLurpeiFO/H9se1h82GOlz0NuZOl/XRTPhvf3BY6SPh84r0BdJzKHUo59Ao709vDmuDO4DzhePfLx52aZuum/14egTo= 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=omrWThs4; arc=none smtp.client-ip=209.85.208.173 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="omrWThs4" Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2e3e18c24c1so20834171fa.1 for ; Fri, 10 May 2024 07:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1715350754; x=1715955554; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=p2Vlnws5FiAdjm8Du8XlBvr/Ou/c9kQRn48QLmV0BFs=; b=omrWThs4Nv+j/ZDfWNiUKVjk9RZL2eE494DUT6Pj2My0lTtFxCzxmuLdZNTlGjdUJ8 LVchddRJ/OrsdmsSu7esGYAWu3T9YGgxZ9FoYkt8b5865ReoQQrK8rz2lg+OXBSite/4 A6g9Ui3X61sPnSzzTa9jlP0oPU/F59p9iMQl74z8aIZUbb9j8imdRolMC5Q4eagfsxO0 182U5SFXkYr0vftFrkq5bY4SuwKMjjqE66IQRaB/UHtwGBYbU2n7Pmh6GjEtM16h8vaG BXY2KCfpb34EXjEFPZnBhasXY3nBKJSfmeezhkS8seYrPxQ6KQTXmsVm8xzoWCjK7vJX 6ykQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715350754; x=1715955554; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=p2Vlnws5FiAdjm8Du8XlBvr/Ou/c9kQRn48QLmV0BFs=; b=aEgnpk7yswpzS1VehbHu4YaBdx3FvwqG125ZVCk3oFnhBMDSPXSEQgPG0XCtnBrsgZ Z7YMJPd76JD6ad7sBB7wyy8y5/yj3Y6rFv2Z2mE6feNpD+yRLfyU1oyoY+eesM8fH7Q1 Z+vGqb5a2t1rihEpMliz2CjIg5BGWG9muH39JmBWkNopYBxKMlufGS1HcXrMtnB+9MlG 4NrgHNSCiDfS1+G11JdiJnOD+tQhjEzSPUf9FZ1d6lVz9GV1ID+PRyFrNbEhsohZRE3T GG0ghExB5h5lh7lp8q+kSFI6F9tMfC3QHFecYn16IzivaG3z/toyFnq0aNjpBzvRVB/L 9dGA== X-Forwarded-Encrypted: i=1; AJvYcCVdl8NHzDHCLAyZrHnnxfQZXEPa/ngb7yW1/fCLakGq6t9kijZYy4jShevnz9JmJRfwhgGyyxvcj1UcdlIkKkHe2LRWZAUMoKol X-Gm-Message-State: AOJu0Yx1OVfNUB/+kOvlZX/T1GKesN2S5XL1+6NiLbh1P6gfv6rLaSLD aQ3uismPdxmRNlzUHKtdSmC8b/7JCAR6Z+Rcr7BtKvjUfFp/mFtA0GNpU6c/gDQ= X-Google-Smtp-Source: AGHT+IGpJWrJsfoOoQk4zUMuiUHP+YlLGjm6rvptjOJOKUVTGe3fh/K/iMDcN0xqxLz1thXwhYEQOg== X-Received: by 2002:a2e:b0d9:0:b0:2d6:c43e:f0b3 with SMTP id 38308e7fff4ca-2e5203a50a2mr16994981fa.50.1715350754136; Fri, 10 May 2024 07:19:14 -0700 (PDT) Received: from localhost.localdomain (host-79-47-39-74.retail.telecomitalia.it. [79.47.39.74]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41fd97e842csm56111875e9.24.2024.05.10.07.19.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 07:19:13 -0700 (PDT) From: Angelo Dureghello X-Google-Original-From: Angelo Dureghello To: jic23@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: nuno.sa@analog.com, lars@metafoo.de, Michael.Hennerich@analog.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Angelo Dureghello Subject: [PATCH 1/3] dt-bindings: iio: dac: add ad35xxr single output variants Date: Fri, 10 May 2024 16:18:34 +0200 Message-ID: <20240510141836.1624009-1-adureghello@baylibre.org> X-Mailer: git-send-email 2.45.0.rc1 Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Angelo Dureghello Add support for ad3541r and ad3551r single output variants. Signed-off-by: Angelo Dureghello --- .../devicetree/bindings/iio/dac/adi,ad3552r.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad3552r.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad3552r.yaml index 8265d709094d..17442cdfbe27 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad3552r.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad3552r.yaml @@ -19,7 +19,9 @@ description: | properties: compatible: enum: + - adi,ad3541r - adi,ad3542r + - adi,ad3551r - adi,ad3552r reg: @@ -128,7 +130,9 @@ allOf: properties: compatible: contains: - const: adi,ad3542r + enum: + - adi,ad3541r + - adi,ad3542r then: patternProperties: "^channel@([0-1])$": @@ -158,7 +162,9 @@ allOf: properties: compatible: contains: - const: adi,ad3552r + enum: + - adi,ad3551r + - adi,ad3552r then: patternProperties: "^channel@([0-1])$": From patchwork Fri May 10 14:18:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Dureghello X-Patchwork-Id: 13661661 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.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 141B712CDBE for ; Fri, 10 May 2024 14:19:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350760; cv=none; b=H4TfKBJdWmjsmVfQQ5kaS7fhTEgnni4n0e6IKyqfCZqvv1m5mU2WOsjJ4Cp44sW3QC8JbnRATRyzC5VWM4W4vH1oz9lel0OgpRdEop0kVesZvPsm4+4gL6hNwNw+6nZHjgoNQLPdVjO+ffhYlWoGrWF0HnaL8maWjpkQWxsAcd8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350760; c=relaxed/simple; bh=NlQ/Ug7dz4K2c2zWHyPJUr2k+IfziswsplWQ7RQc/kw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VpURJFwtZ88EHwZr9gRKKP6HVou2wlc+sj2Ak7Z4ouIq0umkLMvdpuiqveb6g6QqGC/muk/HvgSrVaHfUoKhSq3VF11UVKhN0McjLCJ4OigFLRlXi5ACUtfM+1i4TEXz56t9xYNm4kptuTsjVWFpYbpenj8w/AdFNIw7tD66h9E= 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=yLVn5E+6; arc=none smtp.client-ip=209.85.221.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="yLVn5E+6" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-34d9c9f2cf0so1707784f8f.3 for ; Fri, 10 May 2024 07:19:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1715350756; x=1715955556; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kBayFo9ABt7YlFjmk+ws+uzVFbLXwJ+VUXfXdiBtu3U=; b=yLVn5E+672NVDcUuZ5BM9pqUiQ51PD0bYvsxde4oKfhH58dUTDwa7EJ/YV5wd2UZ+R eH9fhGEjWqOVGY+dM/kb/6H0jSj91zknOZXoM4TZ67I3ozYssnfhoS8wTZ/NBdBQZIm5 bv81b7/jLbupL/+KYSndc6ixpctxX8WfWrjCbVZeSupcS+lUDT6M0XwHpSYMm2cbg4jL /Jij+sL8dPrVJkO0wiZs9vP/m8inRb1OFwMSUREFJwVYl6HCFpMh6XlZbAqhjLQ0Egeb DeD3hyZF04ZFwsNiGWcX0H2/tn/rskfphj7yWihS3SN8bPLwiMVP1EdoQGxuPmJPsOro x+Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715350756; x=1715955556; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kBayFo9ABt7YlFjmk+ws+uzVFbLXwJ+VUXfXdiBtu3U=; b=K+iOrwhbonGcXtV51gTF7UZdoFYrxuJ63NsaubPSgrDN557+3UMbnNY4nINnHiTZqb aJWeeZQB3+YhcY9XvDBCsYsng4K3uz1mPfEpHMDkvGU3g0K5UOFN97XrQroBY+lshkWJ yEtLWu9uMc+wjg6i/bJ2mn5mrhB+9WztcZYoeDhuIattiJDn4TYvEnwfZ7ItpaR7U4ae K7s/SFsbajabb+xHpo2p0H3XjWqQrcWR4NZlNaPgqBVj3XVbFBp/Vys9TzWO2yTwGZ3Y Jm/9S0KH35ORdBagajLTxIF5MBR5w2XxXfAtIjyJ8K1LU51ilGoWeDrWem1CW/f/szKp SYyw== X-Forwarded-Encrypted: i=1; AJvYcCXNxz89WlpMSKyMz8R4amNHWdZ9TQvIsYWR5BTdXXkC3T1Mt/Nu4NK5uTKLJQy4NXVFtBYjwzdlmrNJ0CSbTMoecx4C70HhtWW0 X-Gm-Message-State: AOJu0YyAPk0UclwRLl4IvVL0hdJv44MfDc/+JkcCaYBu+UTJDBZE0x7e TfnWB0RYHhWCwtz6Qr9qHOOtRG66v7VL2b0SAn8oDwWiaox6NROM+kaJEIGHufs= X-Google-Smtp-Source: AGHT+IGJ7nj5x+rqDdO1Ls7q9E9QWTgWjhPJK1qtXFrn9CBOM7ecq92CKF5mEejihS5rabgpVGfggw== X-Received: by 2002:a05:6000:181a:b0:34c:fa08:791c with SMTP id ffacd0b85a97d-3504a969487mr2456273f8f.45.1715350756294; Fri, 10 May 2024 07:19:16 -0700 (PDT) Received: from localhost.localdomain (host-79-47-39-74.retail.telecomitalia.it. [79.47.39.74]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41fd97e842csm56111875e9.24.2024.05.10.07.19.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 07:19:15 -0700 (PDT) From: Angelo Dureghello X-Google-Original-From: Angelo Dureghello To: jic23@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: nuno.sa@analog.com, lars@metafoo.de, Michael.Hennerich@analog.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Angelo Dureghello Subject: [PATCH 2/3] iio: dac: ad3552r: add support for ad3541r and ad3551r Date: Fri, 10 May 2024 16:18:35 +0200 Message-ID: <20240510141836.1624009-2-adureghello@baylibre.org> X-Mailer: git-send-email 2.45.0.rc1 In-Reply-To: <20240510141836.1624009-1-adureghello@baylibre.org> References: <20240510141836.1624009-1-adureghello@baylibre.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Angelo Dureghello Add support for single-output dac variants. Signed-off-by: Angelo Dureghello --- drivers/iio/dac/ad3552r.c | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/drivers/iio/dac/ad3552r.c b/drivers/iio/dac/ad3552r.c index a492e8f2fc0f..0dd6f995c3e2 100644 --- a/drivers/iio/dac/ad3552r.c +++ b/drivers/iio/dac/ad3552r.c @@ -140,7 +140,9 @@ enum ad3552r_ch_vref_select { }; enum ad3542r_id { + AD3541R_ID = 0x400b, AD3542R_ID = 0x4009, + AD3551R_ID = 0x400a, AD3552R_ID = 0x4008, }; @@ -745,7 +747,8 @@ static void ad3552r_calc_gain_and_offset(struct ad3552r_desc *dac, s32 ch) } else { /* Normal range */ idx = dac->ch_data[ch].range; - if (dac->chip_id == AD3542R_ID) { + if (dac->chip_id == AD3541R_ID || + dac->chip_id == AD3542R_ID) { v_min = ad3542r_ch_ranges[idx][0]; v_max = ad3542r_ch_ranges[idx][1]; } else { @@ -780,7 +783,7 @@ static int ad3552r_find_range(u16 id, s32 *vals) int i, len; const s32 (*ranges)[2]; - if (id == AD3542R_ID) { + if (id == AD3541R_ID || id == AD3542R_ID) { len = ARRAY_SIZE(ad3542r_ch_ranges); ranges = ad3542r_ch_ranges; } else { @@ -955,9 +958,10 @@ static int ad3552r_configure_device(struct ad3552r_desc *dac) dev_err(dev, "mandatory reg property missing\n"); goto put_child; } - if (ch >= AD3552R_NUM_CH) { - dev_err(dev, "reg must be less than %d\n", - AD3552R_NUM_CH); + if (ch >= AD3552R_NUM_CH || + (dac->chip_id == AD3541R_ID && ch) || + (dac->chip_id == AD3551R_ID && ch)) { + dev_err(dev, "channel %d is not supported\n", ch); err = -EINVAL; goto put_child; } @@ -987,9 +991,10 @@ static int ad3552r_configure_device(struct ad3552r_desc *dac) goto put_child; dac->ch_data[ch].range = val; - } else if (dac->chip_id == AD3542R_ID) { + } else if (dac->chip_id == AD3541R_ID || + dac->chip_id == AD3542R_ID) { dev_err(dev, - "adi,output-range-microvolt is required for ad3542r\n"); + "adi,output-range-microvolt is required for ad354xr\n"); err = -EINVAL; goto put_child; } else { @@ -1088,10 +1093,20 @@ static int ad3552r_probe(struct spi_device *spi) return err; /* Config triggered buffer device */ - if (dac->chip_id == AD3552R_ID) - indio_dev->name = "ad3552r"; - else + switch (dac->chip_id) { + case AD3541R_ID: + indio_dev->name = "ad3541r"; + break; + case AD3542R_ID: indio_dev->name = "ad3542r"; + break; + case AD3551R_ID: + indio_dev->name = "ad3551r"; + break; + case AD3552R_ID: + indio_dev->name = "ad3552r"; + break; + } indio_dev->dev.parent = &spi->dev; indio_dev->info = &ad3552r_iio_info; indio_dev->num_channels = dac->num_ch; @@ -1110,14 +1125,18 @@ static int ad3552r_probe(struct spi_device *spi) } static const struct spi_device_id ad3552r_id[] = { + { "ad3541r", AD3541R_ID }, { "ad3542r", AD3542R_ID }, + { "ad3551r", AD3551R_ID }, { "ad3552r", AD3552R_ID }, { } }; MODULE_DEVICE_TABLE(spi, ad3552r_id); static const struct of_device_id ad3552r_of_match[] = { + { .compatible = "adi,ad3541r"}, { .compatible = "adi,ad3542r"}, + { .compatible = "adi,ad3551r"}, { .compatible = "adi,ad3552r"}, { } }; From patchwork Fri May 10 14:18:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Dureghello X-Patchwork-Id: 13661663 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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 EA277161330 for ; Fri, 10 May 2024 14:19:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350761; cv=none; b=s6ZrcjJxQ6bI3W8GCD/Rtm5VvwPi1VuCkRA9m4puHnJLQ7yMXo8PobP5QEQ0DyCqpObAVIe19LCIfJG2g8d760RIzSWLqNyG4nI6FPN6rkRnVu/Meny8LX2TKhXEDvMymM9jqhP8OvkfX/d+6gwT++X32BvFkYmpN3ED5tu9JoY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350761; c=relaxed/simple; bh=i4G7aoZtuOLQ6v/EAbm/87VL6HJuAkCoK1F6wDmVAoA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ETtVLMrv4whgwtB8b60AksAfiuCh4y6fPHEYgCdLKo+GYvV2OUwD/M6AJVekdoPXaBrKyhnXtwrvBzsDPKzA1JM2Wn90lqS60BNzv9zH1MozczMCdi34krW9Hb8rcc6KaOz7EDvHBpyJG3whpi4ljPnLxHMs14XV10rPws0PNGY= 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=iFwnDgVD; arc=none smtp.client-ip=209.85.208.181 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="iFwnDgVD" Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2e52181c228so9843451fa.0 for ; Fri, 10 May 2024 07:19:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1715350758; x=1715955558; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ygxOQC15SUv3c6gwY3JPpSRcLSnmMYCDwnNrBTw5+2g=; b=iFwnDgVDMpE5HBR8sOAoQ76o7hp7BSvjOms/HGF2HJnJvHhi5AOLEqSKQYxUNbsfnJ C3iCuFyKktF45RLOTC7odHlEdBKuNc6pGYjU8El7Z6h901A9gTgeizRp+MdzVZ9Jk+BG j1UsYkuCuh7rvr9TxvV+N3AkpW5A736Y/LQq4nS6TwiNawXQ/N2/+KOU7o39ibEWpaM+ BHplazxLWcyPuZC7Ty6nhrBF1iFaP7J0KrR1NM56PduTxJLc0H0MoRhFnn4A0LsagJc9 zs8wQg6W0xnO+8mU66pcY22KHVZbZxr4SePjJiHCYXZdH8X6t76gKvCpJNzfdY2PHp7v 08lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715350758; x=1715955558; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ygxOQC15SUv3c6gwY3JPpSRcLSnmMYCDwnNrBTw5+2g=; b=V4GONhohql9+mh1XFuDoP58E7uQPzoJdCgUL96PXl/LhovsEpVVO6pDdUqy/Rp7vhq jnQlqn8w57HdWD1CkWOUqnEWk5Lv2iS90p9aYvePRthOWL6hY5PzjAohUEE/QEauRw3J 4oELfJR6lCIwJSgN4XjbwHYsZlayFmoM9pvy9cbHUjVwbpbPxwfaN1S97texx/k5mKdD VmhUDJjzVKcJVoODF0dDEiulsLCfDvjtn9FP7tw8s6KguRlS7Sm4Dqz4yk79YClHVDJJ Hx74YQpL7s7w0EJRhs/AS/nLFQRjntJDUiKDMzipyF0jj2+29z1QfHB+r4FJKiewe9y+ aGwA== X-Forwarded-Encrypted: i=1; AJvYcCXsDb0YVr7m7cDKjS6JKdWHxGrcD4CthR990Fh07pxh1nsUo4j3t1K8DRifI5UFL0eQVYcxT++kKXT+nE8F7k/NjuEEnnucpqVv X-Gm-Message-State: AOJu0YwQPJMc4GwuldBB/qKz5HgpNi6Y+vxKKzj4W+buWT2z69i51hIP nO7B9yb0PCLwKZzW2CN8ROc1gns3QnFBlAhE8CWBX2XfXJZbg1a5ty3SkPkURfs= X-Google-Smtp-Source: AGHT+IFaPZglaNJ8HKYesz9qBPTuNdjcWZFbOKI1g7KqEHhS5dnFETMdXxI9xWKnlCo8gdgjLKGLtw== X-Received: by 2002:a2e:b16e:0:b0:2e2:1e87:bbc7 with SMTP id 38308e7fff4ca-2e51fe53fbcmr17337851fa.18.1715350758289; Fri, 10 May 2024 07:19:18 -0700 (PDT) Received: from localhost.localdomain (host-79-47-39-74.retail.telecomitalia.it. [79.47.39.74]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41fd97e842csm56111875e9.24.2024.05.10.07.19.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 07:19:17 -0700 (PDT) From: Angelo Dureghello X-Google-Original-From: Angelo Dureghello To: jic23@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: nuno.sa@analog.com, lars@metafoo.de, Michael.Hennerich@analog.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Angelo Dureghello Subject: [PATCH 3/3] dt-bindings: iio: dac: fix ad3552r gain parameter names Date: Fri, 10 May 2024 16:18:36 +0200 Message-ID: <20240510141836.1624009-3-adureghello@baylibre.org> X-Mailer: git-send-email 2.45.0.rc1 In-Reply-To: <20240510141836.1624009-1-adureghello@baylibre.org> References: <20240510141836.1624009-1-adureghello@baylibre.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Angelo Dureghello The adi,gain-scaling-p/n values are an inverted log2, so initial naiming was set correct, but the driver uses just adi,gain-scaling-p/n, so uniforming documentation, that seems a less-risk fix for future rebases, and still conformant to datasheet. Signed-off-by: Angelo Dureghello --- .../devicetree/bindings/iio/dac/adi,ad3552r.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad3552r.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad3552r.yaml index 17442cdfbe27..9e3dbf890bfa 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad3552r.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad3552r.yaml @@ -94,13 +94,13 @@ patternProperties: maximum: 511 minimum: -511 - adi,gain-scaling-p-inv-log2: - description: GainP = 1 / ( 2 ^ adi,gain-scaling-p-inv-log2) + adi,gain-scaling-p: + description: GainP = 1 / ( 2 ^ adi,gain-scaling-p) $ref: /schemas/types.yaml#/definitions/uint32 enum: [0, 1, 2, 3] - adi,gain-scaling-n-inv-log2: - description: GainN = 1 / ( 2 ^ adi,gain-scaling-n-inv-log2) + adi,gain-scaling-n: + description: GainN = 1 / ( 2 ^ adi,gain-scaling-n) $ref: /schemas/types.yaml#/definitions/uint32 enum: [0, 1, 2, 3] @@ -109,8 +109,8 @@ patternProperties: required: - adi,gain-offset - - adi,gain-scaling-p-inv-log2 - - adi,gain-scaling-n-inv-log2 + - adi,gain-scaling-p + - adi,gain-scaling-n - adi,rfb-ohms required: @@ -214,8 +214,8 @@ examples: reg = <1>; custom-output-range-config { adi,gain-offset = <5>; - adi,gain-scaling-p-inv-log2 = <1>; - adi,gain-scaling-n-inv-log2 = <2>; + adi,gain-scaling-p = <1>; + adi,gain-scaling-n = <2>; adi,rfb-ohms = <1>; }; };