<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/acpi/tiny-power-button.c, branch v7.0.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-06-01T15:54:24+00:00</updated>
<entry>
<title>ACPI: driver: Check ACPI_COMPANION() against NULL during probe</title>
<updated>2026-06-01T15:54:24+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2026-05-22T12:36:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=612ddab8fce04394bd7aebe8e0f2599642e30859'/>
<id>urn:sha1:612ddab8fce04394bd7aebe8e0f2599642e30859</id>
<content type='text'>
[ Upstream commit e4865a56d013e86e46ea6acea15bb6eae01898ff ]

Since every platform driver can be forced to match a device that doesn't
match its list of device IDs because of device_match_driver_override(),
platform drivers that rely on the existence of a device's ACPI companion
object should verify its presence.

Accordingly, add requisite ACPI_COMPANION() or ACPI_HANDLE() checks
against NULL to 13 platform drivers handling core ACPI devices.

Also change the value returned by the ACPI thermal zone driver when
the device's ACPI companion is not present to -ENODEV for consistency
with the other drivers.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Hans de Goede &lt;johannes.goede@oss.qualcomm.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://patch.msgid.link/4516068.ejJDZkT8p0@rafael.j.wysocki
Cc: 7.0+ &lt;stable@vger.kernel.org&gt; # 7.0+
[ reordered variable declaration to add NULL check before pre-existing stable-only code that dereferences the pointer ]
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ACPI: tiny-power-button: Convert the driver to a platform one</title>
<updated>2025-12-26T14:08:57+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2025-12-15T13:59:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f4203ec64e1155c07c5d95bddc62201af8598c67'/>
<id>urn:sha1:f4203ec64e1155c07c5d95bddc62201af8598c67</id>
<content type='text'>
While binding drivers directly to struct acpi_device objects allows
basic functionality to be provided, at least in the majority of cases,
there are some problems with it, related to general consistency, sysfs
layout, power management operation ordering, and code cleanliness.

Overall, it is better to bind drivers to platform devices than to their
ACPI companions, so convert the ACPI tiny-power-button driver to a
platform one.

While this is not expected to alter functionality, it changes sysfs
layout and so it will be visible to user space.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
[ rjw: White space fixup ]
Link: https://patch.msgid.link/5629403.Sb9uPGUboI@rafael.j.wysocki
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: tiny-power-button: Eliminate the driver notify callback</title>
<updated>2023-06-16T17:48:09+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2023-06-04T15:22:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ff1d7aea83e2ea805b060d6a2f0623e41e3e4158'/>
<id>urn:sha1:ff1d7aea83e2ea805b060d6a2f0623e41e3e4158</id>
<content type='text'>
Rework the ACPI tiny-power-button driver to install a notify handler or
a fixed event handler for the device it binds to by itself and drop its
notify callback.

This will allow acpi_device_install_notify_handler() and
acpi_device_remove_notify_handler() to be simplified going forward.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: make remove callback of ACPI driver void</title>
<updated>2022-11-23T18:11:22+00:00</updated>
<author>
<name>Dawei Li</name>
<email>set_pte_at@outlook.com</email>
</author>
<published>2022-11-13T16:26:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6c0eb5ba3500f6da367351ff3c4452c029cb72fa'/>
<id>urn:sha1:6c0eb5ba3500f6da367351ff3c4452c029cb72fa</id>
<content type='text'>
For bus-based driver, device removal is implemented as:
1 device_remove()-&gt;
2   bus-&gt;remove()-&gt;
3     driver-&gt;remove()

Driver core needs no inform from callee(bus driver) about the
result of remove callback. In that case, commit fc7a6209d571
("bus: Make remove callback return void") forces bus_type::remove
be void-returned.

Now we have the situation that both 1 &amp; 2 of calling chain are
void-returned, so it does not make much sense for 3(driver-&gt;remove)
to return non-void to its caller.

So the basic idea behind this change is making remove() callback of
any bus-based driver to be void-returned.

This change, for itself, is for device drivers based on acpi-bus.

Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Lee Jones &lt;lee@kernel.org&gt;
Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Dawei Li &lt;set_pte_at@outlook.com&gt;
Reviewed-by: Maximilian Luz &lt;luzmaximilian@gmail.com&gt;  # for drivers/platform/surface/*
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: tiny-power-button: Simplify the code using module_acpi_driver()</title>
<updated>2020-11-17T17:12:34+00:00</updated>
<author>
<name>Hanjun Guo</name>
<email>guohanjun@huawei.com</email>
</author>
<published>2020-11-13T02:26:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=907cc9fefe8349d6cc70d6800cc8edf10acf7634'/>
<id>urn:sha1:907cc9fefe8349d6cc70d6800cc8edf10acf7634</id>
<content type='text'>
Using module_acpi_driver() to simplify the code.

Signed-off-by: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: tiny-power-button: Remove dead ACPICA debug code</title>
<updated>2020-09-25T16:25:51+00:00</updated>
<author>
<name>Hanjun Guo</name>
<email>guohanjun@huawei.com</email>
</author>
<published>2020-09-24T02:57:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b16cd57ebc5d866c3b16664d8d19c91579b3aa88'/>
<id>urn:sha1:b16cd57ebc5d866c3b16664d8d19c91579b3aa88</id>
<content type='text'>
The ACPICA debug code is not used, can be removed.

Signed-off-by: Hanjun Guo &lt;guohanjun@huawei.com&gt;
[ rjw: Subject edit ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: Add new tiny-power-button driver to directly signal init</title>
<updated>2020-02-13T22:36:23+00:00</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2020-02-11T23:38:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a1b93e890d4f3e8c134095b52954bfbccaea29a6'/>
<id>urn:sha1:a1b93e890d4f3e8c134095b52954bfbccaea29a6</id>
<content type='text'>
Virtual machines often use an ACPI power button event to tell the
machine to shut down gracefully.

Provide an extremely lightweight "tiny power button" driver to handle
this event by signaling init directly, rather than running a separate
daemon (such as acpid or systemd-logind) that adds to startup time and
VM image complexity.

The kernel configuration defines the default signal to send init, and
userspace can change this signal via a module parameter.

Suggested-by: "Rafael J. Wysocki" &lt;rafael@kernel.org&gt;
Signed-off-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
