Re: [PATCH] i2c: i801: Register optional lis3lv02d i2c device on Dell machines

Andy Shevchenko
2017-01-03T20:21:50Z

On Tue, Jan 3, 2017 at 8:50 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> On Tuesday 03 January 2017 19:38:43 Dmitry Torokhov wrote:

>> "IIRC both dell-smo8800 and lis3lv02d represent one HW device (that
>> ST microelectronics accelerometer) but due to complicated HW
>> abstraction and layers on Dell laptops it is handled by two drivers,
>> one ACPI and one i2c."
>>
>> and that is the core of the issue. You have 2 drivers fighting over
>> the same device. Fix this and it will all work.
>
> With my current implementation (which I sent in this patch), they are
> not fighting.
>
> dell-smo8800 exports /dev/freefall (and nothing more) and lis3lv02d only
> accelerometer device as lis3lv02d driver does not get IRQ number in
> platform data.
>
>> As far as I can see hp_accel instantiates lis3lv02d and accesses it
>> via ACPI methods, can the same be done for Dell?
>
> No, Dell does not have any ACPI methods.

> And as I wrote in ACPI or DMI
> is even not i2c address of device, so it needs to be specified in code
> itself.

And as I wrote there is still a way to provide it without hardcoding
on model basis.

> Really there is no other way... :-(

--
With Best Regards,
Andy Shevchenko