samsung           322 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung;
samsung           394 drivers/platform/x86/samsung-laptop.c static int sabi_command(struct samsung_laptop *samsung, u16 command,
samsung           398 drivers/platform/x86/samsung-laptop.c 	const struct sabi_config *config = samsung->config;
samsung           400 drivers/platform/x86/samsung-laptop.c 	u16 port = readw(samsung->sabi + config->header_offsets.port);
samsung           403 drivers/platform/x86/samsung-laptop.c 	mutex_lock(&samsung->sabi_mutex);
samsung           415 drivers/platform/x86/samsung-laptop.c 	outb(readb(samsung->sabi + config->header_offsets.en_mem), port);
samsung           418 drivers/platform/x86/samsung-laptop.c 	writew(config->main_function, samsung->sabi_iface + SABI_IFACE_MAIN);
samsung           419 drivers/platform/x86/samsung-laptop.c 	writew(command, samsung->sabi_iface + SABI_IFACE_SUB);
samsung           420 drivers/platform/x86/samsung-laptop.c 	writeb(0, samsung->sabi_iface + SABI_IFACE_COMPLETE);
samsung           422 drivers/platform/x86/samsung-laptop.c 		writel(in->d0, samsung->sabi_iface + SABI_IFACE_DATA);
samsung           423 drivers/platform/x86/samsung-laptop.c 		writel(in->d1, samsung->sabi_iface + SABI_IFACE_DATA + 4);
samsung           424 drivers/platform/x86/samsung-laptop.c 		writew(in->d2, samsung->sabi_iface + SABI_IFACE_DATA + 8);
samsung           425 drivers/platform/x86/samsung-laptop.c 		writeb(in->d3, samsung->sabi_iface + SABI_IFACE_DATA + 10);
samsung           427 drivers/platform/x86/samsung-laptop.c 	outb(readb(samsung->sabi + config->header_offsets.iface_func), port);
samsung           430 drivers/platform/x86/samsung-laptop.c 	outb(readb(samsung->sabi + config->header_offsets.re_mem), port);
samsung           433 drivers/platform/x86/samsung-laptop.c 	complete = readb(samsung->sabi_iface + SABI_IFACE_COMPLETE);
samsung           434 drivers/platform/x86/samsung-laptop.c 	iface_data = readb(samsung->sabi_iface + SABI_IFACE_DATA);
samsung           451 drivers/platform/x86/samsung-laptop.c 		out->d0 = readl(samsung->sabi_iface + SABI_IFACE_DATA);
samsung           452 drivers/platform/x86/samsung-laptop.c 		out->d1 = readl(samsung->sabi_iface + SABI_IFACE_DATA + 4);
samsung           453 drivers/platform/x86/samsung-laptop.c 		out->d2 = readw(samsung->sabi_iface + SABI_IFACE_DATA + 2);
samsung           454 drivers/platform/x86/samsung-laptop.c 		out->d3 = readb(samsung->sabi_iface + SABI_IFACE_DATA + 1);
samsung           463 drivers/platform/x86/samsung-laptop.c 	mutex_unlock(&samsung->sabi_mutex);
samsung           468 drivers/platform/x86/samsung-laptop.c static int sabi_set_commandb(struct samsung_laptop *samsung,
samsung           474 drivers/platform/x86/samsung-laptop.c 	return sabi_command(samsung, command, &in, NULL);
samsung           477 drivers/platform/x86/samsung-laptop.c static int read_brightness(struct samsung_laptop *samsung)
samsung           479 drivers/platform/x86/samsung-laptop.c 	const struct sabi_config *config = samsung->config;
samsung           480 drivers/platform/x86/samsung-laptop.c 	const struct sabi_commands *commands = &samsung->config->commands;
samsung           485 drivers/platform/x86/samsung-laptop.c 	retval = sabi_command(samsung, commands->get_brightness,
samsung           499 drivers/platform/x86/samsung-laptop.c static void set_brightness(struct samsung_laptop *samsung, u8 user_brightness)
samsung           501 drivers/platform/x86/samsung-laptop.c 	const struct sabi_config *config = samsung->config;
samsung           502 drivers/platform/x86/samsung-laptop.c 	const struct sabi_commands *commands = &samsung->config->commands;
samsung           505 drivers/platform/x86/samsung-laptop.c 	if (samsung->has_stepping_quirk && user_level != 0) {
samsung           510 drivers/platform/x86/samsung-laptop.c 		if (user_brightness == read_brightness(samsung))
samsung           513 drivers/platform/x86/samsung-laptop.c 		sabi_set_commandb(samsung, commands->set_brightness, 0);
samsung           516 drivers/platform/x86/samsung-laptop.c 	sabi_set_commandb(samsung, commands->set_brightness, user_level);
samsung           521 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung = bl_get_data(bd);
samsung           523 drivers/platform/x86/samsung-laptop.c 	return read_brightness(samsung);
samsung           526 drivers/platform/x86/samsung-laptop.c static void check_for_stepping_quirk(struct samsung_laptop *samsung)
samsung           530 drivers/platform/x86/samsung-laptop.c 	int orig_level = read_brightness(samsung);
samsung           540 drivers/platform/x86/samsung-laptop.c 		set_brightness(samsung, 1);
samsung           542 drivers/platform/x86/samsung-laptop.c 	initial_level = read_brightness(samsung);
samsung           549 drivers/platform/x86/samsung-laptop.c 	samsung->has_stepping_quirk = false;
samsung           550 drivers/platform/x86/samsung-laptop.c 	set_brightness(samsung, check_level);
samsung           552 drivers/platform/x86/samsung-laptop.c 	if (read_brightness(samsung) != check_level) {
samsung           553 drivers/platform/x86/samsung-laptop.c 		samsung->has_stepping_quirk = true;
samsung           557 drivers/platform/x86/samsung-laptop.c 	set_brightness(samsung, orig_level);
samsung           562 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung = bl_get_data(bd);
samsung           563 drivers/platform/x86/samsung-laptop.c 	const struct sabi_commands *commands = &samsung->config->commands;
samsung           565 drivers/platform/x86/samsung-laptop.c 	set_brightness(samsung, bd->props.brightness);
samsung           568 drivers/platform/x86/samsung-laptop.c 		sabi_set_commandb(samsung, commands->set_backlight, 1);
samsung           570 drivers/platform/x86/samsung-laptop.c 		sabi_set_commandb(samsung, commands->set_backlight, 0);
samsung           583 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung = srfkill->samsung;
samsung           584 drivers/platform/x86/samsung-laptop.c 	const struct sabi_commands *commands = &samsung->config->commands;
samsung           586 drivers/platform/x86/samsung-laptop.c 	return sabi_set_commandb(samsung, commands->set_wireless_button,
samsung           594 drivers/platform/x86/samsung-laptop.c static int swsmi_wireless_status(struct samsung_laptop *samsung,
samsung           597 drivers/platform/x86/samsung-laptop.c 	const struct sabi_commands *commands = &samsung->config->commands;
samsung           599 drivers/platform/x86/samsung-laptop.c 	return sabi_command(samsung, commands->get_wireless_status,
samsung           606 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung = srfkill->samsung;
samsung           607 drivers/platform/x86/samsung-laptop.c 	const struct sabi_commands *commands = &samsung->config->commands;
samsung           611 drivers/platform/x86/samsung-laptop.c 	ret = swsmi_wireless_status(samsung, &data);
samsung           625 drivers/platform/x86/samsung-laptop.c 	return sabi_command(samsung, commands->set_wireless_status,
samsung           632 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung = srfkill->samsung;
samsung           636 drivers/platform/x86/samsung-laptop.c 	ret = swsmi_wireless_status(samsung, &data);
samsung           658 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung = dev_get_drvdata(dev);
samsung           659 drivers/platform/x86/samsung-laptop.c 	const struct sabi_config *config = samsung->config;
samsung           666 drivers/platform/x86/samsung-laptop.c 	retval = sabi_command(samsung, commands->get_performance_level,
samsung           683 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung = dev_get_drvdata(dev);
samsung           684 drivers/platform/x86/samsung-laptop.c 	const struct sabi_config *config = samsung->config;
samsung           695 drivers/platform/x86/samsung-laptop.c 			sabi_set_commandb(samsung,
samsung           711 drivers/platform/x86/samsung-laptop.c static int read_battery_life_extender(struct samsung_laptop *samsung)
samsung           713 drivers/platform/x86/samsung-laptop.c 	const struct sabi_commands *commands = &samsung->config->commands;
samsung           722 drivers/platform/x86/samsung-laptop.c 	retval = sabi_command(samsung, commands->get_battery_life_extender,
samsung           734 drivers/platform/x86/samsung-laptop.c static int write_battery_life_extender(struct samsung_laptop *samsung,
samsung           737 drivers/platform/x86/samsung-laptop.c 	const struct sabi_commands *commands = &samsung->config->commands;
samsung           742 drivers/platform/x86/samsung-laptop.c 	return sabi_command(samsung, commands->set_battery_life_extender,
samsung           750 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung = dev_get_drvdata(dev);
samsung           753 drivers/platform/x86/samsung-laptop.c 	ret = read_battery_life_extender(samsung);
samsung           764 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung = dev_get_drvdata(dev);
samsung           770 drivers/platform/x86/samsung-laptop.c 	ret = write_battery_life_extender(samsung, !!value);
samsung           780 drivers/platform/x86/samsung-laptop.c static int read_usb_charge(struct samsung_laptop *samsung)
samsung           782 drivers/platform/x86/samsung-laptop.c 	const struct sabi_commands *commands = &samsung->config->commands;
samsung           791 drivers/platform/x86/samsung-laptop.c 	retval = sabi_command(samsung, commands->get_usb_charge,
samsung           803 drivers/platform/x86/samsung-laptop.c static int write_usb_charge(struct samsung_laptop *samsung,
samsung           806 drivers/platform/x86/samsung-laptop.c 	const struct sabi_commands *commands = &samsung->config->commands;
samsung           811 drivers/platform/x86/samsung-laptop.c 	return sabi_command(samsung, commands->set_usb_charge,
samsung           819 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung = dev_get_drvdata(dev);
samsung           822 drivers/platform/x86/samsung-laptop.c 	ret = read_usb_charge(samsung);
samsung           833 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung = dev_get_drvdata(dev);
samsung           839 drivers/platform/x86/samsung-laptop.c 	ret = write_usb_charge(samsung, !!value);
samsung           849 drivers/platform/x86/samsung-laptop.c static int read_lid_handling(struct samsung_laptop *samsung)
samsung           851 drivers/platform/x86/samsung-laptop.c 	const struct sabi_commands *commands = &samsung->config->commands;
samsung           859 drivers/platform/x86/samsung-laptop.c 	retval = sabi_command(samsung, commands->get_lid_handling,
samsung           868 drivers/platform/x86/samsung-laptop.c static int write_lid_handling(struct samsung_laptop *samsung,
samsung           871 drivers/platform/x86/samsung-laptop.c 	const struct sabi_commands *commands = &samsung->config->commands;
samsung           876 drivers/platform/x86/samsung-laptop.c 	return sabi_command(samsung, commands->set_lid_handling,
samsung           884 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung = dev_get_drvdata(dev);
samsung           887 drivers/platform/x86/samsung-laptop.c 	ret = read_lid_handling(samsung);
samsung           898 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung = dev_get_drvdata(dev);
samsung           904 drivers/platform/x86/samsung-laptop.c 	ret = write_lid_handling(samsung, !!value);
samsung           941 drivers/platform/x86/samsung-laptop.c static void samsung_rfkill_exit(struct samsung_laptop *samsung)
samsung           943 drivers/platform/x86/samsung-laptop.c 	if (samsung->wlan.rfkill) {
samsung           944 drivers/platform/x86/samsung-laptop.c 		rfkill_unregister(samsung->wlan.rfkill);
samsung           945 drivers/platform/x86/samsung-laptop.c 		rfkill_destroy(samsung->wlan.rfkill);
samsung           946 drivers/platform/x86/samsung-laptop.c 		samsung->wlan.rfkill = NULL;
samsung           948 drivers/platform/x86/samsung-laptop.c 	if (samsung->bluetooth.rfkill) {
samsung           949 drivers/platform/x86/samsung-laptop.c 		rfkill_unregister(samsung->bluetooth.rfkill);
samsung           950 drivers/platform/x86/samsung-laptop.c 		rfkill_destroy(samsung->bluetooth.rfkill);
samsung           951 drivers/platform/x86/samsung-laptop.c 		samsung->bluetooth.rfkill = NULL;
samsung           955 drivers/platform/x86/samsung-laptop.c static int samsung_new_rfkill(struct samsung_laptop *samsung,
samsung           965 drivers/platform/x86/samsung-laptop.c 	arfkill->samsung = samsung;
samsung           967 drivers/platform/x86/samsung-laptop.c 	*rfkill = rfkill_alloc(name, &samsung->platform_device->dev,
samsung           985 drivers/platform/x86/samsung-laptop.c static int __init samsung_rfkill_init_seclinux(struct samsung_laptop *samsung)
samsung           987 drivers/platform/x86/samsung-laptop.c 	return samsung_new_rfkill(samsung, &samsung->wlan, "samsung-wlan",
samsung           991 drivers/platform/x86/samsung-laptop.c static int __init samsung_rfkill_init_swsmi(struct samsung_laptop *samsung)
samsung           996 drivers/platform/x86/samsung-laptop.c 	ret = swsmi_wireless_status(samsung, &data);
samsung          1001 drivers/platform/x86/samsung-laptop.c 			ret = samsung_rfkill_init_seclinux(samsung);
samsung          1008 drivers/platform/x86/samsung-laptop.c 		ret = samsung_new_rfkill(samsung, &samsung->wlan,
samsung          1017 drivers/platform/x86/samsung-laptop.c 		ret = samsung_new_rfkill(samsung, &samsung->bluetooth,
samsung          1027 drivers/platform/x86/samsung-laptop.c 		samsung_rfkill_exit(samsung);
samsung          1032 drivers/platform/x86/samsung-laptop.c static int __init samsung_rfkill_init(struct samsung_laptop *samsung)
samsung          1034 drivers/platform/x86/samsung-laptop.c 	if (samsung->config->sabi_version == 2)
samsung          1035 drivers/platform/x86/samsung-laptop.c 		return samsung_rfkill_init_seclinux(samsung);
samsung          1036 drivers/platform/x86/samsung-laptop.c 	if (samsung->config->sabi_version == 3)
samsung          1037 drivers/platform/x86/samsung-laptop.c 		return samsung_rfkill_init_swsmi(samsung);
samsung          1041 drivers/platform/x86/samsung-laptop.c static void samsung_lid_handling_exit(struct samsung_laptop *samsung)
samsung          1043 drivers/platform/x86/samsung-laptop.c 	if (samsung->quirks->lid_handling)
samsung          1044 drivers/platform/x86/samsung-laptop.c 		write_lid_handling(samsung, 0);
samsung          1047 drivers/platform/x86/samsung-laptop.c static int __init samsung_lid_handling_init(struct samsung_laptop *samsung)
samsung          1051 drivers/platform/x86/samsung-laptop.c 	if (samsung->quirks->lid_handling)
samsung          1052 drivers/platform/x86/samsung-laptop.c 		retval = write_lid_handling(samsung, 1);
samsung          1057 drivers/platform/x86/samsung-laptop.c static int kbd_backlight_enable(struct samsung_laptop *samsung)
samsung          1059 drivers/platform/x86/samsung-laptop.c 	const struct sabi_commands *commands = &samsung->config->commands;
samsung          1068 drivers/platform/x86/samsung-laptop.c 	retval = sabi_command(samsung, commands->kbd_backlight,
samsung          1079 drivers/platform/x86/samsung-laptop.c static int kbd_backlight_read(struct samsung_laptop *samsung)
samsung          1081 drivers/platform/x86/samsung-laptop.c 	const struct sabi_commands *commands = &samsung->config->commands;
samsung          1087 drivers/platform/x86/samsung-laptop.c 	retval = sabi_command(samsung, commands->kbd_backlight,
samsung          1096 drivers/platform/x86/samsung-laptop.c static int kbd_backlight_write(struct samsung_laptop *samsung, int brightness)
samsung          1098 drivers/platform/x86/samsung-laptop.c 	const struct sabi_commands *commands = &samsung->config->commands;
samsung          1103 drivers/platform/x86/samsung-laptop.c 	return sabi_command(samsung, commands->kbd_backlight,
samsung          1109 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung;
samsung          1111 drivers/platform/x86/samsung-laptop.c 	samsung = container_of(work, struct samsung_laptop, kbd_led_work);
samsung          1112 drivers/platform/x86/samsung-laptop.c 	kbd_backlight_write(samsung, samsung->kbd_led_wk);
samsung          1118 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung;
samsung          1120 drivers/platform/x86/samsung-laptop.c 	samsung = container_of(led_cdev, struct samsung_laptop, kbd_led);
samsung          1122 drivers/platform/x86/samsung-laptop.c 	if (value > samsung->kbd_led.max_brightness)
samsung          1123 drivers/platform/x86/samsung-laptop.c 		value = samsung->kbd_led.max_brightness;
samsung          1127 drivers/platform/x86/samsung-laptop.c 	samsung->kbd_led_wk = value;
samsung          1128 drivers/platform/x86/samsung-laptop.c 	queue_work(samsung->led_workqueue, &samsung->kbd_led_work);
samsung          1133 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung;
samsung          1135 drivers/platform/x86/samsung-laptop.c 	samsung = container_of(led_cdev, struct samsung_laptop, kbd_led);
samsung          1136 drivers/platform/x86/samsung-laptop.c 	return kbd_backlight_read(samsung);
samsung          1139 drivers/platform/x86/samsung-laptop.c static void samsung_leds_exit(struct samsung_laptop *samsung)
samsung          1141 drivers/platform/x86/samsung-laptop.c 	if (!IS_ERR_OR_NULL(samsung->kbd_led.dev))
samsung          1142 drivers/platform/x86/samsung-laptop.c 		led_classdev_unregister(&samsung->kbd_led);
samsung          1143 drivers/platform/x86/samsung-laptop.c 	if (samsung->led_workqueue)
samsung          1144 drivers/platform/x86/samsung-laptop.c 		destroy_workqueue(samsung->led_workqueue);
samsung          1147 drivers/platform/x86/samsung-laptop.c static int __init samsung_leds_init(struct samsung_laptop *samsung)
samsung          1151 drivers/platform/x86/samsung-laptop.c 	samsung->led_workqueue = create_singlethread_workqueue("led_workqueue");
samsung          1152 drivers/platform/x86/samsung-laptop.c 	if (!samsung->led_workqueue)
samsung          1155 drivers/platform/x86/samsung-laptop.c 	if (kbd_backlight_enable(samsung) >= 0) {
samsung          1156 drivers/platform/x86/samsung-laptop.c 		INIT_WORK(&samsung->kbd_led_work, kbd_led_update);
samsung          1158 drivers/platform/x86/samsung-laptop.c 		samsung->kbd_led.name = "samsung::kbd_backlight";
samsung          1159 drivers/platform/x86/samsung-laptop.c 		samsung->kbd_led.brightness_set = kbd_led_set;
samsung          1160 drivers/platform/x86/samsung-laptop.c 		samsung->kbd_led.brightness_get = kbd_led_get;
samsung          1161 drivers/platform/x86/samsung-laptop.c 		samsung->kbd_led.max_brightness = 8;
samsung          1162 drivers/platform/x86/samsung-laptop.c 		if (samsung->quirks->four_kbd_backlight_levels)
samsung          1163 drivers/platform/x86/samsung-laptop.c 			samsung->kbd_led.max_brightness = 4;
samsung          1165 drivers/platform/x86/samsung-laptop.c 		ret = led_classdev_register(&samsung->platform_device->dev,
samsung          1166 drivers/platform/x86/samsung-laptop.c 					   &samsung->kbd_led);
samsung          1170 drivers/platform/x86/samsung-laptop.c 		samsung_leds_exit(samsung);
samsung          1175 drivers/platform/x86/samsung-laptop.c static void samsung_backlight_exit(struct samsung_laptop *samsung)
samsung          1177 drivers/platform/x86/samsung-laptop.c 	if (samsung->backlight_device) {
samsung          1178 drivers/platform/x86/samsung-laptop.c 		backlight_device_unregister(samsung->backlight_device);
samsung          1179 drivers/platform/x86/samsung-laptop.c 		samsung->backlight_device = NULL;
samsung          1183 drivers/platform/x86/samsung-laptop.c static int __init samsung_backlight_init(struct samsung_laptop *samsung)
samsung          1188 drivers/platform/x86/samsung-laptop.c 	if (!samsung->handle_backlight)
samsung          1193 drivers/platform/x86/samsung-laptop.c 	props.max_brightness = samsung->config->max_brightness -
samsung          1194 drivers/platform/x86/samsung-laptop.c 		samsung->config->min_brightness;
samsung          1197 drivers/platform/x86/samsung-laptop.c 				       &samsung->platform_device->dev,
samsung          1198 drivers/platform/x86/samsung-laptop.c 				       samsung, &backlight_ops,
samsung          1203 drivers/platform/x86/samsung-laptop.c 	samsung->backlight_device = bd;
samsung          1204 drivers/platform/x86/samsung-laptop.c 	samsung->backlight_device->props.brightness = read_brightness(samsung);
samsung          1205 drivers/platform/x86/samsung-laptop.c 	samsung->backlight_device->props.power = FB_BLANK_UNBLANK;
samsung          1206 drivers/platform/x86/samsung-laptop.c 	backlight_update_status(samsung->backlight_device);
samsung          1215 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung = dev_get_drvdata(dev);
samsung          1219 drivers/platform/x86/samsung-laptop.c 		ok = !!samsung->config->performance_levels[0].name;
samsung          1221 drivers/platform/x86/samsung-laptop.c 		ok = !!(read_battery_life_extender(samsung) >= 0);
samsung          1223 drivers/platform/x86/samsung-laptop.c 		ok = !!(read_usb_charge(samsung) >= 0);
samsung          1225 drivers/platform/x86/samsung-laptop.c 		ok = !!(read_lid_handling(samsung) >= 0);
samsung          1235 drivers/platform/x86/samsung-laptop.c static void samsung_sysfs_exit(struct samsung_laptop *samsung)
samsung          1237 drivers/platform/x86/samsung-laptop.c 	struct platform_device *device = samsung->platform_device;
samsung          1242 drivers/platform/x86/samsung-laptop.c static int __init samsung_sysfs_init(struct samsung_laptop *samsung)
samsung          1244 drivers/platform/x86/samsung-laptop.c 	struct platform_device *device = samsung->platform_device;
samsung          1252 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung = m->private;
samsung          1253 drivers/platform/x86/samsung-laptop.c 	struct sabi_data *sdata = &samsung->debug.data;
samsung          1257 drivers/platform/x86/samsung-laptop.c 		   samsung->debug.command,
samsung          1260 drivers/platform/x86/samsung-laptop.c 	ret = sabi_command(samsung, samsung->debug.command, sdata, sdata);
samsung          1264 drivers/platform/x86/samsung-laptop.c 			   samsung->debug.command);
samsung          1274 drivers/platform/x86/samsung-laptop.c static void samsung_debugfs_exit(struct samsung_laptop *samsung)
samsung          1276 drivers/platform/x86/samsung-laptop.c 	debugfs_remove_recursive(samsung->debug.root);
samsung          1279 drivers/platform/x86/samsung-laptop.c static void samsung_debugfs_init(struct samsung_laptop *samsung)
samsung          1284 drivers/platform/x86/samsung-laptop.c 	samsung->debug.root = root;
samsung          1286 drivers/platform/x86/samsung-laptop.c 	samsung->debug.f0000_wrapper.data = samsung->f0000_segment;
samsung          1287 drivers/platform/x86/samsung-laptop.c 	samsung->debug.f0000_wrapper.size = 0xffff;
samsung          1289 drivers/platform/x86/samsung-laptop.c 	samsung->debug.data_wrapper.data = &samsung->debug.data;
samsung          1290 drivers/platform/x86/samsung-laptop.c 	samsung->debug.data_wrapper.size = sizeof(samsung->debug.data);
samsung          1292 drivers/platform/x86/samsung-laptop.c 	samsung->debug.sdiag_wrapper.data = samsung->sdiag;
samsung          1293 drivers/platform/x86/samsung-laptop.c 	samsung->debug.sdiag_wrapper.size = strlen(samsung->sdiag);
samsung          1296 drivers/platform/x86/samsung-laptop.c 			   &samsung->debug.command);
samsung          1298 drivers/platform/x86/samsung-laptop.c 			   &samsung->debug.data.d0);
samsung          1300 drivers/platform/x86/samsung-laptop.c 			   &samsung->debug.data.d1);
samsung          1302 drivers/platform/x86/samsung-laptop.c 			   &samsung->debug.data.d2);
samsung          1304 drivers/platform/x86/samsung-laptop.c 			  &samsung->debug.data.d3);
samsung          1306 drivers/platform/x86/samsung-laptop.c 			    &samsung->debug.data_wrapper);
samsung          1308 drivers/platform/x86/samsung-laptop.c 			    &samsung->debug.f0000_wrapper);
samsung          1309 drivers/platform/x86/samsung-laptop.c 	debugfs_create_file("call", S_IFREG | S_IRUGO, root, samsung,
samsung          1312 drivers/platform/x86/samsung-laptop.c 			    &samsung->debug.sdiag_wrapper);
samsung          1315 drivers/platform/x86/samsung-laptop.c static void samsung_sabi_exit(struct samsung_laptop *samsung)
samsung          1317 drivers/platform/x86/samsung-laptop.c 	const struct sabi_config *config = samsung->config;
samsung          1321 drivers/platform/x86/samsung-laptop.c 		sabi_set_commandb(samsung, config->commands.set_linux, 0x80);
samsung          1323 drivers/platform/x86/samsung-laptop.c 	if (samsung->sabi_iface) {
samsung          1324 drivers/platform/x86/samsung-laptop.c 		iounmap(samsung->sabi_iface);
samsung          1325 drivers/platform/x86/samsung-laptop.c 		samsung->sabi_iface = NULL;
samsung          1327 drivers/platform/x86/samsung-laptop.c 	if (samsung->f0000_segment) {
samsung          1328 drivers/platform/x86/samsung-laptop.c 		iounmap(samsung->f0000_segment);
samsung          1329 drivers/platform/x86/samsung-laptop.c 		samsung->f0000_segment = NULL;
samsung          1332 drivers/platform/x86/samsung-laptop.c 	samsung->config = NULL;
samsung          1335 drivers/platform/x86/samsung-laptop.c static __init void samsung_sabi_infos(struct samsung_laptop *samsung, int loca,
samsung          1338 drivers/platform/x86/samsung-laptop.c 	const struct sabi_config *config = samsung->config;
samsung          1345 drivers/platform/x86/samsung-laptop.c 	       readw(samsung->sabi + config->header_offsets.port));
samsung          1347 drivers/platform/x86/samsung-laptop.c 	       readb(samsung->sabi + config->header_offsets.iface_func));
samsung          1349 drivers/platform/x86/samsung-laptop.c 	       readb(samsung->sabi + config->header_offsets.en_mem));
samsung          1351 drivers/platform/x86/samsung-laptop.c 	       readb(samsung->sabi + config->header_offsets.re_mem));
samsung          1353 drivers/platform/x86/samsung-laptop.c 	       readw(samsung->sabi + config->header_offsets.data_offset));
samsung          1355 drivers/platform/x86/samsung-laptop.c 	       readw(samsung->sabi + config->header_offsets.data_segment));
samsung          1360 drivers/platform/x86/samsung-laptop.c static void __init samsung_sabi_diag(struct samsung_laptop *samsung)
samsung          1362 drivers/platform/x86/samsung-laptop.c 	int loca = find_signature(samsung->f0000_segment, "SDiaG@");
samsung          1375 drivers/platform/x86/samsung-laptop.c 	for (i = 0; loca < 0xffff && i < sizeof(samsung->sdiag) - 1; loca++) {
samsung          1376 drivers/platform/x86/samsung-laptop.c 		char temp = readb(samsung->f0000_segment + loca);
samsung          1379 drivers/platform/x86/samsung-laptop.c 			samsung->sdiag[i++] = temp;
samsung          1384 drivers/platform/x86/samsung-laptop.c 	if (debug && samsung->sdiag[0])
samsung          1385 drivers/platform/x86/samsung-laptop.c 		pr_info("sdiag: %s", samsung->sdiag);
samsung          1388 drivers/platform/x86/samsung-laptop.c static int __init samsung_sabi_init(struct samsung_laptop *samsung)
samsung          1397 drivers/platform/x86/samsung-laptop.c 	samsung->f0000_segment = ioremap_nocache(0xf0000, 0xffff);
samsung          1398 drivers/platform/x86/samsung-laptop.c 	if (!samsung->f0000_segment) {
samsung          1405 drivers/platform/x86/samsung-laptop.c 	samsung_sabi_diag(samsung);
samsung          1409 drivers/platform/x86/samsung-laptop.c 		samsung->config = &sabi_configs[i];
samsung          1410 drivers/platform/x86/samsung-laptop.c 		loca = find_signature(samsung->f0000_segment,
samsung          1411 drivers/platform/x86/samsung-laptop.c 				      samsung->config->test_string);
samsung          1423 drivers/platform/x86/samsung-laptop.c 	config = samsung->config;
samsung          1428 drivers/platform/x86/samsung-laptop.c 	samsung->sabi = (samsung->f0000_segment + loca);
samsung          1431 drivers/platform/x86/samsung-laptop.c 	ifaceP = (readw(samsung->sabi + config->header_offsets.data_segment) & 0x0ffff) << 4;
samsung          1432 drivers/platform/x86/samsung-laptop.c 	ifaceP += readw(samsung->sabi + config->header_offsets.data_offset) & 0x0ffff;
samsung          1435 drivers/platform/x86/samsung-laptop.c 		samsung_sabi_infos(samsung, loca, ifaceP);
samsung          1437 drivers/platform/x86/samsung-laptop.c 	samsung->sabi_iface = ioremap_nocache(ifaceP, 16);
samsung          1438 drivers/platform/x86/samsung-laptop.c 	if (!samsung->sabi_iface) {
samsung          1446 drivers/platform/x86/samsung-laptop.c 		int retval = sabi_set_commandb(samsung,
samsung          1456 drivers/platform/x86/samsung-laptop.c 	if (samsung->handle_backlight)
samsung          1457 drivers/platform/x86/samsung-laptop.c 		check_for_stepping_quirk(samsung);
samsung          1460 drivers/platform/x86/samsung-laptop.c 		samsung->config->test_string);
samsung          1464 drivers/platform/x86/samsung-laptop.c 		samsung_sabi_exit(samsung);
samsung          1469 drivers/platform/x86/samsung-laptop.c static void samsung_platform_exit(struct samsung_laptop *samsung)
samsung          1471 drivers/platform/x86/samsung-laptop.c 	if (samsung->platform_device) {
samsung          1472 drivers/platform/x86/samsung-laptop.c 		platform_device_unregister(samsung->platform_device);
samsung          1473 drivers/platform/x86/samsung-laptop.c 		samsung->platform_device = NULL;
samsung          1480 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung;
samsung          1482 drivers/platform/x86/samsung-laptop.c 	samsung = container_of(nb, struct samsung_laptop, pm_nb);
samsung          1484 drivers/platform/x86/samsung-laptop.c 	    samsung->quirks->enable_kbd_backlight)
samsung          1485 drivers/platform/x86/samsung-laptop.c 		kbd_backlight_enable(samsung);
samsung          1487 drivers/platform/x86/samsung-laptop.c 	if (val == PM_POST_HIBERNATION && samsung->quirks->lid_handling)
samsung          1488 drivers/platform/x86/samsung-laptop.c 		write_lid_handling(samsung, 1);
samsung          1493 drivers/platform/x86/samsung-laptop.c static int __init samsung_platform_init(struct samsung_laptop *samsung)
samsung          1501 drivers/platform/x86/samsung-laptop.c 	samsung->platform_device = pdev;
samsung          1502 drivers/platform/x86/samsung-laptop.c 	platform_set_drvdata(samsung->platform_device, samsung);
samsung          1649 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung;
samsung          1659 drivers/platform/x86/samsung-laptop.c 	samsung = kzalloc(sizeof(*samsung), GFP_KERNEL);
samsung          1660 drivers/platform/x86/samsung-laptop.c 	if (!samsung)
samsung          1663 drivers/platform/x86/samsung-laptop.c 	mutex_init(&samsung->sabi_mutex);
samsung          1664 drivers/platform/x86/samsung-laptop.c 	samsung->handle_backlight = true;
samsung          1665 drivers/platform/x86/samsung-laptop.c 	samsung->quirks = quirks;
samsung          1668 drivers/platform/x86/samsung-laptop.c 	if (samsung->quirks->broken_acpi_video)
samsung          1670 drivers/platform/x86/samsung-laptop.c 	if (samsung->quirks->use_native_backlight)
samsung          1674 drivers/platform/x86/samsung-laptop.c 		samsung->handle_backlight = false;
samsung          1677 drivers/platform/x86/samsung-laptop.c 	ret = samsung_platform_init(samsung);
samsung          1681 drivers/platform/x86/samsung-laptop.c 	ret = samsung_sabi_init(samsung);
samsung          1685 drivers/platform/x86/samsung-laptop.c 	ret = samsung_sysfs_init(samsung);
samsung          1689 drivers/platform/x86/samsung-laptop.c 	ret = samsung_backlight_init(samsung);
samsung          1693 drivers/platform/x86/samsung-laptop.c 	ret = samsung_rfkill_init(samsung);
samsung          1697 drivers/platform/x86/samsung-laptop.c 	ret = samsung_leds_init(samsung);
samsung          1701 drivers/platform/x86/samsung-laptop.c 	ret = samsung_lid_handling_init(samsung);
samsung          1705 drivers/platform/x86/samsung-laptop.c 	samsung_debugfs_init(samsung);
samsung          1707 drivers/platform/x86/samsung-laptop.c 	samsung->pm_nb.notifier_call = samsung_pm_notification;
samsung          1708 drivers/platform/x86/samsung-laptop.c 	register_pm_notifier(&samsung->pm_nb);
samsung          1710 drivers/platform/x86/samsung-laptop.c 	samsung_platform_device = samsung->platform_device;
samsung          1714 drivers/platform/x86/samsung-laptop.c 	samsung_leds_exit(samsung);
samsung          1716 drivers/platform/x86/samsung-laptop.c 	samsung_rfkill_exit(samsung);
samsung          1718 drivers/platform/x86/samsung-laptop.c 	samsung_backlight_exit(samsung);
samsung          1720 drivers/platform/x86/samsung-laptop.c 	samsung_sysfs_exit(samsung);
samsung          1722 drivers/platform/x86/samsung-laptop.c 	samsung_sabi_exit(samsung);
samsung          1724 drivers/platform/x86/samsung-laptop.c 	samsung_platform_exit(samsung);
samsung          1726 drivers/platform/x86/samsung-laptop.c 	kfree(samsung);
samsung          1732 drivers/platform/x86/samsung-laptop.c 	struct samsung_laptop *samsung;
samsung          1734 drivers/platform/x86/samsung-laptop.c 	samsung = platform_get_drvdata(samsung_platform_device);
samsung          1735 drivers/platform/x86/samsung-laptop.c 	unregister_pm_notifier(&samsung->pm_nb);
samsung          1737 drivers/platform/x86/samsung-laptop.c 	samsung_debugfs_exit(samsung);
samsung          1738 drivers/platform/x86/samsung-laptop.c 	samsung_lid_handling_exit(samsung);
samsung          1739 drivers/platform/x86/samsung-laptop.c 	samsung_leds_exit(samsung);
samsung          1740 drivers/platform/x86/samsung-laptop.c 	samsung_rfkill_exit(samsung);
samsung          1741 drivers/platform/x86/samsung-laptop.c 	samsung_backlight_exit(samsung);
samsung          1742 drivers/platform/x86/samsung-laptop.c 	samsung_sysfs_exit(samsung);
samsung          1743 drivers/platform/x86/samsung-laptop.c 	samsung_sabi_exit(samsung);
samsung          1744 drivers/platform/x86/samsung-laptop.c 	samsung_platform_exit(samsung);
samsung          1746 drivers/platform/x86/samsung-laptop.c 	kfree(samsung);