diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-14 16:51:47 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-14 16:51:47 -0700 |
commit | 55167453111d3a1e600e29ba6c8e63906bb4821b (patch) | |
tree | 2d8abea34b7d47ff1191c24781a0b50b1bcb1b09 /drivers/platform/x86/samsung-laptop.c | |
parent | fde7dc63b1caa6dedf9af7cbf79895589629bc95 (diff) | |
parent | 7d67c8ac25fbc66ee254aa3e33329d1c9bc152ce (diff) |
Merge tag 'platform-drivers-x86-v5.3-1' of git://git.infradead.org/linux-platform-drivers-x86
Pull x86 platform driver updates from Andy Shevchenko:
"Gathered a bunch of x86 platform driver changes. It's rather big,
since includes two big refactors and completely new driver:
- ASUS WMI driver got a big refactoring in order to support the TUF
Gaming laptops. Besides that, the regression with backlight being
permanently off on various EeePC laptops has been fixed.
- Accelerometer on HP ProBook 450 G0 shows wrong measurements due to
X axis being inverted. This has been fixed.
- Intel PMC core driver has been extended to be ACPI enumerated if
the DSDT provides device with _HID "INT33A1". This allows to
convert the driver to be pure platform and support new hardware
purely based on ACPI DSDT.
- From now on the Intel Speed Select Technology is supported thru a
corresponding driver. This driver provides an access to the
features of the ISST, such as Performance Profile, Core Power, Base
frequency and Turbo Frequency.
- Mellanox platform drivers has been refactored and now extended to
support more systems, including new coming ones.
- The OLPC XO-1.75 platform is now supported.
- CB4063 Beckhoff Automation board is using PMC clocks, provided via
pmc_atom driver, for ethernet controllers in a way that they can't
be managed by the clock driver. The quirk has been extended to
cover this case.
- Touchscreen on Chuwi Hi10 Plus tablet has been enabled. Meanwhile
the information of Chuwi Hi10 Air has been fixed to cover more
models based on the same platform.
- Xiaomi notebooks have WMI interface enabled. Thus, the driver to
support it has been provided. It required some extension of the
generic WMI library, which allows to propagate opaque context to
the ->probe() of the individual drivers.
This release includes debugfs clean up from Greg KH for several
drivers that drop return code check and make debugfs absence or
failure non-fatal.
Also miscellaneous fixes here and there, mostly for Acer WMI and
various Intel drivers"
* tag 'platform-drivers-x86-v5.3-1' of git://git.infradead.org/linux-platform-drivers-x86: (74 commits)
platform/x86: Fix PCENGINES_APU2 Kconfig warning
tools/power/x86/intel-speed-select: Add .gitignore file
platform/x86: mlx-platform: Fix error handling in mlxplat_init()
platform/x86: intel_pmc_core: Attach using APCI HID "INT33A1"
platform/x86: intel_pmc_core: transform Pkg C-state residency from TSC ticks into microseconds
platform/x86: asus-wmi: Use dev_get_drvdata()
Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces
platform/x86: mlx-platform: Add more reset cause attributes
platform/x86: mlx-platform: Modify DMI matching order
platform/x86: mlx-platform: Add regmap structure for the next generation systems
platform/x86: mlx-platform: Change API for i2c-mlxcpld driver activation
platform/x86: mlx-platform: Move regmap initialization before all drivers activation
MAINTAINERS: Update for Intel Speed Select Technology
tools/power/x86: A tool to validate Intel Speed Select commands
platform/x86: ISST: Restore state on resume
platform/x86: ISST: Add Intel Speed Select PUNIT MSR interface
platform/x86: ISST: Add Intel Speed Select mailbox interface via MSRs
platform/x86: ISST: Add Intel Speed Select mailbox interface via PCI
platform/x86: ISST: Add Intel Speed Select mmio interface
platform/x86: ISST: Add IOCTL to Translate Linux logical CPU to PUNIT CPU number
...
Diffstat (limited to 'drivers/platform/x86/samsung-laptop.c')
-rw-r--r-- | drivers/platform/x86/samsung-laptop.c | 89 |
1 files changed, 23 insertions, 66 deletions
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c index 123e52c73c86..9b6a93ff41ff 100644 --- a/drivers/platform/x86/samsung-laptop.c +++ b/drivers/platform/x86/samsung-laptop.c @@ -1276,15 +1276,12 @@ static void samsung_debugfs_exit(struct samsung_laptop *samsung) debugfs_remove_recursive(samsung->debug.root); } -static int samsung_debugfs_init(struct samsung_laptop *samsung) +static void samsung_debugfs_init(struct samsung_laptop *samsung) { - struct dentry *dent; + struct dentry *root; - samsung->debug.root = debugfs_create_dir("samsung-laptop", NULL); - if (!samsung->debug.root) { - pr_err("failed to create debugfs directory"); - goto error_debugfs; - } + root = debugfs_create_dir("samsung-laptop", NULL); + samsung->debug.root = root; samsung->debug.f0000_wrapper.data = samsung->f0000_segment; samsung->debug.f0000_wrapper.size = 0xffff; @@ -1295,60 +1292,24 @@ static int samsung_debugfs_init(struct samsung_laptop *samsung) samsung->debug.sdiag_wrapper.data = samsung->sdiag; samsung->debug.sdiag_wrapper.size = strlen(samsung->sdiag); - dent = debugfs_create_u16("command", S_IRUGO | S_IWUSR, - samsung->debug.root, &samsung->debug.command); - if (!dent) - goto error_debugfs; - - dent = debugfs_create_u32("d0", S_IRUGO | S_IWUSR, samsung->debug.root, - &samsung->debug.data.d0); - if (!dent) - goto error_debugfs; - - dent = debugfs_create_u32("d1", S_IRUGO | S_IWUSR, samsung->debug.root, - &samsung->debug.data.d1); - if (!dent) - goto error_debugfs; - - dent = debugfs_create_u16("d2", S_IRUGO | S_IWUSR, samsung->debug.root, - &samsung->debug.data.d2); - if (!dent) - goto error_debugfs; - - dent = debugfs_create_u8("d3", S_IRUGO | S_IWUSR, samsung->debug.root, - &samsung->debug.data.d3); - if (!dent) - goto error_debugfs; - - dent = debugfs_create_blob("data", S_IRUGO | S_IWUSR, - samsung->debug.root, - &samsung->debug.data_wrapper); - if (!dent) - goto error_debugfs; - - dent = debugfs_create_blob("f0000_segment", S_IRUSR | S_IWUSR, - samsung->debug.root, - &samsung->debug.f0000_wrapper); - if (!dent) - goto error_debugfs; - - dent = debugfs_create_file("call", S_IFREG | S_IRUGO, - samsung->debug.root, samsung, - &samsung_laptop_call_fops); - if (!dent) - goto error_debugfs; - - dent = debugfs_create_blob("sdiag", S_IRUGO | S_IWUSR, - samsung->debug.root, - &samsung->debug.sdiag_wrapper); - if (!dent) - goto error_debugfs; - - return 0; - -error_debugfs: - samsung_debugfs_exit(samsung); - return -ENOMEM; + debugfs_create_u16("command", S_IRUGO | S_IWUSR, root, + &samsung->debug.command); + debugfs_create_u32("d0", S_IRUGO | S_IWUSR, root, + &samsung->debug.data.d0); + debugfs_create_u32("d1", S_IRUGO | S_IWUSR, root, + &samsung->debug.data.d1); + debugfs_create_u16("d2", S_IRUGO | S_IWUSR, root, + &samsung->debug.data.d2); + debugfs_create_u8("d3", S_IRUGO | S_IWUSR, root, + &samsung->debug.data.d3); + debugfs_create_blob("data", S_IRUGO | S_IWUSR, root, + &samsung->debug.data_wrapper); + debugfs_create_blob("f0000_segment", S_IRUSR | S_IWUSR, root, + &samsung->debug.f0000_wrapper); + debugfs_create_file("call", S_IFREG | S_IRUGO, root, samsung, + &samsung_laptop_call_fops); + debugfs_create_blob("sdiag", S_IRUGO | S_IWUSR, root, + &samsung->debug.sdiag_wrapper); } static void samsung_sabi_exit(struct samsung_laptop *samsung) @@ -1741,9 +1702,7 @@ static int __init samsung_init(void) if (ret) goto error_lid_handling; - ret = samsung_debugfs_init(samsung); - if (ret) - goto error_debugfs; + samsung_debugfs_init(samsung); samsung->pm_nb.notifier_call = samsung_pm_notification; register_pm_notifier(&samsung->pm_nb); @@ -1751,8 +1710,6 @@ static int __init samsung_init(void) samsung_platform_device = samsung->platform_device; return ret; -error_debugfs: - samsung_lid_handling_exit(samsung); error_lid_handling: samsung_leds_exit(samsung); error_leds: |