<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/acpi/pmic, branch v6.1.168</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-10-17T13:20:36+00:00</updated>
<entry>
<title>ACPI: PMIC: Remove unneeded check in tps68470_pmic_opregion_probe()</title>
<updated>2024-10-17T13:20:36+00:00</updated>
<author>
<name>Aleksandr Mishin</name>
<email>amishin@t-argos.ru</email>
</author>
<published>2024-07-30T22:53:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f4ea89abbe295d2e7c2b4df64cb5c8ea1a60746f'/>
<id>urn:sha1:f4ea89abbe295d2e7c2b4df64cb5c8ea1a60746f</id>
<content type='text'>
[ Upstream commit 07442c46abad1d50ac82af5e0f9c5de2732c4592 ]

In tps68470_pmic_opregion_probe() pointer 'dev' is compared to NULL which
is useless.

Fix this issue by removing unneeded check.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: e13452ac3790 ("ACPI / PMIC: Add TI PMIC TPS68470 operation region driver")
Suggested-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Aleksandr Mishin &lt;amishin@t-argos.ru&gt;
Reviewed-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://patch.msgid.link/20240730225339.13165-1-amishin@t-argos.ru
[ rjw: Subject edit ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ACPI: PMIC: xpower: Fix _TMP ACPI errors</title>
<updated>2021-12-08T14:34:57+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2021-11-26T15:21:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5f96ba56552121f4297874d0accf29b9b4a1ae93'/>
<id>urn:sha1:5f96ba56552121f4297874d0accf29b9b4a1ae93</id>
<content type='text'>
On some devices with a X-Powers AXP288 PMIC the LPAT tables in the ACPI
node for the AXP288 PMIC for some reason only describe a small temperature
range, e.g. 27° - 37° Celcius (assuming the entries are in millidegrees).

When the tablet is idle in a room at 21° degrees this is causing values
outside the LPAT table to be read, causing e.g. the following 2 errors
to get spammed to the logs every 4 seconds! :

[ 7512.791316] ACPI Error: AE_ERROR, Returned by Handler for [UserDefinedRegion] (20210930/evregion-281)
[ 7512.791611] ACPI Error: Aborting method \_SB.SXP1._TMP due to previous error (AE_ERROR) (20210930/psparse-529)

Fix this by clamping the raw value to the LPAT table range before
passing it to acpi_lpat_raw_to_temp().

Note clamping has been chosen rather then extrapolating because it is
unknown how other parts of the ACPI tables will respond to temperature
values outside of the LPAT range.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: PMIC: allow drivers to provide a custom lpat_raw_to_temp() function</title>
<updated>2021-12-08T14:34:57+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2021-11-26T15:21:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c5200609c9176482ea96ac73e52bd466b622f385'/>
<id>urn:sha1:c5200609c9176482ea96ac73e52bd466b622f385</id>
<content type='text'>
The LPAT tables used in the DSDT for some PMICs require special handling,
allow the PMIC OpRegion drivers to provide an alternative implementation
by adding a lpat_raw_to_temp function pointer to struct pmic_table;
and initialize this to the default acpi_lpat_raw_to_temp function
for all PMICs.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: PMIC: constify all struct intel_pmic_opregion_data declarations</title>
<updated>2021-12-08T14:34:57+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2021-11-26T15:21:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e172e650eda3274964df3a74cf12d210eae9a044'/>
<id>urn:sha1:e172e650eda3274964df3a74cf12d210eae9a044</id>
<content type='text'>
The struct intel_pmic_opregion_data declarations never change,
constify them all.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: PMIC: Fix intel_pmic_regs_handler() read accesses</title>
<updated>2021-11-03T18:28:32+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2021-10-31T15:31:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=009a789443fe4c8e6b1ecb7c16b4865c026184cd'/>
<id>urn:sha1:009a789443fe4c8e6b1ecb7c16b4865c026184cd</id>
<content type='text'>
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:

OperationRegion (REGS, 0x8F, Zero, 0x50)
Field (REGS, ByteAcc, NoLock, Preserve)
{
    CLNT,   8,
    SA,     8,
    OFF,    8,
    VAL,    8,
    RWM,    8
}

Method (GET, 3, Serialized)
{
    If ((AVBE == One))
    {
        CLNT = Arg0
        SA = Arg1
        OFF = Arg2
        RWM = Zero
        If ((AVBG == One))
        {
            GPRW = Zero
        }
    }

    Return (VAL) /* \_SB_.PCI0.I2C7.PMI5.VAL_ */
}

Method (SET, 4, Serialized)
{
    If ((AVBE == One))
    {
        CLNT = Arg0
        SA = Arg1
        OFF = Arg2
        VAL = Arg3
        RWM = One
        If ((AVBG == One))
        {
            GPRW = One
        }
    }
}

Fixes: 0afa877a5650 ("ACPI / PMIC: intel: add REGS operation region support")
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / PMIC: XPower: optimize MIPI PMIQ sequence I2C-bus accesses</title>
<updated>2021-07-16T17:05:59+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2021-07-06T16:09:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fd080a01ecfc92984cabca6e54c61fe0f70e3984'/>
<id>urn:sha1:fd080a01ecfc92984cabca6e54c61fe0f70e3984</id>
<content type='text'>
The I2C-bus to the XPower AXP288 is shared between the Linux kernel and
the SoCs P-Unit. The P-Unit has a semaphore which the kernel must "lock"
before it may use the bus and while the kernel holds the semaphore the CPU
and GPU power-states must not be changed otherwise the system will freeze.

This is a complex process, which is quite expensive. This is all done by
iosf_mbi_block_punit_i2c_access(). To ensure that no unguarded I2C-bus
accesses happen, iosf_mbi_block_punit_i2c_access() gets called by the
I2C-bus-driver for every I2C transfer. Because this is so expensive it
is allowed to call iosf_mbi_block_punit_i2c_access() in a nested
fashion, so that higher-level code which does multiple I2C-transfers can
call it once for a group of transfers, turning the calls done by the
I2C-bus-driver into no-ops.

The default exec_mipi_pmic_seq_element implementation from
drivers/acpi/pmic/intel_pmic.c does a regmap_update_bits() call and
the involved registers are typically marked as volatile in the regmap,
so this leads to 2 I2C-bus accesses.

Add a XPower AXP288 specific implementation of exec_mipi_pmic_seq_element
which calls iosf_mbi_block_punit_i2c_access() calls before the
regmap_update_bits() call to avoid having to do the whole expensive
acquire P-Unit semaphore dance twice.

Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / PMIC: XPower: optimize I2C-bus accesses</title>
<updated>2021-07-16T17:05:59+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2021-07-06T16:09:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e38ba404f20c4beb1a5d4547567d2934a5b95843'/>
<id>urn:sha1:e38ba404f20c4beb1a5d4547567d2934a5b95843</id>
<content type='text'>
The I2C-bus to the XPower AXP288 is shared between the Linux kernel and
the SoCs P-Unit. The P-Unit has a semaphore which the kernel must "lock"
before it may use the bus and while the kernel holds the semaphore the CPU
and GPU power-states must not be changed otherwise the system will freeze.

This is a complex process, which is quite expensive. This is all done by
iosf_mbi_block_punit_i2c_access(). To ensure that no unguarded I2C-bus
accesses happen, iosf_mbi_block_punit_i2c_access() gets called by the
I2C-bus-driver for every I2C transfer. Because this is so expensive it
is allowed to call iosf_mbi_block_punit_i2c_access() in a nested
fashion, so that higher-level code which does multiple I2C-transfers can
call it once for a group of transfers, turning the calls done by the
I2C-bus-driver into no-ops.

Add iosf_mbi_block_punit_i2c_access() calls around groups of register
accesses, so that the P-Unit semaphore only needs to be taken once
for each group of register accesses.

Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>mfd: tps68470: Remove tps68470 MFD driver</title>
<updated>2021-06-17T11:12:18+00:00</updated>
<author>
<name>Daniel Scally</name>
<email>djrscally@gmail.com</email>
</author>
<published>2021-06-03T22:40:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=24700e1f41f0dcbe389b8d9e5830aaca2192093c'/>
<id>urn:sha1:24700e1f41f0dcbe389b8d9e5830aaca2192093c</id>
<content type='text'>
This driver only covered one scenario in which ACPI devices with _HID
INT3472 are found, and its functionality has been taken over by the
intel-skl-int3472 module, so remove it.

Acked-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;djrscally@gmail.com&gt;
Link: https://lore.kernel.org/r/20210603224007.120560-7-djrscally@gmail.com
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>ACPI: scan: Extend acpi_walk_dep_device_list()</title>
<updated>2021-06-07T14:45:05+00:00</updated>
<author>
<name>Daniel Scally</name>
<email>djrscally@gmail.com</email>
</author>
<published>2021-06-03T22:40:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a9e10e58730432e5de840eb3ddd55c75f29341b3'/>
<id>urn:sha1:a9e10e58730432e5de840eb3ddd55c75f29341b3</id>
<content type='text'>
The acpi_walk_dep_device_list() function is not as generic as its
name implies, serving only to decrement the dependency count for each
dependent device of the input.

Extend it to accept a callback which can be applied to all the
dependencies in acpi_dep_list.

Replace all existing calls to the function with calls to a wrapper,
passing a callback that applies the same dependency reduction.

Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Acked-by: Maximilian Luz &lt;luzmaximilian@gmail.com&gt;  # for platform/surface parts
Signed-off-by: Daniel Scally &lt;djrscally@gmail.com&gt;
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: fix various typos in comments</title>
<updated>2021-03-19T16:45:49+00:00</updated>
<author>
<name>Tom Saeger</name>
<email>tom.saeger@oracle.com</email>
</author>
<published>2021-03-13T01:55:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=935ab8509ccb277c536c9fad96b1a90d3bed98fc'/>
<id>urn:sha1:935ab8509ccb277c536c9fad96b1a90d3bed98fc</id>
<content type='text'>
Fix trivial ACPI driver comment typos.

s/notifcations/notifications/
s/Ajust/Adjust/
s/preform/perform/
s/atrributes/attributes/
s/Souce/Source/
s/Evalutes/Evaluates/
s/Evalutes/Evaluates/
s/specifiy/specify/
s/promixity/proximity/
s/presuambly/presumably/
s/Evalute/Evaluate/
s/specificed/specified/
s/rountine/routine/
s/previosuly/previously/

Change comment referencing pcc_send_cmd to send_pcc_cmd.

Signed-off-by: Tom Saeger &lt;tom.saeger@oracle.com&gt;
Reviewed-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
