mirror of
https://github.com/openharmony/device_board_osware.git
synced 2026-07-19 17:23:31 -04:00
modify format problem
Signed-off-by: zhaoxc0502 <zhaoxc0502@thundersoft.com>
This commit is contained in:
@@ -62,7 +62,7 @@ struct I2cTransferParam g_transferParam;
|
||||
return : status
|
||||
************************************************************************************************/
|
||||
static int WM8904I2cRead(DevHandle i2cHandle, uint16_t regaddr,
|
||||
unsigned int regLen, uint8_t *regdata, unsigned int dataLen)
|
||||
unsigned int regLen, uint8_t *regdata, unsigned int dataLen)
|
||||
{
|
||||
int index = 0;
|
||||
unsigned char regBuf[4] = {0};
|
||||
@@ -136,7 +136,7 @@ int WM8904RegRead(DevHandle i2cHandle, unsigned int reg, unsigned int *val, unsi
|
||||
return : status
|
||||
*********************************************************************************************/
|
||||
static int WM8904I2cWrite(DevHandle i2cHandle, uint16_t regaddr,
|
||||
unsigned int regLen, uint8_t *regdata, unsigned int dataLen)
|
||||
unsigned int regLen, uint8_t *regdata, unsigned int dataLen)
|
||||
{
|
||||
int index = 0;
|
||||
unsigned char regBuf[4] = {0};
|
||||
|
||||
@@ -318,6 +318,7 @@ static int32_t DaiFindDeviceFromBus(struct device *dev, void *para)
|
||||
}
|
||||
|
||||
#define MCLK_BITS (4)
|
||||
#define MCLK_BITS_OFFSET (20)
|
||||
static int32_t DaiInit(struct DaiHost * daiHost, struct HdfDeviceObject *device)
|
||||
{
|
||||
struct PrivDaiData *pdd;
|
||||
@@ -363,10 +364,7 @@ static int32_t DaiInit(struct DaiHost * daiHost, struct HdfDeviceObject *device)
|
||||
|
||||
pdd->mclk = devm_clk_get(&codec_dev->dev, "mclk");
|
||||
if (IS_ERR(pdd->mclk)) {
|
||||
if (codec_np) {
|
||||
of_node_put(codec_np);
|
||||
}
|
||||
|
||||
of_node_put(codec_np);
|
||||
return HDF_FAILURE;
|
||||
}
|
||||
|
||||
@@ -382,7 +380,7 @@ static int32_t DaiInit(struct DaiHost * daiHost, struct HdfDeviceObject *device)
|
||||
}
|
||||
|
||||
/* set SAI2_MCLK_DIR to enable codec MCLK for imx7d */
|
||||
regmap_update_bits(pdd->gpr, MCLK_BITS, 1 << 20, 1 << 20);
|
||||
regmap_update_bits(pdd->gpr, MCLK_BITS, 1 << MCLK_BITS_OFFSET, 1 << MCLK_BITS_OFFSET);
|
||||
}
|
||||
|
||||
return HDF_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user