From: chri <chripell@gmail.com>
To: "Andrew Morton" <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] max3100 driver
Date: Wed, 12 Dec 2007 12:58:46 +0100 [thread overview]
Message-ID: <cabda6420712120358y38ea040bj1f589db65334d27e@mail.gmail.com> (raw)
In-Reply-To: <20071212014941.9bc998bf.akpm@linux-foundation.org>
Hi,
thank you for your extensive review, I will fix and resubmitt. Anyway
I learned an important lesson: checkpatch.pl will be my best friend.
Sorry I haven't read about it earlier.
Just a question:
>
> > +/*
> > + *
> > + * Copyright (C) 2007 Christian Pellegrin
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License as published by
> > + * the Free Software Foundation; either version 2 of the License, or
> > + * (at your option) any later version.
> > + */
> > +
> > +
> > +#ifndef _LINUX_SERIAL_MAX3100_H
> > +#define _LINUX_SERIAL_MAX3100_H 1
> > +
> > +struct plat_max3100 {
> > + int loopback;
> > +/* force MAX3100 in loopback */
> > + int crystal;
> > +/* 0 for 3.6864 Mhz, 1 for 1.8432 */
> > + int only_edge_irq;
> > +/* for archs like PXA with only edge irqs */
> > +};
>
> Does this header file need to exist? afaict plat_max3100 is only used by
> drivers/serial/max3100.c and hence could be defined there?
>
It's used in the machine definition file for platform devices that
cannot be autoprobed. Anyway where is the best place to put such
struct definition / include files? And what is the best way to
document them (if not inline)? For example I put in my machine
definition file (let's say arch/arm/mach-s3c2410/mach-smdk2410.c):
static struct plat_max3100 max3100_plat_data = {
.loopback = 0,
.crystal = 0,
.only_edge_irq = 0,
};
static struct spi_board_info spi_board_info[] = {
{
.modalias = "max3100",
.platform_data = &max3100_plat_data,
.irq = IRQ_EINT12,
.max_speed_hz = 5*1000*1000,
.chip_select = 0,
},
};
...
spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
--
Christian Pellegrin, see http://www.evolware.org/chri/
"Real Programmers don't play tennis, or any other sport which requires
you to change clothes. Mountain climbing is OK, and Real Programmers
wear their climbing boots to work in case a mountain should suddenly
spring up in the middle of the computer room."
next prev parent reply other threads:[~2007-12-12 11:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-05 10:26 chripell
2007-12-12 9:49 ` Andrew Morton
2007-12-12 11:58 ` chri [this message]
2007-12-17 8:17 chripell
2007-12-17 8:45 ` Jiri Slaby
2007-12-17 8:55 ` chri
2007-12-17 9:00 ` Jiri Slaby
2008-09-20 7:20 Christian Pellegrin
2008-09-20 8:24 ` Andrew Morton
2008-09-20 10:35 ` chri
2008-09-20 13:56 ` Arjan van de Ven
2008-09-20 14:30 ` chri
2008-09-20 14:34 ` Alan Cox
2008-09-21 16:09 ` Ben Pfaff
2008-10-09 6:23 ` chri
2008-10-10 12:08 ` Christian Pellegrin
2008-09-20 14:11 ` Alan Cox
2008-09-20 14:37 ` chri
2008-10-09 6:30 ` chri
2008-10-09 9:18 ` Alan Cox
2008-09-20 10:51 Michael Trimarchi
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=cabda6420712120358y38ea040bj1f589db65334d27e@mail.gmail.com \
--to=chripell@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.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
Powered by JetHome