From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Adam Thomson
<Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Dmitry Torokhov
<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Alessandro Zummo
<a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org>,
Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
Subject: Re: [PATCH v2 1/8] ASoC: da9055: Fix device registration of PMIC and CODEC devices
Date: Fri, 7 Feb 2014 10:56:57 +0000 [thread overview]
Message-ID: <20140207105657.GL14727@lee--X1> (raw)
In-Reply-To: <6a398d176b0b2bf8792d27bd5e2995fd96afb32d.1391705989.git.Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
> Currently the I2C device Ids conflict for the MFD and CODEC so
> cannot be both instantiated on one platform. This patch updates
> the Ids and names to make them unique from each other.
>
> It should be noted that the I2C addresses for both PMIC and CODEC
> are modifiable so instantiation of the two are kept as separate
> devices, rather than instantiating the CODEC from the MFD code.
>
> Signed-off-by: Adam Thomson <Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
> Acked-by: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
> drivers/mfd/da9055-i2c.c | 12 ++++++++++--
> sound/soc/codecs/da9055.c | 11 +++++++++--
> 2 files changed, 19 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mfd/da9055-i2c.c b/drivers/mfd/da9055-i2c.c
> index 13af7e5..8103e43 100644
> --- a/drivers/mfd/da9055-i2c.c
> +++ b/drivers/mfd/da9055-i2c.c
> @@ -53,17 +53,25 @@ static int da9055_i2c_remove(struct i2c_client *i2c)
> return 0;
> }
>
> +/*
> + * DO NOT change the device Ids. The naming is intentionally specific as both
> + * the PMIC and CODEC parts of this chip are instantiated separately as I2C
> + * devices (both have configurable I2C addresses, and are to all intents and
> + * purposes separate). As a result there are specific DA9055 ids for PMIC
> + * and CODEC, which must be different to operate together.
> + */
I'm not sure this comment is required.
Most device IDs are named this way.
> static struct i2c_device_id da9055_i2c_id[] = {
> - {"da9055", 0},
> + {"da9055-pmic", 0},
> { }
> };
> +MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);
>
> static struct i2c_driver da9055_i2c_driver = {
> .probe = da9055_i2c_probe,
> .remove = da9055_i2c_remove,
> .id_table = da9055_i2c_id,
> .driver = {
> - .name = "da9055",
> + .name = "da9055-pmic",
> .owner = THIS_MODULE,
> },
> };
> diff --git a/sound/soc/codecs/da9055.c b/sound/soc/codecs/da9055.c
> index 52b79a4..4228126 100644
> --- a/sound/soc/codecs/da9055.c
> +++ b/sound/soc/codecs/da9055.c
> @@ -1523,8 +1523,15 @@ static int da9055_remove(struct i2c_client *client)
> return 0;
> }
>
> +/*
> + * DO NOT change the device Ids. The naming is intentionally specific as both
> + * the CODEC and PMIC parts of this chip are instantiated separately as I2C
> + * devices (both have configurable I2C addresses, and are to all intents and
> + * purposes separate). As a result there are specific DA9055 Ids for CODEC
> + * and PMIC, which must be different to operate together.
> + */
And here, really, no need.
> static const struct i2c_device_id da9055_i2c_id[] = {
> - { "da9055", 0 },
> + { "da9055-codec", 0 },
> { }
> };
> MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);
> @@ -1532,7 +1539,7 @@ MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);
> /* I2C codec control layer */
> static struct i2c_driver da9055_i2c_driver = {
> .driver = {
> - .name = "da9055",
> + .name = "da9055-codec",
> .owner = THIS_MODULE,
> },
> .probe = da9055_i2c_probe,
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Cc: Mark Brown <broonie@kernel.org>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Alessandro Zummo <a.zummo@towertech.it>,
Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH v2 1/8] ASoC: da9055: Fix device registration of PMIC and CODEC devices
Date: Fri, 7 Feb 2014 10:56:57 +0000 [thread overview]
Message-ID: <20140207105657.GL14727@lee--X1> (raw)
In-Reply-To: <6a398d176b0b2bf8792d27bd5e2995fd96afb32d.1391705989.git.Adam.Thomson.Opensource@diasemi.com>
> Currently the I2C device Ids conflict for the MFD and CODEC so
> cannot be both instantiated on one platform. This patch updates
> the Ids and names to make them unique from each other.
>
> It should be noted that the I2C addresses for both PMIC and CODEC
> are modifiable so instantiation of the two are kept as separate
> devices, rather than instantiating the CODEC from the MFD code.
>
> Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> Acked-by: Mark Brown <broonie@linaro.org>
> ---
> drivers/mfd/da9055-i2c.c | 12 ++++++++++--
> sound/soc/codecs/da9055.c | 11 +++++++++--
> 2 files changed, 19 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mfd/da9055-i2c.c b/drivers/mfd/da9055-i2c.c
> index 13af7e5..8103e43 100644
> --- a/drivers/mfd/da9055-i2c.c
> +++ b/drivers/mfd/da9055-i2c.c
> @@ -53,17 +53,25 @@ static int da9055_i2c_remove(struct i2c_client *i2c)
> return 0;
> }
>
> +/*
> + * DO NOT change the device Ids. The naming is intentionally specific as both
> + * the PMIC and CODEC parts of this chip are instantiated separately as I2C
> + * devices (both have configurable I2C addresses, and are to all intents and
> + * purposes separate). As a result there are specific DA9055 ids for PMIC
> + * and CODEC, which must be different to operate together.
> + */
I'm not sure this comment is required.
Most device IDs are named this way.
> static struct i2c_device_id da9055_i2c_id[] = {
> - {"da9055", 0},
> + {"da9055-pmic", 0},
> { }
> };
> +MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);
>
> static struct i2c_driver da9055_i2c_driver = {
> .probe = da9055_i2c_probe,
> .remove = da9055_i2c_remove,
> .id_table = da9055_i2c_id,
> .driver = {
> - .name = "da9055",
> + .name = "da9055-pmic",
> .owner = THIS_MODULE,
> },
> };
> diff --git a/sound/soc/codecs/da9055.c b/sound/soc/codecs/da9055.c
> index 52b79a4..4228126 100644
> --- a/sound/soc/codecs/da9055.c
> +++ b/sound/soc/codecs/da9055.c
> @@ -1523,8 +1523,15 @@ static int da9055_remove(struct i2c_client *client)
> return 0;
> }
>
> +/*
> + * DO NOT change the device Ids. The naming is intentionally specific as both
> + * the CODEC and PMIC parts of this chip are instantiated separately as I2C
> + * devices (both have configurable I2C addresses, and are to all intents and
> + * purposes separate). As a result there are specific DA9055 Ids for CODEC
> + * and PMIC, which must be different to operate together.
> + */
And here, really, no need.
> static const struct i2c_device_id da9055_i2c_id[] = {
> - { "da9055", 0 },
> + { "da9055-codec", 0 },
> { }
> };
> MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);
> @@ -1532,7 +1539,7 @@ MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);
> /* I2C codec control layer */
> static struct i2c_driver da9055_i2c_driver = {
> .driver = {
> - .name = "da9055",
> + .name = "da9055-codec",
> .owner = THIS_MODULE,
> },
> .probe = da9055_i2c_probe,
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2014-02-07 10:56 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-06 18:03 [PATCH v2 0/8] da9055: Driver initialisation fixes, add DT support Adam Thomson
2014-02-06 18:03 ` Adam Thomson
2014-02-06 18:03 ` [PATCH v2 1/8] ASoC: da9055: Fix device registration of PMIC and CODEC devices Adam Thomson
2014-02-06 18:03 ` Adam Thomson
[not found] ` <6a398d176b0b2bf8792d27bd5e2995fd96afb32d.1391705989.git.Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
2014-02-07 10:56 ` Lee Jones [this message]
2014-02-07 10:56 ` Lee Jones
2014-02-07 12:58 ` Mark Brown
2014-02-10 11:51 ` Lee Jones
2014-02-10 13:43 ` Mark Brown
2014-02-10 13:43 ` Mark Brown
[not found] ` <20140210134310.GH1757-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-02-10 13:59 ` Lee Jones
2014-02-10 13:59 ` Lee Jones
2014-02-10 14:14 ` Mark Brown
2014-02-10 14:42 ` Lee Jones
2014-02-10 14:51 ` Mark Brown
2014-02-10 14:51 ` Mark Brown
2014-02-06 18:03 ` [PATCH v2 2/8] ASoC: da9055: Add DT support for CODEC Adam Thomson
2014-02-06 18:03 ` Adam Thomson
2014-02-07 16:25 ` Mark Brown
[not found] ` <20140207162504.GP32298-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-02-07 16:26 ` Mark Brown
2014-02-07 16:26 ` Mark Brown
2014-02-10 10:48 ` Opensource [Adam Thomson]
2014-02-10 10:48 ` Opensource [Adam Thomson]
2014-02-06 18:03 ` [PATCH v2 3/8] mfd: da9055: Add DT support for PMIC Adam Thomson
2014-02-06 18:03 ` Adam Thomson
2014-02-07 11:03 ` Lee Jones
2014-02-07 15:45 ` Opensource [Adam Thomson]
2014-02-07 15:45 ` Opensource [Adam Thomson]
2014-02-06 18:03 ` [PATCH v2 4/8] regulator: da9055: Add DT support Adam Thomson
2014-02-06 18:03 ` Adam Thomson
[not found] ` <9c9235270af15eb50bd2d5c20daa7a81858910a4.1391705989.git.Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
2014-02-07 16:31 ` Mark Brown
2014-02-07 16:31 ` Mark Brown
2014-02-06 18:03 ` [PATCH v2 5/8] onkey: da9055: Remove use of regmap_irq_get_virq() Adam Thomson
2014-02-06 18:03 ` Adam Thomson
2014-02-06 18:03 ` [PATCH v2 6/8] hwmon: " Adam Thomson
2014-02-06 18:03 ` Adam Thomson
2014-02-07 1:29 ` Guenter Roeck
2014-02-06 18:03 ` [PATCH v2 7/8] rtc: " Adam Thomson
2014-02-06 18:03 ` Adam Thomson
[not found] ` <cover.1391705989.git.Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
2014-02-06 18:03 ` [PATCH v2 8/8] regulator: " Adam Thomson
2014-02-06 18:03 ` Adam Thomson
2014-02-07 16:31 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140207105657.GL14727@lee--X1 \
--to=lee.jones-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org \
--cc=a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org \
--cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.