From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.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 77A1A4086A for ; Wed, 11 Mar 2026 00:11:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773187908; cv=none; b=e0SsavpvrZtJHv/cbH3fRJxVIpLAHJP9kKXVOiC0HxbdW/vzVpBEXTBvvvC3oTL9qGCBuzSJ+tm5Sw4IGWGWF4fCSqj6oVXhhz42ODnjipmU5W1+cMka5ONA6nzxxfs5icLfZ5EiF/vgUG9obejjHO5iO4XLbG9e0vl1n6tUx/4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773187908; c=relaxed/simple; bh=P3lEy5gIkhZ3O6GB/4pR9gWhPNMout6x33dBMMGTqnc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Kz0fP9AQvDw70nYYExYwj5uMYX64qPo7pWsCXoPMV/T2QQr7ananS7wtbqJP4d7TWwXVIL20+CEhD3dfq6fpnU427o3amhT5ISxSFz9NjFevS4RKKUZZtQ+R9sKYxymjeHw/42csY5XENvvezPv9R+XAPmipsiRe9BVBenAFenk= 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=y/qXzXUk; arc=none smtp.client-ip=209.85.210.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="y/qXzXUk" Received: by mail-ot1-f49.google.com with SMTP id 46e09a7af769-7d75371d873so2736335a34.3 for ; Tue, 10 Mar 2026 17:11:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1773187905; x=1773792705; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=k/g9x/WAltqKnAS6kgiR1qo0fBhygP8SG/QvklfILzc=; b=y/qXzXUk69fxfYkmTeImwa+hj4O/vGBPkAt+DNTFcOLgLY+ACHSB+ypg7s2Gq994kZ 7hm2qsueBPtYoM2ZM0Kf9Ncd2AFnAdxm519kuYX0gs1ukgD+qRY7N9O1F2AlhhVBVtLP sWRrh8oW1dXSqr8VW5cNdCAgxnGNdokwp0iviYDlpl8/DWXIcnLiGxKtGMdIj5gWJTs6 0oObGrTRYZDy6JFNDiHF/E1HRhzJvWQrfpBxKqUQqVndkwjtQD0Kbm0rRBKYqX9i4tVh JyRgLZlQBXMGgIAVwRL2eLAuGrUCh4d1nY2RxsCABLW7tAXen/c02DKwSWStrNzPEt2u ALJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773187905; x=1773792705; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=k/g9x/WAltqKnAS6kgiR1qo0fBhygP8SG/QvklfILzc=; b=kHpgp40wk7rdO0tHLh/2HQOgex7fWyXlTMrQK60t2yUCDNc08gqtnt9wFSRSo4E7fP lV+EmJiVr4qBCuS5Ss5E1qLSxfQeN/6ssxi7nwYLQURyBuFmpwFlmMgrAagpsRWmPMSy PIFxgfwo+sgrNXPTD2IxvCHBYUlo+mmlHnMFpiauIdlnbht0uHJJVqCHjucPl/+EORgR q31l1AdatoE1QCM+uKttNLGutrhbiWv4ypIglB+Upc8s2Zp5aNgFwV+GDpUTNUKh1qIv exd7uJEb1GigX8W5dbvpZiHJxCpLDREdMAbuqH4RkS0P291IFzLBX48mjh8dNzJ2JHwf ZFag== X-Forwarded-Encrypted: i=1; AJvYcCXYDnQfj2v0MExW80WZId1cpSKy/eFaRTBt5ak/jaYtzqMtXAaUf/K5Yimcd+RlUri2PesnXDDqpCdCu8w=@vger.kernel.org X-Gm-Message-State: AOJu0YzExENcRmRWaOFBksBbScjuQMOL7V5Cpef+xqSrp2OvViUDZCxO BtJYo0jp5WO4i5UeJNeM6U9hpgSv0xmaY4T17p3qs+irr9lza5fNGHuoUKdXXg9zNew= X-Gm-Gg: ATEYQzzLXN1Hvjmlbf0bR41UAZsfjgKvZx3erigXuetf2CPb4Zt6wHiOTW8dqWspsmq GimrD5N7HCMZJmfI7a6U0lUSQWutn9pYbFVnJpDrAbxE07AEZZCfpTM4S7e0wuqWhCEJnl+dms1 wQHFV/a1BR9w4Uq76dMUBdlsUXLNek6u7d6tp7EiKVqtOACftZqStrIxfDiMQoil/zQInnhe1Oz bJMkLTpG6D2PkvHD6Pwj6IN6Nqr6eixO0LlPoQ7xLB6a/kiHcejz6M1CPFx6hh5R1TS4NMGzoHZ 7Ju+1RfOQilSAEEDAzYFwA2U2FF2l/W2ua97QZ1chUN6cI6auGU0oMZnNiDkHT1wsJjoro6xK+S oquaw3vlDZXU8GyU9SGiC4yiUcLOAHZZxbl9zYWzgTTN44IUE+CosUHWqz66JFxP+Td6SLOP6a9 YgguNycwssDVUN7mTdDXTGHMPqtkL/+DbjfWQu7D7Jx4C5f9ihsFW6krzDcI20fMEvdkM5XUnxu A== X-Received: by 2002:a05:6830:264b:b0:7d7:382f:f00f with SMTP id 46e09a7af769-7d76a73d752mr520754a34.31.1773187905339; Tue, 10 Mar 2026 17:11:45 -0700 (PDT) Received: from ?IPV6:2600:8803:e7e4:500:82ac:f3fe:2e5f:ec03? ([2600:8803:e7e4:500:82ac:f3fe:2e5f:ec03]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7d76aebc9d3sm492155a34.24.2026.03.10.17.11.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Mar 2026 17:11:44 -0700 (PDT) Message-ID: Date: Tue, 10 Mar 2026 19:11:43 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC 6/8] iio: frequency: ad9910: add RAM mode support To: Rodrigo Alencar <455.rodrigo.alencar@gmail.com>, Jonathan Cameron , Rodrigo Alencar via B4 Relay Cc: rodrigo.alencar@analog.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Lars-Peter Clausen , Michael Hennerich , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel References: <20260220-ad9910-iio-driver-v1-0-3b264aa48a10@analog.com> <20260220-ad9910-iio-driver-v1-6-3b264aa48a10@analog.com> <20260301133153.7f2f8501@jic23-huawei> <20260307140735.5ec2e608@jic23-huawei> Content-Language: en-US From: David Lechner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/10/26 12:40 PM, Rodrigo Alencar wrote: > On 26/03/07 02:07PM, Jonathan Cameron wrote: >> On Sun, 1 Mar 2026 13:31:53 +0000 >> Jonathan Cameron wrote: >> >>> On Fri, 20 Feb 2026 16:46:10 +0000 >>> Rodrigo Alencar via B4 Relay wrote: >>> >>>> From: Rodrigo Alencar >>>> >>>> Add RAM channel with support for profile-based control. This includes: >>>> - RAM data loading via binary sysfs attribute (ram_data); >>> >>> I'm not sure that's a long term viable path. We either need >>> to figure out how to do it as firmware file load, or via an output buffer. >>> >>> Firmware load would probably be too static and I'm not sure quite >>> how we map these to IIO output buffers. >> >> We would have to carry it for ever which is very much not ideal. >> The firmware approach has the same issue, but can be thought of >> as defaults at boot time forever. If no defaults then we use whatever >> we come up with as the long term solution. > > I was thinking about the firmware approach: > - Normally a driver would request the firmware during probe and the > filename would be pre-defined. > - Less statically, It could have an attribute that once written, it would > request the RAM contents (e.g. under /lib/firmware/ad9910_ram.bin). > It could be the enable attribute itself (but that would not be effective > when the binary would not change), or a separate one (e.g. destination), > or a new one (e.g. load_en) Have you looked at firmware_upload_register()? It looks like it provides something along these lines. > - Alternatively we can also have an attribute (like 'filename') that once written, > loads a firmware file under /lib/firmware/.bin > > I am currently using libiio to write the sysfs binary attribute. Thus, > the downside of the firmware approach is that I would have to use something > else when changing a firmware file remotely (as libiio would not support this). > > Also, the buffer approach has its problems, mostly because triggered buffers > are not really designed for multi-buffer support, even though it could work > along side the DMA engine one (that I am using with the parallel port). > Additionally, userspace tools are not yet ready for multi-buffer support. > Also, an IIO buffer might give a sense of data streaming capabilities, > not a one-shot load that I need here. >