Lines Matching +full:xo +full:- +full:1

1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Copyright © 2007-2008 Andres Salomon <dilinger@debian.org>
19 #include <linux/olpc-ec.h>
37 if (get_option(&str, &ec_timeout) != 1) { in olpc_ec_timeout_set()
39 printk(KERN_ERR "olpc-ec: invalid argument to " in olpc_ec_timeout_set()
42 printk(KERN_DEBUG "olpc-ec: using %d ms delay for EC commands.\n", in olpc_ec_timeout_set()
44 return 1; in olpc_ec_timeout_set()
68 for (timeo = ec_timeout; state != desired && timeo; timeo--) { in __wait_on_ibf()
69 mdelay(1); in __wait_on_ibf()
74 timeo < (ec_timeout - EC_BASE_TIMEOUT)) { in __wait_on_ibf()
75 printk(KERN_WARNING "olpc-ec: %d: waited %u ms for IBF!\n", in __wait_on_ibf()
76 line, ec_timeout - timeo); in __wait_on_ibf()
88 for (timeo = ec_timeout; state != desired && timeo; timeo--) { in __wait_on_obf()
89 mdelay(1); in __wait_on_obf()
94 timeo < (ec_timeout - EC_BASE_TIMEOUT)) { in __wait_on_obf()
95 printk(KERN_WARNING "olpc-ec: %d: waited %u ms for OBF!\n", in __wait_on_obf()
96 line, ec_timeout - timeo); in __wait_on_obf()
112 int ret = -EIO; in olpc_xo1_ec_cmd()
117 for (i = 0; i < 10 && (obf_status(0x6c) == 1); i++) in olpc_xo1_ec_cmd()
120 printk(KERN_ERR "olpc-ec: timeout while attempting to " in olpc_xo1_ec_cmd()
126 printk(KERN_ERR "olpc-ec: timeout waiting for EC to " in olpc_xo1_ec_cmd()
141 pr_devel("olpc-ec: running cmd 0x%x\n", cmd); in olpc_xo1_ec_cmd()
145 printk(KERN_ERR "olpc-ec: timeout waiting for EC to read " in olpc_xo1_ec_cmd()
153 pr_devel("olpc-ec: sending cmd arg 0x%x\n", inbuf[i]); in olpc_xo1_ec_cmd()
156 printk(KERN_ERR "olpc-ec: timeout waiting for" in olpc_xo1_ec_cmd()
165 if (wait_on_obf(0x6c, 1)) { in olpc_xo1_ec_cmd()
166 printk(KERN_ERR "olpc-ec: timeout waiting for" in olpc_xo1_ec_cmd()
173 pr_devel("olpc-ec: received 0x%x\n", outbuf[i]); in olpc_xo1_ec_cmd()
196 rev = of_get_property(root, "board-revision-int", &propsize); in get_board_revision()
229 pdev = platform_device_register_simple("xo1-rfkill", -1, NULL, 0); in add_xo1_platform_devices()
233 pdev = platform_device_register_simple("olpc-xo1", -1, NULL, 0); in add_xo1_platform_devices()
268 * XO-1 EC wakeups are available when olpc-xo1-sci driver is
279 * XO-1.5 EC wakeups are available when olpc-xo15-sci driver is
293 /* register the XO-1 and 1.5-specific EC handler */ in olpc_init()
294 if (olpc_platform_info.boardrev < olpc_board_pre(0xd0)) /* XO-1 */ in olpc_init()
298 platform_device_register_simple("olpc-ec", -1, NULL, 0); in olpc_init()
306 * XO-1 only. */ in olpc_init()
312 if (olpc_platform_info.boardrev < olpc_board_pre(0xd0)) { /* XO-1 */ in olpc_init()