/* * 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"); -next.git/log/Documentation/arm/tcm.txt'>logtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-04-15 15:44:10 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-04-15 15:44:10 -0700
commit2e572599139d27db3aaf540b0d34f0a4f58dfca1 (patch)
treea96c8d562d50963c923edd777b60a2dc3749462c /Documentation/arm/tcm.txt
parentf3c9a1abbe9d4c9565fdb0755e2c7814f32d4f62 (diff)
parenta7297a6a3a3322b054592e8e988981d2f5f29cc4 (diff)
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: "A few fixes for the current series. This contains: - Two fixes for NVMe: One fixes a reset race that can be triggered by repeated insert/removal of the module. The other fixes an issue on some platforms, where we get probe timeouts since legacy interrupts isn't working. This used not to be a problem since we had the worker thread poll for completions, but since that was killed off, it means those poor souls can't successfully probe their NVMe device. Use a proper IRQ check and probe (msi-x -> msi ->legacy), like most other drivers to work around this. Both from Keith. - A loop corruption issue with offset in iters, from Ming Lei. - A fix for not having the partition stat per cpu ref count initialized before sending out the KOBJ_ADD, which could cause user space to access the counter prior to initialization. Also from Ming Lei. - A fix for using the wrong congestion state, from Kaixu Xia" * 'for-linus' of git://git.kernel.dk/linux-block: block: loop: fix filesystem corruption in case of aio/dio NVMe: Always use MSI/MSI-x interrupts NVMe: Fix reset/remove race writeback: fix the wrong congested state variable definition block: partition: initialize percpuref before sending out KOBJ_ADD
Diffstat (limited to 'Documentation/arm/tcm.txt')