/* * ADAU1977/ADAU1978/ADAU1979 driver * * Copyright 2014 Analog Devices Inc. * Author: Lars-Peter Clausen * * Licensed under the GPL-2. */ #include #include #include #include #include #include "adau1977.h" static void adau1977_spi_switch_mode(struct device *dev) { struct spi_device *spi = to_spi_device(dev); /* * To get the device into SPI mode CLATCH has to be pulled low three * times. Do this by issuing three dummy reads. */ spi_w8r8(spi, 0x00); spi_w8r8(spi, 0x00); spi_w8r8(spi, 0x00); } static int adau1977_spi_probe(struct spi_device *spi) { const struct spi_device_id *id = spi_get_device_id(spi); struct regmap_config config; if (!id) return -EINVAL; config = adau1977_regmap_config; config.val_bits = 8; config.reg_bits = 16; config.read_flag_mask = 0x1; return adau1977_probe(&spi->dev, devm_regmap_init_spi(spi, &config), id->driver_data, adau1977_spi_switch_mode); } static int adau1977_spi_remove(struct spi_device *spi) { snd_soc_unregister_codec(&spi->dev); return 0; } static const struct spi_device_id adau1977_spi_ids[] = { { "adau1977", ADAU1977 }, { "adau1978", ADAU1978 }, { "adau1979", ADAU1978 }, { } }; MODULE_DEVICE_TABLE(spi, adau1977_spi_ids); static struct spi_driver adau1977_spi_driver = { .driver = { .name = "adau1977", }, .probe = adau1977_spi_probe, .remove = adau1977_spi_remove, .id_table = adau1977_spi_ids, }; module_spi_driver(adau1977_spi_driver); MODULE_DESCRIPTION("ASoC ADAU1977/ADAU1978/ADAU1979 driver"); MODULE_AUTHOR("Lars-Peter Clausen "); MODULE_LICENSE("GPL"); a>logtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-01-18 21:31:31 +0100
committerJohan Hovold <johan@kernel.org>2017-01-19 09:08:37 +0100
commit24d615a694d649aa2e167c3f97f62bdad07e3f84 (patch)
tree2fe33c115bdec6bf4b01e27afd90bb16fa668e22 /sound/soc
parent49def1853334396f948dcb4cedb9347abb318df5 (diff)
USB: serial: qcserial: add Dell DW5570 QDL
The Dell DW5570 is a re-branded Sierra Wireless MC8805 which will by default boot with vid 0x413c and pid 0x81a3. When triggered QDL download mode, the device switches to pid 0x81a6 and provides the standard TTY used for firmware upgrade. Cc: <stable@vger.kernel.org> Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'sound/soc')