Lines Matching refs:device
75 MODULE_DESCRIPTION("Sony laptop extras driver (SPIC and SNC ACPI device)");
86 "set this if you don't want to enable the SPIC device");
108 "minor number of the misc device for the SPIC compatibility code, "
182 static int sony_nc_rfkill_setup(struct acpi_device *device,
621 /* the device uses 1-based values, while the backlight subsystem uses
628 static ssize_t sony_nc_sysfs_show(struct device *, struct device_attribute *,
630 static ssize_t sony_nc_sysfs_store(struct device *, struct device_attribute *,
816 static ssize_t sony_nc_handles_show(struct device *dev,
948 static ssize_t sony_nc_sysfs_show(struct device *dev, struct device_attribute *attr,
969 static ssize_t sony_nc_sysfs_store(struct device *dev,
1005 * Backlight device
1181 static void sony_nc_notify(struct acpi_device *device, u32 event)
1223 * update the rfkill device status when the
1290 * ACPI device
1292 static void sony_nc_function_setup(struct acpi_device *device,
1365 result = sony_nc_rfkill_setup(device, handle);
1508 dprintk("Resuming SNC device\n");
1546 static int sony_nc_resume(struct device *dev)
1605 static int sony_nc_setup_rfkill(struct acpi_device *device,
1636 rfk = rfkill_alloc(name, &device->dev, type,
1697 static int sony_nc_rfkill_setup(struct acpi_device *device,
1739 sony_nc_setup_rfkill(device, SONY_WIFI);
1742 sony_nc_setup_rfkill(device, SONY_BLUETOOTH);
1747 sony_nc_setup_rfkill(device, SONY_WWAN);
1750 sony_nc_setup_rfkill(device, SONY_WIMAX);
1790 static ssize_t sony_nc_kbd_backlight_mode_store(struct device *dev,
1810 static ssize_t sony_nc_kbd_backlight_mode_show(struct device *dev,
1832 static ssize_t sony_nc_kbd_backlight_timeout_store(struct device *dev,
1852 static ssize_t sony_nc_kbd_backlight_timeout_show(struct device *dev,
1975 static ssize_t sony_nc_battery_care_limit_store(struct device *dev,
2032 static ssize_t sony_nc_battery_care_limit_show(struct device *dev,
2059 static ssize_t sony_nc_battery_care_health_show(struct device *dev,
2174 static ssize_t sony_nc_thermal_profiles_show(struct device *dev,
2189 static ssize_t sony_nc_thermal_mode_store(struct device *dev,
2213 static ssize_t sony_nc_thermal_mode_show(struct device *dev,
2310 static ssize_t sony_nc_lid_resume_store(struct device *dev,
2351 static ssize_t sony_nc_lid_resume_show(struct device *dev,
2482 static ssize_t sony_nc_gfx_switch_status_show(struct device *dev,
2539 static ssize_t sony_nc_highspeed_charging_store(struct device *dev,
2558 static ssize_t sony_nc_highspeed_charging_show(struct device *dev,
2613 static ssize_t sony_nc_lowbatt_store(struct device *dev,
2632 static ssize_t sony_nc_lowbatt_show(struct device *dev,
2679 static ssize_t sony_nc_hsfan_store(struct device *dev,
2698 static ssize_t sony_nc_hsfan_show(struct device *dev,
2709 static ssize_t sony_nc_fanspeed_show(struct device *dev,
2786 static ssize_t sony_nc_usb_charge_store(struct device *dev,
2805 static ssize_t sony_nc_usb_charge_show(struct device *dev,
2860 static ssize_t sony_nc_panelid_show(struct device *dev,
2907 static ssize_t sony_nc_smart_conn_store(struct device *dev,
2966 static ssize_t sony_nc_touchpad_store(struct device *dev,
2988 static ssize_t sony_nc_touchpad_show(struct device *dev,
3142 pr_warn("unable to register backlight device\n");
3154 static int sony_nc_add(struct acpi_device *device)
3160 sony_nc_acpi_device = device;
3161 strcpy(acpi_device_class(device), "sony/hotkey");
3163 sony_nc_acpi_handle = device->handle;
3165 /* read device status */
3166 result = acpi_bus_get_status(device);
3167 /* bail IFF the above call was successful and the device is not present */
3168 if (!result && !device->status.present) {
3189 result = sony_laptop_setup_input(device);
3206 sony_nc_function_setup(device, sony_pf_device);
3212 /* create sony_pf sysfs attributes related to the SNC device */
3271 static void sony_nc_remove(struct acpi_device *device)
3648 * irq and we can read new data from the device:
3888 static ssize_t sony_pic_wwanpower_store(struct device *dev,
3906 static ssize_t sony_pic_wwanpower_show(struct device *dev,
3927 static ssize_t sony_pic_bluetoothpower_store(struct device *dev,
3945 static ssize_t sony_pic_bluetoothpower_show(struct device *dev,
3968 static ssize_t sony_pic_fanspeed_store(struct device *dev,
3985 static ssize_t sony_pic_fanspeed_show(struct device *dev,
4160 /* sync the backlight device status */
4297 pr_info("device allocated minor is %d\n",
4408 static int sony_pic_possible_resources(struct acpi_device *device)
4413 if (!device)
4416 /* get device status */
4419 result = acpi_bus_get_status(device);
4425 if (!device->status.enabled)
4434 status = acpi_walk_resources(device->handle, METHOD_NAME__PRS,
4445 * Disable the spic device by calling its _DIS method
4447 static int sony_pic_disable(struct acpi_device *device)
4449 acpi_status ret = acpi_evaluate_object(device->handle, "_DIS", NULL,
4465 static int sony_pic_enable(struct acpi_device *device,
4547 status = acpi_set_current_resources(device->handle, &buffer);
4556 /* Necessary device initializations calls (from sonypi) */
4636 static void sony_pic_remove(struct acpi_device *device)
4641 if (sony_pic_disable(device)) {
4642 pr_err("Couldn't disable device\n");
4675 static int sony_pic_add(struct acpi_device *device)
4681 spic_dev.acpi_dev = device;
4682 strcpy(acpi_device_class(device), "sony/hotkey");
4687 result = sony_pic_possible_resources(device);
4694 result = sony_laptop_setup_input(device);
4764 result = sony_pic_enable(device, spic_dev.cur_ioport, spic_dev.cur_irq);
4766 pr_err("Couldn't enable device\n");
4771 /* create device attributes */
4787 sony_pic_disable(device);
4821 static int sony_pic_suspend(struct device *dev)
4828 static int sony_pic_resume(struct device *dev)