/*
 * ALSA SoC TPA6130A2 amplifier driver
 *
 * Copyright (C) Nokia Corporation
 *
 * Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
 *
 * 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.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA
 *
 */

#ifndef __TPA6130A2_H__
#define __TPA6130A2_H__

/* Register addresses */
#define TPA6130A2_REG_CONTROL		0x01
#define TPA6130A2_REG_VOL_MUTE		0x02
#define TPA6130A2_REG_OUT_IMPEDANCE	0x03
#define TPA6130A2_REG_VERSION		0x04

/* Register bits */
/* TPA6130A2_REG_CONTROL (0x01) */
#define TPA6130A2_SWS_SHIFT		0
#define TPA6130A2_SWS			(0x01 << TPA6130A2_SWS_SHIFT)
#define TPA6130A2_TERMAL		(0x01 << 1)
#define TPA6130A2_MODE(x)		(x << 4)
#define TPA6130A2_MODE_STEREO		(0x00)
#define TPA6130A2_MODE_DUAL_MONO	(0x01)
#define TPA6130A2_MODE_BRIDGE		(0x02)
#define TPA6130A2_MODE_MASK		(0x03)
#define TPA6130A2_HP_EN_R_SHIFT		6
#define TPA6130A2_HP_EN_R		(0x01 << TPA6130A2_HP_EN_R_SHIFT)
#define TPA6130A2_HP_EN_L_SHIFT		7
#define TPA6130A2_HP_EN_L		(0x01 << TPA6130A2_HP_EN_L_SHIFT)

/* TPA6130A2_REG_VOL_MUTE (0x02) */
#define TPA6130A2_VOLUME(x)		((x & 0x3f) << 0)
#define TPA6130A2_MUTE_R		(0x01 << 6)
#define TPA6130A2_MUTE_L		(0x01 << 7)

/* TPA6130A2_REG_OUT_IMPEDANCE (0x03) */
#define TPA6130A2_HIZ_R			(0x01 << 0)
#define TPA6130A2_HIZ_L			(0x01 << 1)

/* TPA6130A2_REG_VERSION (0x04) */
#define TPA6130A2_VERSION_MASK		(0x0f)

#endif /* __TPA6130A2_H__ */
c.c?h=nds-private-remove&amp;id=5add6e4a222f2eb437992af6b39c8a9c9a28604a'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/net/atm/lec.c?h=nds-private-remove&amp;id=5add6e4a222f2eb437992af6b39c8a9c9a28604a'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/net/atm/lec.c'>
<input type='hidden' name='h' value='nds-private-remove'/><input type='hidden' name='id' value='5add6e4a222f2eb437992af6b39c8a9c9a28604a'/><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/log/?h=nds-private-remove&amp;id=5add6e4a222f2eb437992af6b39c8a9c9a28604a'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/net?h=nds-private-remove&amp;id=5add6e4a222f2eb437992af6b39c8a9c9a28604a'>net</a>/<a href='/cgit.cgi/linux/net-next.git/log/net/atm?h=nds-private-remove&amp;id=5add6e4a222f2eb437992af6b39c8a9c9a28604a'>atm</a>/<a href='/cgit.cgi/linux/net-next.git/log/net/atm/lec.c?h=nds-private-remove&amp;id=5add6e4a222f2eb437992af6b39c8a9c9a28604a'>lec.c</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/net/atm/lec.c?h=nds-private-remove&amp;id=5add6e4a222f2eb437992af6b39c8a9c9a28604a&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>