Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * wm8804.h  --  WM8804 S/PDIF transceiver driver
0004  *
0005  * Copyright 2010 Wolfson Microelectronics plc
0006  *
0007  * Author: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
0008  */
0009 
0010 #ifndef _WM8804_H
0011 #define _WM8804_H
0012 
0013 #include <linux/regmap.h>
0014 
0015 /*
0016  * Register values.
0017  */
0018 #define WM8804_RST_DEVID1           0x00
0019 #define WM8804_DEVID2               0x01
0020 #define WM8804_DEVREV               0x02
0021 #define WM8804_PLL1             0x03
0022 #define WM8804_PLL2             0x04
0023 #define WM8804_PLL3             0x05
0024 #define WM8804_PLL4             0x06
0025 #define WM8804_PLL5             0x07
0026 #define WM8804_PLL6             0x08
0027 #define WM8804_SPDMODE              0x09
0028 #define WM8804_INTMASK              0x0A
0029 #define WM8804_INTSTAT              0x0B
0030 #define WM8804_SPDSTAT              0x0C
0031 #define WM8804_RXCHAN1              0x0D
0032 #define WM8804_RXCHAN2              0x0E
0033 #define WM8804_RXCHAN3              0x0F
0034 #define WM8804_RXCHAN4              0x10
0035 #define WM8804_RXCHAN5              0x11
0036 #define WM8804_SPDTX1               0x12
0037 #define WM8804_SPDTX2               0x13
0038 #define WM8804_SPDTX3               0x14
0039 #define WM8804_SPDTX4               0x15
0040 #define WM8804_SPDTX5               0x16
0041 #define WM8804_GPO0             0x17
0042 #define WM8804_GPO1             0x18
0043 #define WM8804_GPO2             0x1A
0044 #define WM8804_AIFTX                0x1B
0045 #define WM8804_AIFRX                0x1C
0046 #define WM8804_SPDRX1               0x1D
0047 #define WM8804_PWRDN                0x1E
0048 
0049 #define WM8804_REGISTER_COUNT           30
0050 #define WM8804_MAX_REGISTER         0x1E
0051 
0052 #define WM8804_TX_CLKSRC_MCLK           1
0053 #define WM8804_TX_CLKSRC_PLL            2
0054 
0055 #define WM8804_CLKOUT_SRC_CLK1          3
0056 #define WM8804_CLKOUT_SRC_OSCCLK        4
0057 
0058 #define WM8804_CLKOUT_DIV           1
0059 #define WM8804_MCLK_DIV             2
0060 
0061 #define WM8804_MCLKDIV_256FS            0
0062 #define WM8804_MCLKDIV_128FS            1
0063 
0064 extern const struct regmap_config wm8804_regmap_config;
0065 extern const struct dev_pm_ops wm8804_pm;
0066 
0067 int wm8804_probe(struct device *dev, struct regmap *regmap);
0068 void wm8804_remove(struct device *dev);
0069 
0070 #endif  /* _WM8804_H */