aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2017-07-03 11:15:04 -0400
committerMark Brown <broonie@kernel.org>2017-07-03 11:15:04 -0400
commit85ee1f42fa60693e5ed72e9453ef6352e72bb4c0 (patch)
treec3c524bd6316c4c70b4f93291683ee6fff95eda4 /include
parent51fa6a8f15ddaaf8ecb0fe75b365c012905341fe (diff)
parent8288591368fcb470024348a9b846f7b3f791be44 (diff)
Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next
Diffstat (limited to 'include')
-rw-r--r--include/linux/of_graph.h21
-rw-r--r--include/sound/simple_card_utils.h19
-rw-r--r--include/sound/soc.h3
3 files changed, 40 insertions, 3 deletions
diff --git a/include/linux/of_graph.h b/include/linux/of_graph.h
index abdb02eaef06..3e058f05ab04 100644
--- a/include/linux/of_graph.h
+++ b/include/linux/of_graph.h
@@ -43,11 +43,15 @@ struct of_endpoint {
43#ifdef CONFIG_OF 43#ifdef CONFIG_OF
44int of_graph_parse_endpoint(const struct device_node *node, 44int of_graph_parse_endpoint(const struct device_node *node,
45 struct of_endpoint *endpoint); 45 struct of_endpoint *endpoint);
46int of_graph_get_endpoint_count(const struct device_node *np);
46struct device_node *of_graph_get_port_by_id(struct device_node *node, u32 id); 47struct device_node *of_graph_get_port_by_id(struct device_node *node, u32 id);
47struct device_node *of_graph_get_next_endpoint(const struct device_node *parent, 48struct device_node *of_graph_get_next_endpoint(const struct device_node *parent,
48 struct device_node *previous); 49 struct device_node *previous);
49struct device_node *of_graph_get_endpoint_by_regs( 50struct device_node *of_graph_get_endpoint_by_regs(
50 const struct device_node *parent, int port_reg, int reg); 51 const struct device_node *parent, int port_reg, int reg);
52struct device_node *of_graph_get_remote_endpoint(
53 const struct device_node *node);
54struct device_node *of_graph_get_port_parent(struct device_node *node);
51struct device_node *of_graph_get_remote_port_parent( 55struct device_node *of_graph_get_remote_port_parent(
52 const struct device_node *node); 56 const struct device_node *node);
53struct device_node *of_graph_get_remote_port(const struct device_node *node); 57struct device_node *of_graph_get_remote_port(const struct device_node *node);
@@ -61,6 +65,11 @@ static inline int of_graph_parse_endpoint(const struct device_node *node,
61 return -ENOSYS; 65 return -ENOSYS;
62} 66}
63 67
68static inline int of_graph_get_endpoint_count(const struct device_node *np)
69{
70 return 0;
71}
72
64static inline struct device_node *of_graph_get_port_by_id( 73static inline struct device_node *of_graph_get_port_by_id(
65 struct device_node *node, u32 id) 74 struct device_node *node, u32 id)
66{ 75{
@@ -80,6 +89,18 @@ static inline struct device_node *of_graph_get_endpoint_by_regs(
80 return NULL; 89 return NULL;
81} 90}
82 91
92static inline struct device_node *of_graph_get_remote_endpoint(
93 const struct device_node *node)
94{
95 return NULL;
96}
97
98static inline struct device_node *of_graph_get_port_parent(
99 struct device_node *node)
100{
101 return NULL;
102}
103
83static inline struct device_node *of_graph_get_remote_port_parent( 104static inline struct device_node *of_graph_get_remote_port_parent(
84 const struct device_node *node) 105 const struct device_node *node)
85{ 106{
diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h
index af58d2362975..108cae459ed0 100644
--- a/include/sound/simple_card_utils.h
+++ b/include/sound/simple_card_utils.h
@@ -35,13 +35,16 @@ int asoc_simple_card_parse_card_name(struct snd_soc_card *card,
35 char *prefix); 35 char *prefix);
36 36
37#define asoc_simple_card_parse_clk_cpu(dev, node, dai_link, simple_dai) \ 37#define asoc_simple_card_parse_clk_cpu(dev, node, dai_link, simple_dai) \
38 asoc_simple_card_parse_clk(dev, node, dai_link->cpu_of_node, simple_dai) 38 asoc_simple_card_parse_clk(dev, node, dai_link->cpu_of_node, simple_dai, \
39 dai_link->cpu_dai_name)
39#define asoc_simple_card_parse_clk_codec(dev, node, dai_link, simple_dai) \ 40#define asoc_simple_card_parse_clk_codec(dev, node, dai_link, simple_dai) \
40 asoc_simple_card_parse_clk(dev, node, dai_link->codec_of_node, simple_dai) 41 asoc_simple_card_parse_clk(dev, node, dai_link->codec_of_node, simple_dai,\
42 dai_link->codec_dai_name)
41int asoc_simple_card_parse_clk(struct device *dev, 43int asoc_simple_card_parse_clk(struct device *dev,
42 struct device_node *node, 44 struct device_node *node,
43 struct device_node *dai_of_node, 45 struct device_node *dai_of_node,
44 struct asoc_simple_dai *simple_dai); 46 struct asoc_simple_dai *simple_dai,
47 const char *name);
45 48
46#define asoc_simple_card_parse_cpu(node, dai_link, \ 49#define asoc_simple_card_parse_cpu(node, dai_link, \
47 list_name, cells_name, is_single_link) \ 50 list_name, cells_name, is_single_link) \
@@ -60,6 +63,16 @@ int asoc_simple_card_parse_dai(struct device_node *node,
60 const char *cells_name, 63 const char *cells_name,
61 int *is_single_links); 64 int *is_single_links);
62 65
66#define asoc_simple_card_parse_graph_cpu(ep, dai_link) \
67 asoc_simple_card_parse_graph_dai(ep, &dai_link->cpu_of_node, \
68 &dai_link->cpu_dai_name)
69#define asoc_simple_card_parse_graph_codec(ep, dai_link) \
70 asoc_simple_card_parse_graph_dai(ep, &dai_link->codec_of_node, \
71 &dai_link->codec_dai_name)
72int asoc_simple_card_parse_graph_dai(struct device_node *ep,
73 struct device_node **endpoint_np,
74 const char **dai_name);
75
63int asoc_simple_card_init_dai(struct snd_soc_dai *dai, 76int asoc_simple_card_init_dai(struct snd_soc_dai *dai,
64 struct asoc_simple_dai *simple_dai); 77 struct asoc_simple_dai *simple_dai);
65 78
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 5170fd81e1fd..9c94b97c17f8 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -803,6 +803,8 @@ struct snd_soc_component_driver {
803 int (*of_xlate_dai_name)(struct snd_soc_component *component, 803 int (*of_xlate_dai_name)(struct snd_soc_component *component,
804 struct of_phandle_args *args, 804 struct of_phandle_args *args,
805 const char **dai_name); 805 const char **dai_name);
806 int (*of_xlate_dai_id)(struct snd_soc_component *comment,
807 struct device_node *endpoint);
806 void (*seq_notifier)(struct snd_soc_component *, enum snd_soc_dapm_type, 808 void (*seq_notifier)(struct snd_soc_component *, enum snd_soc_dapm_type,
807 int subseq); 809 int subseq);
808 int (*stream_event)(struct snd_soc_component *, int event); 810 int (*stream_event)(struct snd_soc_component *, int event);
@@ -1676,6 +1678,7 @@ unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
1676 const char *prefix, 1678 const char *prefix,
1677 struct device_node **bitclkmaster, 1679 struct device_node **bitclkmaster,
1678 struct device_node **framemaster); 1680 struct device_node **framemaster);
1681int snd_soc_get_dai_id(struct device_node *ep);
1679int snd_soc_get_dai_name(struct of_phandle_args *args, 1682int snd_soc_get_dai_name(struct of_phandle_args *args,
1680 const char **dai_name); 1683 const char **dai_name);
1681int snd_soc_of_get_dai_name(struct device_node *of_node, 1684int snd_soc_of_get_dai_name(struct device_node *of_node,