public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [patch/resend] nand: add containing structure for NAND platform data
@ 2007-04-30 10:22 Vitaly
  2007-04-30 15:50 ` Sergei Shtylyov
  0 siblings, 1 reply; 4+ messages in thread
From: Vitaly @ 2007-04-30 10:22 UTC (permalink / raw)
  To: linux-mtd

In order to make it more convenient to pass platform-specific NAND stuff 
to a generic driver which is hopefully to come out next, I've introduced
a container structure for chip-specific and controller-specific data.
I'd expect that use cases in platform code will be like

struct platform_nand_data nand_data = {
	...
};

struct platform_device nand_device = {
	...
	.dev = {
		.platform_data = &nand_data,
		...
	},
};

So, please find the patch below.

 include/linux/mtd/nand.h |   10 ++++++++++
 1 files changed, 10 insertions(+)

Signed-off-by: Vitaly Wool <vitalywool@gmail.com> <mailto:vitalywool@gmail.com>

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

* Re: [patch/resend] nand: add containing structure for NAND platform data
  2007-04-30 10:22 [patch/resend] nand: add containing structure for NAND platform data Vitaly
@ 2007-04-30 15:50 ` Sergei Shtylyov
  2007-04-30 16:10   ` Vitaly Wool
  0 siblings, 1 reply; 4+ messages in thread
From: Sergei Shtylyov @ 2007-04-30 15:50 UTC (permalink / raw)
  To: Vitaly; +Cc: linux-mtd

Hello.

Vitaly wrote:

> In order to make it more convenient to pass platform-specific NAND stuff 
> to a generic driver which is hopefully to come out next, I've introduced
> a container structure for chip-specific and controller-specific data.
> I'd expect that use cases in platform code will be like
> 
> struct platform_nand_data nand_data = {
> 	...
> };
> 
> struct platform_device nand_device = {
> 	...
> 	.dev = {
> 		.platform_data = &nand_data,
> 		...
> 	},
> };
> 
> So, please find the patch below.
> 
>  include/linux/mtd/nand.h |   10 ++++++++++
>  1 files changed, 10 insertions(+)
> 
> Signed-off-by: Vitaly Wool <vitalywool@gmail.com> <mailto:vitalywool@gmail.com>

   Erm, I can't. ;-)

> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

MBR, Sergei

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

* Re: [patch/resend] nand: add containing structure for NAND platform data
  2007-04-30 15:50 ` Sergei Shtylyov
@ 2007-04-30 16:10   ` Vitaly Wool
  0 siblings, 0 replies; 4+ messages in thread
From: Vitaly Wool @ 2007-04-30 16:10 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linux-mtd

> > So, please find the patch below.
> >
> >  include/linux/mtd/nand.h |   10 ++++++++++
> >  1 files changed, 10 insertions(+)
> >
> > Signed-off-by: Vitaly Wool <vitalywool@gmail.com> <mailto:vitalywool@gmail.com>
>
>    Erm, I can't. ;-)

I did mess it up. Sorry guys. Will resend shortly.

Vitaly

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

* [patch/resend] nand: add containing structure for NAND platform data
@ 2007-04-30 16:19 Vitaly Wool
  0 siblings, 0 replies; 4+ messages in thread
From: Vitaly Wool @ 2007-04-30 16:19 UTC (permalink / raw)
  To: linux-mtd

In order to make it more convenient to pass platform-specific NAND stuff
to a generic driver which is hopefully to come out next, I've introduced
a container structure for chip-specific and controller-specific data.
I'd expect that use cases in platform code will be like

struct platform_nand_data nand_data = {
	...
};

struct platform_device nand_device = {
	...
	.dev = {
		.platform_data = &nand_data,
		...
	},
};

So, please find the patch below.

 include/linux/mtd/nand.h |   10 ++++++++++
 1 files changed, 10 insertions(+)

Index: linux-2.6/include/linux/mtd/nand.h
===================================================================
--- linux-2.6.orig/include/linux/mtd/nand.h
+++ linux-2.6/include/linux/mtd/nand.h
@@ -592,6 +592,16 @@ struct platform_nand_ctrl {
 	void		*priv;
 };
 
+/**
+ * struct platform_nand_data - container structure for platform-specific data
+ * @chip:		chip level chip structure
+ * @ctrl:		controller level device structure
+ */
+struct platform_nand_data {
+	struct platform_nand_chip	chip;
+	struct platform_nand_ctrl	ctrl;
+};
+
 /* Some helpers to access the data structures */
 static inline
 struct platform_nand_chip *get_platform_nandchip(struct mtd_info *mtd)

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

end of thread, other threads:[~2007-04-30 16:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-30 10:22 [patch/resend] nand: add containing structure for NAND platform data Vitaly
2007-04-30 15:50 ` Sergei Shtylyov
2007-04-30 16:10   ` Vitaly Wool
  -- strict thread matches above, loose matches on Subject: below --
2007-04-30 16:19 Vitaly Wool

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