Re: [PATCH] max3100 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux