Re: [PATCH] gpio: add GPIO support for SMSC SCH311x

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

 



Hi Linus,

You wrote:
> >> drivers/gpio/gpio-ts5500.c - aha, created from
> >>   arch/x86/platform/ts5500/ts5500.c, a "board file".
> >
> > Because of the lack of mechanism such as DMI, there's no safe way
> > to verify the
> > machine at the GPIO driver level. However, the board code (which
> > registers the
> > platform device) does a safe check by looking for some magic in the
> > RAM.
> >
> > Would it be safer if we make GPIO_TS5500 depends on TS5500?
> 
> I don't know actually. How does it work with these x86 things?
> Is it so that the system comes up and then you modprobe this driver?

With TS5500 selected, the board comes up, get probed reading the RAM
(from the board code), then registers this GPIO platform device.

> In that case, do you bring up a fully generic kernel or do you have
> to have it compiled with CONFIG_TS5500 set to 'y' and is that
> done of a say, typical distro kernel?

GPIO_TS5500 cannot probe the DIO blocks by itself. It needs a board
code to fill and register the corresponding platform device structures.

So a generic x86 kernel will work on the board, but we need TS5500 set
to 'y' in order to have the GPIOs.

> If we don't know if it will be modprobed or not on a certain system
> we should keep it as is, but of the distro kernels all set
> CONFIG_TS5500 to 'n' then we should add a dependency
> like that.

As it is an embedded platform, I don't think CONFIG_TS5500 is enabled
on distro kernels.

I hope it's a bit clearer. Let me know what is your advice on this.

Best,
Vivien
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux