From: "Yang, Wenyou" <Wenyou.Yang@atmel.com>
To: Beniamino Galvani <b.galvani@gmail.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
"Mark Rutland" <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
"Heiko Stuebner" <heiko@sntech.de>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH 4/5] regulator: act8865: add support for act8846
Date: Mon, 23 Jun 2014 09:46:58 +0000 [thread overview]
Message-ID: <B256D81BAE5131468A838E5D7A2436419D1B5CC4@penmbx01> (raw)
In-Reply-To: <1403451105-31929-5-git-send-email-b.galvani@gmail.com>
> -----Original Message-----
> From: Beniamino Galvani [mailto:b.galvani@gmail.com]
> Sent: Sunday, June 22, 2014 11:32 PM
> To: Liam Girdwood; Mark Brown
> Cc: Yang, Wenyou; Rob Herring; Pawel Moll; Mark Rutland; Ian Campbell;
> Kumar Gala; Heiko Stuebner; devicetree@vger.kernel.org; linux-
> doc@vger.kernel.org; linux-kernel@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; Beniamino Galvani
> Subject: [PATCH 4/5] regulator: act8865: add support for act8846
>
> Add device id and definition of registers and regulators to support the
> act8846 PMU.
>
> Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
> ---
> drivers/regulator/act8865-regulator.c | 71
> +++++++++++++++++++++++++++++++++
> include/linux/regulator/act8865.h | 17 ++++++++
> 2 files changed, 88 insertions(+)
>
> diff --git a/drivers/regulator/act8865-regulator.c
> b/drivers/regulator/act8865-regulator.c
> index c604b34..1a693a5 100644
> --- a/drivers/regulator/act8865-regulator.c
> +++ b/drivers/regulator/act8865-regulator.c
> @@ -29,6 +29,40 @@
> #include <linux/regmap.h>
>
> /*
> + * ACT8846 Global Register Map.
> + */
> +#define ACT8846_SYS0 0x00
> +#define ACT8846_SYS1 0x01
> +#define ACT8846_REG1_VSET 0x10
> +#define ACT8846_REG1_CTRL 0x12
> +#define ACT8846_REG2_VSET0 0x20
> +#define ACT8846_REG2_VSET1 0x21
> +#define ACT8846_REG2_CTRL 0x22
> +#define ACT8846_REG3_VSET0 0x30
> +#define ACT8846_REG3_VSET1 0x31
> +#define ACT8846_REG3_CTRL 0x32
> +#define ACT8846_REG4_VSET0 0x40
> +#define ACT8846_REG4_VSET1 0x41
> +#define ACT8846_REG4_CTRL 0x42
> +#define ACT8846_REG5_VSET 0x50
> +#define ACT8846_REG5_CTRL 0x51
> +#define ACT8846_REG6_VSET 0x58
> +#define ACT8846_REG6_CTRL 0x59
> +#define ACT8846_REG7_VSET 0x60
> +#define ACT8846_REG7_CTRL 0x61
> +#define ACT8846_REG8_VSET 0x68
> +#define ACT8846_REG8_CTRL 0x69
> +#define ACT8846_REG9_VSET 0x70
> +#define ACT8846_REG9_CTRL 0x71
> +#define ACT8846_REG10_VSET 0x80
> +#define ACT8846_REG10_CTRL 0x81
> +#define ACT8846_REG11_VSET 0x90
> +#define ACT8846_REG11_CTRL 0x91
> +#define ACT8846_REG12_VSET 0xa0
> +#define ACT8846_REG12_CTRL 0xa1
> +#define ACT8846_REG13_CTRL 0xb1
> +
> +/*
> * ACT8865 Global Register Map.
> */
> #define ACT8865_SYS_MODE 0x00
> @@ -103,6 +137,21 @@ static struct regulator_ops act8865_ops = {
> .owner = THIS_MODULE, \
> }
>
> +static const struct regulator_desc act8846_regulators[] = {
> + ACT88xx_REG("REG1", ACT8846, REG1, VSET),
> + ACT88xx_REG("REG2", ACT8846, REG2, VSET0),
> + ACT88xx_REG("REG3", ACT8846, REG3, VSET0),
> + ACT88xx_REG("REG4", ACT8846, REG4, VSET0),
> + ACT88xx_REG("REG5", ACT8846, REG5, VSET),
> + ACT88xx_REG("REG6", ACT8846, REG6, VSET),
> + ACT88xx_REG("REG7", ACT8846, REG7, VSET),
> + ACT88xx_REG("REG8", ACT8846, REG8, VSET),
> + ACT88xx_REG("REG9", ACT8846, REG9, VSET),
> + ACT88xx_REG("REG10", ACT8846, REG10, VSET),
> + ACT88xx_REG("REG11", ACT8846, REG11, VSET),
> + ACT88xx_REG("REG12", ACT8846, REG12, VSET), };
> +
> static const struct regulator_desc act8865_regulators[] = {
> ACT88xx_REG("DCDC_REG1", ACT8865, DCDC1, VSET1),
> ACT88xx_REG("DCDC_REG2", ACT8865, DCDC2, VSET1), @@ -115,11
> +164,27 @@ static const struct regulator_desc act8865_regulators[] = {
>
> #ifdef CONFIG_OF
> static const struct of_device_id act8865_dt_ids[] = {
> + { .compatible = "active-semi,act8846", .data = (void *)ACT8846 },
> { .compatible = "active-semi,act8865", .data = (void *)ACT8865 },
> { }
> };
> MODULE_DEVICE_TABLE(of, act8865_dt_ids);
>
> +static struct of_regulator_match act8846_matches[] = {
> + [ACT8846_ID_REG1] = { .name = "REG1" },
> + [ACT8846_ID_REG2] = { .name = "REG2" },
> + [ACT8846_ID_REG3] = { .name = "REG3" },
> + [ACT8846_ID_REG4] = { .name = "REG4" },
> + [ACT8846_ID_REG5] = { .name = "REG5" },
> + [ACT8846_ID_REG6] = { .name = "REG6" },
> + [ACT8846_ID_REG7] = { .name = "REG7" },
> + [ACT8846_ID_REG8] = { .name = "REG8" },
> + [ACT8846_ID_REG9] = { .name = "REG9" },
> + [ACT8846_ID_REG10] = { .name = "REG10" },
> + [ACT8846_ID_REG11] = { .name = "REG11" },
> + [ACT8846_ID_REG12] = { .name = "REG12" },
> +};
> +
> static struct of_regulator_match act8865_matches[] = {
> [ACT8865_ID_DCDC1] = { .name = "DCDC_REG1"},
> [ACT8865_ID_DCDC2] = { .name = "DCDC_REG2"},
> @@ -222,6 +287,11 @@ static int act8865_pmic_probe(struct i2c_client
> *client,
> }
>
> switch (type) {
> + case ACT8846:
> + matches = act8846_matches;
> + regulators = act8846_regulators;
> + num_regulators = ARRAY_SIZE(act8846_regulators);
> + break;
> case ACT8865:
> matches = act8865_matches;
> regulators = act8865_regulators;
> @@ -290,6 +360,7 @@ static int act8865_pmic_probe(struct i2c_client
> *client, }
>
> static const struct i2c_device_id act8865_ids[] = {
> + { .name = "act8846", .driver_data = ACT8846 },
> { .name = "act8865", .driver_data = ACT8865 },
> { },
> };
> diff --git a/include/linux/regulator/act8865.h
> b/include/linux/regulator/act8865.h
> index b49be81..b6c4909 100644
> --- a/include/linux/regulator/act8865.h
> +++ b/include/linux/regulator/act8865.h
> @@ -30,7 +30,24 @@ enum {
> };
>
> enum {
> + ACT8846_ID_REG1,
> + ACT8846_ID_REG2,
> + ACT8846_ID_REG3,
> + ACT8846_ID_REG4,
> + ACT8846_ID_REG5,
> + ACT8846_ID_REG6,
> + ACT8846_ID_REG7,
> + ACT8846_ID_REG8,
> + ACT8846_ID_REG9,
> + ACT8846_ID_REG10,
> + ACT8846_ID_REG11,
> + ACT8846_ID_REG12,
> + ACT8846_REG_NUM,
> +};
> +
> +enum {
> ACT8865,
> + ACT8846,
> };
>
> /**
> --
> 1.7.10.4
Tested on at91-sama5d3_xplained with ACT8865
Tested-by Wenyou.Yang <wenyou.yang@atmel.com>
Best Regards,
Wenyou Yang
WARNING: multiple messages have this Message-ID (diff)
From: Wenyou.Yang@atmel.com (Yang, Wenyou)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] regulator: act8865: add support for act8846
Date: Mon, 23 Jun 2014 09:46:58 +0000 [thread overview]
Message-ID: <B256D81BAE5131468A838E5D7A2436419D1B5CC4@penmbx01> (raw)
In-Reply-To: <1403451105-31929-5-git-send-email-b.galvani@gmail.com>
> -----Original Message-----
> From: Beniamino Galvani [mailto:b.galvani at gmail.com]
> Sent: Sunday, June 22, 2014 11:32 PM
> To: Liam Girdwood; Mark Brown
> Cc: Yang, Wenyou; Rob Herring; Pawel Moll; Mark Rutland; Ian Campbell;
> Kumar Gala; Heiko Stuebner; devicetree at vger.kernel.org; linux-
> doc at vger.kernel.org; linux-kernel at vger.kernel.org; linux-arm-
> kernel at lists.infradead.org; Beniamino Galvani
> Subject: [PATCH 4/5] regulator: act8865: add support for act8846
>
> Add device id and definition of registers and regulators to support the
> act8846 PMU.
>
> Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
> ---
> drivers/regulator/act8865-regulator.c | 71
> +++++++++++++++++++++++++++++++++
> include/linux/regulator/act8865.h | 17 ++++++++
> 2 files changed, 88 insertions(+)
>
> diff --git a/drivers/regulator/act8865-regulator.c
> b/drivers/regulator/act8865-regulator.c
> index c604b34..1a693a5 100644
> --- a/drivers/regulator/act8865-regulator.c
> +++ b/drivers/regulator/act8865-regulator.c
> @@ -29,6 +29,40 @@
> #include <linux/regmap.h>
>
> /*
> + * ACT8846 Global Register Map.
> + */
> +#define ACT8846_SYS0 0x00
> +#define ACT8846_SYS1 0x01
> +#define ACT8846_REG1_VSET 0x10
> +#define ACT8846_REG1_CTRL 0x12
> +#define ACT8846_REG2_VSET0 0x20
> +#define ACT8846_REG2_VSET1 0x21
> +#define ACT8846_REG2_CTRL 0x22
> +#define ACT8846_REG3_VSET0 0x30
> +#define ACT8846_REG3_VSET1 0x31
> +#define ACT8846_REG3_CTRL 0x32
> +#define ACT8846_REG4_VSET0 0x40
> +#define ACT8846_REG4_VSET1 0x41
> +#define ACT8846_REG4_CTRL 0x42
> +#define ACT8846_REG5_VSET 0x50
> +#define ACT8846_REG5_CTRL 0x51
> +#define ACT8846_REG6_VSET 0x58
> +#define ACT8846_REG6_CTRL 0x59
> +#define ACT8846_REG7_VSET 0x60
> +#define ACT8846_REG7_CTRL 0x61
> +#define ACT8846_REG8_VSET 0x68
> +#define ACT8846_REG8_CTRL 0x69
> +#define ACT8846_REG9_VSET 0x70
> +#define ACT8846_REG9_CTRL 0x71
> +#define ACT8846_REG10_VSET 0x80
> +#define ACT8846_REG10_CTRL 0x81
> +#define ACT8846_REG11_VSET 0x90
> +#define ACT8846_REG11_CTRL 0x91
> +#define ACT8846_REG12_VSET 0xa0
> +#define ACT8846_REG12_CTRL 0xa1
> +#define ACT8846_REG13_CTRL 0xb1
> +
> +/*
> * ACT8865 Global Register Map.
> */
> #define ACT8865_SYS_MODE 0x00
> @@ -103,6 +137,21 @@ static struct regulator_ops act8865_ops = {
> .owner = THIS_MODULE, \
> }
>
> +static const struct regulator_desc act8846_regulators[] = {
> + ACT88xx_REG("REG1", ACT8846, REG1, VSET),
> + ACT88xx_REG("REG2", ACT8846, REG2, VSET0),
> + ACT88xx_REG("REG3", ACT8846, REG3, VSET0),
> + ACT88xx_REG("REG4", ACT8846, REG4, VSET0),
> + ACT88xx_REG("REG5", ACT8846, REG5, VSET),
> + ACT88xx_REG("REG6", ACT8846, REG6, VSET),
> + ACT88xx_REG("REG7", ACT8846, REG7, VSET),
> + ACT88xx_REG("REG8", ACT8846, REG8, VSET),
> + ACT88xx_REG("REG9", ACT8846, REG9, VSET),
> + ACT88xx_REG("REG10", ACT8846, REG10, VSET),
> + ACT88xx_REG("REG11", ACT8846, REG11, VSET),
> + ACT88xx_REG("REG12", ACT8846, REG12, VSET), };
> +
> static const struct regulator_desc act8865_regulators[] = {
> ACT88xx_REG("DCDC_REG1", ACT8865, DCDC1, VSET1),
> ACT88xx_REG("DCDC_REG2", ACT8865, DCDC2, VSET1), @@ -115,11
> +164,27 @@ static const struct regulator_desc act8865_regulators[] = {
>
> #ifdef CONFIG_OF
> static const struct of_device_id act8865_dt_ids[] = {
> + { .compatible = "active-semi,act8846", .data = (void *)ACT8846 },
> { .compatible = "active-semi,act8865", .data = (void *)ACT8865 },
> { }
> };
> MODULE_DEVICE_TABLE(of, act8865_dt_ids);
>
> +static struct of_regulator_match act8846_matches[] = {
> + [ACT8846_ID_REG1] = { .name = "REG1" },
> + [ACT8846_ID_REG2] = { .name = "REG2" },
> + [ACT8846_ID_REG3] = { .name = "REG3" },
> + [ACT8846_ID_REG4] = { .name = "REG4" },
> + [ACT8846_ID_REG5] = { .name = "REG5" },
> + [ACT8846_ID_REG6] = { .name = "REG6" },
> + [ACT8846_ID_REG7] = { .name = "REG7" },
> + [ACT8846_ID_REG8] = { .name = "REG8" },
> + [ACT8846_ID_REG9] = { .name = "REG9" },
> + [ACT8846_ID_REG10] = { .name = "REG10" },
> + [ACT8846_ID_REG11] = { .name = "REG11" },
> + [ACT8846_ID_REG12] = { .name = "REG12" },
> +};
> +
> static struct of_regulator_match act8865_matches[] = {
> [ACT8865_ID_DCDC1] = { .name = "DCDC_REG1"},
> [ACT8865_ID_DCDC2] = { .name = "DCDC_REG2"},
> @@ -222,6 +287,11 @@ static int act8865_pmic_probe(struct i2c_client
> *client,
> }
>
> switch (type) {
> + case ACT8846:
> + matches = act8846_matches;
> + regulators = act8846_regulators;
> + num_regulators = ARRAY_SIZE(act8846_regulators);
> + break;
> case ACT8865:
> matches = act8865_matches;
> regulators = act8865_regulators;
> @@ -290,6 +360,7 @@ static int act8865_pmic_probe(struct i2c_client
> *client, }
>
> static const struct i2c_device_id act8865_ids[] = {
> + { .name = "act8846", .driver_data = ACT8846 },
> { .name = "act8865", .driver_data = ACT8865 },
> { },
> };
> diff --git a/include/linux/regulator/act8865.h
> b/include/linux/regulator/act8865.h
> index b49be81..b6c4909 100644
> --- a/include/linux/regulator/act8865.h
> +++ b/include/linux/regulator/act8865.h
> @@ -30,7 +30,24 @@ enum {
> };
>
> enum {
> + ACT8846_ID_REG1,
> + ACT8846_ID_REG2,
> + ACT8846_ID_REG3,
> + ACT8846_ID_REG4,
> + ACT8846_ID_REG5,
> + ACT8846_ID_REG6,
> + ACT8846_ID_REG7,
> + ACT8846_ID_REG8,
> + ACT8846_ID_REG9,
> + ACT8846_ID_REG10,
> + ACT8846_ID_REG11,
> + ACT8846_ID_REG12,
> + ACT8846_REG_NUM,
> +};
> +
> +enum {
> ACT8865,
> + ACT8846,
> };
>
> /**
> --
> 1.7.10.4
Tested on at91-sama5d3_xplained with ACT8865
Tested-by Wenyou.Yang <wenyou.yang@atmel.com>
Best Regards,
Wenyou Yang
next prev parent reply other threads:[~2014-06-23 9:47 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-22 15:31 [PATCH 0/5] regulator: act8865: add support for act8846 Beniamino Galvani
2014-06-22 15:31 ` Beniamino Galvani
2014-06-22 15:31 ` [PATCH 1/5] regulator: act8865: fix parsing of platform data Beniamino Galvani
2014-06-22 15:31 ` Beniamino Galvani
2014-06-23 9:45 ` Yang, Wenyou
2014-06-23 9:45 ` Yang, Wenyou
2014-06-23 9:45 ` Yang, Wenyou
2014-06-27 16:09 ` Mark Brown
2014-06-27 16:09 ` Mark Brown
2014-06-22 15:31 ` [PATCH 2/5] regulator: act8865: set correct number of regulators in pdata Beniamino Galvani
2014-06-22 15:31 ` Beniamino Galvani
2014-06-23 9:45 ` Yang, Wenyou
2014-06-23 9:45 ` Yang, Wenyou
2014-06-23 9:45 ` Yang, Wenyou
2014-06-27 16:07 ` Mark Brown
2014-06-27 16:07 ` Mark Brown
2014-06-29 9:46 ` Beniamino Galvani
2014-06-29 9:46 ` Beniamino Galvani
2014-06-29 9:46 ` Beniamino Galvani
2014-07-03 15:55 ` Mark Brown
2014-07-03 15:55 ` Mark Brown
2014-07-03 15:58 ` Mark Brown
2014-07-03 15:58 ` Mark Brown
2014-06-22 15:31 ` [PATCH 3/5] regulator: act8865: prepare support for other act88xx devices Beniamino Galvani
2014-06-22 15:31 ` Beniamino Galvani
2014-06-23 9:46 ` Yang, Wenyou
2014-06-23 9:46 ` Yang, Wenyou
2014-06-23 9:46 ` Yang, Wenyou
2014-07-03 16:00 ` Mark Brown
2014-07-03 16:00 ` Mark Brown
2014-06-22 15:31 ` [PATCH 4/5] regulator: act8865: add support for act8846 Beniamino Galvani
2014-06-22 15:31 ` Beniamino Galvani
2014-06-23 9:46 ` Yang, Wenyou [this message]
2014-06-23 9:46 ` Yang, Wenyou
2014-06-23 9:46 ` Yang, Wenyou
2014-06-22 15:31 ` [PATCH 5/5] regulator: act8865: add act8846 to DT binding documentation Beniamino Galvani
2014-06-22 15:31 ` Beniamino Galvani
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=B256D81BAE5131468A838E5D7A2436419D1B5CC4@penmbx01 \
--to=wenyou.yang@atmel.com \
--cc=b.galvani@gmail.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=heiko@sntech.de \
--cc=ijc+devicetree@hellion.org.uk \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.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.