From patchwork Wed Feb 25 16:16:54 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 4484 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 0C8213F1C6 for ; Wed, 25 Feb 2026 17:19:04 +0100 (CET) Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4837c597cd5sf12433045e9.3 for ; Wed, 25 Feb 2026 08:19:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1772036343; cv=pass; d=google.com; s=arc-20240605; b=ZazMI3tnUae2S7+Dbp/S4mhT/gAsvHXTmFR4spqKnJUDDewhAc/kmX/q8fxahH6XQo 3FEe6xL8+VPp8OzmyzR5UoiXjNVAU1MYC+J+sbaiy/q6EoCMpxoSFP4/uH0qkrkLHsGj bs3gt/L0z0W49YblohCvLO4Cm+xyHjH1Lh5XnTLknLuKeK9Ls54QtDhGnPb8vsaDCNHM +4iKhYiNXTBVZ9986Ix82WH9p2QHihJanaBD3baCa/yLLzDHioZkw/8aJWQtkTMkX+4A CB7tfUy+7z7TMBkXvx3MbtBB12WCNSN4uZcGk2OLf/kUTiPUgh2NUFJidmT7Psiseyia y6bw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Ji0PnndBMXAJvVYEiFNTv7fX9EdcwaPQi8Qfnzh7UoM=; fh=tpEpSitd/jM63mg8QnRUu39IM3PJWkSitDCHYb3d1B8=; b=B9WqVqMLT/NIY1qMr5cpM8kS4tdbwLFz/yme8+NEP4KH1L03VDnOI0dbXCTupR8V0R qJ1e6Td/Qt9PaVZBNPBnhgrBMwx2oYKz1iNIqLufCvzjB2NIjB1U2L6wZIio+nL6c7o7 scOQiShWMH9tdH2Qrik1MofTd7DuTuc0MNrPcOmQF/t8IhCVHIpuYM453LQQyCqRH68c jcWHmdZNDUa2gd8cETBk+S0q6vepeFJ/S7OkB+98iXrkOJ/M/bW9TlE4JvHwUgBNJhD6 eVm2rq8lcLXtrEQWECLjFyubbYWz4NiPdQFQCD1x1s/N7g+i7+nNdeI+R8i7SGZM7uc8 1Wfg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E2SLrBq9; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1772036343; x=1772641143; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Ji0PnndBMXAJvVYEiFNTv7fX9EdcwaPQi8Qfnzh7UoM=; b=QbNDHGstl3/922pwtLfRNHaKTb4RelqRLSybM8YT2rydoskeFWlETsRPI/NyYorKFC Di/LelicFkhoOXgeejlcOh7Q9fwdwagW/a2jnWvFCYUCkiusKle1QPmlKSw09z/8i2h+ PJvJ8upot81VEfkSXrSJZWzWBtJLDa9JORo9I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772036343; x=1772641143; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ji0PnndBMXAJvVYEiFNTv7fX9EdcwaPQi8Qfnzh7UoM=; b=KbEETG3Ek4ApyKcyDfrskvNki7sTo9ZEIUNeWTCoz5D3fxgkV1CbOsxv57pYED7V2L SdEXu2Ttr73eAig8Fe31BxgTfnfiEKe8UVj1eB8hY3UqZZoL+HAX3/AuY9MQAiKdGpmY VAngEvtISWikxBBq8c87DyOYy9kKg10AWwa3RMHR9Zfg6VhrFqpBf0vigeB+gXEbc4G4 4PMBgzEz+spSmOQ2EauyJZoSknCTxGwH6dMHUei+NxiE+7pMFeU0LeGCrywgPvbu7rVp o2akXn9ymbjq/EGyFGhHzy1jW+7vzmiWrCyvppWHuuT/tAh4vm05r/zto/lXbHPRL+cc WdWA== X-Forwarded-Encrypted: i=2; AJvYcCXyA0wRuPVGA5iLR8nguS6oewv+AqQg9y3Gi4sN3Q3D+ZyxUFZm6ngqdMaO650bupvGR+srT490ljCoHmds@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YyGj45GIWwj7ro1zfb8Lwn2ZcHemJSruorbok4zm9Kh98oTKKlR P+SZek0G9Wy1GEsPwqO0uNjmi2mBikWpwoGjj5pSLepMG2SNPfnPbKEtK3BlRwv0bbUGA/1vjk2 NoQ== X-Received: by 2002:a05:600c:3484:b0:483:3380:ca11 with SMTP id 5b1f17b1804b1-483a95ee3fdmr247282185e9.33.1772036343384; Wed, 25 Feb 2026 08:19:03 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com; h="AV1CL+FosJGdodi+Tj8uOxjWvx1wRQ6fn3IFu3a5YoN2LPBGgA==" Received: by 2002:a05:600c:46ca:b0:477:a036:8e82 with SMTP id 5b1f17b1804b1-483bf036f3als6566275e9.0.-pod-prod-08-eu; Wed, 25 Feb 2026 08:19:01 -0800 (PST) X-Received: by 2002:a05:600c:3b96:b0:47e:e076:c7a5 with SMTP id 5b1f17b1804b1-483a95b7aedmr323316575e9.11.1772036341335; Wed, 25 Feb 2026 08:19:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772036341; cv=none; d=google.com; s=arc-20240605; b=PKTyBWd2y3opy/RRnbmKVdtaG569Cz/D0eh9+709GojJfYIolAtRHQC6vGsQYLweOV lequLLbuepeFdTKdN8d5Q0XMzWTmo6EofqsWow59WJR6U4YZlObcepqhM904/ZawMl9P K86kjyDA89kw3vdHaT6jTLSt4LYIvg/lE1RMA6u+DlPCUc8ln4J5nibgqXgmIQ9sfQWN 0aXaQINOh8HJkJKqWek/wMWGFyyNj3ttuFVcPgGYoWNl0Q/trSXPka7NlQoKBvkG00be 2rAnMhf/zYemrbtccpzfiDW3p0KQ7j/eZY69u+f6lZm0tBX4HhcTz5xn9AyZFBlYjC1O BdPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=gwYALHZDBEirWjUwGBe95A54XbbI8IIK1ONmtW4T1Qs=; fh=ui+ndE+o9v1fHFjpmz3+1s9DABExnosvyG4QUpNaudw=; b=Jp/+6LZsaZbzhlr69FvqUlWMBPu8O27yOc/YO6u/zu+raKVt/4KfINk3tuSW1ZJuIT GuXuo+yzhL+k/CndpwrlYIWl2kxab8LR9QvpKiyomNwLoVXJJnOy2CtII4/sFvO2hd0d Z33NjfYFOrAjLmzXw5D10HRWS+TE5kBQ5TeC5M/P/XDNCZmMUf2wEKmDu/gLS0jK6skg 6DfMtF8n3SMTONWa9SFmdAZ0QvVNQ2RtlO6GeXCxOq38wcw0lAlC+TIdZ9pT8RFwBBOe +Xec8eP6v2itJ21VrcCX2wmsXangtu4PPbRux4+Hk6uTlW+EpQWyGGB6rDIkbOjsufXI T4eQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E2SLrBq9; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-483a9b73006sor10317445e9.7.2026.02.25.08.19.01 for (Google Transport Security); Wed, 25 Feb 2026 08:19:01 -0800 (PST) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Gm-Gg: ATEYQzzj8ccq4Ovj5MhaI41GuagaDs89YDrdMLZeha53R6Sna+R26sqTkS9p41ylHbf nNsemKZ0R5Gcp9LNe8t0kTx9O8a2tD6iZld6Zu5PUmRHMdh8d5fn8K+Wow4X1LRkLA8TSN6zEkO hjEarCHwOI+G2Yuyf6fxBlgovYHt1ZPPm7SHEvCMrQDj21aglnwQpADdg/hKH2+cp5eaMphyqSl oikd+F/rw0ojkU984yi+pvpqg090Ss6rsvxr3L5Yz2/yygVUl6bBqF9rkxr8fnf98Anh2aJKgTd j9tXcWt7TbBDecFPOZiOUppB1dcvV3QYy6L+dA30pLOPy9K0fIz+Ka19laCDTSpxz3prWArCKtA dwXPuLdMwjs6FdstciBiyEXZtp1CbuBv449YKpnyYyhKiYIlu5nGgZWMAJPkQB5YbuYJ2VacV9e LOGktOoDFtBo+IpzbFhOrN8XsGU9Z1DEKo61QBTxRZyyVVRMtgPVYQ0Zxxext3broXZemJbeC99 bm0wU/KLogUl3Y/0cL4rJ21EcKgGh9f8f0wEv3cMycGT7R4 X-Received: by 2002:a05:600c:4f95:b0:483:8e43:6def with SMTP id 5b1f17b1804b1-483a95e5a97mr250975375e9.28.1772036340869; Wed, 25 Feb 2026 08:19:00 -0800 (PST) Received: from dario-ThinkPad-P14s-Gen-5.amarulasolutions.com ([2.196.43.111]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483bd6f19f5sm186562265e9.1.2026.02.25.08.18.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Feb 2026 08:19:00 -0800 (PST) From: Dario Binacchi To: u-boot@lists.denx.de Cc: linux-amarula@amarulasolutions.com, Patrick Delaunay , Patrice Chotard , Dario Binacchi , Simon Glass , Jagan Teki , Simon Glass , Tom Rini Subject: [PATCH v3 3/9] test: spi: add sandbox_spi_get_wordlen interface Date: Wed, 25 Feb 2026 17:16:54 +0100 Message-ID: <20260225161851.2475274-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260225161851.2475274-1-dario.binacchi@amarulasolutions.com> References: <20260225161851.2475274-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E2SLrBq9; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add the sandbox_spi_get_wordlen() public interface to retrieve the internal word length state of the sandbox SPI device. This is intended for use in sandbox SPI test cases to verify that the word length is correctly propagated from the SPI uclass to the driver. Signed-off-by: Dario Binacchi Reviewed-by: Simon Glass --- Changes in v3: - Add Reviewed-by tag of Simon Glass - Get from struct spi_slave data. arch/sandbox/include/asm/test.h | 8 ++++++++ drivers/spi/sandbox_spi.c | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h index 0e8d19ce2325..0438790028b9 100644 --- a/arch/sandbox/include/asm/test.h +++ b/arch/sandbox/include/asm/test.h @@ -243,6 +243,14 @@ uint sandbox_spi_get_speed(struct udevice *dev); */ uint sandbox_spi_get_mode(struct udevice *dev); +/** + * sandbox_spi_get_wordlen() - Get current wordlen setting of a sandbox spi slave + * + * @dev: Device to check + * Return: current wordlen + */ +uint sandbox_spi_get_wordlen(struct udevice *dev); + /** * sandbox_get_pch_spi_protect() - Get the PCI SPI protection status * diff --git a/drivers/spi/sandbox_spi.c b/drivers/spi/sandbox_spi.c index 7c237ac8d371..3ee97d67f4a0 100644 --- a/drivers/spi/sandbox_spi.c +++ b/drivers/spi/sandbox_spi.c @@ -61,6 +61,13 @@ uint sandbox_spi_get_mode(struct udevice *dev) return priv->mode; } +uint sandbox_spi_get_wordlen(struct udevice *dev) +{ + struct spi_slave *slave = dev_get_parent_priv(dev); + + return slave->wordlen; +} + static int sandbox_spi_set_wordlen(struct udevice *dev, unsigned int wordlen) { struct spi_slave *slave = dev_get_parent_priv(dev);