/*1* File: sound/soc/codec/ad73311.h2* Based on:3* Author: Cliff Cai <[email protected]>4*5* Created: Thur Sep 25, 20086* Description: definitions for AD73311 registers7*8*9* Modified:10* Copyright 2006 Analog Devices Inc.11*12* Bugs: Enter bugs at http://blackfin.uclinux.org/13*14* This program is free software; you can redistribute it and/or modify15* it under the terms of the GNU General Public License as published by16* the Free Software Foundation; either version 2 of the License, or17* (at your option) any later version.18*19* This program is distributed in the hope that it will be useful,20* but WITHOUT ANY WARRANTY; without even the implied warranty of21* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the22* GNU General Public License for more details.23*24* You should have received a copy of the GNU General Public License25* along with this program; if not, see the file COPYING, or write26* to the Free Software Foundation, Inc.,27* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA28*/2930#ifndef __AD73311_H__31#define __AD73311_H__3233#define AD_CONTROL 0x800034#define AD_DATA 0x000035#define AD_READ 0x400036#define AD_WRITE 0x00003738/* Control register A */39#define CTRL_REG_A (0 << 8)4041#define REGA_MODE_PRO 0x0042#define REGA_MODE_DATA 0x0143#define REGA_MODE_MIXED 0x0344#define REGA_DLB 0x0445#define REGA_SLB 0x0846#define REGA_DEVC(x) ((x & 0x7) << 4)47#define REGA_RESET 0x804849/* Control register B */50#define CTRL_REG_B (1 << 8)5152#define REGB_DIRATE(x) (x & 0x3)53#define REGB_SCDIV(x) ((x & 0x3) << 2)54#define REGB_MCDIV(x) ((x & 0x7) << 4)55#define REGB_CEE (1 << 7)5657/* Control register C */58#define CTRL_REG_C (2 << 8)5960#define REGC_PUDEV (1 << 0)61#define REGC_PUADC (1 << 3)62#define REGC_PUDAC (1 << 4)63#define REGC_PUREF (1 << 5)64#define REGC_REFUSE (1 << 6)6566/* Control register D */67#define CTRL_REG_D (3 << 8)6869#define REGD_IGS(x) (x & 0x7)70#define REGD_RMOD (1 << 3)71#define REGD_OGS(x) ((x & 0x7) << 4)72#define REGD_MUTE (1 << 7)7374/* Control register E */75#define CTRL_REG_E (4 << 8)7677#define REGE_DA(x) (x & 0x1f)78#define REGE_IBYP (1 << 5)7980/* Control register F */81#define CTRL_REG_F (5 << 8)8283#define REGF_SEEN (1 << 5)84#define REGF_INV (1 << 6)85#define REGF_ALB (1 << 7)8687#endif888990