kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* The Kernel knows. But how ? Did the acpi make a secret dead drop ?
@ 2019-01-06  8:52 Jay Aurabind
  2019-01-06 11:16 ` Greg KH
  2019-01-06 11:19 ` Valentin Vidic
  0 siblings, 2 replies; 8+ messages in thread
From: Jay Aurabind @ 2019-01-06  8:52 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 826 bytes --]

Hi,

The subject line might be a bit dramatic, but I assure you my question is
isn't.

I have a 3-axis accelerometer (LIS3LV02DL) in my laptop which shows up as
an input device. Since its x86, I am assuming the necessary information was
encoded in ACPI Tables. But I cannot find any mention of this device in the
acpi tables exposed by the kernel.

I tried grepping through all the ACPI tables in /sys/firmware/acpi/tables.
I was hoping to find some string that could identify the corresponding
kernel drivers. But there are no hits for "lis". I suppose string based
literals are not the way acpi works like in kernel device-driver matching.
The driver in question is  drivers/misc/lis3lv02d/lis3lv02d.c

So what exactly in the ACPI triggered the kernel module lis3lv02d to be
loaded ?

-- 

Thanks and Regards,
*Aurabindo J*

[-- Attachment #1.2: Type: text/html, Size: 1911 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: The Kernel knows. But how ? Did the acpi make a secret dead drop ?
  2019-01-06  8:52 The Kernel knows. But how ? Did the acpi make a secret dead drop ? Jay Aurabind
@ 2019-01-06 11:16 ` Greg KH
  2019-01-06 11:19 ` Valentin Vidic
  1 sibling, 0 replies; 8+ messages in thread
From: Greg KH @ 2019-01-06 11:16 UTC (permalink / raw)
  To: Jay Aurabind; +Cc: kernelnewbies

On Sun, Jan 06, 2019 at 02:22:34PM +0530, Jay Aurabind wrote:
> Hi,
> 
> The subject line might be a bit dramatic, but I assure you my question is
> isn't.
> 
> I have a 3-axis accelerometer (LIS3LV02DL) in my laptop which shows up as
> an input device. Since its x86, I am assuming the necessary information was
> encoded in ACPI Tables. But I cannot find any mention of this device in the
> acpi tables exposed by the kernel.

Odds are it is an i2c device, that's the way it normally is hooked up on
a laptop, not through ACPI as you have noticed.

Does that help?

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: The Kernel knows. But how ? Did the acpi make a secret dead drop ?
  2019-01-06  8:52 The Kernel knows. But how ? Did the acpi make a secret dead drop ? Jay Aurabind
  2019-01-06 11:16 ` Greg KH
@ 2019-01-06 11:19 ` Valentin Vidic
  2019-01-06 12:47   ` Jay Aurabind
  1 sibling, 1 reply; 8+ messages in thread
From: Valentin Vidic @ 2019-01-06 11:19 UTC (permalink / raw)
  To: kernelnewbies

On Sun, Jan 06, 2019 at 02:22:34PM +0530, Jay Aurabind wrote:
> The subject line might be a bit dramatic, but I assure you my question is
> isn't.
> 
> I have a 3-axis accelerometer (LIS3LV02DL) in my laptop which shows up as
> an input device. Since its x86, I am assuming the necessary information was
> encoded in ACPI Tables. But I cannot find any mention of this device in the
> acpi tables exposed by the kernel.
> 
> I tried grepping through all the ACPI tables in /sys/firmware/acpi/tables.
> I was hoping to find some string that could identify the corresponding
> kernel drivers. But there are no hits for "lis". I suppose string based
> literals are not the way acpi works like in kernel device-driver matching.
> The driver in question is  drivers/misc/lis3lv02d/lis3lv02d.c
> 
> So what exactly in the ACPI triggered the kernel module lis3lv02d to be
> loaded ?

It seems to me this is an I2C device so the following alias could load it:

modules.alias:alias i2c:lis3lv02d lis3lv02d_i2c

-- 
Valentin

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: The Kernel knows. But how ? Did the acpi make a secret dead drop ?
  2019-01-06 11:19 ` Valentin Vidic
@ 2019-01-06 12:47   ` Jay Aurabind
  2019-01-06 13:00     ` Valentin Vidic
  0 siblings, 1 reply; 8+ messages in thread
From: Jay Aurabind @ 2019-01-06 12:47 UTC (permalink / raw)
  To: Valentin Vidic; +Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 1502 bytes --]

On Sun, 6 Jan 2019 at 16:49, Valentin Vidic <Valentin.Vidic@carnet.hr>
wrote:

> On Sun, Jan 06, 2019 at 02:22:34PM +0530, Jay Aurabind wrote:
> > The subject line might be a bit dramatic, but I assure you my question is
> > isn't.
> >
> > I have a 3-axis accelerometer (LIS3LV02DL) in my laptop which shows up as
> > an input device. Since its x86, I am assuming the necessary information
> was
> > encoded in ACPI Tables. But I cannot find any mention of this device in
> the
> > acpi tables exposed by the kernel.
> >
> > I tried grepping through all the ACPI tables in
> /sys/firmware/acpi/tables.
> > I was hoping to find some string that could identify the corresponding
> > kernel drivers. But there are no hits for "lis". I suppose string based
> > literals are not the way acpi works like in kernel device-driver
> matching.
> > The driver in question is  drivers/misc/lis3lv02d/lis3lv02d.c
> >
> > So what exactly in the ACPI triggered the kernel module lis3lv02d to be
> > loaded ?
>
> It seems to me this is an I2C device so the following alias could load it:
>
> modules.alias:alias i2c:lis3lv02d lis3lv02d_i2c
>

Apparently it could be both I2C or SPI, as I find lis3lv02d_spi.c as well.
I don't really know if this device sits on I2C bus or SPI.


> --
> Valentin
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>


-- 

Thanks and Regards,
*Aurabindo J*

[-- Attachment #1.2: Type: text/html, Size: 2915 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: The Kernel knows. But how ? Did the acpi make a secret dead drop ?
  2019-01-06 12:47   ` Jay Aurabind
@ 2019-01-06 13:00     ` Valentin Vidic
  2019-01-06 13:28       ` Jay Aurabind
  0 siblings, 1 reply; 8+ messages in thread
From: Valentin Vidic @ 2019-01-06 13:00 UTC (permalink / raw)
  To: kernelnewbies

On Sun, Jan 06, 2019 at 06:17:44PM +0530, Jay Aurabind wrote:
> Apparently it could be both I2C or SPI, as I find lis3lv02d_spi.c as well.
> I don't really know if this device sits on I2C bus or SPI.

Yes, but you can check lsmod after boot to see if i2c driver was loaded.
Also you can try to list i2c devices to see if it appears there.

-- 
Valentin

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: The Kernel knows. But how ? Did the acpi make a secret dead drop ?
  2019-01-06 13:00     ` Valentin Vidic
@ 2019-01-06 13:28       ` Jay Aurabind
  2019-01-06 14:07         ` Valentin Vidic
  0 siblings, 1 reply; 8+ messages in thread
From: Jay Aurabind @ 2019-01-06 13:28 UTC (permalink / raw)
  To: Valentin Vidic; +Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 847 bytes --]

On Sun, 6 Jan 2019 at 18:32, Valentin Vidic <Valentin.Vidic@carnet.hr>
wrote:

> On Sun, Jan 06, 2019 at 06:17:44PM +0530, Jay Aurabind wrote:
> > Apparently it could be both I2C or SPI, as I find lis3lv02d_spi.c as
> well.
> > I don't really know if this device sits on I2C bus or SPI.
>
> Yes, but you can check lsmod after boot to see if i2c driver was loaded.
> Also you can try to list i2c devices to see if it appears there.
>

I do not have any /dev/i2c* listings. Besides, these are the only modules
with i2c in their names:

i2c_algo_bit
i2c_i801
i2c_smbus

i915 uses the first one. Nothing else.


> --
> Valentin
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>


-- 

Thanks and Regards,
*Aurabindo J*

[-- Attachment #1.2: Type: text/html, Size: 2495 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: The Kernel knows. But how ? Did the acpi make a secret dead drop ?
  2019-01-06 13:28       ` Jay Aurabind
@ 2019-01-06 14:07         ` Valentin Vidic
  2019-01-06 15:02           ` Jay Aurabind
  0 siblings, 1 reply; 8+ messages in thread
From: Valentin Vidic @ 2019-01-06 14:07 UTC (permalink / raw)
  To: kernelnewbies

On Sun, Jan 06, 2019 at 06:58:09PM +0530, Jay Aurabind wrote:
> I do not have any /dev/i2c* listings. Besides, these are the only modules
> with i2c in their names:

If not i2c than it could be this load path:

modules.alias:alias acpi*:HPQ6007:* hp_accel
modules.alias:alias acpi*:HPQ6000:* hp_accel
modules.alias:alias acpi*:HPQ0004:* hp_accel
modules.dep:kernel/drivers/platform/x86/hp_accel.ko: kernel/drivers/misc/lis3lv02d/lis3lv02d.ko kernel/drivers/input/input-polldev.ko

-- 
Valentin

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: The Kernel knows. But how ? Did the acpi make a secret dead drop ?
  2019-01-06 14:07         ` Valentin Vidic
@ 2019-01-06 15:02           ` Jay Aurabind
  0 siblings, 0 replies; 8+ messages in thread
From: Jay Aurabind @ 2019-01-06 15:02 UTC (permalink / raw)
  To: Valentin Vidic; +Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 1108 bytes --]

On Sun, 6 Jan 2019 at 19:37, Valentin Vidic <Valentin.Vidic@carnet.hr>
wrote:

> On Sun, Jan 06, 2019 at 06:58:09PM +0530, Jay Aurabind wrote:
> > I do not have any /dev/i2c* listings. Besides, these are the only modules
> > with i2c in their names:
>
> If not i2c than it could be this load path:
>
> modules.alias:alias acpi*:HPQ6007:* hp_accel
> modules.alias:alias acpi*:HPQ6000:* hp_accel
> modules.alias:alias acpi*:HPQ0004:* hp_accel
> modules.dep:kernel/drivers/platform/x86/hp_accel.ko:
> kernel/drivers/misc/lis3lv02d/lis3lv02d.ko
> kernel/drivers/input/input-polldev.ko
>
>
Interesting observation! So I just checked, the ACPI tables does have the
string HPQ6000 in it!
And I found hp_accel creates an acpi driver which in turn says it
needs lis3lv02d


So there are no dead drops! :P This info answers my question. Thank you so
much for your help Valentin!

-- 
> Valentin
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>


-- 

Thanks and Regards,
*Aurabindo J*

[-- Attachment #1.2: Type: text/html, Size: 2756 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-01-06 15:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-06  8:52 The Kernel knows. But how ? Did the acpi make a secret dead drop ? Jay Aurabind
2019-01-06 11:16 ` Greg KH
2019-01-06 11:19 ` Valentin Vidic
2019-01-06 12:47   ` Jay Aurabind
2019-01-06 13:00     ` Valentin Vidic
2019-01-06 13:28       ` Jay Aurabind
2019-01-06 14:07         ` Valentin Vidic
2019-01-06 15:02           ` Jay Aurabind

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).