public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] at24: add kernel side usage description
@ 2012-01-25 16:11 yegorslists-gM/Ye1E23mwN+BqQ9rBEUg
       [not found] ` <1327507871-15211-1-git-send-email-yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: yegorslists-gM/Ye1E23mwN+BqQ9rBEUg @ 2012-01-25 16:11 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
  Cc: w.sang-bIcnvbaLZ9MEGnE8C9+IrQ, Yegor Yefremov

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

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

* Re: [PATCH] at24: add kernel side usage description
       [not found] ` <1327507871-15211-1-git-send-email-yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
@ 2012-01-27 13:40   ` Jean Delvare
  2012-01-28 22:53   ` Wolfram Sang
  1 sibling, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2012-01-27 13:40 UTC (permalink / raw)
  To: yegorslists-gM/Ye1E23mwN+BqQ9rBEUg
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, w.sang-bIcnvbaLZ9MEGnE8C9+IrQ

On Wed, 25 Jan 2012 17:11:11 +0100, yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org wrote:
> 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,

Good idea.

Acked-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>

I believe Wolfram will pick this as the maintainer of the at24 driver.

-- 
Jean Delvare

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

* Re: [PATCH] at24: add kernel side usage description
       [not found] ` <1327507871-15211-1-git-send-email-yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
  2012-01-27 13:40   ` Jean Delvare
@ 2012-01-28 22:53   ` Wolfram Sang
       [not found]     ` <20120128225336.GC26708-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2012-01-28 22:53 UTC (permalink / raw)
  To: yegorslists-gM/Ye1E23mwN+BqQ9rBEUg; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1910 bytes --]

On Wed, Jan 25, 2012 at 05:11:11PM +0100, yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org wrote:
> 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.

I think a reference to some board code is not good, since the code might change
for whatever reason. I know that I suggested to place the comment there, but
meanwhile I think at24_platform_data really needs to get proper kernel-doc
annotations, also including your suggestion. I won't force that on you and will
do it in the next days, unless you are eager to do it, of course :)

Thanks,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [PATCH] at24: add kernel side usage description
       [not found]     ` <20120128225336.GC26708-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2012-01-29  0:16       ` Yegor Yefremov
  0 siblings, 0 replies; 4+ messages in thread
From: Yegor Yefremov @ 2012-01-29  0:16 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA

On Sat, Jan 28, 2012 at 11:53 PM, Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> wrote:
> On Wed, Jan 25, 2012 at 05:11:11PM +0100, yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org wrote:
>> 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.
>
> I think a reference to some board code is not good, since the code might change
> for whatever reason. I know that I suggested to place the comment there, but
> meanwhile I think at24_platform_data really needs to get proper kernel-doc
> annotations, also including your suggestion. I won't force that on you and will
> do it in the next days, unless you are eager to do it, of course :)

I think you're the best man to do the job :-) Since you have more
experience in this area.

Yegor

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

end of thread, other threads:[~2012-01-29  0:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-25 16:11 [PATCH] at24: add kernel side usage description yegorslists-gM/Ye1E23mwN+BqQ9rBEUg
     [not found] ` <1327507871-15211-1-git-send-email-yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2012-01-27 13:40   ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox