From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
patches@lists.linux.dev,
Angelo Dureghello <adureghello@baylibre.com>,
David Lechner <dlechner@baylibre.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.12 196/218] iio: dac: ad3552r: extract common code (no changes in behavior intended)
Date: Thu, 3 Jul 2025 16:42:24 +0200 [thread overview]
Message-ID: <20250703144004.046235077@linuxfoundation.org> (raw)
In-Reply-To: <20250703143955.956569535@linuxfoundation.org>
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Angelo Dureghello <adureghello@baylibre.com>
[ Upstream commit f665d7d33d7909cf51e2db0f0767ecab0295c0bd ]
Extracting common code, to share common code to be used later
by the AXI driver version (ad3552r-axi.c).
Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20241028-wip-bl-ad3552r-axi-v0-iio-testing-v9-6-f6960b4f9719@kernel-space.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iio/dac/Makefile | 2 +-
drivers/iio/dac/ad3552r-common.c | 249 +++++++++++++++++++
drivers/iio/dac/ad3552r.c | 398 +++----------------------------
drivers/iio/dac/ad3552r.h | 224 +++++++++++++++++
4 files changed, 501 insertions(+), 372 deletions(-)
create mode 100644 drivers/iio/dac/ad3552r-common.c
create mode 100644 drivers/iio/dac/ad3552r.h
diff --git a/drivers/iio/dac/Makefile b/drivers/iio/dac/Makefile
index 2cf148f16306d..56a125f56284f 100644
--- a/drivers/iio/dac/Makefile
+++ b/drivers/iio/dac/Makefile
@@ -4,7 +4,7 @@
#
# When adding new entries keep the list in alphabetical order
-obj-$(CONFIG_AD3552R) += ad3552r.o
+obj-$(CONFIG_AD3552R) += ad3552r.o ad3552r-common.o
obj-$(CONFIG_AD5360) += ad5360.o
obj-$(CONFIG_AD5380) += ad5380.o
obj-$(CONFIG_AD5421) += ad5421.o
diff --git a/drivers/iio/dac/ad3552r-common.c b/drivers/iio/dac/ad3552r-common.c
new file mode 100644
index 0000000000000..2dfeca3656d21
--- /dev/null
+++ b/drivers/iio/dac/ad3552r-common.c
@@ -0,0 +1,249 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// Copyright (c) 2010-2024 Analog Devices Inc.
+// Copyright (c) 2024 Baylibre, SAS
+
+#include <linux/bitfield.h>
+#include <linux/device.h>
+#include <linux/module.h>
+#include <linux/property.h>
+#include <linux/regulator/consumer.h>
+
+#include "ad3552r.h"
+
+const s32 ad3552r_ch_ranges[AD3552R_MAX_RANGES][2] = {
+ [AD3552R_CH_OUTPUT_RANGE_0__2P5V] = { 0, 2500 },
+ [AD3552R_CH_OUTPUT_RANGE_0__5V] = { 0, 5000 },
+ [AD3552R_CH_OUTPUT_RANGE_0__10V] = { 0, 10000 },
+ [AD3552R_CH_OUTPUT_RANGE_NEG_5__5V] = { -5000, 5000 },
+ [AD3552R_CH_OUTPUT_RANGE_NEG_10__10V] = { -10000, 10000 }
+};
+EXPORT_SYMBOL_NS_GPL(ad3552r_ch_ranges, IIO_AD3552R);
+
+const s32 ad3542r_ch_ranges[AD3542R_MAX_RANGES][2] = {
+ [AD3542R_CH_OUTPUT_RANGE_0__2P5V] = { 0, 2500 },
+ [AD3542R_CH_OUTPUT_RANGE_0__3V] = { 0, 3000 },
+ [AD3542R_CH_OUTPUT_RANGE_0__5V] = { 0, 5000 },
+ [AD3542R_CH_OUTPUT_RANGE_0__10V] = { 0, 10000 },
+ [AD3542R_CH_OUTPUT_RANGE_NEG_2P5__7P5V] = { -2500, 7500 },
+ [AD3542R_CH_OUTPUT_RANGE_NEG_5__5V] = { -5000, 5000 }
+};
+EXPORT_SYMBOL_NS_GPL(ad3542r_ch_ranges, IIO_AD3552R);
+
+/* Gain * AD3552R_GAIN_SCALE */
+static const s32 gains_scaling_table[] = {
+ [AD3552R_CH_GAIN_SCALING_1] = 1000,
+ [AD3552R_CH_GAIN_SCALING_0_5] = 500,
+ [AD3552R_CH_GAIN_SCALING_0_25] = 250,
+ [AD3552R_CH_GAIN_SCALING_0_125] = 125
+};
+
+u16 ad3552r_calc_custom_gain(u8 p, u8 n, s16 goffs)
+{
+ return FIELD_PREP(AD3552R_MASK_CH_RANGE_OVERRIDE, 1) |
+ FIELD_PREP(AD3552R_MASK_CH_GAIN_SCALING_P, p) |
+ FIELD_PREP(AD3552R_MASK_CH_GAIN_SCALING_N, n) |
+ FIELD_PREP(AD3552R_MASK_CH_OFFSET_BIT_8, abs(goffs)) |
+ FIELD_PREP(AD3552R_MASK_CH_OFFSET_POLARITY, goffs < 0);
+}
+EXPORT_SYMBOL_NS_GPL(ad3552r_calc_custom_gain, IIO_AD3552R);
+
+static void ad3552r_get_custom_range(struct ad3552r_ch_data *ch_data,
+ s32 *v_min, s32 *v_max)
+{
+ s64 vref, tmp, common, offset, gn, gp;
+ /*
+ * From datasheet formula (In Volts):
+ * Vmin = 2.5 + [(GainN + Offset / 1024) * 2.5 * Rfb * 1.03]
+ * Vmax = 2.5 - [(GainP + Offset / 1024) * 2.5 * Rfb * 1.03]
+ * Calculus are converted to milivolts
+ */
+ vref = 2500;
+ /* 2.5 * 1.03 * 1000 (To mV) */
+ common = 2575 * ch_data->rfb;
+ offset = ch_data->gain_offset;
+
+ gn = gains_scaling_table[ch_data->n];
+ tmp = (1024 * gn + AD3552R_GAIN_SCALE * offset) * common;
+ tmp = div_s64(tmp, 1024 * AD3552R_GAIN_SCALE);
+ *v_max = vref + tmp;
+
+ gp = gains_scaling_table[ch_data->p];
+ tmp = (1024 * gp - AD3552R_GAIN_SCALE * offset) * common;
+ tmp = div_s64(tmp, 1024 * AD3552R_GAIN_SCALE);
+ *v_min = vref - tmp;
+}
+
+void ad3552r_calc_gain_and_offset(struct ad3552r_ch_data *ch_data,
+ const struct ad3552r_model_data *model_data)
+{
+ s32 idx, v_max, v_min, span, rem;
+ s64 tmp;
+
+ if (ch_data->range_override) {
+ ad3552r_get_custom_range(ch_data, &v_min, &v_max);
+ } else {
+ /* Normal range */
+ idx = ch_data->range;
+ v_min = model_data->ranges_table[idx][0];
+ v_max = model_data->ranges_table[idx][1];
+ }
+
+ /*
+ * From datasheet formula:
+ * Vout = Span * (D / 65536) + Vmin
+ * Converted to scale and offset:
+ * Scale = Span / 65536
+ * Offset = 65536 * Vmin / Span
+ *
+ * Reminders are in micros in order to be printed as
+ * IIO_VAL_INT_PLUS_MICRO
+ */
+ span = v_max - v_min;
+ ch_data->scale_int = div_s64_rem(span, 65536, &rem);
+ /* Do operations in microvolts */
+ ch_data->scale_dec = DIV_ROUND_CLOSEST((s64)rem * 1000000, 65536);
+
+ ch_data->offset_int = div_s64_rem(v_min * 65536, span, &rem);
+ tmp = (s64)rem * 1000000;
+ ch_data->offset_dec = div_s64(tmp, span);
+}
+EXPORT_SYMBOL_NS_GPL(ad3552r_calc_gain_and_offset, IIO_AD3552R);
+
+int ad3552r_get_ref_voltage(struct device *dev, u32 *val)
+{
+ int voltage;
+ int delta = 100000;
+
+ voltage = devm_regulator_get_enable_read_voltage(dev, "vref");
+ if (voltage < 0 && voltage != -ENODEV)
+ return dev_err_probe(dev, voltage,
+ "Error getting vref voltage\n");
+
+ if (voltage == -ENODEV) {
+ if (device_property_read_bool(dev, "adi,vref-out-en"))
+ *val = AD3552R_INTERNAL_VREF_PIN_2P5V;
+ else
+ *val = AD3552R_INTERNAL_VREF_PIN_FLOATING;
+
+ return 0;
+ }
+
+ if (voltage > 2500000 + delta || voltage < 2500000 - delta) {
+ dev_warn(dev, "vref-supply must be 2.5V");
+ return -EINVAL;
+ }
+
+ *val = AD3552R_EXTERNAL_VREF_PIN_INPUT;
+
+ return 0;
+}
+EXPORT_SYMBOL_NS_GPL(ad3552r_get_ref_voltage, IIO_AD3552R);
+
+int ad3552r_get_drive_strength(struct device *dev, u32 *val)
+{
+ int err;
+ u32 drive_strength;
+
+ err = device_property_read_u32(dev, "adi,sdo-drive-strength",
+ &drive_strength);
+ if (err)
+ return err;
+
+ if (drive_strength > 3) {
+ dev_err_probe(dev, -EINVAL,
+ "adi,sdo-drive-strength must be less than 4\n");
+ return -EINVAL;
+ }
+
+ *val = drive_strength;
+
+ return 0;
+}
+EXPORT_SYMBOL_NS_GPL(ad3552r_get_drive_strength, IIO_AD3552R);
+
+int ad3552r_get_custom_gain(struct device *dev, struct fwnode_handle *child,
+ u8 *gs_p, u8 *gs_n, u16 *rfb, s16 *goffs)
+{
+ int err;
+ u32 val;
+ struct fwnode_handle *gain_child __free(fwnode_handle) =
+ fwnode_get_named_child_node(child,
+ "custom-output-range-config");
+
+ if (!gain_child)
+ return dev_err_probe(dev, -EINVAL,
+ "custom-output-range-config mandatory\n");
+
+ err = fwnode_property_read_u32(gain_child, "adi,gain-scaling-p", &val);
+ if (err)
+ return dev_err_probe(dev, err,
+ "adi,gain-scaling-p mandatory\n");
+ *gs_p = val;
+
+ err = fwnode_property_read_u32(gain_child, "adi,gain-scaling-n", &val);
+ if (err)
+ return dev_err_probe(dev, err,
+ "adi,gain-scaling-n property mandatory\n");
+ *gs_n = val;
+
+ err = fwnode_property_read_u32(gain_child, "adi,rfb-ohms", &val);
+ if (err)
+ return dev_err_probe(dev, err,
+ "adi,rfb-ohms mandatory\n");
+ *rfb = val;
+
+ err = fwnode_property_read_u32(gain_child, "adi,gain-offset", &val);
+ if (err)
+ return dev_err_probe(dev, err,
+ "adi,gain-offset mandatory\n");
+ *goffs = val;
+
+ return 0;
+}
+EXPORT_SYMBOL_NS_GPL(ad3552r_get_custom_gain, IIO_AD3552R);
+
+static int ad3552r_find_range(const struct ad3552r_model_data *model_info,
+ s32 *vals)
+{
+ int i;
+
+ for (i = 0; i < model_info->num_ranges; i++)
+ if (vals[0] == model_info->ranges_table[i][0] * 1000 &&
+ vals[1] == model_info->ranges_table[i][1] * 1000)
+ return i;
+
+ return -EINVAL;
+}
+
+int ad3552r_get_output_range(struct device *dev,
+ const struct ad3552r_model_data *model_info,
+ struct fwnode_handle *child, u32 *val)
+{
+ int ret;
+ s32 vals[2];
+
+ /* This property is optional, so returning -ENOENT if missing */
+ if (!fwnode_property_present(child, "adi,output-range-microvolt"))
+ return -ENOENT;
+
+ ret = fwnode_property_read_u32_array(child,
+ "adi,output-range-microvolt",
+ vals, 2);
+ if (ret)
+ return dev_err_probe(dev, ret,
+ "invalid adi,output-range-microvolt\n");
+
+ ret = ad3552r_find_range(model_info, vals);
+ if (ret < 0)
+ return dev_err_probe(dev, ret,
+ "invalid adi,output-range-microvolt value\n");
+
+ *val = ret;
+
+ return 0;
+}
+EXPORT_SYMBOL_NS_GPL(ad3552r_get_output_range, IIO_AD3552R);
+
+MODULE_DESCRIPTION("ad3552r common functions");
+MODULE_LICENSE("GPL");
diff --git a/drivers/iio/dac/ad3552r.c b/drivers/iio/dac/ad3552r.c
index aa453d3de5e1c..5b2ce2aa67a47 100644
--- a/drivers/iio/dac/ad3552r.c
+++ b/drivers/iio/dac/ad3552r.c
@@ -12,226 +12,9 @@
#include <linux/iio/trigger_consumer.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
-#include <linux/regulator/consumer.h>
#include <linux/spi/spi.h>
-/* Register addresses */
-/* Primary address space */
-#define AD3552R_REG_ADDR_INTERFACE_CONFIG_A 0x00
-#define AD3552R_MASK_SOFTWARE_RESET (BIT(7) | BIT(0))
-#define AD3552R_MASK_ADDR_ASCENSION BIT(5)
-#define AD3552R_MASK_SDO_ACTIVE BIT(4)
-#define AD3552R_REG_ADDR_INTERFACE_CONFIG_B 0x01
-#define AD3552R_MASK_SINGLE_INST BIT(7)
-#define AD3552R_MASK_SHORT_INSTRUCTION BIT(3)
-#define AD3552R_REG_ADDR_DEVICE_CONFIG 0x02
-#define AD3552R_MASK_DEVICE_STATUS(n) BIT(4 + (n))
-#define AD3552R_MASK_CUSTOM_MODES GENMASK(3, 2)
-#define AD3552R_MASK_OPERATING_MODES GENMASK(1, 0)
-#define AD3552R_REG_ADDR_CHIP_TYPE 0x03
-#define AD3552R_MASK_CLASS GENMASK(7, 0)
-#define AD3552R_REG_ADDR_PRODUCT_ID_L 0x04
-#define AD3552R_REG_ADDR_PRODUCT_ID_H 0x05
-#define AD3552R_REG_ADDR_CHIP_GRADE 0x06
-#define AD3552R_MASK_GRADE GENMASK(7, 4)
-#define AD3552R_MASK_DEVICE_REVISION GENMASK(3, 0)
-#define AD3552R_REG_ADDR_SCRATCH_PAD 0x0A
-#define AD3552R_REG_ADDR_SPI_REVISION 0x0B
-#define AD3552R_REG_ADDR_VENDOR_L 0x0C
-#define AD3552R_REG_ADDR_VENDOR_H 0x0D
-#define AD3552R_REG_ADDR_STREAM_MODE 0x0E
-#define AD3552R_MASK_LENGTH GENMASK(7, 0)
-#define AD3552R_REG_ADDR_TRANSFER_REGISTER 0x0F
-#define AD3552R_MASK_MULTI_IO_MODE GENMASK(7, 6)
-#define AD3552R_MASK_STREAM_LENGTH_KEEP_VALUE BIT(2)
-#define AD3552R_REG_ADDR_INTERFACE_CONFIG_C 0x10
-#define AD3552R_MASK_CRC_ENABLE (GENMASK(7, 6) |\
- GENMASK(1, 0))
-#define AD3552R_MASK_STRICT_REGISTER_ACCESS BIT(5)
-#define AD3552R_REG_ADDR_INTERFACE_STATUS_A 0x11
-#define AD3552R_MASK_INTERFACE_NOT_READY BIT(7)
-#define AD3552R_MASK_CLOCK_COUNTING_ERROR BIT(5)
-#define AD3552R_MASK_INVALID_OR_NO_CRC BIT(3)
-#define AD3552R_MASK_WRITE_TO_READ_ONLY_REGISTER BIT(2)
-#define AD3552R_MASK_PARTIAL_REGISTER_ACCESS BIT(1)
-#define AD3552R_MASK_REGISTER_ADDRESS_INVALID BIT(0)
-#define AD3552R_REG_ADDR_INTERFACE_CONFIG_D 0x14
-#define AD3552R_MASK_ALERT_ENABLE_PULLUP BIT(6)
-#define AD3552R_MASK_MEM_CRC_EN BIT(4)
-#define AD3552R_MASK_SDO_DRIVE_STRENGTH GENMASK(3, 2)
-#define AD3552R_MASK_DUAL_SPI_SYNCHROUNOUS_EN BIT(1)
-#define AD3552R_MASK_SPI_CONFIG_DDR BIT(0)
-#define AD3552R_REG_ADDR_SH_REFERENCE_CONFIG 0x15
-#define AD3552R_MASK_IDUMP_FAST_MODE BIT(6)
-#define AD3552R_MASK_SAMPLE_HOLD_DIFFERENTIAL_USER_EN BIT(5)
-#define AD3552R_MASK_SAMPLE_HOLD_USER_TRIM GENMASK(4, 3)
-#define AD3552R_MASK_SAMPLE_HOLD_USER_ENABLE BIT(2)
-#define AD3552R_MASK_REFERENCE_VOLTAGE_SEL GENMASK(1, 0)
-#define AD3552R_REG_ADDR_ERR_ALARM_MASK 0x16
-#define AD3552R_MASK_REF_RANGE_ALARM BIT(6)
-#define AD3552R_MASK_CLOCK_COUNT_ERR_ALARM BIT(5)
-#define AD3552R_MASK_MEM_CRC_ERR_ALARM BIT(4)
-#define AD3552R_MASK_SPI_CRC_ERR_ALARM BIT(3)
-#define AD3552R_MASK_WRITE_TO_READ_ONLY_ALARM BIT(2)
-#define AD3552R_MASK_PARTIAL_REGISTER_ACCESS_ALARM BIT(1)
-#define AD3552R_MASK_REGISTER_ADDRESS_INVALID_ALARM BIT(0)
-#define AD3552R_REG_ADDR_ERR_STATUS 0x17
-#define AD3552R_MASK_REF_RANGE_ERR_STATUS BIT(6)
-#define AD3552R_MASK_DUAL_SPI_STREAM_EXCEEDS_DAC_ERR_STATUS BIT(5)
-#define AD3552R_MASK_MEM_CRC_ERR_STATUS BIT(4)
-#define AD3552R_MASK_RESET_STATUS BIT(0)
-#define AD3552R_REG_ADDR_POWERDOWN_CONFIG 0x18
-#define AD3552R_MASK_CH_DAC_POWERDOWN(ch) BIT(4 + (ch))
-#define AD3552R_MASK_CH_AMPLIFIER_POWERDOWN(ch) BIT(ch)
-#define AD3552R_REG_ADDR_CH0_CH1_OUTPUT_RANGE 0x19
-#define AD3552R_MASK_CH_OUTPUT_RANGE_SEL(ch) ((ch) ? GENMASK(7, 4) :\
- GENMASK(3, 0))
-#define AD3552R_REG_ADDR_CH_OFFSET(ch) (0x1B + (ch) * 2)
-#define AD3552R_MASK_CH_OFFSET_BITS_0_7 GENMASK(7, 0)
-#define AD3552R_REG_ADDR_CH_GAIN(ch) (0x1C + (ch) * 2)
-#define AD3552R_MASK_CH_RANGE_OVERRIDE BIT(7)
-#define AD3552R_MASK_CH_GAIN_SCALING_N GENMASK(6, 5)
-#define AD3552R_MASK_CH_GAIN_SCALING_P GENMASK(4, 3)
-#define AD3552R_MASK_CH_OFFSET_POLARITY BIT(2)
-#define AD3552R_MASK_CH_OFFSET_BIT_8 BIT(0)
-/*
- * Secondary region
- * For multibyte registers specify the highest address because the access is
- * done in descending order
- */
-#define AD3552R_SECONDARY_REGION_START 0x28
-#define AD3552R_REG_ADDR_HW_LDAC_16B 0x28
-#define AD3552R_REG_ADDR_CH_DAC_16B(ch) (0x2C - (1 - ch) * 2)
-#define AD3552R_REG_ADDR_DAC_PAGE_MASK_16B 0x2E
-#define AD3552R_REG_ADDR_CH_SELECT_16B 0x2F
-#define AD3552R_REG_ADDR_INPUT_PAGE_MASK_16B 0x31
-#define AD3552R_REG_ADDR_SW_LDAC_16B 0x32
-#define AD3552R_REG_ADDR_CH_INPUT_16B(ch) (0x36 - (1 - ch) * 2)
-/* 3 bytes registers */
-#define AD3552R_REG_START_24B 0x37
-#define AD3552R_REG_ADDR_HW_LDAC_24B 0x37
-#define AD3552R_REG_ADDR_CH_DAC_24B(ch) (0x3D - (1 - ch) * 3)
-#define AD3552R_REG_ADDR_DAC_PAGE_MASK_24B 0x40
-#define AD3552R_REG_ADDR_CH_SELECT_24B 0x41
-#define AD3552R_REG_ADDR_INPUT_PAGE_MASK_24B 0x44
-#define AD3552R_REG_ADDR_SW_LDAC_24B 0x45
-#define AD3552R_REG_ADDR_CH_INPUT_24B(ch) (0x4B - (1 - ch) * 3)
-
-/* Useful defines */
-#define AD3552R_MAX_CH 2
-#define AD3552R_MASK_CH(ch) BIT(ch)
-#define AD3552R_MASK_ALL_CH GENMASK(1, 0)
-#define AD3552R_MAX_REG_SIZE 3
-#define AD3552R_READ_BIT BIT(7)
-#define AD3552R_ADDR_MASK GENMASK(6, 0)
-#define AD3552R_MASK_DAC_12B 0xFFF0
-#define AD3552R_DEFAULT_CONFIG_B_VALUE 0x8
-#define AD3552R_SCRATCH_PAD_TEST_VAL1 0x34
-#define AD3552R_SCRATCH_PAD_TEST_VAL2 0xB2
-#define AD3552R_GAIN_SCALE 1000
-#define AD3552R_LDAC_PULSE_US 100
-
-enum ad3552r_ch_vref_select {
- /* Internal source with Vref I/O floating */
- AD3552R_INTERNAL_VREF_PIN_FLOATING,
- /* Internal source with Vref I/O at 2.5V */
- AD3552R_INTERNAL_VREF_PIN_2P5V,
- /* External source with Vref I/O as input */
- AD3552R_EXTERNAL_VREF_PIN_INPUT
-};
-
-enum ad3552r_id {
- AD3541R_ID = 0x400b,
- AD3542R_ID = 0x4009,
- AD3551R_ID = 0x400a,
- AD3552R_ID = 0x4008,
-};
-
-enum ad3552r_ch_output_range {
- /* Range from 0 V to 2.5 V. Requires Rfb1x connection */
- AD3552R_CH_OUTPUT_RANGE_0__2P5V,
- /* Range from 0 V to 5 V. Requires Rfb1x connection */
- AD3552R_CH_OUTPUT_RANGE_0__5V,
- /* Range from 0 V to 10 V. Requires Rfb2x connection */
- AD3552R_CH_OUTPUT_RANGE_0__10V,
- /* Range from -5 V to 5 V. Requires Rfb2x connection */
- AD3552R_CH_OUTPUT_RANGE_NEG_5__5V,
- /* Range from -10 V to 10 V. Requires Rfb4x connection */
- AD3552R_CH_OUTPUT_RANGE_NEG_10__10V,
-};
-
-static const s32 ad3552r_ch_ranges[][2] = {
- [AD3552R_CH_OUTPUT_RANGE_0__2P5V] = {0, 2500},
- [AD3552R_CH_OUTPUT_RANGE_0__5V] = {0, 5000},
- [AD3552R_CH_OUTPUT_RANGE_0__10V] = {0, 10000},
- [AD3552R_CH_OUTPUT_RANGE_NEG_5__5V] = {-5000, 5000},
- [AD3552R_CH_OUTPUT_RANGE_NEG_10__10V] = {-10000, 10000}
-};
-
-enum ad3542r_ch_output_range {
- /* Range from 0 V to 2.5 V. Requires Rfb1x connection */
- AD3542R_CH_OUTPUT_RANGE_0__2P5V,
- /* Range from 0 V to 3 V. Requires Rfb1x connection */
- AD3542R_CH_OUTPUT_RANGE_0__3V,
- /* Range from 0 V to 5 V. Requires Rfb1x connection */
- AD3542R_CH_OUTPUT_RANGE_0__5V,
- /* Range from 0 V to 10 V. Requires Rfb2x connection */
- AD3542R_CH_OUTPUT_RANGE_0__10V,
- /* Range from -2.5 V to 7.5 V. Requires Rfb2x connection */
- AD3542R_CH_OUTPUT_RANGE_NEG_2P5__7P5V,
- /* Range from -5 V to 5 V. Requires Rfb2x connection */
- AD3542R_CH_OUTPUT_RANGE_NEG_5__5V,
-};
-
-static const s32 ad3542r_ch_ranges[][2] = {
- [AD3542R_CH_OUTPUT_RANGE_0__2P5V] = {0, 2500},
- [AD3542R_CH_OUTPUT_RANGE_0__3V] = {0, 3000},
- [AD3542R_CH_OUTPUT_RANGE_0__5V] = {0, 5000},
- [AD3542R_CH_OUTPUT_RANGE_0__10V] = {0, 10000},
- [AD3542R_CH_OUTPUT_RANGE_NEG_2P5__7P5V] = {-2500, 7500},
- [AD3542R_CH_OUTPUT_RANGE_NEG_5__5V] = {-5000, 5000}
-};
-
-enum ad3552r_ch_gain_scaling {
- /* Gain scaling of 1 */
- AD3552R_CH_GAIN_SCALING_1,
- /* Gain scaling of 0.5 */
- AD3552R_CH_GAIN_SCALING_0_5,
- /* Gain scaling of 0.25 */
- AD3552R_CH_GAIN_SCALING_0_25,
- /* Gain scaling of 0.125 */
- AD3552R_CH_GAIN_SCALING_0_125,
-};
-
-/* Gain * AD3552R_GAIN_SCALE */
-static const s32 gains_scaling_table[] = {
- [AD3552R_CH_GAIN_SCALING_1] = 1000,
- [AD3552R_CH_GAIN_SCALING_0_5] = 500,
- [AD3552R_CH_GAIN_SCALING_0_25] = 250,
- [AD3552R_CH_GAIN_SCALING_0_125] = 125
-};
-
-struct ad3552r_ch_data {
- s32 scale_int;
- s32 scale_dec;
- s32 offset_int;
- s32 offset_dec;
- s16 gain_offset;
- u16 rfb;
- u8 n;
- u8 p;
- u8 range;
- bool range_override;
-};
-
-struct ad3552r_model_data {
- const char *model_name;
- enum ad3552r_id chip_id;
- unsigned int num_hw_channels;
- const s32 (*ranges_table)[2];
- int num_ranges;
- bool requires_output_range;
-};
+#include "ad3552r.h"
struct ad3552r_desc {
const struct ad3552r_model_data *model_data;
@@ -639,136 +422,35 @@ static int ad3552r_reset(struct ad3552r_desc *dac)
FIELD_PREP(AD3552R_MASK_ADDR_ASCENSION, val));
}
-static void ad3552r_get_custom_range(struct ad3552r_desc *dac, s32 i, s32 *v_min,
- s32 *v_max)
-{
- s64 vref, tmp, common, offset, gn, gp;
- /*
- * From datasheet formula (In Volts):
- * Vmin = 2.5 + [(GainN + Offset / 1024) * 2.5 * Rfb * 1.03]
- * Vmax = 2.5 - [(GainP + Offset / 1024) * 2.5 * Rfb * 1.03]
- * Calculus are converted to milivolts
- */
- vref = 2500;
- /* 2.5 * 1.03 * 1000 (To mV) */
- common = 2575 * dac->ch_data[i].rfb;
- offset = dac->ch_data[i].gain_offset;
-
- gn = gains_scaling_table[dac->ch_data[i].n];
- tmp = (1024 * gn + AD3552R_GAIN_SCALE * offset) * common;
- tmp = div_s64(tmp, 1024 * AD3552R_GAIN_SCALE);
- *v_max = vref + tmp;
-
- gp = gains_scaling_table[dac->ch_data[i].p];
- tmp = (1024 * gp - AD3552R_GAIN_SCALE * offset) * common;
- tmp = div_s64(tmp, 1024 * AD3552R_GAIN_SCALE);
- *v_min = vref - tmp;
-}
-
-static void ad3552r_calc_gain_and_offset(struct ad3552r_desc *dac, s32 ch)
-{
- s32 idx, v_max, v_min, span, rem;
- s64 tmp;
-
- if (dac->ch_data[ch].range_override) {
- ad3552r_get_custom_range(dac, ch, &v_min, &v_max);
- } else {
- /* Normal range */
- idx = dac->ch_data[ch].range;
- v_min = dac->model_data->ranges_table[idx][0];
- v_max = dac->model_data->ranges_table[idx][1];
- }
-
- /*
- * From datasheet formula:
- * Vout = Span * (D / 65536) + Vmin
- * Converted to scale and offset:
- * Scale = Span / 65536
- * Offset = 65536 * Vmin / Span
- *
- * Reminders are in micros in order to be printed as
- * IIO_VAL_INT_PLUS_MICRO
- */
- span = v_max - v_min;
- dac->ch_data[ch].scale_int = div_s64_rem(span, 65536, &rem);
- /* Do operations in microvolts */
- dac->ch_data[ch].scale_dec = DIV_ROUND_CLOSEST((s64)rem * 1000000,
- 65536);
-
- dac->ch_data[ch].offset_int = div_s64_rem(v_min * 65536, span, &rem);
- tmp = (s64)rem * 1000000;
- dac->ch_data[ch].offset_dec = div_s64(tmp, span);
-}
-
-static int ad3552r_find_range(const struct ad3552r_model_data *model_data,
- s32 *vals)
-{
- int i;
-
- for (i = 0; i < model_data->num_ranges; i++)
- if (vals[0] == model_data->ranges_table[i][0] * 1000 &&
- vals[1] == model_data->ranges_table[i][1] * 1000)
- return i;
-
- return -EINVAL;
-}
-
static int ad3552r_configure_custom_gain(struct ad3552r_desc *dac,
struct fwnode_handle *child,
u32 ch)
{
struct device *dev = &dac->spi->dev;
- u32 val;
int err;
u8 addr;
- u16 reg = 0, offset;
-
- struct fwnode_handle *gain_child __free(fwnode_handle)
- = fwnode_get_named_child_node(child,
- "custom-output-range-config");
- if (!gain_child)
- return dev_err_probe(dev, -EINVAL,
- "mandatory custom-output-range-config property missing\n");
-
- dac->ch_data[ch].range_override = 1;
- reg |= FIELD_PREP(AD3552R_MASK_CH_RANGE_OVERRIDE, 1);
-
- err = fwnode_property_read_u32(gain_child, "adi,gain-scaling-p", &val);
- if (err)
- return dev_err_probe(dev, err,
- "mandatory adi,gain-scaling-p property missing\n");
- reg |= FIELD_PREP(AD3552R_MASK_CH_GAIN_SCALING_P, val);
- dac->ch_data[ch].p = val;
-
- err = fwnode_property_read_u32(gain_child, "adi,gain-scaling-n", &val);
- if (err)
- return dev_err_probe(dev, err,
- "mandatory adi,gain-scaling-n property missing\n");
- reg |= FIELD_PREP(AD3552R_MASK_CH_GAIN_SCALING_N, val);
- dac->ch_data[ch].n = val;
-
- err = fwnode_property_read_u32(gain_child, "adi,rfb-ohms", &val);
- if (err)
- return dev_err_probe(dev, err,
- "mandatory adi,rfb-ohms property missing\n");
- dac->ch_data[ch].rfb = val;
+ u16 reg;
- err = fwnode_property_read_u32(gain_child, "adi,gain-offset", &val);
+ err = ad3552r_get_custom_gain(dev, child,
+ &dac->ch_data[ch].p,
+ &dac->ch_data[ch].n,
+ &dac->ch_data[ch].rfb,
+ &dac->ch_data[ch].gain_offset);
if (err)
- return dev_err_probe(dev, err,
- "mandatory adi,gain-offset property missing\n");
- dac->ch_data[ch].gain_offset = val;
+ return err;
- offset = abs((s32)val);
- reg |= FIELD_PREP(AD3552R_MASK_CH_OFFSET_BIT_8, (offset >> 8));
+ dac->ch_data[ch].range_override = 1;
- reg |= FIELD_PREP(AD3552R_MASK_CH_OFFSET_POLARITY, (s32)val < 0);
addr = AD3552R_REG_ADDR_CH_GAIN(ch);
err = ad3552r_write_reg(dac, addr,
- offset & AD3552R_MASK_CH_OFFSET_BITS_0_7);
+ abs((s32)dac->ch_data[ch].gain_offset) &
+ AD3552R_MASK_CH_OFFSET_BITS_0_7);
if (err)
return dev_err_probe(dev, err, "Error writing register\n");
+ reg = ad3552r_calc_custom_gain(dac->ch_data[ch].p, dac->ch_data[ch].n,
+ dac->ch_data[ch].gain_offset);
+
err = ad3552r_write_reg(dac, addr, reg);
if (err)
return dev_err_probe(dev, err, "Error writing register\n");
@@ -779,30 +461,17 @@ static int ad3552r_configure_custom_gain(struct ad3552r_desc *dac,
static int ad3552r_configure_device(struct ad3552r_desc *dac)
{
struct device *dev = &dac->spi->dev;
- int err, cnt = 0, voltage, delta = 100000;
- u32 vals[2], val, ch;
+ int err, cnt = 0;
+ u32 val, ch;
dac->gpio_ldac = devm_gpiod_get_optional(dev, "ldac", GPIOD_OUT_HIGH);
if (IS_ERR(dac->gpio_ldac))
return dev_err_probe(dev, PTR_ERR(dac->gpio_ldac),
"Error getting gpio ldac");
- voltage = devm_regulator_get_enable_read_voltage(dev, "vref");
- if (voltage < 0 && voltage != -ENODEV)
- return dev_err_probe(dev, voltage, "Error getting vref voltage\n");
-
- if (voltage == -ENODEV) {
- if (device_property_read_bool(dev, "adi,vref-out-en"))
- val = AD3552R_INTERNAL_VREF_PIN_2P5V;
- else
- val = AD3552R_INTERNAL_VREF_PIN_FLOATING;
- } else {
- if (voltage > 2500000 + delta || voltage < 2500000 - delta) {
- dev_warn(dev, "vref-supply must be 2.5V");
- return -EINVAL;
- }
- val = AD3552R_EXTERNAL_VREF_PIN_INPUT;
- }
+ err = ad3552r_get_ref_voltage(dev, &val);
+ if (err < 0)
+ return err;
err = ad3552r_update_reg_field(dac,
AD3552R_REG_ADDR_SH_REFERENCE_CONFIG,
@@ -811,13 +480,8 @@ static int ad3552r_configure_device(struct ad3552r_desc *dac)
if (err)
return err;
- err = device_property_read_u32(dev, "adi,sdo-drive-strength", &val);
+ err = ad3552r_get_drive_strength(dev, &val);
if (!err) {
- if (val > 3) {
- dev_err(dev, "adi,sdo-drive-strength must be less than 4\n");
- return -EINVAL;
- }
-
err = ad3552r_update_reg_field(dac,
AD3552R_REG_ADDR_INTERFACE_CONFIG_D,
AD3552R_MASK_SDO_DRIVE_STRENGTH,
@@ -842,21 +506,12 @@ static int ad3552r_configure_device(struct ad3552r_desc *dac)
"reg must be less than %d\n",
dac->model_data->num_hw_channels);
- if (fwnode_property_present(child, "adi,output-range-microvolt")) {
- err = fwnode_property_read_u32_array(child,
- "adi,output-range-microvolt",
- vals,
- 2);
- if (err)
- return dev_err_probe(dev, err,
- "adi,output-range-microvolt property could not be parsed\n");
-
- err = ad3552r_find_range(dac->model_data, vals);
- if (err < 0)
- return dev_err_probe(dev, err,
- "Invalid adi,output-range-microvolt value\n");
+ err = ad3552r_get_output_range(dev, dac->model_data,
+ child, &val);
+ if (err && err != -ENOENT)
+ return err;
- val = err;
+ if (!err) {
if (ch == 0)
val = FIELD_PREP(AD3552R_MASK_CH_OUTPUT_RANGE_SEL(0), val);
else
@@ -880,7 +535,7 @@ static int ad3552r_configure_device(struct ad3552r_desc *dac)
return err;
}
- ad3552r_calc_gain_and_offset(dac, ch);
+ ad3552r_calc_gain_and_offset(&dac->ch_data[ch], dac->model_data);
dac->enabled_ch |= BIT(ch);
if (ch == 0)
@@ -1079,3 +734,4 @@ module_spi_driver(ad3552r_driver);
MODULE_AUTHOR("Mihail Chindris <mihail.chindris@analog.com>");
MODULE_DESCRIPTION("Analog Device AD3552R DAC");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS(IIO_AD3552R);
diff --git a/drivers/iio/dac/ad3552r.h b/drivers/iio/dac/ad3552r.h
new file mode 100644
index 0000000000000..7511e3f1882cb
--- /dev/null
+++ b/drivers/iio/dac/ad3552r.h
@@ -0,0 +1,224 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * AD3552R Digital <-> Analog converters common header
+ *
+ * Copyright 2021-2024 Analog Devices Inc.
+ * Author: Angelo Dureghello <adureghello@baylibre.com>
+ */
+
+#ifndef __DRIVERS_IIO_DAC_AD3552R_H__
+#define __DRIVERS_IIO_DAC_AD3552R_H__
+
+/* Register addresses */
+/* Primary address space */
+#define AD3552R_REG_ADDR_INTERFACE_CONFIG_A 0x00
+#define AD3552R_MASK_SOFTWARE_RESET (BIT(7) | BIT(0))
+#define AD3552R_MASK_ADDR_ASCENSION BIT(5)
+#define AD3552R_MASK_SDO_ACTIVE BIT(4)
+#define AD3552R_REG_ADDR_INTERFACE_CONFIG_B 0x01
+#define AD3552R_MASK_SINGLE_INST BIT(7)
+#define AD3552R_MASK_SHORT_INSTRUCTION BIT(3)
+#define AD3552R_REG_ADDR_DEVICE_CONFIG 0x02
+#define AD3552R_MASK_DEVICE_STATUS(n) BIT(4 + (n))
+#define AD3552R_MASK_CUSTOM_MODES GENMASK(3, 2)
+#define AD3552R_MASK_OPERATING_MODES GENMASK(1, 0)
+#define AD3552R_REG_ADDR_CHIP_TYPE 0x03
+#define AD3552R_MASK_CLASS GENMASK(7, 0)
+#define AD3552R_REG_ADDR_PRODUCT_ID_L 0x04
+#define AD3552R_REG_ADDR_PRODUCT_ID_H 0x05
+#define AD3552R_REG_ADDR_CHIP_GRADE 0x06
+#define AD3552R_MASK_GRADE GENMASK(7, 4)
+#define AD3552R_MASK_DEVICE_REVISION GENMASK(3, 0)
+#define AD3552R_REG_ADDR_SCRATCH_PAD 0x0A
+#define AD3552R_REG_ADDR_SPI_REVISION 0x0B
+#define AD3552R_REG_ADDR_VENDOR_L 0x0C
+#define AD3552R_REG_ADDR_VENDOR_H 0x0D
+#define AD3552R_REG_ADDR_STREAM_MODE 0x0E
+#define AD3552R_MASK_LENGTH GENMASK(7, 0)
+#define AD3552R_REG_ADDR_TRANSFER_REGISTER 0x0F
+#define AD3552R_MASK_MULTI_IO_MODE GENMASK(7, 6)
+#define AD3552R_MASK_STREAM_LENGTH_KEEP_VALUE BIT(2)
+#define AD3552R_REG_ADDR_INTERFACE_CONFIG_C 0x10
+#define AD3552R_MASK_CRC_ENABLE \
+ (GENMASK(7, 6) | GENMASK(1, 0))
+#define AD3552R_MASK_STRICT_REGISTER_ACCESS BIT(5)
+#define AD3552R_REG_ADDR_INTERFACE_STATUS_A 0x11
+#define AD3552R_MASK_INTERFACE_NOT_READY BIT(7)
+#define AD3552R_MASK_CLOCK_COUNTING_ERROR BIT(5)
+#define AD3552R_MASK_INVALID_OR_NO_CRC BIT(3)
+#define AD3552R_MASK_WRITE_TO_READ_ONLY_REGISTER BIT(2)
+#define AD3552R_MASK_PARTIAL_REGISTER_ACCESS BIT(1)
+#define AD3552R_MASK_REGISTER_ADDRESS_INVALID BIT(0)
+#define AD3552R_REG_ADDR_INTERFACE_CONFIG_D 0x14
+#define AD3552R_MASK_ALERT_ENABLE_PULLUP BIT(6)
+#define AD3552R_MASK_MEM_CRC_EN BIT(4)
+#define AD3552R_MASK_SDO_DRIVE_STRENGTH GENMASK(3, 2)
+#define AD3552R_MASK_DUAL_SPI_SYNCHROUNOUS_EN BIT(1)
+#define AD3552R_MASK_SPI_CONFIG_DDR BIT(0)
+#define AD3552R_REG_ADDR_SH_REFERENCE_CONFIG 0x15
+#define AD3552R_MASK_IDUMP_FAST_MODE BIT(6)
+#define AD3552R_MASK_SAMPLE_HOLD_DIFF_USER_EN BIT(5)
+#define AD3552R_MASK_SAMPLE_HOLD_USER_TRIM GENMASK(4, 3)
+#define AD3552R_MASK_SAMPLE_HOLD_USER_ENABLE BIT(2)
+#define AD3552R_MASK_REFERENCE_VOLTAGE_SEL GENMASK(1, 0)
+#define AD3552R_REG_ADDR_ERR_ALARM_MASK 0x16
+#define AD3552R_MASK_REF_RANGE_ALARM BIT(6)
+#define AD3552R_MASK_CLOCK_COUNT_ERR_ALARM BIT(5)
+#define AD3552R_MASK_MEM_CRC_ERR_ALARM BIT(4)
+#define AD3552R_MASK_SPI_CRC_ERR_ALARM BIT(3)
+#define AD3552R_MASK_WRITE_TO_READ_ONLY_ALARM BIT(2)
+#define AD3552R_MASK_PARTIAL_REGISTER_ACCESS_ALARM BIT(1)
+#define AD3552R_MASK_REGISTER_ADDRESS_INVALID_ALARM BIT(0)
+#define AD3552R_REG_ADDR_ERR_STATUS 0x17
+#define AD3552R_MASK_REF_RANGE_ERR_STATUS BIT(6)
+#define AD3552R_MASK_STREAM_EXCEEDS_DAC_ERR_STATUS BIT(5)
+#define AD3552R_MASK_MEM_CRC_ERR_STATUS BIT(4)
+#define AD3552R_MASK_RESET_STATUS BIT(0)
+#define AD3552R_REG_ADDR_POWERDOWN_CONFIG 0x18
+#define AD3552R_MASK_CH_DAC_POWERDOWN(ch) BIT(4 + (ch))
+#define AD3552R_MASK_CH_AMPLIFIER_POWERDOWN(ch) BIT(ch)
+#define AD3552R_REG_ADDR_CH0_CH1_OUTPUT_RANGE 0x19
+#define AD3552R_MASK_CH0_RANGE GENMASK(2, 0)
+#define AD3552R_MASK_CH1_RANGE GENMASK(6, 4)
+#define AD3552R_MASK_CH_OUTPUT_RANGE GENMASK(7, 0)
+#define AD3552R_MASK_CH_OUTPUT_RANGE_SEL(ch) \
+ ((ch) ? GENMASK(7, 4) : GENMASK(3, 0))
+#define AD3552R_REG_ADDR_CH_OFFSET(ch) (0x1B + (ch) * 2)
+#define AD3552R_MASK_CH_OFFSET_BITS_0_7 GENMASK(7, 0)
+#define AD3552R_REG_ADDR_CH_GAIN(ch) (0x1C + (ch) * 2)
+#define AD3552R_MASK_CH_RANGE_OVERRIDE BIT(7)
+#define AD3552R_MASK_CH_GAIN_SCALING_N GENMASK(6, 5)
+#define AD3552R_MASK_CH_GAIN_SCALING_P GENMASK(4, 3)
+#define AD3552R_MASK_CH_OFFSET_POLARITY BIT(2)
+#define AD3552R_MASK_CH_OFFSET_BIT_8 BIT(8)
+/*
+ * Secondary region
+ * For multibyte registers specify the highest address because the access is
+ * done in descending order
+ */
+#define AD3552R_SECONDARY_REGION_START 0x28
+#define AD3552R_REG_ADDR_HW_LDAC_16B 0x28
+#define AD3552R_REG_ADDR_CH_DAC_16B(ch) (0x2C - (1 - (ch)) * 2)
+#define AD3552R_REG_ADDR_DAC_PAGE_MASK_16B 0x2E
+#define AD3552R_REG_ADDR_CH_SELECT_16B 0x2F
+#define AD3552R_REG_ADDR_INPUT_PAGE_MASK_16B 0x31
+#define AD3552R_REG_ADDR_SW_LDAC_16B 0x32
+#define AD3552R_REG_ADDR_CH_INPUT_16B(ch) (0x36 - (1 - (ch)) * 2)
+/* 3 bytes registers */
+#define AD3552R_REG_START_24B 0x37
+#define AD3552R_REG_ADDR_HW_LDAC_24B 0x37
+#define AD3552R_REG_ADDR_CH_DAC_24B(ch) (0x3D - (1 - (ch)) * 3)
+#define AD3552R_REG_ADDR_DAC_PAGE_MASK_24B 0x40
+#define AD3552R_REG_ADDR_CH_SELECT_24B 0x41
+#define AD3552R_REG_ADDR_INPUT_PAGE_MASK_24B 0x44
+#define AD3552R_REG_ADDR_SW_LDAC_24B 0x45
+#define AD3552R_REG_ADDR_CH_INPUT_24B(ch) (0x4B - (1 - (ch)) * 3)
+
+#define AD3552R_MAX_CH 2
+#define AD3552R_MASK_CH(ch) BIT(ch)
+#define AD3552R_MASK_ALL_CH GENMASK(1, 0)
+#define AD3552R_MAX_REG_SIZE 3
+#define AD3552R_READ_BIT BIT(7)
+#define AD3552R_ADDR_MASK GENMASK(6, 0)
+#define AD3552R_MASK_DAC_12B GENMASK(15, 4)
+#define AD3552R_DEFAULT_CONFIG_B_VALUE 0x8
+#define AD3552R_SCRATCH_PAD_TEST_VAL1 0x34
+#define AD3552R_SCRATCH_PAD_TEST_VAL2 0xB2
+#define AD3552R_GAIN_SCALE 1000
+#define AD3552R_LDAC_PULSE_US 100
+
+#define AD3552R_MAX_RANGES 5
+#define AD3542R_MAX_RANGES 6
+
+extern const s32 ad3552r_ch_ranges[AD3552R_MAX_RANGES][2];
+extern const s32 ad3542r_ch_ranges[AD3542R_MAX_RANGES][2];
+
+enum ad3552r_id {
+ AD3541R_ID = 0x400b,
+ AD3542R_ID = 0x4009,
+ AD3551R_ID = 0x400a,
+ AD3552R_ID = 0x4008,
+};
+
+struct ad3552r_model_data {
+ const char *model_name;
+ enum ad3552r_id chip_id;
+ unsigned int num_hw_channels;
+ const s32 (*ranges_table)[2];
+ int num_ranges;
+ bool requires_output_range;
+};
+
+struct ad3552r_ch_data {
+ s32 scale_int;
+ s32 scale_dec;
+ s32 offset_int;
+ s32 offset_dec;
+ s16 gain_offset;
+ u16 rfb;
+ u8 n;
+ u8 p;
+ u8 range;
+ bool range_override;
+};
+
+enum ad3552r_ch_gain_scaling {
+ /* Gain scaling of 1 */
+ AD3552R_CH_GAIN_SCALING_1,
+ /* Gain scaling of 0.5 */
+ AD3552R_CH_GAIN_SCALING_0_5,
+ /* Gain scaling of 0.25 */
+ AD3552R_CH_GAIN_SCALING_0_25,
+ /* Gain scaling of 0.125 */
+ AD3552R_CH_GAIN_SCALING_0_125,
+};
+
+enum ad3552r_ch_vref_select {
+ /* Internal source with Vref I/O floating */
+ AD3552R_INTERNAL_VREF_PIN_FLOATING,
+ /* Internal source with Vref I/O at 2.5V */
+ AD3552R_INTERNAL_VREF_PIN_2P5V,
+ /* External source with Vref I/O as input */
+ AD3552R_EXTERNAL_VREF_PIN_INPUT
+};
+
+enum ad3542r_ch_output_range {
+ /* Range from 0 V to 2.5 V. Requires Rfb1x connection */
+ AD3542R_CH_OUTPUT_RANGE_0__2P5V,
+ /* Range from 0 V to 3 V. Requires Rfb1x connection */
+ AD3542R_CH_OUTPUT_RANGE_0__3V,
+ /* Range from 0 V to 5 V. Requires Rfb1x connection */
+ AD3542R_CH_OUTPUT_RANGE_0__5V,
+ /* Range from 0 V to 10 V. Requires Rfb2x connection */
+ AD3542R_CH_OUTPUT_RANGE_0__10V,
+ /* Range from -2.5 V to 7.5 V. Requires Rfb2x connection */
+ AD3542R_CH_OUTPUT_RANGE_NEG_2P5__7P5V,
+ /* Range from -5 V to 5 V. Requires Rfb2x connection */
+ AD3542R_CH_OUTPUT_RANGE_NEG_5__5V,
+};
+
+enum ad3552r_ch_output_range {
+ /* Range from 0 V to 2.5 V. Requires Rfb1x connection */
+ AD3552R_CH_OUTPUT_RANGE_0__2P5V,
+ /* Range from 0 V to 5 V. Requires Rfb1x connection */
+ AD3552R_CH_OUTPUT_RANGE_0__5V,
+ /* Range from 0 V to 10 V. Requires Rfb2x connection */
+ AD3552R_CH_OUTPUT_RANGE_0__10V,
+ /* Range from -5 V to 5 V. Requires Rfb2x connection */
+ AD3552R_CH_OUTPUT_RANGE_NEG_5__5V,
+ /* Range from -10 V to 10 V. Requires Rfb4x connection */
+ AD3552R_CH_OUTPUT_RANGE_NEG_10__10V,
+};
+
+int ad3552r_get_output_range(struct device *dev,
+ const struct ad3552r_model_data *model_info,
+ struct fwnode_handle *child, u32 *val);
+int ad3552r_get_custom_gain(struct device *dev, struct fwnode_handle *child,
+ u8 *gs_p, u8 *gs_n, u16 *rfb, s16 *goffs);
+u16 ad3552r_calc_custom_gain(u8 p, u8 n, s16 goffs);
+int ad3552r_get_ref_voltage(struct device *dev, u32 *val);
+int ad3552r_get_drive_strength(struct device *dev, u32 *val);
+void ad3552r_calc_gain_and_offset(struct ad3552r_ch_data *ch_data,
+ const struct ad3552r_model_data *model_data);
+
+#endif /* __DRIVERS_IIO_DAC_AD3552R_H__ */
--
2.39.5
next prev parent reply other threads:[~2025-07-03 14:55 UTC|newest]
Thread overview: 243+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-03 14:39 [PATCH 6.12 000/218] 6.12.36-rc1 review Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 001/218] cifs: Correctly set SMB1 SessionKey field in Session Setup Request Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 002/218] cifs: Fix cifs_query_path_info() for Windows NT servers Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 003/218] cifs: Fix encoding of SMB1 Session Setup NTLMSSP Request in non-UNICODE mode Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 004/218] NFSv4: Always set NLINK even if the server doesnt support it Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 005/218] NFSv4.2: fix listxattr to return selinux security label Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 006/218] NFSv4.2: fix setattr caching of TIME_[MODIFY|ACCESS]_SET when timestamps are delegated Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 007/218] mailbox: Not protect module_put with spin_lock_irqsave Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 008/218] mfd: max14577: Fix wakeup source leaks on device unbind Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 009/218] sunrpc: dont immediately retransmit on seqno miss Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 010/218] dm vdo indexer: dont read request structure after enqueuing Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 011/218] leds: multicolor: Fix intensity setting while SW blinking Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 012/218] fuse: fix race between concurrent setattrs from multiple nodes Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 013/218] cxl/region: Add a dev_err() on missing target list entries Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 014/218] NFSv4: xattr handlers should check for absent nfs filehandles Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 015/218] hwmon: (pmbus/max34440) Fix support for max34451 Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 016/218] ksmbd: allow a filename to contain special characters on SMB3.1.1 posix extension Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 017/218] ksmbd: provide zero as a unique ID to the Mac client Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 018/218] rust: module: place cleanup_module() in .exit.text section Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 019/218] rust: arm: fix unknown (to Clang) argument -mno-fdpic Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 020/218] Revert "iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices" Greg Kroah-Hartman
2025-07-03 14:51 ` Lukas Wunner
2025-07-04 6:42 ` Lukas Wunner
2025-07-04 8:35 ` Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 021/218] dmaengine: idxd: Check availability of workqueue allocated by idxd wq driver before using Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 022/218] dmaengine: xilinx_dma: Set dma_device directions Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 023/218] PCI: dwc: Make link training more robust by setting PORT_LOGIC_LINK_WIDTH to one lane Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 024/218] PCI: apple: Fix missing OF node reference in apple_pcie_setup_port Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 025/218] PCI: imx6: Add workaround for errata ERR051624 Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 026/218] nvme-tcp: fix I/O stalls on congested sockets Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 027/218] nvme-tcp: sanitize request list handling Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 028/218] md/md-bitmap: fix dm-raid max_write_behind setting Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 029/218] amd/amdkfd: fix a kfd_process ref leak Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 030/218] bcache: fix NULL pointer in cache_set_flush() Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 031/218] drm/amdgpu: seq64 memory unmap uses uninterruptible lock Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 032/218] drm/scheduler: signal scheduled fence when kill job Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 033/218] iio: pressure: zpa2326: Use aligned_s64 for the timestamp Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 034/218] um: Add cmpxchg8b_emu and checksum functions to asm-prototypes.h Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 035/218] um: use proper care when taking mmap lock during segfault Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 036/218] 8250: microchip: pci1xxxx: Add PCIe Hot reset disable support for Rev C0 and later devices Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 037/218] coresight: Only check bottom two claim bits Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 038/218] usb: dwc2: also exit clock_gating when stopping udc while suspended Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 039/218] iio: adc: ad_sigma_delta: Fix use of uninitialized status_pos Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 040/218] misc: tps6594-pfsm: Add NULL pointer check in tps6594_pfsm_probe() Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 041/218] usb: potential integer overflow in usbg_make_tpg() Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 042/218] tty: serial: uartlite: register uart driver in init Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 043/218] usb: common: usb-conn-gpio: use a unique name for usb connector device Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 044/218] usb: Add checks for snprintf() calls in usb_alloc_dev() Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 045/218] usb: cdc-wdm: avoid setting WDM_READ for ZLP-s Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 046/218] usb: gadget: f_hid: wake up readers on disable/unbind Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 047/218] usb: typec: displayport: Receive DP Status Update NAK request exit dp altmode Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 048/218] usb: typec: mux: do not return on EOPNOTSUPP in {mux, switch}_set Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 049/218] riscv: add a data fence for CMODX in the kernel mode Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 050/218] ALSA: hda: Ignore unsol events for cards being shut down Greg Kroah-Hartman
2025-07-03 14:39 ` [PATCH 6.12 051/218] ALSA: hda: Add new pci id for AMD GPU display HD audio controller Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 052/218] ALSA: usb-audio: Add a quirk for Lenovo Thinkpad Thunderbolt 3 dock Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 053/218] ASoC: rt1320: fix speaker noise when volume bar is 100% Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 054/218] ceph: fix possible integer overflow in ceph_zero_objects() Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 055/218] scsi: ufs: core: Dont perform UFS clkscaling during host async scan Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 056/218] ovl: Check for NULL d_inode() in ovl_dentry_upper() Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 057/218] btrfs: handle csum tree error with rescue=ibadroots correctly Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 058/218] drm/i915/gem: Allow EXEC_CAPTURE on recoverable contexts on DG1 Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 059/218] Revert "drm/i915/gem: Allow EXEC_CAPTURE on recoverable contexts on DG1" Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 060/218] btrfs: factor out nocow ordered extent and extent map generation into a helper Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 061/218] btrfs: use unsigned types for constants defined as bit shifts Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 062/218] btrfs: fix qgroup reservation leak on failure to allocate ordered extent Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 063/218] fs/jfs: consolidate sanity checking in dbMount Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 064/218] jfs: validate AG parameters in dbMount() to prevent crashes Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 065/218] ASoC: codec: wcd9335: Convert to GPIO descriptors Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 066/218] ASoC: codecs: wcd9335: Fix missing free of regulator supplies Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 067/218] f2fs: dont over-report free space or inodes in statvfs Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 068/218] PCI: apple: Use helper function for_each_child_of_node_scoped() Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 069/218] PCI: apple: Set only available ports up Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 070/218] accel/ivpu: Do not fail on cmdq if failed to allocate preemption buffers Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 071/218] accel/ivpu: Remove copy engine support Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 072/218] accel/ivpu: Make command queue ID allocated on XArray Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 073/218] accel/ivpu: Separate DB ID and CMDQ ID allocations from CMDQ allocation Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 074/218] accel/ivpu: Add debugfs interface for setting HWS priority bands Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 075/218] accel/ivpu: Trigger device recovery on engine reset/resume failure Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 076/218] af_unix: Dont leave consecutive consumed OOB skbs Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 077/218] i2c: tiny-usb: disable zero-length read messages Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 078/218] i2c: robotfuzz-osif: " Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 079/218] ata: ahci: Use correct DMI identifier for ASUSPRO-D840SA LPM quirk Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 080/218] smb: client: remove \t from TP_printk statements Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 081/218] mm/damon/sysfs-schemes: free old damon_sysfs_scheme_filter->memcg_path on write Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 082/218] ASoC: amd: yc: Add DMI quirk for Lenovo IdeaPad Slim 5 15 Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 083/218] s390/pkey: Prevent overflow in size calculation for memdup_user() Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 084/218] fs/proc/task_mmu: fix PAGE_IS_PFNZERO detection for the huge zero folio Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 085/218] lib/group_cpus: fix NULL pointer dereference from group_cpus_evenly() Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 086/218] Revert "riscv: Define TASK_SIZE_MAX for __access_ok()" Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 087/218] Revert "riscv: misaligned: fix sleeping function called during misaligned access handling" Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 088/218] drm/dp: Change AUX DPCD probe address from DPCD_REV to LANE0_1_STATUS Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 089/218] drm/xe/display: Add check for alloc_ordered_workqueue() Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 090/218] HID: wacom: fix crash in wacom_aes_battery_handler() Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 091/218] atm: clip: prevent NULL deref in clip_push() Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 092/218] Bluetooth: hci_core: Fix use-after-free in vhci_flush() Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 093/218] ALSA: usb-audio: Fix out-of-bounds read in snd_usb_get_audioformat_uac3() Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 094/218] attach_recursive_mnt(): do not lock the covering tree when sliding something under it Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 095/218] libbpf: Fix null pointer dereference in btf_dump__free on allocation failure Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 096/218] ethernet: ionic: Fix DMA mapping tests Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 097/218] wifi: mac80211: fix beacon interval calculation overflow Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 098/218] af_unix: Dont set -ECONNRESET for consumed OOB skb Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 099/218] wifi: mac80211: Add link iteration macro for link data Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 100/218] wifi: mac80211: Create separate links for VLAN interfaces Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 101/218] wifi: mac80211: finish link init before RCU publish Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 102/218] vsock/uapi: fix linux/vm_sockets.h userspace compilation errors Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 103/218] bnxt: properly flush XDP redirect lists Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 104/218] um: ubd: Add missing error check in start_io_thread() Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 105/218] libbpf: Fix possible use-after-free for externs Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 106/218] net: enetc: Correct endianness handling in _enetc_rd_reg64 Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 107/218] netlink: specs: tc: replace underscores with dashes in names Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 108/218] atm: Release atm_dev_mutex after removing procfs in atm_dev_deregister() Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 109/218] ALSA: hda/realtek: Fix built-in mic on ASUS VivoBook X507UAR Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 110/218] net: selftests: fix TCP packet checksum Greg Kroah-Hartman
2025-07-03 14:40 ` [PATCH 6.12 111/218] drm/amdgpu/discovery: optionally use fw based ip discovery Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 112/218] drm/amd: Adjust output for discovery error handling Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 113/218] drm/i915: fix build error some more Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 114/218] drm/bridge: ti-sn65dsi86: make use of debugfs_init callback Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 115/218] drm/bridge: ti-sn65dsi86: Add HPD for DisplayPort connector type Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 116/218] drm/xe: Process deferred GGTT node removals on device unwind Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 117/218] smb: client: fix potential deadlock when reconnecting channels Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 118/218] smb: smbdirect: add smbdirect_pdu.h with protocol definitions Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 119/218] smb: client: make use of common smbdirect_pdu.h Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 120/218] smb: smbdirect: add smbdirect.h with public structures Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 121/218] smb: smbdirect: add smbdirect_socket.h Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 122/218] smb: client: make use of common smbdirect_socket Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 123/218] smb: smbdirect: introduce smbdirect_socket_parameters Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 124/218] smb: client: make use of common smbdirect_socket_parameters Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 125/218] cifs: Fix the smbd_response slab to allow usercopy Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 126/218] cifs: Fix reading into an ITER_FOLIOQ from the smbdirect code Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 127/218] EDAC/amd64: Fix size calculation for Non-Power-of-Two DIMMs Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 128/218] x86/traps: Initialize DR6 by writing its architectural reset value Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 129/218] staging: rtl8723bs: Avoid memset() in aes_cipher() and aes_decipher() Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 130/218] dt-bindings: serial: 8250: Make clocks and clock-frequency exclusive Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 131/218] serial: core: restore of_node information in sysfs Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 132/218] serial: imx: Restore original RXTL for console to fix data loss Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 133/218] Bluetooth: L2CAP: Fix L2CAP MTU negotiation Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 134/218] dm-raid: fix variable in journal device check Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 135/218] btrfs: fix a race between renames and directory logging Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 136/218] btrfs: update superblocks device bytes_used when dropping chunk Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 137/218] spi: spi-cadence-quadspi: Fix pm runtime unbalance Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 138/218] net: libwx: fix the creation of page_pool Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 139/218] maple_tree: fix MA_STATE_PREALLOC flag in mas_preallocate() Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 140/218] mm/gup: revert "mm: gup: fix infinite loop within __get_longterm_locked" Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 141/218] f2fs: fix to zero post-eof page Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 142/218] HID: lenovo: Restrict F7/9/11 mode to compact keyboards only Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 143/218] HID: wacom: fix memory leak on kobject creation failure Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 144/218] HID: wacom: fix memory leak on sysfs attribute " Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 145/218] HID: wacom: fix kobject reference count leak Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 146/218] scsi: megaraid_sas: Fix invalid node index Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 147/218] scsi: ufs: core: Fix clk scaling to be conditional in reset and restore Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 148/218] drm/ast: Fix comment on modeset lock Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 149/218] drm/cirrus-qemu: Fix pitch programming Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 150/218] drm/etnaviv: Protect the schedulers pending list with its lock Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 151/218] drm/tegra: Assign plane type before registration Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 152/218] drm/tegra: Fix a possible null pointer dereference Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 153/218] drm/udl: Unregister device before cleaning up on disconnect Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 154/218] drm/msm/gpu: Fix crash when throttling GPU immediately during boot Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 155/218] drm/amdkfd: Fix race in GWS queue scheduling Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 156/218] drm/bridge: cdns-dsi: Fix the clock variable for mode_valid() Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 157/218] drm/bridge: cdns-dsi: Fix phy de-init and flag it so Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 158/218] drm/bridge: cdns-dsi: Fix connecting to next bridge Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 159/218] drm/bridge: cdns-dsi: Check return value when getting default PHY config Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 160/218] drm/bridge: cdns-dsi: Wait for Clk and Data Lanes to be ready Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 161/218] drm/amd/display: Add null pointer check for get_first_active_display() Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 162/218] drm/amdgpu: amdgpu_vram_mgr_new(): Clamp lpfn to total vram Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 163/218] drm/amd/display: Correct non-OLED pre_T11_delay Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 164/218] drm/xe/vm: move rebind_work init earlier Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 165/218] drm/xe/sched: stop re-submitting signalled jobs Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 166/218] drm/xe/guc_submit: add back fix Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 167/218] drm/amd/display: Fix RMCM programming seq errors Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 168/218] drm/amdgpu: Add kicker device detection Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 169/218] drm/amd/display: Check dce_hwseq before dereferencing it Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 170/218] drm/xe: Fix memset on iomem Greg Kroah-Hartman
2025-07-03 14:41 ` [PATCH 6.12 171/218] drm/xe: Fix taking invalid lock on wedge Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 172/218] drm/xe: Fix early wedge on GuC load failure Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 173/218] drm/i915/dsi: Fix off by one in BXT_MIPI_TRANS_VTOTAL Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 174/218] drm/amdgpu: Fix SDMA UTC_L1 handling during start/stop sequences Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 175/218] drm/amdgpu: switch job hw_fence to amdgpu_fence Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 176/218] drm/amd/display: Fix mpv playback corruption on weston Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 177/218] media: uvcvideo: Rollback non processed entities on error Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 178/218] x86/fpu: Refactor xfeature bitmask update code for sigframe XSAVE Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 179/218] x86/pkeys: Simplify PKRU update in signal frame Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 180/218] net: libwx: fix Tx L4 checksum Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 181/218] io_uring: fix potential page leak in io_sqe_buffer_register() Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 182/218] io_uring/rsrc: fix folio unpinning Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 183/218] io_uring/rsrc: dont rely on user vaddr alignment Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 184/218] io_uring/net: improve recv bundles Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 185/218] io_uring/net: only retry recv bundle for a full transfer Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 186/218] io_uring/net: only consider msg_inq if larger than 1 Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 187/218] io_uring/net: always use current transfer count for buffer put Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 188/218] io_uring/net: mark iov as dynamically allocated even for single segments Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 189/218] io_uring/kbuf: flag partial buffer mappings Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 190/218] mm/vma: reset VMA iterator on commit_merge() OOM failure Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 191/218] r8169: add support for RTL8125D Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 192/218] net: phy: realtek: merge the drivers for internal NBase-T PHYs Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 193/218] net: phy: realtek: add RTL8125D-internal PHY Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 194/218] btrfs: do proper folio cleanup when cow_file_range() failed Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 195/218] iio: dac: ad3552r: changes to use FIELD_PREP Greg Kroah-Hartman
2025-07-03 14:42 ` Greg Kroah-Hartman [this message]
2025-07-03 14:42 ` [PATCH 6.12 197/218] iio: dac: ad3552r-common: fix ad3541/2r ranges Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 198/218] drm/xe: Carve out wopcm portion from the stolen memory Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 199/218] usb: typec: tcpm: PSSourceOffTimer timeout in PR_Swap enters ERROR_RECOVERY Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 200/218] drm/msm/dp: account for widebus and yuv420 during mode validation Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 201/218] drm/fbdev-dma: Add shadow buffering for deferred I/O Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 202/218] btrfs: skip inodes without loaded extent maps when shrinking extent maps Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 203/218] btrfs: make the extent map shrinker run asynchronously as a work queue job Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 204/218] btrfs: do regular iput instead of delayed iput during extent map shrinking Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 205/218] riscv/atomic: Do proper sign extension also for unsigned in arch_cmpxchg Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 206/218] LoongArch: Set hugetlb mmap base address aligned with pmd size Greg Kroah-Hartman
2025-07-05 11:45 ` Miguel Ojeda
2025-07-05 14:34 ` Sasha Levin
2025-07-03 14:42 ` [PATCH 6.12 207/218] arm64: dts: rockchip: Add avdd HDMI supplies to RockPro64 board dtsi Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 208/218] ALSA: hda/realtek: Bass speaker fixup for ASUS UM5606KA Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 209/218] drm/amdkfd: remove gfx 12 trap handler page size cap Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 210/218] drm/amdkfd: Fix instruction hazard in gfx12 trap handler Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 211/218] net: stmmac: Fix accessing freed irq affinity_hint Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 212/218] spi: spi-mem: Extend spi-mem operations with a per-operation maximum frequency Greg Kroah-Hartman
2025-07-04 11:55 ` Pratyush Yadav
2025-07-04 12:17 ` Greg Kroah-Hartman
2025-07-04 14:39 ` Mark Brown
2025-07-04 16:43 ` Greg Kroah-Hartman
2025-07-04 15:45 ` Pratyush Yadav
2025-07-04 16:43 ` Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 213/218] spi: spi-mem: Add a new controller capability Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 214/218] spi: fsl-qspi: Support per spi-mem operation frequency switches Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 215/218] spi: fsl-qspi: use devm function instead of driver remove Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 216/218] btrfs: zoned: fix extent range end unlock in cow_file_range() Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 217/218] btrfs: fix use-after-free on inode when scanning root during em shrinking Greg Kroah-Hartman
2025-07-03 14:42 ` [PATCH 6.12 218/218] spi: fsl-qspi: Fix double cleanup in probe error path Greg Kroah-Hartman
2025-07-03 18:06 ` [PATCH 6.12 000/218] 6.12.36-rc1 review Florian Fainelli
2025-07-03 19:55 ` Hardik Garg
2025-07-03 22:14 ` Shuah Khan
2025-07-04 5:57 ` Ron Economos
2025-07-04 11:13 ` Jon Hunter
2025-07-04 12:14 ` Mark Brown
2025-07-04 12:51 ` Naresh Kamboju
2025-07-04 23:10 ` Miguel Ojeda
2025-07-06 6:51 ` Greg KH
2025-07-05 3:05 ` Peter Schneider
2025-07-05 13:50 ` Pascal Ernster
2025-07-06 6:51 ` Greg Kroah-Hartman
2025-07-06 6:56 ` Pascal Ernster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250703144004.046235077@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=adureghello@baylibre.com \
--cc=dlechner@baylibre.com \
--cc=patches@lists.linux.dev \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox