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

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

 



On Sunday 28 January 2018 16:39:25 Andy Shevchenko wrote:
> On Sat, Jan 27, 2018 at 3:32 PM, Pali Rohár <pali.rohar@xxxxxxxxx> wrote:
> > +static bool is_dell_system_with_lis3lv02d(void)
> > +{
> 
> > +       /*
> > +        * Check that ACPI device SMO88xx exists and is enabled. That ACPI
> > +        * device represent our ST microelectronics lis3lv02d accelerometer but
> > +        * unfortunately without any other information (like i2c address).
> > +        */
> 
> Isn't it simple
> 
> return acpi_dev_present("SMO88", NULL, -1);
> 
> call?

ACPI device name is SMO8800, SMO8810, ... Will that acpi_dev_present
function match only prefix and not exact string?

> > +       found = false;
> > +       status = acpi_get_devices(NULL, check_acpi_smo88xx_device, NULL,
> > +                                 (void **)&found);
> > +       if (!ACPI_SUCCESS(status) || !found)
> > +               return false;
> > +
> > +       return true;
> > +}
> 
> 

-- 
Pali Rohár
pali.rohar@xxxxxxxxx

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux