[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdbsogzeGjK_f45Kr-V1R0ZCo=-2tp+geLqt4+VFnpdrdA@mail.gmail.com>
Date: Sun, 21 Jul 2013 16:35:38 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Simon Guinot <simon.guinot@...uanux.org>
Cc: Grant Likely <grant.likely@...retlab.ca>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Vincent Donnefort <vdonnefort@...il.com>
Subject: Re: [PATCH] gpio: add GPIO support for F71882FG and F71889F
On Mon, Jul 1, 2013 at 6:28 PM, Simon Guinot <simon.guinot@...uanux.org> wrote:
> On Sun, Jun 30, 2013 at 01:35:00AM +0200, Linus Walleij wrote:
>> > +static struct platform_driver f7188x_gpio_driver = {
>> > + .driver = {
>> > + .owner = THIS_MODULE,
>> > + .name = DRVNAME,
>> > + },
>> > + .probe = f7188x_gpio_probe,
>> > + .remove = f7188x_gpio_remove,
>> > +};
>> > +
>> > +static int __init f7188x_gpio_init(void)
>> > +{
>> > + int err;
>> > + struct f7188x_sio sio;
>> > +
>> > + if (f7188x_find(0x2e, &sio) &&
>> > + f7188x_find(0x4e, &sio))
>> > + return -ENODEV;
>>
>> This looks like the life on the ISA-bus. Is that not dangerous?
>
> I guess this looks like the ISA bus because this super-I/O uses the LPC
> bus which is ISA-compatible. At my knowledge, reading this I/O ports
> and trying to match the vendor and device IDs is the only way to
> identify the super-I/O chip. For example, have a look at the drivers
> f71882fg (hwmon) and f71808e_wdt (watchdog). Both are using the same
> identification mechanism.
As said yesterday, this is OK, I guess.
Auto-detection is always to be preferred.
I was just worrying if it could somehow be hazardous if this
module is loaded on systems without this hardware.
It also goes against the trend of describing hardware using
things like devicetree or ACPI tables, but that is a broader
discussion and something we cannot always influence.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists