Re: [PATCH 1/3] ARM: tegra: paz00: add support for the embedded controller

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

 



[+gregkh]

On Sat, Oct 22, 2011 at 10:49:42PM +0200, Marc Dietrich wrote:
> On Saturday 22 October 2011 13:27:12 Olof Johansson wrote:
> > On Sat, Oct 22, 2011 at 1:16 PM, Marc Dietrich <marvin24@xxxxxx> wrote:
> > > This adds support for the embedded controller known as NVEC. The driver
> > > lives currently in the staging tree and we aim to promote it one level
> > > higher in the near future.
> > > 
> > > The NVEC driver uses the I2C resources of the master controller for now
> > > until slave support is added to the i2c-tegra driver.
> > > 
> > > diff --git a/arch/arm/mach-tegra/board-paz00.c
> > > b/arch/arm/mach-tegra/board-paz00.c index 602f8dd..3f46b37 100644
> > > --- a/arch/arm/mach-tegra/board-paz00.c
> > > +++ b/arch/arm/mach-tegra/board-paz00.c
> > > @@ -44,6 +44,8 @@
> > >  #include "devices.h"
> > >  #include "gpio-names.h"
> > > 
> > > +#include "../../../drivers/staging/nvec/nvec.h"
> > 
> > Ick, no! Move the header file containing platform data to
> > include/linux/platform_data instead (or break it off in a separate
> > header file).
> 
> I know this looks ugly, but it is AFAIK the only (and the common) way for a 
> staging driver to be used. Of course the header will be moved to e.g. to 
> include/linux/mfd once the driver is ready for mainline, but till that we just
> cannot write somewhere outside of the staging dir.

Actually, you should be OK with adding it to include/linux/platform_data.

But if you're just about to add device tree, it might make sense to do
a device tree binding instead and only do device-tree configuration of the
device instead. Care to cook up a patch for that?

> > > +       tegra_i2c_device3.name = "nvec";
> > > +       tegra_i2c_device3.dev.platform_data = &nvec_pdata;
> > > +       platform_device_register(&tegra_i2c_device3);
> > 
> > Please define a separate platform_device instead of hijacking the
> > current one, please.
> 
> ok, I just wanted to keep the patch small ;-)

Keeping the code clean is more important than keeping the change small.


-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux