mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-25 13:14:19 +08:00
dm: sound: samsung: Rename i2stx_info to samsung_i2s_priv
This struct is only used by the Samsung I2C driver and should move into that driver. For now, rename it so it is clear that is driver-private info. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
d2eab333a7
commit
ccf0425e32
@ -255,8 +255,8 @@ static int i2s_set_samplesize(struct i2s_reg *i2s_reg, unsigned int blc)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int i2s_transfer_tx_data(struct i2stx_info *pi2s_tx, unsigned int *data,
|
int i2s_transfer_tx_data(struct samsung_i2s_priv *pi2s_tx, unsigned int *data,
|
||||||
unsigned long data_size)
|
unsigned long data_size)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int start;
|
int start;
|
||||||
@ -293,7 +293,7 @@ int i2s_transfer_tx_data(struct i2stx_info *pi2s_tx, unsigned int *data,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int i2s_tx_init(struct i2stx_info *pi2s_tx)
|
int i2s_tx_init(struct samsung_i2s_priv *pi2s_tx)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct i2s_reg *i2s_reg =
|
struct i2s_reg *i2s_reg =
|
||||||
|
@ -20,15 +20,15 @@
|
|||||||
#define SOUND_400_HZ 400
|
#define SOUND_400_HZ 400
|
||||||
#define SOUND_BITS_IN_BYTE 8
|
#define SOUND_BITS_IN_BYTE 8
|
||||||
|
|
||||||
static struct i2stx_info g_i2stx_pri;
|
static struct samsung_i2s_priv g_i2stx_pri;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* get_sound_i2s_values gets values for i2s parameters
|
* get_sound_i2s_values gets values for i2s parameters
|
||||||
*
|
*
|
||||||
* @param i2stx_info i2s transmitter transfer param structure
|
* @param samsung_i2s_priv i2s transmitter transfer param structure
|
||||||
* @param blob FDT blob if enabled else NULL
|
* @param blob FDT blob if enabled else NULL
|
||||||
*/
|
*/
|
||||||
static int get_sound_i2s_values(struct i2stx_info *i2s, const void *blob)
|
static int get_sound_i2s_values(struct samsung_i2s_priv *i2s, const void *blob)
|
||||||
{
|
{
|
||||||
int node;
|
int node;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
@ -97,7 +97,7 @@ static int get_sound_i2s_values(struct i2stx_info *i2s, const void *blob)
|
|||||||
* @param pi2s_tx i2s parameters required by codec
|
* @param pi2s_tx i2s parameters required by codec
|
||||||
* @return int value, 0 for success
|
* @return int value, 0 for success
|
||||||
*/
|
*/
|
||||||
static int codec_init(const void *blob, struct i2stx_info *pi2s_tx)
|
static int codec_init(const void *blob, struct samsung_i2s_priv *pi2s_tx)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
const char *codectype;
|
const char *codectype;
|
||||||
@ -145,7 +145,7 @@ static int codec_init(const void *blob, struct i2stx_info *pi2s_tx)
|
|||||||
int sound_init(const void *blob)
|
int sound_init(const void *blob)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct i2stx_info *pi2s_tx = &g_i2stx_pri;
|
struct samsung_i2s_priv *pi2s_tx = &g_i2stx_pri;
|
||||||
|
|
||||||
/* Get the I2S Values */
|
/* Get the I2S Values */
|
||||||
if (get_sound_i2s_values(pi2s_tx, blob) < 0) {
|
if (get_sound_i2s_values(pi2s_tx, blob) < 0) {
|
||||||
|
@ -76,7 +76,7 @@ struct i2s_reg {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* This structure stores the i2s related information */
|
/* This structure stores the i2s related information */
|
||||||
struct i2stx_info {
|
struct samsung_i2s_priv {
|
||||||
unsigned int rfs; /* LR clock frame size */
|
unsigned int rfs; /* LR clock frame size */
|
||||||
unsigned int bfs; /* Bit slock frame size */
|
unsigned int bfs; /* Bit slock frame size */
|
||||||
unsigned int audio_pll_clk; /* Audio pll frequency in Hz */
|
unsigned int audio_pll_clk; /* Audio pll frequency in Hz */
|
||||||
@ -96,8 +96,8 @@ struct i2stx_info {
|
|||||||
*
|
*
|
||||||
* @return int value 0 for success, -1 in case of error
|
* @return int value 0 for success, -1 in case of error
|
||||||
*/
|
*/
|
||||||
int i2s_transfer_tx_data(struct i2stx_info *pi2s_tx, unsigned *data,
|
int i2s_transfer_tx_data(struct samsung_i2s_priv *pi2s_tx, uint *data,
|
||||||
unsigned long data_size);
|
unsigned long data_size);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialise i2s transmiter
|
* Initialise i2s transmiter
|
||||||
@ -106,6 +106,6 @@ int i2s_transfer_tx_data(struct i2stx_info *pi2s_tx, unsigned *data,
|
|||||||
*
|
*
|
||||||
* @return int value 0 for success, -1 in case of error
|
* @return int value 0 for success, -1 in case of error
|
||||||
*/
|
*/
|
||||||
int i2s_tx_init(struct i2stx_info *pi2s_tx);
|
int i2s_tx_init(struct samsung_i2s_priv *pi2s_tx);
|
||||||
|
|
||||||
#endif /* __I2S_H__ */
|
#endif /* __I2S_H__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user