diff mbox

[v2,3/4] mfd: axp20x: Add axp20x-usb-power-supply for axp22x pmics

Message ID 1464887936-17020-3-git-send-email-hdegoede@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Hans de Goede June 2, 2016, 5:18 p.m. UTC
Add axp20x-usb-power-supply for axp22x pmics.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Changes in v2:
-Change compatible string for axp22x usb-power-supply cell to match v2 of:
 "power: axp20x_usb: Add support for usb power-supply on axp22x pmics"
---
 drivers/mfd/axp20x.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Chen-Yu Tsai June 3, 2016, 1:20 a.m. UTC | #1
On Fri, Jun 3, 2016 at 1:18 AM, Hans de Goede <hdegoede@redhat.com> wrote:
> Add axp20x-usb-power-supply for axp22x pmics.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Chen-Yu Tsai <wens@csie.org>
Lee Jones June 10, 2016, 2:56 p.m. UTC | #2
On Thu, 02 Jun 2016, Hans de Goede wrote:

> Add axp20x-usb-power-supply for axp22x pmics.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> Changes in v2:
> -Change compatible string for axp22x usb-power-supply cell to match v2 of:
>  "power: axp20x_usb: Add support for usb power-supply on axp22x pmics"
> ---
>  drivers/mfd/axp20x.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Applied, thanks.

> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
> index ca04361..6364dab 100644
> --- a/drivers/mfd/axp20x.c
> +++ b/drivers/mfd/axp20x.c
> @@ -160,6 +160,11 @@ static struct resource axp20x_usb_power_supply_resources[] = {
>  	DEFINE_RES_IRQ_NAMED(AXP20X_IRQ_VBUS_NOT_VALID, "VBUS_NOT_VALID"),
>  };
>  
> +static struct resource axp22x_usb_power_supply_resources[] = {
> +	DEFINE_RES_IRQ_NAMED(AXP22X_IRQ_VBUS_PLUGIN, "VBUS_PLUGIN"),
> +	DEFINE_RES_IRQ_NAMED(AXP22X_IRQ_VBUS_REMOVAL, "VBUS_REMOVAL"),
> +};
> +
>  static struct resource axp22x_pek_resources[] = {
>  	{
>  		.name   = "PEK_DBR",
> @@ -527,6 +532,11 @@ static struct mfd_cell axp22x_cells[] = {
>  		.resources		= axp22x_pek_resources,
>  	}, {
>  		.name			= "axp20x-regulator",
> +	}, {
> +		.name		= "axp20x-usb-power-supply",
> +		.of_compatible	= "x-powers,axp221-usb-power-supply",
> +		.num_resources	= ARRAY_SIZE(axp22x_usb_power_supply_resources),
> +		.resources	= axp22x_usb_power_supply_resources,
>  	},
>  };
>
Hans de Goede June 10, 2016, 6:47 p.m. UTC | #3
Hi,

On 10-06-16 16:56, Lee Jones wrote:
> On Thu, 02 Jun 2016, Hans de Goede wrote:
>
>> Add axp20x-usb-power-supply for axp22x pmics.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>> Changes in v2:
>> -Change compatible string for axp22x usb-power-supply cell to match v2 of:
>>  "power: axp20x_usb: Add support for usb power-supply on axp22x pmics"
>> ---
>>  drivers/mfd/axp20x.c | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>
> Applied, thanks.

Thanks, any chance we can see this show up soonish in :

https://git.kernel.org/cgit/linux/kernel/git/lee/mfd.git/log/?h=for-mfd-next

?

We keep a branch with all the foo-for-next branches relevant for
sunxi merged in for testing and it would be good to get these in there.

Regards,

Hans



>
>> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
>> index ca04361..6364dab 100644
>> --- a/drivers/mfd/axp20x.c
>> +++ b/drivers/mfd/axp20x.c
>> @@ -160,6 +160,11 @@ static struct resource axp20x_usb_power_supply_resources[] = {
>>  	DEFINE_RES_IRQ_NAMED(AXP20X_IRQ_VBUS_NOT_VALID, "VBUS_NOT_VALID"),
>>  };
>>
>> +static struct resource axp22x_usb_power_supply_resources[] = {
>> +	DEFINE_RES_IRQ_NAMED(AXP22X_IRQ_VBUS_PLUGIN, "VBUS_PLUGIN"),
>> +	DEFINE_RES_IRQ_NAMED(AXP22X_IRQ_VBUS_REMOVAL, "VBUS_REMOVAL"),
>> +};
>> +
>>  static struct resource axp22x_pek_resources[] = {
>>  	{
>>  		.name   = "PEK_DBR",
>> @@ -527,6 +532,11 @@ static struct mfd_cell axp22x_cells[] = {
>>  		.resources		= axp22x_pek_resources,
>>  	}, {
>>  		.name			= "axp20x-regulator",
>> +	}, {
>> +		.name		= "axp20x-usb-power-supply",
>> +		.of_compatible	= "x-powers,axp221-usb-power-supply",
>> +		.num_resources	= ARRAY_SIZE(axp22x_usb_power_supply_resources),
>> +		.resources	= axp22x_usb_power_supply_resources,
>>  	},
>>  };
>>
>
diff mbox

Patch

diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
index ca04361..6364dab 100644
--- a/drivers/mfd/axp20x.c
+++ b/drivers/mfd/axp20x.c
@@ -160,6 +160,11 @@  static struct resource axp20x_usb_power_supply_resources[] = {
 	DEFINE_RES_IRQ_NAMED(AXP20X_IRQ_VBUS_NOT_VALID, "VBUS_NOT_VALID"),
 };
 
+static struct resource axp22x_usb_power_supply_resources[] = {
+	DEFINE_RES_IRQ_NAMED(AXP22X_IRQ_VBUS_PLUGIN, "VBUS_PLUGIN"),
+	DEFINE_RES_IRQ_NAMED(AXP22X_IRQ_VBUS_REMOVAL, "VBUS_REMOVAL"),
+};
+
 static struct resource axp22x_pek_resources[] = {
 	{
 		.name   = "PEK_DBR",
@@ -527,6 +532,11 @@  static struct mfd_cell axp22x_cells[] = {
 		.resources		= axp22x_pek_resources,
 	}, {
 		.name			= "axp20x-regulator",
+	}, {
+		.name		= "axp20x-usb-power-supply",
+		.of_compatible	= "x-powers,axp221-usb-power-supply",
+		.num_resources	= ARRAY_SIZE(axp22x_usb_power_supply_resources),
+		.resources	= axp22x_usb_power_supply_resources,
 	},
 };