[PATCH v5 2/3] nvmem: core: deprecate reg_write callback with reg_write_const

Andy Shevchenko andriy.shevchenko at intel.com
Tue Sep 15 00:15:36 PDT 2026


On Mon, Sep 14, 2026 at 10:48:21PM +0100, Srinivas Kandagatla wrote:
> On 8/4/26 2:59 PM, Link Mauve wrote:

...

> > - * @reg_write:	Callback to write data; return zero if successful.
> > + * @reg_write:	**DEPRECATED** - please use reg_write_const instead.
> 
> Marking here as deprecated is total waste as no one will read it,

This is still okay as we have many such things in the kernel (during the time).

> May be move this message to the core while registering.

No objections here.

...

> >  	nvmem_reg_read_t	reg_read;
> >  	nvmem_reg_write_t	reg_write;
> 
> flag this with compile time __deprecated flag.

__deprecated is DEPRECATED :-)
No new code should use it.

include/linux/compiler_attributes.h:110: * Don't. Just don't. See commit 771c035372a0 ("deprecate the '__deprecated'

> > +	nvmem_reg_write_const_t	reg_write_const;


-- 
With Best Regards,
Andy Shevchenko





More information about the linux-amlogic mailing list