Loading include/linux/mod_devicetable.h +8 −0 Original line number Diff line number Diff line Loading @@ -219,6 +219,14 @@ struct serio_device_id { __u8 proto; }; struct hda_device_id { __u32 vendor_id; __u32 rev_id; __u8 api_version; const char *name; unsigned long driver_data; }; /* * Struct used for matching a device */ Loading include/sound/hdaudio.h +2 −10 Original line number Diff line number Diff line Loading @@ -21,22 +21,13 @@ struct hdac_stream; struct hdac_device; struct hdac_driver; struct hdac_widget_tree; struct hda_device_id; /* * exported bus type */ extern struct bus_type snd_hda_bus_type; /* * HDA device table */ struct hda_device_id { __u32 vendor_id; __u32 rev_id; const char *name; unsigned long driver_data; }; /* * generic arrays */ Loading Loading @@ -118,6 +109,7 @@ void snd_hdac_device_exit(struct hdac_device *dev); int snd_hdac_device_register(struct hdac_device *codec); void snd_hdac_device_unregister(struct hdac_device *codec); int snd_hdac_device_set_chip_name(struct hdac_device *codec, const char *name); int snd_hdac_codec_modalias(struct hdac_device *hdac, char *buf, size_t size); int snd_hdac_refresh_widgets(struct hdac_device *codec); int snd_hdac_refresh_widget_sysfs(struct hdac_device *codec); Loading include/sound/hdaudio_ext.h +7 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,13 @@ void snd_hdac_ext_bus_device_remove(struct hdac_ext_bus *ebus); #define hbus_to_ebus(_bus) \ container_of(_bus, struct hdac_ext_bus, bus) #define HDA_CODEC_REV_EXT_ENTRY(_vid, _rev, _name, drv_data) \ { .vendor_id = (_vid), .rev_id = (_rev), .name = (_name), \ .api_version = HDA_DEV_ASOC, \ .driver_data = (unsigned long)(drv_data) } #define HDA_CODEC_EXT_ENTRY(_vid, _revid, _name, _drv_data) \ HDA_CODEC_REV_EXT_ENTRY(_vid, _revid, _name, _drv_data) int snd_hdac_ext_bus_parse_capabilities(struct hdac_ext_bus *sbus); void snd_hdac_ext_bus_ppcap_enable(struct hdac_ext_bus *chip, bool enable); void snd_hdac_ext_bus_ppcap_int_enable(struct hdac_ext_bus *chip, bool enable); Loading scripts/mod/devicetable-offsets.c +5 −0 Original line number Diff line number Diff line Loading @@ -196,5 +196,10 @@ int main(void) DEVID_FIELD(ulpi_device_id, vendor); DEVID_FIELD(ulpi_device_id, product); DEVID(hda_device_id); DEVID_FIELD(hda_device_id, vendor_id); DEVID_FIELD(hda_device_id, rev_id); DEVID_FIELD(hda_device_id, api_version); return 0; } scripts/mod/file2alias.c +17 −0 Original line number Diff line number Diff line Loading @@ -1250,6 +1250,23 @@ static int do_ulpi_entry(const char *filename, void *symval, } ADD_TO_DEVTABLE("ulpi", ulpi_device_id, do_ulpi_entry); /* Looks like: hdaudio:vNrNaN */ static int do_hda_entry(const char *filename, void *symval, char *alias) { DEF_FIELD(symval, hda_device_id, vendor_id); DEF_FIELD(symval, hda_device_id, rev_id); DEF_FIELD(symval, hda_device_id, api_version); strcpy(alias, "hdaudio:"); ADD(alias, "v", vendor_id != 0, vendor_id); ADD(alias, "r", rev_id != 0, rev_id); ADD(alias, "a", api_version != 0, api_version); add_wildcard(alias); return 1; } ADD_TO_DEVTABLE("hdaudio", hda_device_id, do_hda_entry); /* Does namelen bytes of name exactly match the symbol? */ static bool sym_is(const char *name, unsigned namelen, const char *symbol) { Loading Loading
include/linux/mod_devicetable.h +8 −0 Original line number Diff line number Diff line Loading @@ -219,6 +219,14 @@ struct serio_device_id { __u8 proto; }; struct hda_device_id { __u32 vendor_id; __u32 rev_id; __u8 api_version; const char *name; unsigned long driver_data; }; /* * Struct used for matching a device */ Loading
include/sound/hdaudio.h +2 −10 Original line number Diff line number Diff line Loading @@ -21,22 +21,13 @@ struct hdac_stream; struct hdac_device; struct hdac_driver; struct hdac_widget_tree; struct hda_device_id; /* * exported bus type */ extern struct bus_type snd_hda_bus_type; /* * HDA device table */ struct hda_device_id { __u32 vendor_id; __u32 rev_id; const char *name; unsigned long driver_data; }; /* * generic arrays */ Loading Loading @@ -118,6 +109,7 @@ void snd_hdac_device_exit(struct hdac_device *dev); int snd_hdac_device_register(struct hdac_device *codec); void snd_hdac_device_unregister(struct hdac_device *codec); int snd_hdac_device_set_chip_name(struct hdac_device *codec, const char *name); int snd_hdac_codec_modalias(struct hdac_device *hdac, char *buf, size_t size); int snd_hdac_refresh_widgets(struct hdac_device *codec); int snd_hdac_refresh_widget_sysfs(struct hdac_device *codec); Loading
include/sound/hdaudio_ext.h +7 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,13 @@ void snd_hdac_ext_bus_device_remove(struct hdac_ext_bus *ebus); #define hbus_to_ebus(_bus) \ container_of(_bus, struct hdac_ext_bus, bus) #define HDA_CODEC_REV_EXT_ENTRY(_vid, _rev, _name, drv_data) \ { .vendor_id = (_vid), .rev_id = (_rev), .name = (_name), \ .api_version = HDA_DEV_ASOC, \ .driver_data = (unsigned long)(drv_data) } #define HDA_CODEC_EXT_ENTRY(_vid, _revid, _name, _drv_data) \ HDA_CODEC_REV_EXT_ENTRY(_vid, _revid, _name, _drv_data) int snd_hdac_ext_bus_parse_capabilities(struct hdac_ext_bus *sbus); void snd_hdac_ext_bus_ppcap_enable(struct hdac_ext_bus *chip, bool enable); void snd_hdac_ext_bus_ppcap_int_enable(struct hdac_ext_bus *chip, bool enable); Loading
scripts/mod/devicetable-offsets.c +5 −0 Original line number Diff line number Diff line Loading @@ -196,5 +196,10 @@ int main(void) DEVID_FIELD(ulpi_device_id, vendor); DEVID_FIELD(ulpi_device_id, product); DEVID(hda_device_id); DEVID_FIELD(hda_device_id, vendor_id); DEVID_FIELD(hda_device_id, rev_id); DEVID_FIELD(hda_device_id, api_version); return 0; }
scripts/mod/file2alias.c +17 −0 Original line number Diff line number Diff line Loading @@ -1250,6 +1250,23 @@ static int do_ulpi_entry(const char *filename, void *symval, } ADD_TO_DEVTABLE("ulpi", ulpi_device_id, do_ulpi_entry); /* Looks like: hdaudio:vNrNaN */ static int do_hda_entry(const char *filename, void *symval, char *alias) { DEF_FIELD(symval, hda_device_id, vendor_id); DEF_FIELD(symval, hda_device_id, rev_id); DEF_FIELD(symval, hda_device_id, api_version); strcpy(alias, "hdaudio:"); ADD(alias, "v", vendor_id != 0, vendor_id); ADD(alias, "r", rev_id != 0, rev_id); ADD(alias, "a", api_version != 0, api_version); add_wildcard(alias); return 1; } ADD_TO_DEVTABLE("hdaudio", hda_device_id, do_hda_entry); /* Does namelen bytes of name exactly match the symbol? */ static bool sym_is(const char *name, unsigned namelen, const char *symbol) { Loading