| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Move the Surface 3 Power operation region driver from platform/x86 to
the newly created platform/surface directory.
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20201009141128.683254-5-luzmaximilian@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The i2c_acpi_new_device() function never returns NULL, it returns error
pointers.
Fixes: b1f81b496b0d ("platform/x86: surface3_power: MSHW0011 rev-eng implementation")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mshw0011_space_handler()
smatch warnings:
.../surface3_power.c:417 mshw0011_space_handler() warn: always true condition '(ret >= 0) => +(0-u32max >= 0)'
Refactor error handling returned by mshw0011_adp_psr() to avoid always
true condition.
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
|
|
|
|
|
| |
We obviously are users of bits.h and types.h. Add them to the list.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
|
|
|
|
|
|
| |
For better readability reformat GUID assignment.
While here, add the comment how this GUID looks in a string representation.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
|
|
|
|
|
|
| |
Driver depends to ACPI, this marco always is evaluated to the parameter,
thus useless. Drop it for good.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
|
|
|
|
|
| |
For better namespace maintenance prefix POLL_INTERVAL macro with SURFACE_3.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
|
|
|
|
|
| |
Refactor mshw0011_adp_psr() to be one liner.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
|
|
|
|
|
| |
We have device and we may use it to print messages.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
|
|
|
|
|
|
|
| |
As reported by kbuild bot the struct mshw0011_lookup in never used.
Drop its definition for good.
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
|
Patch was rebased on top of for-next. Thanks for your patience!
Blaž
I'm resubmitting this patch with review feedback addressed:
https://patchwork.kernel.org/patch/10584079/
The patch was previously not resubmitted because it required a change
that was reverted in the ACPICA. That has since been corrected:
https://github.com/acpica/acpica/commit/9159c09a2a5897a43f78c95cdffc160d399722c3
We've been using this patch for a while and user reports confirm that it
works:
https://github.com/linux-surface/linux-surface
Previous description follows.
>8------------------------------------------------------8<
The MSHW0011 device is a chip that replaces the battery firmware
by using ACPI operation regions on the Surface 3.
It is unclear whether or not the chip will be reused somewhere else
(under Windows, the chip is called "Surface Platform Power Driver"
and the driver is provided by Microsoft).
The values have been obtained by reverse engineering, and are subject to
errors. Looks like it works on overall pretty well.
I couldn't manage to get the IRQ correctly triggered, so I am using a
good old polling thread to check for changes. This is something
to be fixed in a later version.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=106231
Signed-off-by: Blaž Hrastnik <blaz@mxxn.io>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Stephen Just <stephenjust@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|