From: Stuart Henderson Date: Tue, 23 May 2017 12:33:02 +0000 (+0100) Subject: extcon: madera: Make micd ranges default to Android spec values X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b152fcee5dff78e8a3e7173bf9d3ad9bb8d14d97;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git extcon: madera: Make micd ranges default to Android spec values Change-Id: I3d3fb6accc9e313b455670942740317a59b77c1e Signed-off-by: Stuart Henderson --- diff --git a/drivers/extcon/extcon-madera.c b/drivers/extcon/extcon-madera.c index 0ffb8ef53e40..d96a12151d0e 100644 --- a/drivers/extcon/extcon-madera.c +++ b/drivers/extcon/extcon-madera.c @@ -85,13 +85,10 @@ static const unsigned int madera_default_hpd_pins[4] = { }; static struct madera_micd_range madera_micd_default_ranges[] = { - { .max = 116, .key = KEY_MEDIA }, - { .max = 173, .key = KEY_VOICECOMMAND }, - { .max = 321, .key = KEY_VOLUMEUP }, - { .max = 752, .key = KEY_VOLUMEDOWN }, - { .max = 1257, .key = KEY_SEARCH }, - { .max = -1, .key = -1 }, - { .max = -1, .key = -1 }, + { .max = 70, .key = KEY_MEDIA }, + { .max = 186, .key = KEY_VOICECOMMAND }, + { .max = 295, .key = KEY_VOLUMEUP }, + { .max = 681, .key = KEY_VOLUMEDOWN }, }; /* The number of levels in madera_micd_levels valid for button thresholds */ @@ -2800,7 +2797,7 @@ static int madera_extcon_init_micd_ranges(struct madera_extcon *info) if (pdata->num_micd_ranges == 0) { info->micd_ranges = madera_micd_default_ranges; info->num_micd_ranges = - ARRAY_SIZE(madera_micd_default_ranges) - 2; + ARRAY_SIZE(madera_micd_default_ranges); return 0; }