* [PATCH] ASoC: ak4554: add DT support @ 2013-07-05 2:42 Kuninori Morimoto 2013-07-05 9:17 ` Mark Brown 2013-07-05 9:37 ` Lars-Peter Clausen 0 siblings, 2 replies; 8+ messages in thread From: Kuninori Morimoto @ 2013-07-05 2:42 UTC (permalink / raw) To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood, Kuninori Morimoto Support for loading the ak4554 codec module via devicetree. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> --- This is for mark/topic/ak4554 branch Documentation/devicetree/bindings/sound/ak4554.c | 11 +++++++++++ sound/soc/codecs/ak4554.c | 7 +++++++ 2 files changed, 18 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/ak4554.c diff --git a/Documentation/devicetree/bindings/sound/ak4554.c b/Documentation/devicetree/bindings/sound/ak4554.c new file mode 100644 index 0000000..934fa02 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/ak4554.c @@ -0,0 +1,11 @@ +AK4554 ADC/DAC + +Required properties: + + - compatible : "asahi-kasei,ak4554" + +Example: + +ak4554-adc-dac { + compatible = "asahi-kasei,ak4554"; +}; diff --git a/sound/soc/codecs/ak4554.c b/sound/soc/codecs/ak4554.c index c1a1733..6aed9c4 100644 --- a/sound/soc/codecs/ak4554.c +++ b/sound/soc/codecs/ak4554.c @@ -64,10 +64,17 @@ static int ak4554_soc_remove(struct platform_device *pdev) return 0; } +static struct of_device_id ak4554_of_match[] = { + { .compatible = "asahi-kasei,ak4554" }, + {}, +}; +MODULE_DEVICE_TABLE(of, ak4554_of_match); + static struct platform_driver ak4554_driver = { .driver = { .name = "ak4554-adc-dac", .owner = THIS_MODULE, + .of_match_table = ak4554_of_match, }, .probe = ak4554_soc_probe, .remove = ak4554_soc_remove, -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] ASoC: ak4554: add DT support 2013-07-05 2:42 [PATCH] ASoC: ak4554: add DT support Kuninori Morimoto @ 2013-07-05 9:17 ` Mark Brown 2013-07-05 9:37 ` Lars-Peter Clausen 1 sibling, 0 replies; 8+ messages in thread From: Mark Brown @ 2013-07-05 9:17 UTC (permalink / raw) To: Kuninori Morimoto; +Cc: Linux-ALSA, Simon, Liam Girdwood, Kuninori Morimoto [-- Attachment #1.1: Type: text/plain, Size: 147 bytes --] On Thu, Jul 04, 2013 at 07:42:49PM -0700, Kuninori Morimoto wrote: > Support for loading the ak4554 codec module via devicetree. Applied, thanks. [-- Attachment #1.2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] [-- Attachment #2: Type: text/plain, Size: 0 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ASoC: ak4554: add DT support 2013-07-05 2:42 [PATCH] ASoC: ak4554: add DT support Kuninori Morimoto 2013-07-05 9:17 ` Mark Brown @ 2013-07-05 9:37 ` Lars-Peter Clausen 2013-07-05 16:55 ` Stephen Warren 1 sibling, 1 reply; 8+ messages in thread From: Lars-Peter Clausen @ 2013-07-05 9:37 UTC (permalink / raw) To: Kuninori Morimoto Cc: Linux-ALSA, Stephen Warren, Simon, Liam Girdwood, Mark Brown, Kuninori Morimoto > + - compatible : "asahi-kasei,ak4554" The vendor prefix for Asahi Kasei is documented as "ak" in Documentation/devicetree/bindings/vendor-prefixes.txt. But it doesn;t seem to be used in any upstream drivers, Stephen add that prefix maybe he knows if it is used. If it is unused you should probably send a patch updating the Documentation. - Lars ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ASoC: ak4554: add DT support 2013-07-05 9:37 ` Lars-Peter Clausen @ 2013-07-05 16:55 ` Stephen Warren 2013-07-05 17:04 ` Lars-Peter Clausen 0 siblings, 1 reply; 8+ messages in thread From: Stephen Warren @ 2013-07-05 16:55 UTC (permalink / raw) To: Lars-Peter Clausen Cc: Linux-ALSA, Stephen Warren, Kuninori Morimoto, Mark Brown, Liam Girdwood, Simon, Kuninori Morimoto On 07/05/2013 03:37 AM, Lars-Peter Clausen wrote: >> + - compatible : "asahi-kasei,ak4554" > > The vendor prefix for Asahi Kasei is documented as "ak" in > Documentation/devicetree/bindings/vendor-prefixes.txt. But it doesn;t seem > to be used in any upstream drivers, Stephen add that prefix maybe he knows > if it is used. If it is unused you should probably send a patch updating the > Documentation. It's used at: arch/arm/boot/dts/tegra20-seaboard.dts:499: compatible = "ak,ak8975"; ... although I see that somebody has incorrectly modified ./drivers/iio/magnetometer/ak8975.c to support the "asahi-kasei," vendor prefix:-( ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ASoC: ak4554: add DT support 2013-07-05 16:55 ` Stephen Warren @ 2013-07-05 17:04 ` Lars-Peter Clausen 2013-07-05 17:13 ` Stephen Warren 0 siblings, 1 reply; 8+ messages in thread From: Lars-Peter Clausen @ 2013-07-05 17:04 UTC (permalink / raw) To: Stephen Warren Cc: Linux-ALSA, Stephen Warren, Kuninori Morimoto, Mark Brown, Liam Girdwood, Simon, Kuninori Morimoto On 07/05/2013 06:55 PM, Stephen Warren wrote: > On 07/05/2013 03:37 AM, Lars-Peter Clausen wrote: >>> + - compatible : "asahi-kasei,ak4554" >> >> The vendor prefix for Asahi Kasei is documented as "ak" in >> Documentation/devicetree/bindings/vendor-prefixes.txt. But it doesn;t seem >> to be used in any upstream drivers, Stephen add that prefix maybe he knows >> if it is used. If it is unused you should probably send a patch updating the >> Documentation. > > It's used at: > > arch/arm/boot/dts/tegra20-seaboard.dts:499: compatible = "ak,ak8975"; > > ... although I see that somebody has incorrectly modified > ./drivers/iio/magnetometer/ak8975.c to support the "asahi-kasei," vendor > prefix:-( It looks as if the ak prefix was never in an upstream kernel and the commit date that added the dt table predates the commit date for your devicetree. - Lars ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ASoC: ak4554: add DT support 2013-07-05 17:04 ` Lars-Peter Clausen @ 2013-07-05 17:13 ` Stephen Warren [not found] ` <51D868CF.5080105@gmail.com> 0 siblings, 1 reply; 8+ messages in thread From: Stephen Warren @ 2013-07-05 17:13 UTC (permalink / raw) To: Lars-Peter Clausen Cc: Linux-ALSA, Stephen Warren, Kuninori Morimoto, Mark Brown, Liam Girdwood, Simon, Kuninori Morimoto On 07/05/2013 11:04 AM, Lars-Peter Clausen wrote: > On 07/05/2013 06:55 PM, Stephen Warren wrote: >> On 07/05/2013 03:37 AM, Lars-Peter Clausen wrote: >>>> + - compatible : "asahi-kasei,ak4554" >>> >>> The vendor prefix for Asahi Kasei is documented as "ak" in >>> Documentation/devicetree/bindings/vendor-prefixes.txt. But it doesn;t seem >>> to be used in any upstream drivers, Stephen add that prefix maybe he knows >>> if it is used. If it is unused you should probably send a patch updating the >>> Documentation. >> >> It's used at: >> >> arch/arm/boot/dts/tegra20-seaboard.dts:499: compatible = "ak,ak8975"; >> >> ... although I see that somebody has incorrectly modified >> ./drivers/iio/magnetometer/ak8975.c to support the "asahi-kasei," vendor >> prefix:-( > > It looks as if the ak prefix was never in an upstream kernel and the commit > date that added the dt table predates the commit date for your devicetree. The usage I quoted above is in the mainline kernel, along with the entry in vendor-prefixes.txt. When I fixed vendor-prefixes.txt to define a prefix for AK, and updated the Tegra DT to use them[1], I guess I didn't even look at the driver, since all I2C device matching uses the i2c_device_id table rather than the of_device_id, and the i2c_device_id table doesn't have a concept of a vendor prefix. Hence, I didn't notice the conflict. So, even though the asahi-kasei prefix is in the of_device_id table in the driver, I'd say the ak prefix trumps it, since it's actually in-use in device trees, and is registered in vendor-prefixes.txt. [1]: > commit ae8c4209af2cec065fef15d200a42a04130799f7 > Author: Stephen Warren <swarren@nvidia.com> > AuthorDate: Mon Nov 19 15:34:43 2012 -0700 > Commit: Rob Herring <rob.herring@calxeda.com> > CommitDate: Tue Nov 20 22:58:54 2012 -0600 > > of: Add vendor prefix for Asahi Kasei Corp. > > Their stock ticker is 3407.T which wouldn't make a good DT vendor > prefix. Use the company name initials instead. > > Signed-off-by: Stephen Warren <swarren@nvidia.com> > Signed-off-by: Rob Herring <rob.herring@calxeda.com> > > commit 9846210b1ec9bbaa30022d6d8af7e55ef67ccb45 > Author: Stephen Warren <swarren@nvidia.com> > AuthorDate: Mon Nov 19 15:34:44 2012 -0700 > Commit: Rob Herring <rob.herring@calxeda.com> > CommitDate: Tue Nov 20 22:58:54 2012 -0600 > > ARM: tegra: seaboard: add missing DT vendor prefixes > > A couple devices' DT compatible values only contained the device name > without any vendor prefix. Add the missing vendor prefixes. > > Signed-off-by: Stephen Warren <swarren@nvidia.com> > Signed-off-by: Rob Herring <rob.herring@calxeda.com> ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <51D868CF.5080105@gmail.com>]
* Re: [PATCH] ASoC: ak4554: add DT support [not found] ` <51D868CF.5080105@gmail.com> @ 2013-07-07 17:56 ` Lars-Peter Clausen 2013-07-08 16:03 ` Stephen Warren 0 siblings, 1 reply; 8+ messages in thread From: Lars-Peter Clausen @ 2013-07-07 17:56 UTC (permalink / raw) To: Sylwester Nawrocki Cc: Simon, Linux-ALSA, Stephen Warren, Kuninori Morimoto, Stephen Warren, Liam Girdwood, Mark Brown, Kuninori Morimoto On 07/06/2013 08:58 PM, Sylwester Nawrocki wrote: > On 07/05/2013 07:13 PM, Stephen Warren wrote: >> On 07/05/2013 11:04 AM, Lars-Peter Clausen wrote: >>> On 07/05/2013 06:55 PM, Stephen Warren wrote: >>>> On 07/05/2013 03:37 AM, Lars-Peter Clausen wrote: >>>>>> + - compatible : "asahi-kasei,ak4554" >>>>> >>>>> The vendor prefix for Asahi Kasei is documented as "ak" in >>>>> Documentation/devicetree/bindings/vendor-prefixes.txt. But it doesn;t seem >>>>> to be used in any upstream drivers, Stephen add that prefix maybe he knows >>>>> if it is used. If it is unused you should probably send a patch updating the >>>>> Documentation. >>>> >>>> It's used at: >>>> >>>> arch/arm/boot/dts/tegra20-seaboard.dts:499: compatible = "ak,ak8975"; >>>> >>>> ... although I see that somebody has incorrectly modified >>>> ./drivers/iio/magnetometer/ak8975.c to support the "asahi-kasei," vendor >>>> prefix:-( >>> >>> It looks as if the ak prefix was never in an upstream kernel and the commit >>> date that added the dt table predates the commit date for your devicetree. >> >> The usage I quoted above is in the mainline kernel, along with the entry >> in vendor-prefixes.txt. >> >> When I fixed vendor-prefixes.txt to define a prefix for AK, and updated >> the Tegra DT to use them[1], I guess I didn't even look at the driver, >> since all I2C device matching uses the i2c_device_id table rather than >> the of_device_id, and the i2c_device_id table doesn't have a concept of >> a vendor prefix. Hence, I didn't notice the conflict. >> >> So, even though the asahi-kasei prefix is in the of_device_id table in >> the driver, I'd say the ak prefix trumps it, since it's actually in-use >> in device trees, and is registered in vendor-prefixes.txt. > > I'm going to update this [2] patch to use "ak,ak8975" compatible string > then. Still there are some audio codec drivers that use "asahi-kasei" > vendor prefix: > > Documentation/devicetree/bindings/sound/ak4104.txt: - compatible : > "asahi-kasei,ak4104" > Documentation/devicetree/bindings/sound/ak4104.txt: compatible = > "asahi-kasei,ak4104"; > Documentation/devicetree/bindings/sound/ak4642.txt: - compatible : > "asahi-kasei,ak4642" or "asahi-kasei,ak4643" or "asahi-kasei,ak4648" > Documentation/devicetree/bindings/sound/ak4642.txt: compatible = > "asahi-kasei,ak4642"; > Documentation/devicetree/bindings/sound/ak5386.txt: - compatible : > "asahi-kasei,ak5386" > Documentation/devicetree/bindings/sound/ak5386.txt: compatible = > "asahi-kasei,ak5386"; > ... > sound/soc/codecs/ak4104.c: { .compatible = "asahi-kasei,ak4104", }, > sound/soc/codecs/ak4642.c: { .compatible = "asahi-kasei,ak4642", .data = > &soc_codec_dev_ak4642}, > sound/soc/codecs/ak4642.c: { .compatible = "asahi-kasei,ak4643", .data = > &soc_codec_dev_ak4642}, > sound/soc/codecs/ak4642.c: { .compatible = "asahi-kasei,ak4648", .data = > &soc_codec_dev_ak4648}, > sound/soc/codecs/ak5386.c: { .compatible = "asahi-kasei,ak5386", }, > > It's not in any dts file though, I'm not sure if that makes any > difference. > Well strictly speaking this is all public ABI, so I guess the best is to add a ak prefixed compatible string besides the asahi-kasei one and stick to ak only fore future drivers. - Lars ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ASoC: ak4554: add DT support 2013-07-07 17:56 ` Lars-Peter Clausen @ 2013-07-08 16:03 ` Stephen Warren 0 siblings, 0 replies; 8+ messages in thread From: Stephen Warren @ 2013-07-08 16:03 UTC (permalink / raw) To: Lars-Peter Clausen Cc: Linux-ALSA, Stephen Warren, Kuninori Morimoto, Mark Brown, Liam Girdwood, Simon, Sylwester Nawrocki, Kuninori Morimoto On 07/07/2013 11:56 AM, Lars-Peter Clausen wrote: > On 07/06/2013 08:58 PM, Sylwester Nawrocki wrote: >> On 07/05/2013 07:13 PM, Stephen Warren wrote: >>> On 07/05/2013 11:04 AM, Lars-Peter Clausen wrote: >>>> On 07/05/2013 06:55 PM, Stephen Warren wrote: >>>>> On 07/05/2013 03:37 AM, Lars-Peter Clausen wrote: >>>>>>> + - compatible : "asahi-kasei,ak4554" >>>>>> >>>>>> The vendor prefix for Asahi Kasei is documented as "ak" in >>>>>> Documentation/devicetree/bindings/vendor-prefixes.txt. But it doesn;t seem >>>>>> to be used in any upstream drivers, Stephen add that prefix maybe he knows >>>>>> if it is used. If it is unused you should probably send a patch updating the >>>>>> Documentation. >>>>> >>>>> It's used at: >>>>> >>>>> arch/arm/boot/dts/tegra20-seaboard.dts:499: compatible = "ak,ak8975"; >>>>> >>>>> ... although I see that somebody has incorrectly modified >>>>> ./drivers/iio/magnetometer/ak8975.c to support the "asahi-kasei," vendor >>>>> prefix:-( >>>> >>>> It looks as if the ak prefix was never in an upstream kernel and the commit >>>> date that added the dt table predates the commit date for your devicetree. >>> >>> The usage I quoted above is in the mainline kernel, along with the entry >>> in vendor-prefixes.txt. >>> >>> When I fixed vendor-prefixes.txt to define a prefix for AK, and updated >>> the Tegra DT to use them[1], I guess I didn't even look at the driver, >>> since all I2C device matching uses the i2c_device_id table rather than >>> the of_device_id, and the i2c_device_id table doesn't have a concept of >>> a vendor prefix. Hence, I didn't notice the conflict. >>> >>> So, even though the asahi-kasei prefix is in the of_device_id table in >>> the driver, I'd say the ak prefix trumps it, since it's actually in-use >>> in device trees, and is registered in vendor-prefixes.txt. >> >> I'm going to update this [2] patch to use "ak,ak8975" compatible string >> then. Still there are some audio codec drivers that use "asahi-kasei" >> vendor prefix: ... [examples] >> It's not in any dts file though, I'm not sure if that makes any >> difference. > > Well strictly speaking this is all public ABI, so I guess the best is to add a > ak prefixed compatible string besides the asahi-kasei one and stick to ak only > fore future drivers. True. The best thing may be to deprecate the old vendor prefix by modifying all the DT binding documents that reference it so that they describe the new prefix. In theory we do indeed still have to support the old prefix in all the affected drivers though. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-07-08 16:03 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-07-05 2:42 [PATCH] ASoC: ak4554: add DT support Kuninori Morimoto 2013-07-05 9:17 ` Mark Brown 2013-07-05 9:37 ` Lars-Peter Clausen 2013-07-05 16:55 ` Stephen Warren 2013-07-05 17:04 ` Lars-Peter Clausen 2013-07-05 17:13 ` Stephen Warren [not found] ` <51D868CF.5080105@gmail.com> 2013-07-07 17:56 ` Lars-Peter Clausen 2013-07-08 16:03 ` Stephen Warren
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.