balena-allwinner/layers/meta-balena-allwinner/recipes-kernel/linux/linux-mainline-4.19/0000-0024-mfd-axp20x-add-regulator-userspace-consumer-to-mfd-c.patch
Vicentiu Galanopulo 065936bc48 recipes-kernel/linux: Rename linux to linux-mainline
Since the Armbian sources refer to linux 4.19.76 as
being linux-mainline, all the patches from linux-4.19
were moved to linux-mainline_4.19 and the linux_4.19.76
recipes was named accordingly.

This patch makes 4.19.76 as default version for linux

Signed-off-by: Vicentiu Galanopulo <vicentiu@balena.io>
2019-10-10 11:50:45 +02:00

54 lines
1.5 KiB
Diff

From b77e60c6a2797ada240b1d42b896b70853e2b1af Mon Sep 17 00:00:00 2001
From: Quentin Schulz <quentin.schulz@free-electrons.com>
Date: Thu, 10 Aug 2017 09:40:21 +0200
Subject: [PATCH 24/82] mfd: axp20x: add regulator-userspace-consumer to mfd
cells of AXP813
Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
---
drivers/mfd/axp20x.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
index ac8da970bdfe..95f36a7e3cd4 100644
--- a/drivers/mfd/axp20x.c
+++ b/drivers/mfd/axp20x.c
@@ -24,6 +24,7 @@
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
+#include <linux/regulator/userspace-consumer.h>
#include <linux/mfd/axp20x.h>
#include <linux/mfd/core.h>
#include <linux/of_device.h>
@@ -771,6 +772,16 @@ static const struct mfd_cell axp809_cells[] = {
},
};
+static struct regulator_bulk_data vcc_vb = {
+ .supply = "vcc-vb",
+};
+
+static struct regulator_userspace_consumer_data vcc_vb_data = {
+ .name = "vcc-vb",
+ .num_supplies = 1,
+ .supplies = &vcc_vb,
+};
+
static const struct mfd_cell axp813_cells[] = {
{
.name = "axp221-pek",
@@ -790,6 +801,10 @@ static const struct mfd_cell axp813_cells[] = {
}, {
.name = "axp20x-usb-power-supply",
.of_compatible = "x-powers,axp813-usb-power-supply",
+ }, {
+ .name = "reg-userspace-consumer",
+ .platform_data = &vcc_vb_data,
+ .pdata_size = sizeof(vcc_vb_data),
}, {
.name = "axp20x-ac-power-supply",
.of_compatible = "x-powers,axp813-ac-power-supply",
--
2.20.1