Commit cce35f35 authored by Alexander Kurz's avatar Alexander Kurz Committed by Jacek Anaszewski

leds: mc13783: Fix MC13892 keypad led access

Fix the register access shift argument calculation introduced with
commit a59ce658 ("leds: leds-mc13783: Add MC34708 LED support")
and re-enable access to the "keypad" led for MC13892 MFC devices.
Signed-off-by: default avatarAlexander Kurz <akurz@blala.de>
Signed-off-by: default avatarJacek Anaszewski <j.anaszewski@samsung.com>
parent e602fda1
...@@ -84,8 +84,9 @@ static int mc13xxx_led_set(struct led_classdev *led_cdev, ...@@ -84,8 +84,9 @@ static int mc13xxx_led_set(struct led_classdev *led_cdev,
case MC13892_LED_MD: case MC13892_LED_MD:
case MC13892_LED_AD: case MC13892_LED_AD:
case MC13892_LED_KP: case MC13892_LED_KP:
reg = (led->id - MC13892_LED_MD) / 2; off = led->id - MC13892_LED_MD;
shift = 3 + (led->id - MC13892_LED_MD) * 12; reg = off / 2;
shift = 3 + (off - reg * 2) * 12;
break; break;
case MC13892_LED_R: case MC13892_LED_R:
case MC13892_LED_G: case MC13892_LED_G:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment