From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F1AAB30F7FF for ; Sat, 17 Oct 2026 20:40:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792269604; cv=none; b=oNuSLTn4vs4YgM7W4E5kRv04UfMCEuOEQqB/JmTSuvndHq+KsyMaXzK+mlvRrCOLMGZGBUTWxKR1yRsZEZFGvgmvKZjU8s2cbi0HwxWkr6gGnrvgaNwwgAwfrIpDbzmZE9onnnU++66HULuizZP4h5rViW4E5YqeI8dDENlc7fo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792269604; c=relaxed/simple; bh=q7CwHGyeeVgqKz8YQAKoM8SMMJHmzZPnQKS04vZWW5w=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TdNPOByabsBJS6z3gC8Chohs523Xf21zlh7bPqRo7X1OOqPD343g3wpquf/qA+9oWrHm9dZ3de0zMK3AotCb4xIvUWKjHPK+xo0yfyGmaV8AFChotSe/9Xqlp4QS03aBd2hTjgID0PmOcaKkehjpaP8DV388zxMDETQ3Cmn/4BQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=ApWI0Koj; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Sbl/eQpd; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="ApWI0Koj"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Sbl/eQpd" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69HJ0euu368710 for ; Sat, 17 Oct 2026 20:40:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= zr2FtfRs6QhbM03KAXMoqNBJH4R4akb06Udb+D1B0Dc=; b=ApWI0KojAvUBiQ11 83UigDg+OfMWg1EymhELEx/O7puwtlrbsOdnQ+BP7TGzDbjeFV0/Ph/AQv57zxEo X8vpk8+5f9z833O9O9iHFnT91WJOoikgtIDcbSkqlS+T20Ui5LWtniv5r6u0vFVc 9TA9hv7Z2VawH6BrDJMQii9xvp+GNc513CdvxXu/sX+uYuidQXZJs8mxG8dH4gQr FnkGCFN+Cft2IN0ogPqszHshz6HqQq+eWYKHK+CIBNrm+8qbnYoaO8k/024cCXKD sF0AY8FZP0oKulIyk9Sp3ZppE7lcLcbLhTLi2dkYKgwhw1CGeVaR1eEVhFltmYNQ et4KbQ== Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hc26k1m70-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sat, 17 Oct 2026 20:40:01 +0000 (GMT) Received: by mail-pg1-f200.google.com with SMTP id 41be03b00d2f7-cd61df4951cso995587a12.0 for ; Sat, 17 Oct 2026 13:40:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792269601; x=1792874401; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:organization :references:in-reply-to:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to:content-type; bh=zr2FtfRs6QhbM03KAXMoqNBJH4R4akb06Udb+D1B0Dc=; b=Sbl/eQpddy2NfLJ7vwbLtrj5e+emYk/AMhK9XOcQxXBZVHClEUoE3amq8+GtIaVk7Y btTTi0Nd368MqLrjr+XZuxIRNDp54MVwdKyHJUTx6yDbZNT7cuHsT0PxQzWjzvqDn8TB PnsZyvwzB8tl5BiqFuUFdjQRoyacWrd37XGgnHlFMlAI9oUBHK6gYyDGA6rwl2E1dPWu B+XT/CxMk+OvCO6VhxA9wkOdDtcmzXMSIqhyQt6zGuXupvuXbWhmgdS9wOm7J3/BV9FM zSMVn0r/g3jc2WT/CYpF/aGYHN+OWU0eutadEQjNroy1E2yDmo2+P/9pugvzY5UNc1Jc 2qmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792269601; x=1792874401; h=content-transfer-encoding:content-type:mime-version:organization :references:in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=zr2FtfRs6QhbM03KAXMoqNBJH4R4akb06Udb+D1B0Dc=; b=qE16+/mCzL0i4qVVm1McTM59nOPSAAyPuIiSDbmeV+kbu1uPaWej4PJvn82JpyAgEQ MndOOiqVDqmkoJt9Ox+DclRB0IkJ+LA2Be4WiVJRguWyiLYcsWvt0bRmI2bAZiK7UIkd FfJgC9K6pT5EX0osBgCVdpJ2OjIu7OZVxjvEocM7vXWDlPVx4LCRRfxmZiuxCAvOPc+2 Yuu5SCbgPBA4Qoe36FZ/aVVAvKAb6mii9H1jYyRYDiu1lXVSKHBkD14tpi/ps/eojNy6 ryRM9TZ8S/Dpf2fvt5XQ+va1AUkzZ374l8jfptD0NAfZnmCH9k/6UjeKcWQ0oArcJwtm Y05Q== X-Forwarded-Encrypted: i=1; AKwUvBwKXKJdodQKQ2oWnU6RqwYVrc7Om6z3JSjNKIamoQxe4NSCIgyacSwHEklVavYXlv4lyYTzzQMmrFQ=@vger.kernel.org X-Gm-Message-State: AFq9FYI01PImceB7PLQkjHF3SsJhdpOOsNjkAacfIgXHGUFDjdBlw5Kh zJNyTF0O0VMd5J1xNQkLb8ZYjh2s1OsWi4yTGUtYaX91rkO1MJe69cxteNacZAHxPlG7A33hKM0 qETUatcvx/LzZj7jqNjtGGCltzQo/6tYEw5PYkT0vJDzapWKKYEdzdruWtJaKL4k= X-Gm-Gg: AYBFou0rTEduESISXNB4nCszqYm+GmKbKBKfk9CSHce7qot8arKtt8yYDGxV8CWn7az zEEm3ILIpp1TFquT0dyHbuCQFoI2jfcTTm1dbzQDL1FOW9TspWMBL7PTUMGq7zsuKPY6hQCisnQ Pm3lF/5FkkSe5lPVWpyzaQehDbsFP+brVWULAGOzGy6b5LZ8N5xjywGsoac1X8d6HBJnIxZDC4E SGYFrLucVDhvXghMJ9LfzPXcGWtjnFR/CmO50OJ2cA2HBF+dwOVGWZEUYDopI1oMBYNTx6lKI7o qm31rkVKKV3Rkhjwvm1aI94q6UKal24Wo/kQqWY92kgFP4AUTRVqcviYfASaX59HsMNjSEwf7Ux vgsq8mW0BzIg1VdlxbA== X-Received: by 2002:a05:6a21:4903:b0:3e2:d8f:600f with SMTP id adf61e73a8af0-3e22613d7e1mr2777466637.72.1792269601021; Sat, 17 Oct 2026 13:40:01 -0700 (PDT) X-Received: by 2002:a05:6a21:4903:b0:3e2:d8f:600f with SMTP id adf61e73a8af0-3e22613d7e1mr2777448637.72.1792269600528; Sat, 17 Oct 2026 13:40:00 -0700 (PDT) Received: from jic23-hlaptop ([50.35.44.179]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8a05e2e9c4dsm250356b3a.19.2026.10.17.13.39.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Oct 2026 13:39:58 -0700 (PDT) Date: Sat, 17 Oct 2026 21:39:51 +0100 From: Jonathan Cameron To: Rodrigo Alencar via B4 Relay Cc: rodrigo.alencar@analog.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux@analog.com, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-doc@vger.kernel.org, Olivier Moysan , Jonathan Cameron , David Lechner , Andy Shevchenko , Michael Hennerich , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , Jonathan Corbet , Shuah Khan , Randy Dunlap Subject: Re: [PATCH 08/10] iio: frequency: ad9910: support iio backend Message-ID: <20261017213951.2e62db95@jic23-hlaptop> In-Reply-To: <20261015-ad9910-backend-support-v1-8-3c21648c8e26@analog.com> References: <20261015-ad9910-backend-support-v1-0-3c21648c8e26@analog.com> <20261015-ad9910-backend-support-v1-8-3c21648c8e26@analog.com> Organization: Qualcomm X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDE3MDA4MiBTYWx0ZWRfX6wZM0yk5MEHp mmiU4cBzjwOi4OtBbl9Ozc0zxTOVpkF2Cx+DvYQ3bmkMzUmgTiIV5YpzxmBwp1lk9JBKmuulnMn TcvMKqSYhDYLaRowxIjLDmxceCx29im4QjZk/bPlLoOKv/OKaYpyug0CbQD30nEW/nLltf5bDB8 8QQH/Ru84rExGFoThXMnUJqlOaQF7v3dhuNWr2c8qeruO/s/g1z5kTocfUgJr2RcY50OKmaTT/2 XK413MewFT1xPzP7cL9rio2RrWnJNSYAsCHKZksCdzdQWQYwzQyWgZFs9lUl7M/igofE6aOZaQ0 2zWDRQaifWrj2uNn40dl025yfXbPyEhfR4eTowIJwyj/kFHXfvKHaDuMh0z62ZDPDEOkoP7C0Ga qby9cyQHE6G8f/IMT8WnCd0iqf2vBX/iTDLTT2rEZOhQ+Gnx/so9QyL4H2aWa7RKva2Vl+tCNYW mQyi3CZMQAYr+b1/eXw== X-Proofpoint-GUID: Mi92vNY3gEnHUIh6OFRTPcmunqmM_P00 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDE3MDA4MiBTYWx0ZWRfX/uTFWPagsJK2 JdSWUuzEtYB1e4ecw39yBP2AUfp4ExnitcTKM6bwT5MUUheHI5I+AOE0ioRKkvZKO+L8jiPYa4K XBOYZLj+hZn5LFFArGJirNyrttPuMvU= X-Proofpoint-ORIG-GUID: Mi92vNY3gEnHUIh6OFRTPcmunqmM_P00 X-Authority-Analysis: v=2.4 cv=Cowq4X4D c=1 sm=1 tr=0 ts=6ad3dd21 cx=c_pps a=oF/VQ+ItUULfLr/lQ2/icg==:117 a=aNnz9XPx1a4JIXSYt2cE/A==:17 a=kj9zAlcOel0A:10 a=660iZSQnnn4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=VwQbUJbxAAAA:8 a=gAnH3GRIAAAA:8 a=bvUjbommzZRmoEgeiV8A:9 a=CjuIK1q_8ugA:10 a=3WC7DwWrALyhR5TkjVHa:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-10-17_06,2026-10-14_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 adultscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 spamscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610080000 definitions=main-2610170082 On Thu, 15 Oct 2026 13:49:48 -0300 Rodrigo Alencar via B4 Relay wrote: > From: Rodrigo Alencar > > The AD9910 parallel data port allows modulation of the DDS core parameters > at up to the PDCLK rate, which requires a high-speed data source. Add > support for an optional IIO backend that provides such interface, with > data streamed into the device through an output buffer. > > The parallel port channels get scan indexes and scan types according to > the data destination: 14-bit amplitude, 16-bit phase, 16-bit frequency, > or the 8-bit amplitude and phase pair for polar modulation. As only one > destination can be active at a time, this is enforced by the available > scan masks. On buffer enable, the destination is configured in the > backend and the parallel data port is enabled. The sampling_frequency > attribute of the parallel port channels controls the backend data rate. > > The backend is also notified about profile changes, as it may drive the > PROFILE[2:0] pins, and the debugfs source attributes now consider the > parallel data port when reporting which channel controls each DDS core > parameter. > > Signed-off-by: Rodrigo Alencar > diff --git a/drivers/iio/frequency/ad9910.c b/drivers/iio/frequency/ad9910.c > index 3d517879dee3..39d65dafd5a1 100644 > --- a/drivers/iio/frequency/ad9910.c > +++ b/drivers/iio/frequency/ad9910.c > @@ -1075,7 +1122,15 @@ static const struct iio_chan_spec ad9910_channels[] = { > .output = 1, > .channel = AD9910_CHANNEL_PARALLEL_POLAR, > .address = AD9910_CHAN_IDX_PARALLEL_POLAR_AMP, > - .info_mask_separate = BIT(IIO_CHAN_INFO_OFFSET) | > + .scan_index = AD9910_SCAN_IDX_POLAR_AMP, > + .scan_type = { > + .sign = 'u', > + .realbits = 8, > + .storagebits = 8, > + .shift = 0, Really small thing but we tend to drop setting shift when it takes the default of 0. Particularly makes sense here given no room to shift with 8 bits in 8 bits. > + }, > + .info_mask_separate = BIT(IIO_CHAN_INFO_SAMP_FREQ) | > + BIT(IIO_CHAN_INFO_OFFSET) | > BIT(IIO_CHAN_INFO_SCALE), > .parent = &ad9910_channels[AD9910_CHAN_IDX_PHY], > }, > @@ -1085,7 +1140,15 @@ static const struct iio_chan_spec ad9910_channels[] = { > .output = 1, > .channel = AD9910_CHANNEL_PARALLEL_POLAR, > .address = AD9910_CHAN_IDX_PARALLEL_POLAR_PHASE, > - .info_mask_separate = BIT(IIO_CHAN_INFO_OFFSET) | > + .scan_index = AD9910_SCAN_IDX_POLAR_PHASE, > + .scan_type = { > + .sign = 'u', > + .realbits = 8, > + .storagebits = 8, > + .shift = 0, > + }, > + .info_mask_separate = BIT(IIO_CHAN_INFO_SAMP_FREQ) | > + BIT(IIO_CHAN_INFO_OFFSET) | > BIT(IIO_CHAN_INFO_SCALE), > .parent = &ad9910_channels[AD9910_CHAN_IDX_PHY], > },