lkml.org 
[lkml]   [2023]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V3 2/2] nvmem: add generic driver for devices with MMIO access
From
Hi,

On 2/20/23 09:49, Rafał Miłecki wrote:
> +static int mmio_nvmem_write(void *context, unsigned int offset, void *val, size_t bytes)
> +{
> + struct mmio_nvmem *priv = context;
> +
> + switch (priv->io_width) {
> + case 1:
> + case 2:
> + case 4:
> + return -EOPNOTSUPP;

I'm just curious: (since read supports those cases)

what size writes are typically used here?
And what value for priv->io_width?



Thanks.

> + default:
> + memcpy_toio(priv->base + offset, val, bytes);
> + }
> +
> + return 0;
> +}

--
~Randy

\
 
 \ /
  Last update: 2023-03-27 00:29    [W:0.698 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site