linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vadym Kochan <vadym.kochan@plvision.eu>
To: Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Vadym Kochan <vadym.kochan@plvision.eu>
Subject: [PATCH 1/3] eeprom: at24: set type id as EEPROM
Date: Wed, 16 Sep 2020 20:09:31 +0300	[thread overview]
Message-ID: <20200916170933.20302-2-vadym.kochan@plvision.eu> (raw)
In-Reply-To: <20200916170933.20302-1-vadym.kochan@plvision.eu>

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


  reply	other threads:[~2020-09-16 20:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2020-09-17  8:06   ` [PATCH 1/3] eeprom: at24: set type id as EEPROM 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200916170933.20302-2-vadym.kochan@plvision.eu \
    --to=vadym.kochan@plvision.eu \
    --cc=arnd@arndb.de \
    --cc=bgolaszewski@baylibre.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavoars@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).