Skip to content

Commit 21fc506

Browse files
committed
Merge branches 'acpi-bus', 'acpi-video' and 'acpi-misc'
Merge ACPI bus type driver changes, ACPI backlight driver updates and a series of cleanups related to of.h for 6.4-rc1: - Ensure that ACPI notify handlers are not running after removal and clean up code in acpi_sb_notify() (Rafael Wysocki). - Remove register_backlight_delay module option and code and remove quirks for false-positive backlight control support advertised on desktop boards (Hans de Goede). - Replace irqdomain.h include with struct declarations in ACPI headers and update several pieces of code previously including of.h implicitly through those headers (Rob Herring). * acpi-bus: ACPI: bus: Ensure that notify handlers are not running after removal ACPI: bus: Add missing braces to acpi_sb_notify() * acpi-video: ACPI: video: Remove desktops without backlight DMI quirks ACPI: video: Remove register_backlight_delay module option and code * acpi-misc: ACPI: Replace irqdomain.h include with struct declarations fpga: lattice-sysconfig-spi: Add explicit include for of.h tpm: atmel: Add explicit include for of.h virtio-mmio: Add explicit include for of.h pata: ixp4xx: Add explicit include for of.h ata: pata_macio: Add explicit include of irqdomain.h serial: 8250_tegra: Add explicit include for of.h net: rfkill-gpio: Add explicit include for of.h staging: iio: resolver: ad2s1210: Add explicit include for of.h iio: adc: ad7292: Add explicit include for of.h
4 parents 0f318ba + faae443 + abe4f5a + 4516662 commit 21fc506

15 files changed

Lines changed: 16 additions & 83 deletions

File tree

drivers/acpi/acpi_video.c

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@ module_param(device_id_scheme, bool, 0444);
7070
static int only_lcd = -1;
7171
module_param(only_lcd, int, 0444);
7272

73-
static int register_backlight_delay;
74-
module_param(register_backlight_delay, int, 0444);
75-
MODULE_PARM_DESC(register_backlight_delay,
76-
"Delay in seconds before doing fallback (non GPU driver triggered) "
77-
"backlight registration, set to 0 to disable.");
78-
7973
static bool may_report_brightness_keys;
8074
static int register_count;
8175
static DEFINE_MUTEX(register_count_mutex);
@@ -84,9 +78,6 @@ static LIST_HEAD(video_bus_head);
8478
static int acpi_video_bus_add(struct acpi_device *device);
8579
static void acpi_video_bus_remove(struct acpi_device *device);
8680
static void acpi_video_bus_notify(struct acpi_device *device, u32 event);
87-
static void acpi_video_bus_register_backlight_work(struct work_struct *ignored);
88-
static DECLARE_DELAYED_WORK(video_bus_register_backlight_work,
89-
acpi_video_bus_register_backlight_work);
9081

9182
/*
9283
* Indices in the _BCL method response: the first two items are special,
@@ -2096,11 +2087,6 @@ static void acpi_video_bus_remove(struct acpi_device *device)
20962087
kfree(video);
20972088
}
20982089

2099-
static void acpi_video_bus_register_backlight_work(struct work_struct *ignored)
2100-
{
2101-
acpi_video_register_backlight();
2102-
}
2103-
21042090
static int __init is_i740(struct pci_dev *dev)
21052091
{
21062092
if (dev->device == 0x00D1)
@@ -2183,17 +2169,6 @@ static bool should_check_lcd_flag(void)
21832169
return false;
21842170
}
21852171

2186-
/*
2187-
* At least one graphics driver has reported that no LCD is connected
2188-
* via the native interface. cancel the registration for fallback acpi_video0.
2189-
* If another driver still deems this necessary, it can explicitly register it.
2190-
*/
2191-
void acpi_video_report_nolcd(void)
2192-
{
2193-
cancel_delayed_work(&video_bus_register_backlight_work);
2194-
}
2195-
EXPORT_SYMBOL(acpi_video_report_nolcd);
2196-
21972172
int acpi_video_register(void)
21982173
{
21992174
int ret = 0;
@@ -2222,18 +2197,6 @@ int acpi_video_register(void)
22222197
*/
22232198
register_count = 1;
22242199

2225-
/*
2226-
* acpi_video_bus_add() skips registering the userspace visible
2227-
* backlight_device. The intend is for this to be registered by the
2228-
* drm/kms driver calling acpi_video_register_backlight() *after* it is
2229-
* done setting up its own native backlight device. The delayed work
2230-
* ensures that acpi_video_register_backlight() always gets called
2231-
* eventually, in case there is no drm/kms driver or it is disabled.
2232-
*/
2233-
if (register_backlight_delay)
2234-
schedule_delayed_work(&video_bus_register_backlight_work,
2235-
register_backlight_delay * HZ);
2236-
22372200
leave:
22382201
mutex_unlock(&register_count_mutex);
22392202
return ret;
@@ -2244,7 +2207,6 @@ void acpi_video_unregister(void)
22442207
{
22452208
mutex_lock(&register_count_mutex);
22462209
if (register_count) {
2247-
cancel_delayed_work_sync(&video_bus_register_backlight_work);
22482210
acpi_bus_unregister_driver(&acpi_video_bus);
22492211
register_count = 0;
22502212
may_report_brightness_keys = false;

drivers/acpi/bus.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,7 @@ static void acpi_device_remove_notify_handler(struct acpi_device *device,
589589
acpi_remove_notify_handler(device->handle, type,
590590
acpi_notify_device);
591591
}
592+
acpi_os_wait_events_complete();
592593
}
593594

594595
/* Handle events targeting \_SB device (at present only graceful shutdown) */
@@ -623,8 +624,9 @@ static void acpi_sb_notify(acpi_handle handle, u32 event, void *data)
623624
if (event == ACPI_SB_NOTIFY_SHUTDOWN_REQUEST) {
624625
if (!work_busy(&acpi_sb_work))
625626
schedule_work(&acpi_sb_work);
626-
} else
627+
} else {
627628
pr_warn("event %x is not supported by \\_SB device\n", event);
629+
}
628630
}
629631

630632
static int __init acpi_setup_sb_notify_handler(void)

drivers/acpi/video_detect.c

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,6 @@ static int video_detect_force_native(const struct dmi_system_id *d)
130130
return 0;
131131
}
132132

133-
static int video_detect_force_none(const struct dmi_system_id *d)
134-
{
135-
acpi_backlight_dmi = acpi_backlight_none;
136-
return 0;
137-
}
138-
139133
static const struct dmi_system_id video_detect_dmi_table[] = {
140134
/*
141135
* Models which should use the vendor backlight interface,
@@ -768,35 +762,6 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
768762
DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 15 3535"),
769763
},
770764
},
771-
772-
/*
773-
* Desktops which falsely report a backlight and which our heuristics
774-
* for this do not catch.
775-
*/
776-
{
777-
.callback = video_detect_force_none,
778-
/* Dell OptiPlex 9020M */
779-
.matches = {
780-
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
781-
DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 9020M"),
782-
},
783-
},
784-
{
785-
.callback = video_detect_force_none,
786-
/* GIGABYTE GB-BXBT-2807 */
787-
.matches = {
788-
DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
789-
DMI_MATCH(DMI_PRODUCT_NAME, "GB-BXBT-2807"),
790-
},
791-
},
792-
{
793-
.callback = video_detect_force_none,
794-
/* MSI MS-7721 */
795-
.matches = {
796-
DMI_MATCH(DMI_SYS_VENDOR, "MSI"),
797-
DMI_MATCH(DMI_PRODUCT_NAME, "MS-7721"),
798-
},
799-
},
800765
{ },
801766
};
802767

drivers/ata/pata_ixp4xx_cf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <linux/module.h>
1818
#include <linux/libata.h>
1919
#include <linux/irq.h>
20+
#include <linux/of.h>
2021
#include <linux/platform_device.h>
2122
#include <linux/regmap.h>
2223
#include <scsi/scsi_host.h>

drivers/ata/pata_macio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <linux/adb.h>
2222
#include <linux/pmu.h>
2323
#include <linux/scatterlist.h>
24+
#include <linux/irqdomain.h>
2425
#include <linux/of.h>
2526
#include <linux/gfp.h>
2627
#include <linux/pci.h>

drivers/char/tpm/tpm_atmel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ struct tpm_atmel_priv {
2626

2727
#ifdef CONFIG_PPC64
2828

29-
#include <asm/prom.h>
29+
#include <linux/of.h>
3030

3131
#define atmel_getb(priv, offset) readb(priv->iobase + offset)
3232
#define atmel_putb(val, priv, offset) writeb(val, priv->iobase + offset)

drivers/fpga/lattice-sysconfig-spi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Lattice FPGA programming over slave SPI sysCONFIG interface.
44
*/
55

6+
#include <linux/of.h>
67
#include <linux/spi/spi.h>
78

89
#include "lattice-sysconfig.h"

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4445,10 +4445,6 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
44454445
amdgpu_set_panel_orientation(&aconnector->base);
44464446
}
44474447

4448-
/* If we didn't find a panel, notify the acpi video detection */
4449-
if (dm->adev->flags & AMD_IS_APU && dm->num_of_edps == 0)
4450-
acpi_video_report_nolcd();
4451-
44524448
/* Software is initialized. Now we can register interrupt handlers. */
44534449
switch (adev->asic_type) {
44544450
#if defined(CONFIG_DRM_AMD_DC_SI)

drivers/iio/adc/ad7292.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <linux/bitfield.h>
99
#include <linux/device.h>
1010
#include <linux/module.h>
11+
#include <linux/of.h>
1112
#include <linux/regulator/consumer.h>
1213
#include <linux/spi/spi.h>
1314

drivers/staging/iio/resolver/ad2s1210.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <linux/types.h>
88
#include <linux/mutex.h>
99
#include <linux/device.h>
10+
#include <linux/of.h>
1011
#include <linux/spi/spi.h>
1112
#include <linux/slab.h>
1213
#include <linux/sysfs.h>

0 commit comments

Comments
 (0)