pc_linux: enable gpio, audio

Issue #5036
This commit is contained in:
Sebastian Sumpf 2022-05-04 09:23:34 +02:00 committed by Christian Helmuth
parent c05d4e5b49
commit 48865337b1
10 changed files with 445 additions and 2 deletions

View File

@ -24,6 +24,11 @@
extern "C" {
#endif
/* forward declarations for generated_dummies.c */
struct ieee80211_local;
struct iwl_priv;
struct iwl_mvm;
int lx_emul_rfkill_get_any(void);
void lx_emul_rfkill_switch_all(int blocked);

View File

@ -151,6 +151,14 @@ int acpi_dev_get_resources(struct acpi_device * adev,struct list_head * list,int
}
#include <linux/acpi.h>
int acpi_dev_gpio_irq_wake_get_by(struct acpi_device * adev,const char * name,int index,bool * wake_capable)
{
lx_emul_trace_and_stop(__func__);
}
#include <acpi/acpi_bus.h>
bool acpi_dev_present(const char * hid,const char * uid,s64 hrv)
@ -316,6 +324,22 @@ void device_remove_software_node(struct device * dev)
}
#include <linux/gpio/consumer.h>
struct gpio_desc * __must_check devm_gpiod_get(struct device * dev,const char * con_id,enum gpiod_flags flags)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
struct gpio_desc * __must_check devm_gpiod_get_index(struct device * dev,const char * con_id,unsigned int idx,enum gpiod_flags flags)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/dma-buf.h>
struct dma_buf_attachment * dma_buf_attach(struct dma_buf * dmabuf,struct device * dev)
@ -516,6 +540,78 @@ void gen6_rps_irq_handler(struct intel_rps * rps,u32 pm_iir)
}
#include <linux/gpio/machine.h>
void gpiod_add_lookup_table(struct gpiod_lookup_table * table)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
int gpiod_direction_output(struct gpio_desc * desc,int value)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
struct gpio_desc * __must_check gpiod_get(struct device * dev,const char * con_id,enum gpiod_flags flags)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
int gpiod_get_direction(struct gpio_desc * desc)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
int gpiod_get_value_cansleep(const struct gpio_desc * desc)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
void gpiod_put(struct gpio_desc * desc)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/machine.h>
void gpiod_remove_lookup_table(struct gpiod_lookup_table * table)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
void gpiod_set_value(struct gpio_desc * desc,int value)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
void gpiod_set_value_cansleep(struct gpio_desc * desc,int value)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/i2c.h>
s32 i2c_smbus_read_block_data(const struct i2c_client * client,u8 command,u8 * values)

View File

@ -398,3 +398,11 @@ int software_node_notify(struct device * dev,unsigned long action)
lx_emul_trace(__func__);
return 0;
}
#include <linux/gpio/consumer.h>
struct gpio_desc * devm_gpiod_get_optional(struct device * dev, const char * con_id, enum gpiod_flags flags)
{
lx_emul_trace(__func__);
return NULL;
}

View File

@ -1,7 +1,7 @@
/*
* \brief Dummy definitions of Linux Kernel functions
* \author Automatically generated file - do no edit
* \date 2023-08-09
* \date 2023-10-10
*/
#include <lx_emul.h>
@ -384,6 +384,46 @@ int gnet_stats_copy_queue(struct gnet_dump * d,struct gnet_stats_queue __percpu
}
#include <linux/gpio/consumer.h>
struct gpio_desc * __must_check gpiod_get_optional(struct device * dev,const char * con_id,enum gpiod_flags flags)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
int gpiod_get_value_cansleep(const struct gpio_desc * desc)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
void gpiod_put(struct gpio_desc * desc)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
int gpiod_set_consumer_name(struct gpio_desc * desc,const char * name)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
void gpiod_set_value_cansleep(struct gpio_desc * desc,int value)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/mm.h>
void * high_memory;

View File

@ -392,6 +392,46 @@ int gnet_stats_copy_queue(struct gnet_dump * d,struct gnet_stats_queue __percpu
}
#include <linux/gpio/consumer.h>
struct gpio_desc * __must_check gpiod_get_optional(struct device * dev,const char * con_id,enum gpiod_flags flags)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
int gpiod_get_value_cansleep(const struct gpio_desc * desc)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
void gpiod_put(struct gpio_desc * desc)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
int gpiod_set_consumer_name(struct gpio_desc * desc,const char * name)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
void gpiod_set_value_cansleep(struct gpio_desc * desc,int value)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/pseudo_fs.h>
struct pseudo_fs_context * init_pseudo(struct fs_context * fc,unsigned long magic)

View File

@ -1,7 +1,7 @@
/*
* \brief Array defining order of Linux Kernel initcalls
* \author Automatically generated file - do no edit
* \date 2023-06-20
* \date 2023-10-06
*/
#pragma once
@ -23,6 +23,8 @@ static const char * lx_emul_initcall_order[] = {
"__initcall_static_call_initearly",
"__initcall_init_zero_pfnearly",
"__initcall_init_fs_inode_sysctlsearly",
"__initcall_efi_memreserve_root_initearly",
"__initcall_efi_earlycon_remap_fbearly",
"__initcall_init_mmap_min_addr0",
"__initcall_pci_realloc_setup_params0",
"__initcall_e820__register_nvs_regions1",
@ -33,6 +35,7 @@ static const char * lx_emul_initcall_order[] = {
"__initcall_init_jiffies_clocksource1",
"__initcall_init_script_binfmt1",
"__initcall_init_elf_binfmt1",
"__initcall_gpiolib_dev_init1",
"__initcall_iommu_init1",
"__initcall_cpuidle_init1",
"__initcall_sock_init1",
@ -46,6 +49,7 @@ static const char * lx_emul_initcall_order[] = {
"__initcall_mm_sysfs_init2",
"__initcall_init_per_zone_wmark_min2",
"__initcall_mpi_init2",
"__initcall_acpi_gpio_setup_params2",
"__initcall_pcibus_class_init2",
"__initcall_pci_driver_init2",
"__initcall_backlight_class_init2",
@ -55,6 +59,7 @@ static const char * lx_emul_initcall_order[] = {
"__initcall_mipi_dsi_bus_init2",
"__initcall_devlink_class_init2",
"__initcall_software_node_init2",
"__initcall_regmap_initcall2",
"__initcall_i2c_init2",
"__initcall_thermal_init2",
"__initcall_init_menu2",
@ -107,6 +112,12 @@ static const char * lx_emul_initcall_order[] = {
"__initcall_serio_init4",
"__initcall_input_init4",
"__initcall_power_supply_class_init4",
"__initcall_leds_init4",
"__initcall_efisubsys_init4",
"__initcall_init_soundcore4",
"__initcall_alsa_sound_init4",
"__initcall_hda_bus_init4",
"__initcall_ac97_bus_init4",
"__initcall_proto_init4",
"__initcall_net_dev_init4",
"__initcall_neigh_init4",
@ -189,6 +200,7 @@ static const char * lx_emul_initcall_order[] = {
"__initcall_proc_filesystems_init6",
"__initcall_start_dirtytime_writeback6",
"__initcall_init_devpts_fs6",
"__initcall_efivarfs_init6",
"__initcall_key_proc_init6",
"__initcall_asymmetric_key_init6",
"__initcall_x509_key_init6",
@ -253,11 +265,29 @@ static const char * lx_emul_initcall_order[] = {
"__initcall_xhci_pci_init6",
"__initcall_i8042_init6",
"__initcall_serport_init6",
"__initcall_input_leds_init6",
"__initcall_atkbd_init6",
"__initcall_psmouse_init6",
"__initcall_pkg_temp_thermal_init6",
"__initcall_thermal_throttle_init_device6",
"__initcall_ledtrig_audio_init6",
"__initcall_esrt_sysfs_init6",
"__initcall_wmi_bmof_driver_init6",
"__initcall_snd_ctl_led_init6",
"__initcall_alsa_timer_init6",
"__initcall_alsa_pcm_init6",
"__initcall_generic_driver_init6",
"__initcall_realtek_driver_init6",
"__initcall_hdmi_driver_init6",
"__initcall_snd_soc_init6",
"__initcall_ac97_codec_driver_init6",
"__initcall_dmic_driver_init6",
"__initcall_hdmi_init6",
"__initcall_skl_hda_audio_init6",
"__initcall_sof_probes_client_drv_init6",
"__initcall_snd_sof_pci_intel_skl_driver_init6",
"__initcall_snd_sof_pci_intel_tgl_driver_init6",
"__initcall_snd_sof_pci_intel_mtl_driver_init6",
"__initcall_sock_diag_init6",
"__initcall_packet_init6",
"__initcall_kernel_do_mounts_initrd_sysctls_init7",
@ -291,8 +321,12 @@ static const char * lx_emul_initcall_order[] = {
"__initcall_dmar_free_unused_resources7",
"__initcall_sync_state_resume_initcall7",
"__initcall_deferred_probe_initcall7",
"__initcall_efi_shutdown_init7",
"__initcall_efi_earlycon_unmap_fb7",
"__initcall_regulatory_init_db7",
"__initcall_pci_mmcfg_late_insert_resources7",
"__initcall_acpi_gpio_handle_deferred_request_irqs7s",
"__initcall_alsa_sound_last_init7s",
"__initcall_con_initcon",
"__initcall_end",
"__initcall_univ8250_console_initcon",

View File

@ -193,6 +193,7 @@ include/asm-generic/error-injection.h
include/asm-generic/export.h
include/asm-generic/fixmap.h
include/asm-generic/getorder.h
include/asm-generic/gpio.h
include/asm-generic/int-ll64.h
include/asm-generic/io.h
include/asm-generic/ioctl.h

View File

@ -576,3 +576,69 @@ int software_node_notify(struct device * dev,unsigned long action)
lx_emul_trace(__func__);
return 0;
}
#include <linux/leds.h>
int led_trigger_register(struct led_trigger * trig)
{
lx_emul_trace(__func__);
return 0;
}
void led_trigger_event(struct led_trigger * trig,enum led_brightness brightness)
{
lx_emul_trace(__func__);
}
extern void ieee80211_alloc_led_names(struct ieee80211_local * local);
void ieee80211_alloc_led_names(struct ieee80211_local * local)
{
lx_emul_trace(__func__);
}
extern void ieee80211_led_assoc(struct ieee80211_local * local,bool associated);
void ieee80211_led_assoc(struct ieee80211_local * local,bool associated)
{
lx_emul_trace(__func__);
}
extern void ieee80211_led_init(struct ieee80211_local * local);
void ieee80211_led_init(struct ieee80211_local * local)
{
lx_emul_trace(__func__);
}
extern void ieee80211_led_radio(struct ieee80211_local * local,bool enabled);
void ieee80211_led_radio(struct ieee80211_local * local,bool enabled)
{
lx_emul_trace(__func__);
}
extern void ieee80211_mod_tpt_led_trig(struct ieee80211_local * local,unsigned int types_on,unsigned int types_off);
void ieee80211_mod_tpt_led_trig(struct ieee80211_local * local,unsigned int types_on,unsigned int types_off)
{
lx_emul_trace(__func__);
}
extern int iwl_mvm_leds_init(struct iwl_mvm * mvm);
int iwl_mvm_leds_init(struct iwl_mvm * mvm)
{
lx_emul_trace(__func__);
return 0;
}
extern void iwl_mvm_leds_sync(struct iwl_mvm * mvm);
void iwl_mvm_leds_sync(struct iwl_mvm * mvm)
{
lx_emul_trace(__func__);
}

View File

@ -36,6 +36,22 @@ unsigned long __fdget(unsigned int fd)
}
#include <net/mac80211.h>
const char * __ieee80211_create_tpt_led_trigger(struct ieee80211_hw * hw,unsigned int flags,const struct ieee80211_tpt_blink * blink_table,unsigned int blink_table_len)
{
lx_emul_trace_and_stop(__func__);
}
#include <net/mac80211.h>
const char * __ieee80211_get_radio_led_name(struct ieee80211_hw * hw)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/printk.h>
void __printk_safe_enter(void)
@ -495,11 +511,58 @@ int gnet_stats_copy_queue(struct gnet_dump * d,struct gnet_stats_queue __percpu
}
#include <asm-generic/gpio.h>
void gpio_free(unsigned gpio)
{
lx_emul_trace_and_stop(__func__);
}
#include <asm-generic/gpio.h>
int gpio_request_one(unsigned gpio,unsigned long flags,const char * label)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
struct gpio_desc * gpio_to_desc(unsigned gpio)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
int gpiod_get_raw_value(const struct gpio_desc * desc)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/gpio/consumer.h>
void gpiod_set_raw_value(struct gpio_desc * desc,int value)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/uuid.h>
const u8 guid_index[16] = {};
extern void ieee80211_led_exit(struct ieee80211_local * local);
void ieee80211_led_exit(struct ieee80211_local * local)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/uio.h>
ssize_t import_iovec(int type,const struct iovec __user * uvec,unsigned nr_segs,unsigned fast_segs,struct iovec ** iovp,struct iov_iter * i)
@ -598,6 +661,34 @@ void irq_work_tick(void)
}
extern void iwl_leds_exit(struct iwl_priv * priv);
void iwl_leds_exit(struct iwl_priv * priv)
{
lx_emul_trace_and_stop(__func__);
}
extern void iwl_leds_init(struct iwl_priv * priv);
void iwl_leds_init(struct iwl_priv * priv)
{
lx_emul_trace_and_stop(__func__);
}
extern void iwl_mvm_leds_exit(struct iwl_mvm * mvm);
void iwl_mvm_leds_exit(struct iwl_mvm * mvm)
{
lx_emul_trace_and_stop(__func__);
}
extern void iwlagn_led_enable(struct iwl_priv * priv);
void iwlagn_led_enable(struct iwl_priv * priv)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/kobject.h>
struct kobject *kernel_kobj;
@ -651,6 +742,38 @@ int kobject_synth_uevent(struct kobject * kobj,const char * buf,size_t count)
}
#include <linux/leds.h>
int led_classdev_register_ext(struct device * parent,struct led_classdev * led_cdev,struct led_init_data * init_data)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/leds.h>
void led_classdev_unregister(struct led_classdev * led_cdev)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/leds.h>
void led_trigger_blink_oneshot(struct led_trigger * trig,unsigned long * delay_on,unsigned long * delay_off,int invert)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/leds.h>
void led_trigger_unregister(struct led_trigger * trig)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/preempt.h>
void migrate_disable(void)

View File

@ -58,6 +58,36 @@ LX_ENABLE += DRM DRM_I915
# to automatically set up screen mode at boot time
LX_ENABLE += FB
# GPIO for sound
LX_ENABLE += GPIOLIB GPIO_ACPI
# Sound
LX_ENABLE += SOUND SND AC97_BUS
LX_DISABLE += SND_DRIVERS SND_PCI SND_SUPPORT_OLD_API SND_USB SND_X86 SND_PROC_FS
# Intel HDA
LX_ENABLE += SND_HDA SND_HDA_CODEC_REALTEK SND_HDA_RECONFIG
LX_ENABLE += SND_HDA_PATCH_LOADER
# SOC
LX_ENABLE += SND_SOC SND_SOC_INTEL_HDA_DSP_COMMON ND
LX_ENABLE += SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH
LX_ENABLE += SND_SOC_SOF_HDA_LINK CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC
LX_ENABLE += SND_SOC_HDAC_HDMI SND_SOC_HDAC_HDA SND_HDA_CODEC_HDMI
LX_ENABLE += SND_SOC_AC97_CODEC SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH
LX_DISABLE += SND_SST_ATOM_HIFI2_PLATFORM_ACPI
# SOF
LX_ENABLE += SND_SOC_SOF_TOPLEVEL SND_SOC_SOF_PCI SND_SOC_SOF_INTEL_TOPLEVEL
LX_DISABLE += SND_SOC_SOF_MERRIFIELD SND_SOC_SOF_INTEL_APL SND_SOC_SOF_APOLLOLAKE
LX_DISABLE += SND_SOC_SOF_GEMINILAKE SND_SOC_SOF_INTEL_CNL SND_SOC_SOF_CANNONLAKE
LX_DISABLE += SND_SOC_SOF_COFFEELAKE SND_SOC_SOF_COMETLAKE SND_SOC_SOF_INTEL_ICL
LX_DISABLE += SND_SOC_SOF_ICELAKE SND_SOC_SOF_JASPERLAKE SND_SOC_SOF_ALDERLAKE
LX_DISABLE += SND_SOC_SOF_ELKHARTLAKE
# mandatory fs support
LX_ENABLE += PROC_FS SYSFS