OpenCloudOS-Kernel/drivers/platform/surface
Hans de Goede 21d90aaee8 surface: surface3_power: Fix battery readings on batteries without a serial number
The battery on the 2nd hand Surface 3 which I recently bought appears to
not have a serial number programmed in. This results in any I2C reads from
the registers containing the serial number failing with an I2C NACK.

This was causing mshw0011_bix() to fail causing the battery readings to
not work at all.

Ignore EREMOTEIO (I2C NACK) errors when retrieving the serial number and
continue with an empty serial number to fix this.

Fixes: b1f81b496b ("platform/x86: surface3_power: MSHW0011 rev-eng implementation")
BugLink: https://github.com/linux-surface/linux-surface/issues/608
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20220224101848.7219-1-hdegoede@redhat.com
2022-02-24 13:48:39 +01:00
..
aggregator platform: surface: Propagate ACPI Dependency 2021-12-07 12:21:01 +01:00
Kconfig platform/surface: Reinstate platform dependency 2022-01-24 10:41:45 +01:00
Makefile platform/surface: Add DTX driver 2021-03-17 18:39:38 +01:00
surface3-wmi.c surface: surface3-wmi: Use ACPI_COMPANION() directly 2021-10-19 16:55:43 +02:00
surface3_button.c platform/surface: Move Surface 3 Button driver to platform/surface 2020-10-27 12:51:24 +01:00
surface3_power.c surface: surface3_power: Fix battery readings on batteries without a serial number 2022-02-24 13:48:39 +01:00
surface_acpi_notify.c ACPI: scan: Extend acpi_walk_dep_device_list() 2021-06-07 16:45:05 +02:00
surface_aggregator_cdev.c platform/surface: aggregator_cdev: Add lockdep support 2021-06-16 17:47:53 +02:00
surface_aggregator_registry.c platform/surface: aggregator_registry: Rename device registration function 2021-11-16 10:56:54 +01:00
surface_dtx.c platform/surface: dtx: Add missing mutex_destroy() call in failure path 2021-06-16 17:47:52 +02:00
surface_gpe.c platform/surface: gpe: Add support for Surface Laptop Studio 2021-10-21 20:36:18 +02:00
surface_hotplug.c platform/surface: Add Surface Hot-Plug driver 2021-02-08 16:59:21 +01:00
surface_platform_profile.c platform/surface: aggregator: Make SSAM_DEFINE_SYNC_REQUEST_x define static functions 2021-03-08 11:33:28 +01:00
surfacepro3_button.c platform: x86: ACPI: Get rid of ACPICA message printing 2021-03-08 11:33:39 +01:00