aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/samsung-laptop.c
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2011-11-26 05:00:12 -0500
committerMatthew Garrett <mjg@redhat.com>2012-03-20 12:02:12 -0400
commit2e777187d53ff4366f0dac37ded20980370e580e (patch)
treef7375c0f3ba6600e7f18f59c3df80c4a1df5198e /drivers/platform/x86/samsung-laptop.c
parent6f6ae06eb30d4710cd86a1782326702afa18a8f6 (diff)
samsung-laptop: tweak traces
- don't output error when probing features at load - print the SABI signature if samsung_sabi_init() succeed Signed-off-by: Corentin Chary <corentincj@iksaif.net> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform/x86/samsung-laptop.c')
-rw-r--r--drivers/platform/x86/samsung-laptop.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
index b41c7b4f9c7..5047642d166 100644
--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -366,10 +366,11 @@ static int sabi_command(struct samsung_laptop *samsung, u16 command,
366 366
367 if (debug) { 367 if (debug) {
368 if (in) 368 if (in)
369 pr_info("SABI 0x%04x {0x%08x, 0x%08x, 0x%04x, 0x%02x}", 369 pr_info("SABI command:0x%04x "
370 "data:{0x%08x, 0x%08x, 0x%04x, 0x%02x}",
370 command, in->d0, in->d1, in->d2, in->d3); 371 command, in->d0, in->d1, in->d2, in->d3);
371 else 372 else
372 pr_info("SABI 0x%04x", command); 373 pr_info("SABI command:0x%04x", command);
373 } 374 }
374 375
375 /* enable memory to be able to write to it */ 376 /* enable memory to be able to write to it */
@@ -393,10 +394,17 @@ static int sabi_command(struct samsung_laptop *samsung, u16 command,
393 /* see if the command actually succeeded */ 394 /* see if the command actually succeeded */
394 complete = readb(samsung->sabi_iface + SABI_IFACE_COMPLETE); 395 complete = readb(samsung->sabi_iface + SABI_IFACE_COMPLETE);
395 iface_data = readb(samsung->sabi_iface + SABI_IFACE_DATA); 396 iface_data = readb(samsung->sabi_iface + SABI_IFACE_DATA);
396 if (complete != 0xaa || iface_data == 0xff) { 397
398 /* iface_data = 0xFF happens when a command is not known
399 * so we only add a warning in debug mode since we will
400 * probably issue some unknown command at startup to find
401 * out which features are supported */
402 if (complete != 0xaa || (iface_data == 0xff && debug))
397 pr_warn("SABI command 0x%04x failed with" 403 pr_warn("SABI command 0x%04x failed with"
398 " completion flag 0x%02x and interface data 0x%02x", 404 " completion flag 0x%02x and interface data 0x%02x",
399 command, complete, iface_data); 405 command, complete, iface_data);
406
407 if (complete != 0xaa || iface_data == 0xff) {
400 ret = -EINVAL; 408 ret = -EINVAL;
401 goto exit; 409 goto exit;
402 } 410 }
@@ -409,7 +417,7 @@ static int sabi_command(struct samsung_laptop *samsung, u16 command,
409 } 417 }
410 418
411 if (debug && out) { 419 if (debug && out) {
412 pr_info("SABI {0x%08x, 0x%08x, 0x%04x, 0x%02x}", 420 pr_info("SABI return data:{0x%08x, 0x%08x, 0x%04x, 0x%02x}",
413 out->d0, out->d1, out->d2, out->d3); 421 out->d0, out->d1, out->d2, out->d3);
414 } 422 }
415 423
@@ -1370,6 +1378,9 @@ static int __init samsung_sabi_init(struct samsung_laptop *samsung)
1370 if (samsung->handle_backlight) 1378 if (samsung->handle_backlight)
1371 check_for_stepping_quirk(samsung); 1379 check_for_stepping_quirk(samsung);
1372 1380
1381 pr_info("detected SABI interface: %s\n",
1382 samsung->config->test_string);
1383
1373exit: 1384exit:
1374 if (ret) 1385 if (ret)
1375 samsung_sabi_exit(samsung); 1386 samsung_sabi_exit(samsung);