[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190528095402.hlnqfon6jk452one@pali>
Date: Tue, 28 May 2019 11:54:02 +0200
From: Pali Rohár <pali.rohar@...il.com>
To: Jean Delvare <jdelvare@...e.de>
Cc: Wolfram Sang <wsa@...-dreams.de>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Michał Kępień <kernel@...pniu.pl>,
Steven Honeyman <stevenhoneyman@...il.com>,
Valdis Kletnieks <Valdis.Kletnieks@...edu>,
Jochen Eisinger <jochen@...guin-breeder.org>,
Gabriele Mazzotta <gabriele.mzt@...il.com>,
Andy Lutomirski <luto@...nel.org>,
Mario Limonciello <Mario_Limonciello@...l.com>,
Alex Hung <alex.hung@...onical.com>,
Takashi Iwai <tiwai@...e.de>,
linux-i2c <linux-i2c@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Platform Driver <platform-driver-x86@...r.kernel.org>
Subject: Re: [PATCH v2] i2c: i801: Register optional lis3lv02d i2c device on
Dell machines
On Tuesday 28 May 2019 11:50:15 Jean Delvare wrote:
> On Tue, 2019-05-28 at 11:41 +0200, Pali Rohár wrote:
> > This is not a problem. lis3lv02d provides two things:
> >
> > 1) 3 axes accelerometer
> > 2) optional interrupt and signal it to userspace via misc device
> >
> > dell-smo8800 does not call any parts of lis2lv02d module. It just
> > provides for userspace same misc device API as lis3lv02d.
> >
> > As lis3lv02d has misc device optional, registered i2c device from
> > i2c-i801 does not enable it.
> >
> > So technically it is one device, but their functionality divided into
> > two modules. One which reports accelerometer axes and one which signals
> > disk fall interrupt. These two modules and functionalities does not have
> > to interact, so it is safe to have them separated.
>
> OK, thanks for the explanation. But assuming that we now instantiate
> the lis2lv02d device from i2c-i801 for exactly all the same machines,
> can't we just *enable* the freefall misc device feature of lis2lv02d
> and kill the dell-smo8800 driver completely? Seems more simple to
> maintain going forward.
I though about it and I already wrote that is it not practical. For ACPI
drivers there is easy way to get that interrupt number from ACPI tables.
>From i2c-i801 PCI driver it is hard to get interrupt number for
particular ACPI device...
That is way I preferred simple solution: ACPI driver for ACPI device and
i2c driver for i2c device.
--
Pali Rohár
pali.rohar@...il.com
Powered by blists - more mailing lists