asoc: codecs: Update file names of bolero
Update file names of bolero to be compliance to driver file name convention. Change-Id: I138d0211803f93152ae7fb01eae68050dada082f Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/regmap.h>
|
#include <linux/regmap.h>
|
||||||
#include "bolero_cdc.h"
|
#include "bolero-cdc.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
static const struct reg_default bolero_defaults[] = {
|
static const struct reg_default bolero_defaults[] = {
|
@@ -12,7 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include "bolero_cdc.h"
|
#include "bolero-cdc.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
u8 bolero_tx_reg_access[BOLERO_CDC_TX_MACRO_MAX] = {
|
u8 bolero_tx_reg_access[BOLERO_CDC_TX_MACRO_MAX] = {
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/regmap.h>
|
#include <linux/regmap.h>
|
||||||
#include "bolero_cdc.h"
|
#include "bolero-cdc.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
#define REG_BYTES 2
|
#define REG_BYTES 2
|
@@ -19,7 +19,7 @@
|
|||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
|
|
||||||
#include "bolero_cdc.h"
|
#include "bolero-cdc.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
static struct snd_soc_codec_driver bolero;
|
static struct snd_soc_codec_driver bolero;
|
||||||
@@ -441,9 +441,7 @@ static struct snd_soc_codec_driver bolero = {
|
|||||||
static void bolero_add_child_devices(struct work_struct *work)
|
static void bolero_add_child_devices(struct work_struct *work)
|
||||||
{
|
{
|
||||||
struct bolero_priv *priv;
|
struct bolero_priv *priv;
|
||||||
struct platform_device *pdev;
|
int rc;
|
||||||
struct device_node *node;
|
|
||||||
int ret, i, cnt = 0;
|
|
||||||
|
|
||||||
priv = container_of(work, struct bolero_priv,
|
priv = container_of(work, struct bolero_priv,
|
||||||
bolero_add_child_devices_work);
|
bolero_add_child_devices_work);
|
||||||
@@ -452,37 +450,17 @@ static void bolero_add_child_devices(struct work_struct *work)
|
|||||||
__func__);
|
__func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!priv->dev->of_node) {
|
if (!priv->dev || !priv->dev->of_node) {
|
||||||
dev_err(priv->dev, "%s: DT node for bolero does not exist\n",
|
dev_err(priv->dev, "%s: DT node for bolero does not exist\n",
|
||||||
__func__);
|
__func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
rc = of_platform_populate(priv->dev->of_node, NULL, NULL, priv->dev);
|
||||||
for_each_child_of_node(priv->dev->of_node, node) {
|
if (rc)
|
||||||
pdev = platform_device_alloc(node->name, -1);
|
dev_err(priv->dev, "%s: failed to add child nodes, rc=%d\n",
|
||||||
if (!pdev) {
|
__func__, rc);
|
||||||
dev_err(priv->dev, "%s: pdev memory alloc failed\n",
|
else
|
||||||
__func__);
|
dev_dbg(priv->dev, "%s: added child node\n", __func__);
|
||||||
ret = -ENOMEM;
|
|
||||||
goto fail_pdev_add;
|
|
||||||
}
|
|
||||||
pdev->dev.parent = priv->dev;
|
|
||||||
pdev->dev.of_node = node;
|
|
||||||
|
|
||||||
ret = platform_device_add(pdev);
|
|
||||||
if (ret) {
|
|
||||||
dev_err(priv->dev,
|
|
||||||
"%s: Cannot add platform device\n",
|
|
||||||
__func__);
|
|
||||||
goto fail_pdev_add;
|
|
||||||
}
|
|
||||||
priv->pdev_child_devices[cnt] = pdev;
|
|
||||||
cnt++;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
fail_pdev_add:
|
|
||||||
for (i = cnt; i > 0; i--)
|
|
||||||
platform_device_put(priv->pdev_child_devices[i - 1]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int bolero_probe(struct platform_device *pdev)
|
static int bolero_probe(struct platform_device *pdev)
|
||||||
@@ -538,10 +516,11 @@ static int bolero_probe(struct platform_device *pdev)
|
|||||||
static int bolero_remove(struct platform_device *pdev)
|
static int bolero_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct bolero_priv *priv = dev_get_drvdata(&pdev->dev);
|
struct bolero_priv *priv = dev_get_drvdata(&pdev->dev);
|
||||||
u16 i;
|
|
||||||
|
|
||||||
for (i = priv->child_num; i > 0; i--)
|
if (!priv)
|
||||||
platform_device_unregister(priv->pdev_child_devices[i - 1]);
|
return -EINVAL;
|
||||||
|
|
||||||
|
of_platform_depopulate(&pdev->dev);
|
||||||
mutex_destroy(&priv->io_lock);
|
mutex_destroy(&priv->io_lock);
|
||||||
mutex_destroy(&priv->clk_lock);
|
mutex_destroy(&priv->clk_lock);
|
||||||
return 0;
|
return 0;
|
@@ -13,7 +13,7 @@
|
|||||||
#ifndef _BOLERO_INTERNAL_H
|
#ifndef _BOLERO_INTERNAL_H
|
||||||
#define _BOLERO_INTERNAL_H
|
#define _BOLERO_INTERNAL_H
|
||||||
|
|
||||||
#include "bolero_cdc_registers.h"
|
#include "bolero-cdc-registers.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
REG_NO_ACCESS,
|
REG_NO_ACCESS,
|
||||||
@@ -36,8 +36,6 @@ struct bolero_priv {
|
|||||||
u16 num_macros_registered;
|
u16 num_macros_registered;
|
||||||
u16 child_num;
|
u16 child_num;
|
||||||
u16 current_mclk_mux_macro[MAX_MACRO];
|
u16 current_mclk_mux_macro[MAX_MACRO];
|
||||||
struct platform_device *pdev_child_devices[MAX_MACRO];
|
|
||||||
|
|
||||||
struct work_struct bolero_add_child_devices_work;
|
struct work_struct bolero_add_child_devices_work;
|
||||||
|
|
||||||
int (*read_dev)(struct bolero_priv *priv,
|
int (*read_dev)(struct bolero_priv *priv,
|
||||||
|
Reference in New Issue
Block a user