Loading asoc/codecs/bolero/bolero_cdc_registers.h→asoc/codecs/bolero/bolero-cdc-registers.h +0 −0 File moved. View file asoc/codecs/bolero/bolero_cdc_regmap.c→asoc/codecs/bolero/bolero-cdc-regmap.c +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ */ #include <linux/regmap.h> #include "bolero_cdc.h" #include "bolero-cdc.h" #include "internal.h" static const struct reg_default bolero_defaults[] = { Loading asoc/codecs/bolero/bolero_cdc_tables.c→asoc/codecs/bolero/bolero-cdc-tables.c +1 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ */ #include <linux/types.h> #include "bolero_cdc.h" #include "bolero-cdc.h" #include "internal.h" u8 bolero_tx_reg_access[BOLERO_CDC_TX_MACRO_MAX] = { Loading asoc/codecs/bolero/bolero_cdc_utils.c→asoc/codecs/bolero/bolero-cdc-utils.c +1 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ #include <linux/kernel.h> #include <linux/regmap.h> #include "bolero_cdc.h" #include "bolero-cdc.h" #include "internal.h" #define REG_BYTES 2 Loading asoc/codecs/bolero/bolero_cdc.c→asoc/codecs/bolero/bolero-cdc.c +13 −34 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ #include <linux/delay.h> #include <linux/kernel.h> #include "bolero_cdc.h" #include "bolero-cdc.h" #include "internal.h" static struct snd_soc_codec_driver bolero; Loading Loading @@ -441,9 +441,7 @@ static struct snd_soc_codec_driver bolero = { static void bolero_add_child_devices(struct work_struct *work) { struct bolero_priv *priv; struct platform_device *pdev; struct device_node *node; int ret, i, cnt = 0; int rc; priv = container_of(work, struct bolero_priv, bolero_add_child_devices_work); Loading @@ -452,37 +450,17 @@ static void bolero_add_child_devices(struct work_struct *work) __func__); 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", __func__); return; } for_each_child_of_node(priv->dev->of_node, node) { pdev = platform_device_alloc(node->name, -1); if (!pdev) { dev_err(priv->dev, "%s: pdev memory alloc failed\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]); rc = of_platform_populate(priv->dev->of_node, NULL, NULL, priv->dev); if (rc) dev_err(priv->dev, "%s: failed to add child nodes, rc=%d\n", __func__, rc); else dev_dbg(priv->dev, "%s: added child node\n", __func__); } static int bolero_probe(struct platform_device *pdev) Loading Loading @@ -538,10 +516,11 @@ static int bolero_probe(struct platform_device *pdev) static int bolero_remove(struct platform_device *pdev) { struct bolero_priv *priv = dev_get_drvdata(&pdev->dev); u16 i; for (i = priv->child_num; i > 0; i--) platform_device_unregister(priv->pdev_child_devices[i - 1]); if (!priv) return -EINVAL; of_platform_depopulate(&pdev->dev); mutex_destroy(&priv->io_lock); mutex_destroy(&priv->clk_lock); return 0; Loading Loading
asoc/codecs/bolero/bolero_cdc_registers.h→asoc/codecs/bolero/bolero-cdc-registers.h +0 −0 File moved. View file
asoc/codecs/bolero/bolero_cdc_regmap.c→asoc/codecs/bolero/bolero-cdc-regmap.c +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ */ #include <linux/regmap.h> #include "bolero_cdc.h" #include "bolero-cdc.h" #include "internal.h" static const struct reg_default bolero_defaults[] = { Loading
asoc/codecs/bolero/bolero_cdc_tables.c→asoc/codecs/bolero/bolero-cdc-tables.c +1 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ */ #include <linux/types.h> #include "bolero_cdc.h" #include "bolero-cdc.h" #include "internal.h" u8 bolero_tx_reg_access[BOLERO_CDC_TX_MACRO_MAX] = { Loading
asoc/codecs/bolero/bolero_cdc_utils.c→asoc/codecs/bolero/bolero-cdc-utils.c +1 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ #include <linux/kernel.h> #include <linux/regmap.h> #include "bolero_cdc.h" #include "bolero-cdc.h" #include "internal.h" #define REG_BYTES 2 Loading
asoc/codecs/bolero/bolero_cdc.c→asoc/codecs/bolero/bolero-cdc.c +13 −34 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ #include <linux/delay.h> #include <linux/kernel.h> #include "bolero_cdc.h" #include "bolero-cdc.h" #include "internal.h" static struct snd_soc_codec_driver bolero; Loading Loading @@ -441,9 +441,7 @@ static struct snd_soc_codec_driver bolero = { static void bolero_add_child_devices(struct work_struct *work) { struct bolero_priv *priv; struct platform_device *pdev; struct device_node *node; int ret, i, cnt = 0; int rc; priv = container_of(work, struct bolero_priv, bolero_add_child_devices_work); Loading @@ -452,37 +450,17 @@ static void bolero_add_child_devices(struct work_struct *work) __func__); 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", __func__); return; } for_each_child_of_node(priv->dev->of_node, node) { pdev = platform_device_alloc(node->name, -1); if (!pdev) { dev_err(priv->dev, "%s: pdev memory alloc failed\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]); rc = of_platform_populate(priv->dev->of_node, NULL, NULL, priv->dev); if (rc) dev_err(priv->dev, "%s: failed to add child nodes, rc=%d\n", __func__, rc); else dev_dbg(priv->dev, "%s: added child node\n", __func__); } static int bolero_probe(struct platform_device *pdev) Loading Loading @@ -538,10 +516,11 @@ static int bolero_probe(struct platform_device *pdev) static int bolero_remove(struct platform_device *pdev) { struct bolero_priv *priv = dev_get_drvdata(&pdev->dev); u16 i; for (i = priv->child_num; i > 0; i--) platform_device_unregister(priv->pdev_child_devices[i - 1]); if (!priv) return -EINVAL; of_platform_depopulate(&pdev->dev); mutex_destroy(&priv->io_lock); mutex_destroy(&priv->clk_lock); return 0; Loading