Merge branch 'linux-leds/dell-laptop-changes-for-4.12'
authorDarren Hart <dvhart@infradead.org>
Wed, 29 Mar 2017 19:19:42 +0000 (12:19 -0700)
committerDarren Hart (VMware) <dvhart@infradead.org>
Thu, 13 Apr 2017 17:14:09 +0000 (10:14 -0700)
Merge branch 'dell-laptop-changes-for-4.12' of
git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git
to avoid linux-next merge conflict with dell-laptop.c.

Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
1  2 
drivers/platform/x86/dell-laptop.c

index 1cd258b790e8340a312830197d1c6ecd1711117e,2e237bad4995b65052f9b7cecc84ec067ad75650..47fe6264cadfed240331f8406eac9ff120e9794d
@@@ -2026,26 -1981,31 +2029,51 @@@ static void kbd_led_exit(void
        led_classdev_unregister(&kbd_led);
  }
  
 +static int dell_laptop_notifier_call(struct notifier_block *nb,
 +                                   unsigned long action, void *data)
 +{
 +      switch (action) {
 +      case DELL_LAPTOP_KBD_BACKLIGHT_BRIGHTNESS_CHANGED:
 +              if (!kbd_led_present)
 +                      break;
 +
 +              led_classdev_notify_brightness_hw_changed(&kbd_led,
 +                                              kbd_led_level_get(&kbd_led));
 +              break;
 +      }
 +
 +      return NOTIFY_OK;
 +}
 +
 +static struct notifier_block dell_laptop_notifier = {
 +      .notifier_call = dell_laptop_notifier_call,
 +};
 +
+ int dell_micmute_led_set(int state)
+ {
+       struct calling_interface_buffer *buffer;
+       struct calling_interface_token *token;
+       if (state == 0)
+               token = dell_smbios_find_token(GLOBAL_MIC_MUTE_DISABLE);
+       else if (state == 1)
+               token = dell_smbios_find_token(GLOBAL_MIC_MUTE_ENABLE);
+       else
+               return -EINVAL;
+       if (!token)
+               return -ENODEV;
+       buffer = dell_smbios_get_buffer();
+       buffer->input[0] = token->location;
+       buffer->input[1] = token->value;
+       dell_smbios_send_request(1, 0);
+       dell_smbios_release_buffer();
+       return state;
+ }
+ EXPORT_SYMBOL_GPL(dell_micmute_led_set);
  static int __init dell_init(void)
  {
        struct calling_interface_buffer *buffer;