diff mbox series

[v9,1/5] nvmem: prepare basics for FRAM support

Message ID 20210611052652.7894-2-jiri.prchal@aksignal.cz
State New
Headers show
Series [v9,1/5] nvmem: prepare basics for FRAM support | expand

Commit Message

Jiri Prchal June 11, 2021, 5:26 a.m. UTC
Added enum and string for FRAM to expose it as "fram".

Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
---
v2: no change here
v3: resend and added more recipients
v4: resend
v5: no change here
v6: changed commit subject
v7: no change here
v8: changed subject
v9: no change here
---
 drivers/nvmem/core.c           | 4 ++++
 include/linux/nvmem-provider.h | 1 +
 2 files changed, 5 insertions(+)

Comments

Greg Kroah-Hartman June 11, 2021, 8:48 a.m. UTC | #1
On Fri, Jun 11, 2021 at 07:26:48AM +0200, Jiri Prchal wrote:
> Added enum and string for FRAM to expose it as "fram".

I have no idea what "FRAM" is, nor what "fram" is.

And why do you not add the documentation update here in this same
commit?  This is where you are adding it, trying to dig later in the
series to notice that you really did provide this is a pain, and is
harder to track.

Please provide more information here in the changelog and move the
Documentation addition here into this patch.

thanks,

greg k-h
Jiri Prchal June 11, 2021, 8:59 a.m. UTC | #2
On 11. 06. 21 10:48, Greg Kroah-Hartman wrote:
> On Fri, Jun 11, 2021 at 07:26:48AM +0200, Jiri Prchal wrote:
>> Added enum and string for FRAM to expose it as "fram".
> 
> I have no idea what "FRAM" is, nor what "fram" is.
> 
> And why do you not add the documentation update here in this same
> commit?  This is where you are adding it, trying to dig later in the
> series to notice that you really did provide this is a pain, and is
> harder to track.
> 
> Please provide more information here in the changelog and move the
> Documentation addition here into this patch.

Should I also join #1 and 2 together?
Greg Kroah-Hartman June 11, 2021, 9:08 a.m. UTC | #3
On Fri, Jun 11, 2021 at 10:59:07AM +0200, Jiří Prchal wrote:
> 
> 
> On 11. 06. 21 10:48, Greg Kroah-Hartman wrote:
> > On Fri, Jun 11, 2021 at 07:26:48AM +0200, Jiri Prchal wrote:
> > > Added enum and string for FRAM to expose it as "fram".
> > 
> > I have no idea what "FRAM" is, nor what "fram" is.
> > 
> > And why do you not add the documentation update here in this same
> > commit?  This is where you are adding it, trying to dig later in the
> > series to notice that you really did provide this is a pain, and is
> > harder to track.
> > 
> > Please provide more information here in the changelog and move the
> > Documentation addition here into this patch.
> 
> Should I also join #1 and 2 together?

I do not remember what patch 2 is now, sorry.  All you really need is
the documentation update merged in here, I don't recall patch 2 being an
issue.

thanks,

greg k-h
Enrico Weigelt, metux IT consult June 14, 2021, 4:38 p.m. UTC | #4
On 11.06.21 10:48, Greg Kroah-Hartman wrote:
> On Fri, Jun 11, 2021 at 07:26:48AM +0200, Jiri Prchal wrote:

>> Added enum and string for FRAM to expose it as "fram".

> 

> I have no idea what "FRAM" is, nor what "fram" is.


perhaps ferroelectric RAM ?

https://en.wikipedia.org/wiki/Ferroelectric_RAM


--mtx

-- 
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287
diff mbox series

Patch

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 177f5bf27c6d..01ef9a934b0a 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -180,6 +180,7 @@  static const char * const nvmem_type_str[] = {
 	[NVMEM_TYPE_EEPROM] = "EEPROM",
 	[NVMEM_TYPE_OTP] = "OTP",
 	[NVMEM_TYPE_BATTERY_BACKED] = "Battery backed",
+	[NVMEM_TYPE_FRAM] = "FRAM",
 };
 
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
@@ -359,6 +360,9 @@  static int nvmem_sysfs_setup_compat(struct nvmem_device *nvmem,
 	if (!config->base_dev)
 		return -EINVAL;
 
+	if (config->type == NVMEM_TYPE_FRAM)
+		bin_attr_nvmem_eeprom_compat.attr.name = "fram";
+
 	nvmem->eeprom = bin_attr_nvmem_eeprom_compat;
 	nvmem->eeprom.attr.mode = nvmem_bin_attr_get_umode(nvmem);
 	nvmem->eeprom.size = nvmem->size;
diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index e162b757b6d5..890003565761 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -25,6 +25,7 @@  enum nvmem_type {
 	NVMEM_TYPE_EEPROM,
 	NVMEM_TYPE_OTP,
 	NVMEM_TYPE_BATTERY_BACKED,
+	NVMEM_TYPE_FRAM,
 };
 
 #define NVMEM_DEVID_NONE	(-1)