Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1589922

[PATCH] regulator: hi655x: Add DT bindings so module autoloads

From Jeremy Linton <lintonrjeremy@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] regulator: hi655x: Add DT bindings so module autoloads
Date 2017-03-01 02:20 +0100
Message-ID <tg15T-3SJ-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


The hi655x driver is required for mmc/sd functionality on the
96boards hikey, and likely other platforms. When built as
a standalone module it doesn't get automatically loaded because
it is missing the module probe hooks.

Adding that boilerplate so it gets demand loaded.

Signed-off-by: Jeremy Linton <lintonrjeremy@gmail.com>
---
 drivers/regulator/hi655x-regulator.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/regulator/hi655x-regulator.c b/drivers/regulator/hi655x-regulator.c
index aca1846..924ed60 100644
--- a/drivers/regulator/hi655x-regulator.c
+++ b/drivers/regulator/hi655x-regulator.c
@@ -214,9 +214,16 @@ static int hi655x_regulator_probe(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id hi655x_dt_ids[] = {
+	{ .compatible = "hisilicon,hi655x-pmic",  },
+	{},
+};
+MODULE_DEVICE_TABLE(of, hi655x_dt_ids);
+
 static struct platform_driver hi655x_regulator_driver = {
 	.driver = {
 		.name	= "hi655x-regulator",
+		.of_match_table = hi655x_dt_ids,
 	},
 	.probe	= hi655x_regulator_probe,
 };
-- 
2.10.2

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] regulator: hi655x: Add DT bindings so module autoloads Jeremy Linton <lintonrjeremy@gmail.com> - 2017-03-01 02:20 +0100
  Re: [PATCH] regulator: hi655x: Add DT bindings so module autoloads Jeremy Linton <lintonrjeremy@gmail.com> - 2017-03-01 17:50 +0100
    Re: [PATCH] regulator: hi655x: Add DT bindings so module autoloads Mark Brown <broonie@kernel.org> - 2017-03-01 20:50 +0100
  Re: [PATCH] regulator: hi655x: Add DT bindings so module autoloads Mark Brown <broonie@kernel.org> - 2017-03-01 20:50 +0100

csiph-web