lkml.org 
[lkml]   [2020]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] platform/x86: dell-privacy: Add support for new privacy driver
On Tue, Nov 03, 2020 at 04:55:42AM -0800, Perry Yuan wrote:

> +#define PRIVACY_PlATFORM_NAME "dell-privacy-acpi"
> +#define ACPI_PRIVACY_DEVICE "\\_SB.PC00.LPCB.ECDV"

This looks like the EC rather than a privacy device? If so, you probably
want to collaborate with the EC driver to obtain the handle rather than
depending on the path, unless it's guaranteed that this path will never
change.

> +static int micmute_led_set(struct led_classdev *led_cdev,
> + enum led_brightness brightness)
> +{
> + acpi_status status;
> +
> + status = acpi_evaluate_object(NULL, ACPI_PRIVACY_EC_ACK, NULL, NULL);
> + if (ACPI_FAILURE(status)) {
> + dev_err(led_cdev->dev, "Error setting privacy audio EC ack value: %d\n",status);
> + return -EIO;
> + }
> + return 0;
> +}

What's actually being set here? You don't seem to be passing any
arguments.

> +static const struct acpi_device_id privacy_acpi_device_ids[] = {
> + {"PNP0C09", 0},

Oooh no please don't do this - you'll trigger autoloading on everything
that exposes a PNP0C09 device.

--
Matthew Garrett | mjg59@srcf.ucam.org

\
 
 \ /
  Last update: 2020-11-04 03:09    [W:0.138 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site