public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
	Yegor Yefremov
	<yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Subject: [PATCH] at24: add kernel side usage description
Date: Wed, 25 Jan 2012 17:11:11 +0100	[thread overview]
Message-ID: <1327507871-15211-1-git-send-email-yegorslists@googlemail.com> (raw)

From: Yegor Yefremov <yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>

Add EEPROM usage instructions and example for kernel side.
dm644x-evm was taken as example.

Signed-off-by: Yegor Yefremov <yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
---
 drivers/misc/eeprom/at24.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index ab1ad41..49494ad 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -438,6 +438,15 @@ static ssize_t at24_bin_write(struct file *filp, struct kobject *kobj,
  * This lets other kernel code access the eeprom data. For example, it
  * might hold a board's Ethernet address, or board-specific calibration
  * data generated on the manufacturing floor.
+ *
+ * struct at24_platform_data provides special hook .setup, that can
+ * invoke at24_macc_read()/at24_macc_write() through memory_accessor:
+ * 
+ * void		(*setup)(struct memory_accessor *, void *context);
+ *
+ * setup hook (if provided) will be executed at the end of at24_probe().
+ *
+ * See arch/arm/mach-davinci/board-dm644x-evm.c for details.
  */
 
 static ssize_t at24_macc_read(struct memory_accessor *macc, char *buf,
-- 
1.7.1.1

             reply	other threads:[~2012-01-25 16:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-25 16:11 yegorslists-gM/Ye1E23mwN+BqQ9rBEUg [this message]
     [not found] ` <1327507871-15211-1-git-send-email-yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2012-01-27 13:40   ` [PATCH] at24: add kernel side usage description Jean Delvare
2012-01-28 22:53   ` Wolfram Sang
     [not found]     ` <20120128225336.GC26708-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-01-29  0:16       ` Yegor Yefremov

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=1327507871-15211-1-git-send-email-yegorslists@googlemail.com \
    --to=yegorslists-gm/ye1e23mwn+bqq9rbeug@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.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