Uwe Kleine-König
4b6f925593
ASoC: Intel: catpt: Convert to platform remove callback returning void
...
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Acked-by: Takashi Iwai <tiwai@suse.de >
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com >
Link: https://lore.kernel.org/r/20230315150745.67084-104-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org >
2023-03-20 13:08:33 +00:00
Cezary Rojewski
02f29be6a5
ASoC: Intel: catpt: Drop SND_SOC_ACPI_INTEL_MATCH dependency
...
catpt-driver does not make use of most of the fields found in the
descriptor table and is the sole user of haswell machines list. Move the
tables to local directory and clean them up so it's clear what's
actually used by the solution.
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com >
Link: https://lore.kernel.org/r/20220815165818.3050649-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-08-16 13:08:03 +01:00
Andy Shevchenko
b03bd21574
ASoC: Intel: catpt: remove duplicating driver data retrieval
...
device_get_match_data() in ACPI case calls similar to acpi_match_device().
Hence there is no need to duplicate the call. Just assign what is in
the id->driver_data.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com >
Link: https://lore.kernel.org/r/20220705155813.75917-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-07-05 19:53:50 +01:00
Pierre-Louis Bossart
ec8a15d3a7
ASoC: Intel: catpt: add dynamic selection of DSP driver
...
Follow PCI example and stop the probe when another driver is desired
for the same ACPI HID.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Rander Wang <rander.wang@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Link: https://lore.kernel.org/r/20201112223825.39765-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-11-19 18:24:43 +00:00
Cezary Rojewski
c440c72474
ASoC: Intel: catpt: Streamline power routines across LPT and WPT
...
There is no need for separate power on/off routines for LPT and WPT as
as the protocol is shared for both platforms. Make WPT routines generic
and reuse them in LPT case too.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com >
Link: https://lore.kernel.org/r/20201116133332.8530-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-11-16 20:03:30 +00:00
Cezary Rojewski
f38d43dafb
ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabled
...
module_is_live() is available only when CONFIG_MODULES is enabled.
Replace its usage with try_module_get() which is present regardless of
said config's status.
Fixes: 7a10b66a5d ("ASoC: Intel: catpt: Device driver lifecycle")
Reported-by: Randy Dunlap <rdunlap@infradead.org >
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com >
Acked-by: Randy Dunlap <rdunlap@infradead.org >
Link: https://lore.kernel.org/r/20201007135701.20372-1-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-10-08 21:16:48 +01:00
Cezary Rojewski
8f80a834b9
ASoC: Intel: catpt: Simple sysfs attributes
...
Add sysfs entries for displaying version of FW currently in use as well
as dumping full FW information including build and log-providers hashes.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20200929141247.8058-10-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-10-02 15:32:34 +01:00
Cezary Rojewski
8ba1edb9c2
ASoC: Intel: catpt: Event tracing
...
Define tracing macros for easy catpt debug. These cover all IPC message
types: requests, replies and notifications.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20200929141247.8058-9-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-10-02 15:32:33 +01:00
Cezary Rojewski
7a10b66a5d
ASoC: Intel: catpt: Device driver lifecycle
...
Implement ACPI device probing and removal functions as well as handlers
for its PM capabilities. Device probing also takes care of enumerating
ADSP subsystem components.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20200929141247.8058-8-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-10-02 15:32:32 +01:00