Re: [PATCH] ACPI / PMIC: Fix intel_pmic_regs_handler() read accesses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 31, 2021 at 11:00 AM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>
> The handling of PMIC register reads through writing 0 to address 4
> of the opregion is wrong. Instead of returning the read value
> through the value64, which is a no-op for function == ACPI_WRITE calls,
> store the value and then on a subsequent function == ACPI_READ with
> address == 3 (the address for the value field of the OpRegion)
> return the stored value.
>
> This has been tested on a Xiaomi Mi Pad 2 and makes the ACPI battery dev
> there mostly functional (unfortunately there are still other issues).
>
> Here are the SET() / GET() functions of the PMIC ACPI device,
> which use this opregion, which clearly show the new behavior to
> be correct:

OpRegion vs opregion (I would prefer the former), i.o.w. a bit of
consistency would be nice to have.

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux