Re: [PATCH 8/8] iio: accel: bmc150: Set label based on accel-location for ACPI DUAL250E fwnodes

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

 



On Fri, May 21, 2021 at 11:23 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>
> Some Yoga laptops with 1 accelerometer in the display and 1 in the base,
> use an ACPI HID of DUAL250E instead of BOSC0200.
>
> Set the iio-device's label for DUAL250E devices to a value indicating which
> sensor is which, mirroring how we do this for BOSC0200 dual sensor devices.
>
> Note the DUAL250E fwnode unfortunately does not include a mount-matrix.

> +       /* Special case for devices with a "DUAL250E" HID */
> +       if (adev && acpi_dev_hid_uid_match(adev, "DUAL250E", NULL)) {
> +               if (strcmp(dev_name(dev), "i2c-DUAL250E:base") == 0)
> +                       label = "accel-base";
> +               else
> +                       label = "accel-display";
> +
> +               indio_dev->label = label;
> +               return false; /* DUAL250E fwnodes have no mount matrix info */
> +       }
> +
>         if (!adev || !acpi_dev_hid_uid_match(adev, "BOSC0200", NULL))
>                 return false;


This sounds to me like

_apply_orientation_generic()
...

_apply_orientation_dual250e()


_apply_orientation()

if ()
  return _apply_orientation_generic()

if ()
 return _apply_orientation_dual250e

return false;



--
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux