linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] misc: eeprom: set type id as EEPROM for nvmem devices
@ 2020-09-16 17:09 Vadym Kochan
  2020-09-16 17:09 ` [PATCH 1/3] eeprom: at24: set type id as EEPROM Vadym Kochan
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Vadym Kochan @ 2020-09-16 17:09 UTC (permalink / raw)
  To: Bartosz Golaszewski, Srinivas Kandagatla, Arnd Bergmann,
	Greg Kroah-Hartman, Gustavo A. R. Silva, linux-i2c, linux-kernel
  Cc: Vadym Kochan

Set type as NVMEM_TYPE_EEPROM to expose this info via
sysfs:

$ cat /sys/bus/nvmem/devices/0-00560/type
EEPROM

Tested only with at24 device.

Vadym Kochan (3):
  eeprom: at24: set type id as EEPROM
  eeprom: at25: set type id as EEPROM
  eeprom: 93xx46: set type id as EEPROM

 drivers/misc/eeprom/at24.c          | 1 +
 drivers/misc/eeprom/at25.c          | 1 +
 drivers/misc/eeprom/eeprom_93xx46.c | 1 +
 3 files changed, 3 insertions(+)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] eeprom: at24: set type id as EEPROM
  2020-09-16 17:09 [PATCH 0/3] misc: eeprom: set type id as EEPROM for nvmem devices Vadym Kochan
@ 2020-09-16 17:09 ` Vadym Kochan
  2020-09-17  8:06   ` Bartosz Golaszewski
  2020-09-16 17:09 ` [PATCH 2/3] eeprom: at25: " Vadym Kochan
  2020-09-16 17:09 ` [PATCH 3/3] eeprom: 93xx46: " Vadym Kochan
  2 siblings, 1 reply; 5+ messages in thread
From: Vadym Kochan @ 2020-09-16 17:09 UTC (permalink / raw)
  To: Bartosz Golaszewski, Srinivas Kandagatla, Arnd Bergmann,
	Greg Kroah-Hartman, Gustavo A. R. Silva, linux-i2c, linux-kernel
  Cc: Vadym Kochan

Set type as NVMEM_TYPE_EEPROM to expose this info via
sysfs:

$ cat /sys/bus/nvmem/devices/{DEVICE}/type
EEPROM

Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
---
 drivers/misc/eeprom/at24.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index 2591c21b2b5d..800300296c74 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -678,6 +678,7 @@ static int at24_probe(struct i2c_client *client)
 			return err;
 	}
 
+	nvmem_config.type = NVMEM_TYPE_EEPROM;
 	nvmem_config.name = dev_name(dev);
 	nvmem_config.dev = dev;
 	nvmem_config.read_only = !writable;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/3] eeprom: at25: set type id as EEPROM
  2020-09-16 17:09 [PATCH 0/3] misc: eeprom: set type id as EEPROM for nvmem devices Vadym Kochan
  2020-09-16 17:09 ` [PATCH 1/3] eeprom: at24: set type id as EEPROM Vadym Kochan
@ 2020-09-16 17:09 ` Vadym Kochan
  2020-09-16 17:09 ` [PATCH 3/3] eeprom: 93xx46: " Vadym Kochan
  2 siblings, 0 replies; 5+ messages in thread
From: Vadym Kochan @ 2020-09-16 17:09 UTC (permalink / raw)
  To: Bartosz Golaszewski, Srinivas Kandagatla, Arnd Bergmann,
	Greg Kroah-Hartman, Gustavo A. R. Silva, linux-i2c, linux-kernel
  Cc: Vadym Kochan

Set type as NVMEM_TYPE_EEPROM to expose this info via
sysfs:

$ cat /sys/bus/nvmem/devices/{DEVICE}/type
EEPROM

Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
---
 drivers/misc/eeprom/at25.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c
index ed8d38b09925..3a586a7c4b1a 100644
--- a/drivers/misc/eeprom/at25.c
+++ b/drivers/misc/eeprom/at25.c
@@ -348,6 +348,7 @@ static int at25_probe(struct spi_device *spi)
 	spi_set_drvdata(spi, at25);
 	at25->addrlen = addrlen;
 
+	at25->nvmem_config.type = NVMEM_TYPE_EEPROM;
 	at25->nvmem_config.name = dev_name(&spi->dev);
 	at25->nvmem_config.dev = &spi->dev;
 	at25->nvmem_config.read_only = chip.flags & EE_READONLY;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 3/3] eeprom: 93xx46: set type id as EEPROM
  2020-09-16 17:09 [PATCH 0/3] misc: eeprom: set type id as EEPROM for nvmem devices Vadym Kochan
  2020-09-16 17:09 ` [PATCH 1/3] eeprom: at24: set type id as EEPROM Vadym Kochan
  2020-09-16 17:09 ` [PATCH 2/3] eeprom: at25: " Vadym Kochan
@ 2020-09-16 17:09 ` Vadym Kochan
  2 siblings, 0 replies; 5+ messages in thread
From: Vadym Kochan @ 2020-09-16 17:09 UTC (permalink / raw)
  To: Bartosz Golaszewski, Srinivas Kandagatla, Arnd Bergmann,
	Greg Kroah-Hartman, Gustavo A. R. Silva, linux-i2c, linux-kernel
  Cc: Vadym Kochan

Set type as NVMEM_TYPE_EEPROM to expose this info via
sysfs:

$ cat /sys/bus/nvmem/devices/{DEVICE}/type
EEPROM

Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
---
 drivers/misc/eeprom/eeprom_93xx46.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/misc/eeprom/eeprom_93xx46.c b/drivers/misc/eeprom/eeprom_93xx46.c
index 94cfb675fe4e..7c45f82b4302 100644
--- a/drivers/misc/eeprom/eeprom_93xx46.c
+++ b/drivers/misc/eeprom/eeprom_93xx46.c
@@ -455,6 +455,7 @@ static int eeprom_93xx46_probe(struct spi_device *spi)
 	edev->pdata = pd;
 
 	edev->size = 128;
+	edev->nvmem_config.type = NVMEM_TYPE_EEPROM;
 	edev->nvmem_config.name = dev_name(&spi->dev);
 	edev->nvmem_config.dev = &spi->dev;
 	edev->nvmem_config.read_only = pd->flags & EE_READONLY;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] eeprom: at24: set type id as EEPROM
  2020-09-16 17:09 ` [PATCH 1/3] eeprom: at24: set type id as EEPROM Vadym Kochan
@ 2020-09-17  8:06   ` Bartosz Golaszewski
  0 siblings, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2020-09-17  8:06 UTC (permalink / raw)
  To: Vadym Kochan
  Cc: Srinivas Kandagatla, Arnd Bergmann, Greg Kroah-Hartman,
	Gustavo A. R. Silva, linux-i2c, LKML

On Wed, Sep 16, 2020 at 7:10 PM Vadym Kochan <vadym.kochan@plvision.eu> wrote:
>
> Set type as NVMEM_TYPE_EEPROM to expose this info via
> sysfs:
>
> $ cat /sys/bus/nvmem/devices/{DEVICE}/type
> EEPROM
>
> Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
> ---
>  drivers/misc/eeprom/at24.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
> index 2591c21b2b5d..800300296c74 100644
> --- a/drivers/misc/eeprom/at24.c
> +++ b/drivers/misc/eeprom/at24.c
> @@ -678,6 +678,7 @@ static int at24_probe(struct i2c_client *client)
>                         return err;
>         }
>
> +       nvmem_config.type = NVMEM_TYPE_EEPROM;
>         nvmem_config.name = dev_name(dev);
>         nvmem_config.dev = dev;
>         nvmem_config.read_only = !writable;
> --
> 2.17.1
>

Queued for v5.10, thanks!

Bartosz

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-17  8:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 17:09 [PATCH 0/3] misc: eeprom: set type id as EEPROM for nvmem devices Vadym Kochan
2020-09-16 17:09 ` [PATCH 1/3] eeprom: at24: set type id as EEPROM Vadym Kochan
2020-09-17  8:06   ` Bartosz Golaszewski
2020-09-16 17:09 ` [PATCH 2/3] eeprom: at25: " Vadym Kochan
2020-09-16 17:09 ` [PATCH 3/3] eeprom: 93xx46: " Vadym Kochan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).