lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191024142939.25920-3-andrey.zhizhikin@leica-geosystems.com>
Date:   Thu, 24 Oct 2019 14:29:39 +0000
From:   Andrey Zhizhikin <andrey.z@...il.com>
To:     lgirdwood@...il.com, broonie@...nel.org,
        andriy.shevchenko@...ux.intel.com, lee.jones@...aro.org,
        linux-kernel@...r.kernel.org
Cc:     Andrey Zhizhikin <andrey.zhizhikin@...ca-geosystems.com>
Subject: [PATCH 2/2] mfd: add regulator cell to Cherry Trail Whiskey Cove PMIC

Add a regulator mfd cell to Whiskey Cove PMIC driver, which is used to
supply various voltage rails.

In addition, make the initialization of this mfd driver early enough in
order to provide regulator cell to mmc sub-system when it is initialized.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@...ca-geosystems.com>
---
 drivers/mfd/intel_soc_pmic_chtwc.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/intel_soc_pmic_chtwc.c b/drivers/mfd/intel_soc_pmic_chtwc.c
index be84bb2aa837..47c0d9994784 100644
--- a/drivers/mfd/intel_soc_pmic_chtwc.c
+++ b/drivers/mfd/intel_soc_pmic_chtwc.c
@@ -17,6 +17,7 @@
 #include <linux/mfd/core.h>
 #include <linux/mfd/intel_soc_pmic.h>
 #include <linux/regmap.h>
+#include <linux/regulator/intel-cht-wc-regulator.h>
 
 /* PMIC device registers */
 #define REG_OFFSET_MASK		GENMASK(7, 0)
@@ -58,6 +59,11 @@ static struct mfd_cell cht_wc_dev[] = {
 		.name = "cht_wcove_ext_chgr",
 		.num_resources = ARRAY_SIZE(cht_wc_ext_charger_resources),
 		.resources = cht_wc_ext_charger_resources,
+	}, {
+		.name = "cht_wcove_regulator",
+		.id = CHT_WC_REGULATOR_VSDIO + 1,
+		.num_resources = 0,
+		.resources = NULL,
 	},
 	{	.name = "cht_wcove_region", },
 	{	.name = "cht_wcove_leds", },
@@ -215,7 +221,7 @@ static const struct acpi_device_id cht_wc_acpi_ids[] = {
 	{ }
 };
 
-static struct i2c_driver cht_wc_driver = {
+static struct i2c_driver cht_wc_i2c_driver = {
 	.driver	= {
 		.name	= "CHT Whiskey Cove PMIC",
 		.pm     = &cht_wc_pm_ops,
@@ -225,4 +231,9 @@ static struct i2c_driver cht_wc_driver = {
 	.shutdown = cht_wc_shutdown,
 	.id_table = cht_wc_i2c_id,
 };
-builtin_i2c_driver(cht_wc_driver);
+
+static int __init cht_wc_i2c_init(void)
+{
+	return i2c_add_driver(&cht_wc_i2c_driver);
+}
+subsys_initcall(cht_wc_i2c_init);
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ