/*
 * Driver for the PCM512x CODECs
 *
 * Author:	Mark Brown <broonie@linaro.org>
 *		Copyright 2014 Linaro Ltd
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 */

#include <linux/init.h>
#include <linux/module.h>
#include <linux/spi/spi.h>

#include "pcm512x.h"

static int pcm512x_spi_probe(struct spi_device *spi)
{
	struct regmap *regmap;
	int ret;

	regmap = devm_regmap_init_spi(spi, &pcm512x_regmap);
	if (IS_ERR(regmap)) {
		ret = PTR_ERR(regmap);
		return ret;
	}

	return pcm512x_probe(&spi->dev, regmap);
}

static int pcm512x_spi_remove(struct spi_device *spi)
{
	pcm512x_remove(&spi->dev);
	return 0;
}

static const struct spi_device_id pcm512x_spi_id[] = {
	{ "pcm5121", },
	{ "pcm5122", },
	{ "pcm5141", },
	{ "pcm5142", },
	{ },
};
MODULE_DEVICE_TABLE(spi, pcm512x_spi_id);

static const struct of_device_id pcm512x_of_match[] = {
	{ .compatible = "ti,pcm5121", },
	{ .compatible = "ti,pcm5122", },
	{ .compatible = "ti,pcm5141", },
	{ .compatible = "ti,pcm5142", },
	{ }
};
MODULE_DEVICE_TABLE(of, pcm512x_of_match);

static struct spi_driver pcm512x_spi_driver = {
	.probe		= pcm512x_spi_probe,
	.remove		= pcm512x_spi_remove,
	.id_table	= pcm512x_spi_id,
	.driver = {
		.name	= "pcm512x",
		.of_match_table = pcm512x_of_match,
		.pm     = &pcm512x_pm_ops,
	},
};

module_spi_driver(pcm512x_spi_driver);
git.cgi/linux/net-next.git/log/tools/testing/selftests/x86/protection_keys.c'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/tools/testing/selftests/x86/protection_keys.c?id=aaaec6fc755447a1d056765b11b24d8ff2b81366'>tree</a><a class='active' href='/cgit.cgi/linux/net-next.git/commit/tools/testing/selftests/x86/protection_keys.c?id=aaaec6fc755447a1d056765b11b24d8ff2b81366'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/tools/testing/selftests/x86/protection_keys.c?id=aaaec6fc755447a1d056765b11b24d8ff2b81366'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/tools/testing/selftests/x86/protection_keys.c'>
<input type='hidden' name='id' value='aaaec6fc755447a1d056765b11b24d8ff2b81366'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/commit/?id=aaaec6fc755447a1d056765b11b24d8ff2b81366'>root</a>/<a href='/cgit.cgi/linux/net-next.git/commit/tools?id=aaaec6fc755447a1d056765b11b24d8ff2b81366'>tools</a>/<a href='/cgit.cgi/linux/net-next.git/commit/tools/testing?id=aaaec6fc755447a1d056765b11b24d8ff2b81366'>testing</a>/<a href='/cgit.cgi/linux/net-next.git/commit/tools/testing/selftests?id=aaaec6fc755447a1d056765b11b24d8ff2b81366'>selftests</a>/<a href='/cgit.cgi/linux/net-next.git/commit/tools/testing/selftests/x86?id=aaaec6fc755447a1d056765b11b24d8ff2b81366'>x86</a>/<a href='/cgit.cgi/linux/net-next.git/commit/tools/testing/selftests/x86/protection_keys.c?id=aaaec6fc755447a1d056765b11b24d8ff2b81366'>protection_keys.c</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='id' value='aaaec6fc755447a1d056765b11b24d8ff2b81366'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><table summary='commit info' class='commit-info'>
<tr><th>author</th><td>Thomas Gleixner &lt;tglx@linutronix.de&gt;</td><td class='right'>2017-01-31 19:03:21 +0100</td></tr>
<tr><th>committer</th><td>Thomas Gleixner &lt;tglx@linutronix.de&gt;</td><td class='right'>2017-01-31 20:22:18 +0100</td></tr>
<tr><th>commit</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/tools/testing/selftests/x86/protection_keys.c?id=aaaec6fc755447a1d056765b11b24d8ff2b81366'>aaaec6fc755447a1d056765b11b24d8ff2b81366</a> (<a href='/cgit.cgi/linux/net-next.git/patch/tools/testing/selftests/x86/protection_keys.c?id=aaaec6fc755447a1d056765b11b24d8ff2b81366'>patch</a>)</td></tr>
<tr><th>tree</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/tree/?id=aaaec6fc755447a1d056765b11b24d8ff2b81366'>a7f4167960ee1df86739905b6ccdeb95465bfe5f</a> /<a href='/cgit.cgi/linux/net-next.git/tree/tools/testing/selftests/x86/protection_keys.c?id=aaaec6fc755447a1d056765b11b24d8ff2b81366'>tools/testing/selftests/x86/protection_keys.c</a></td></tr>
<tr><th>parent</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/tools/testing/selftests/x86/protection_keys.c?id=08d85f3ea99f1eeafc4e8507936190e86a16ee8c'>08d85f3ea99f1eeafc4e8507936190e86a16ee8c</a> (<a href='/cgit.cgi/linux/net-next.git/diff/tools/testing/selftests/x86/protection_keys.c?id=aaaec6fc755447a1d056765b11b24d8ff2b81366&amp;id2=08d85f3ea99f1eeafc4e8507936190e86a16ee8c'>diff</a>)</td></tr></table>
<div class='commit-subject'>x86/irq: Make irq activate operations symmetric</div><div class='commit-msg'>The recent commit which prevents double activation of interrupts unearthed
interesting code in x86. The code (ab)uses irq_domain_activate_irq() to
reconfigure an already activated interrupt. That trips over the prevention
code now.

Fix it by deactivating the interrupt before activating the new configuration.

Fixes: 08d85f3ea99f1 "irqdomain: Avoid activating interrupts more than once"
Reported-and-tested-by: Mike Galbraith &lt;efault@gmx.de&gt;
Reported-and-tested-by: Borislav Petkov &lt;bp@alien8.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Andrey Ryabinin &lt;aryabinin@virtuozzo.com&gt;
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1701311901580.3457@nanos

</div><div class='diffstat-header'><a href='/cgit.cgi/linux/net-next.git/diff/?id=aaaec6fc755447a1d056765b11b24d8ff2b81366'>Diffstat</a> (limited to 'tools/testing/selftests/x86/protection_keys.c')</div><table summary='diffstat' class='diffstat'>