mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-leds@vger.kernel.org, linux-input@vger.kernel.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Lee Jones <lee.jones@linaro.org>,
	Daniel Thompson <daniel.thompson@linaro.org>,
	Jingoo Han <jingoohan1@gmail.com>,
	Richard Purdie <rpurdie@rpsys.net>,
	Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Pavel Machek <pavel@ucw.cz>, Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Russell King <linux@armlinux.org.uk>,
	Tony Lindgren <tony@atomide.com>,
	javier@dowhile0.org
Subject: [PATCH 3/4] regulator: tps65217: Fix module autoload for devices registered via OF
Date: Wed,  7 Jun 2017 12:32:41 +0200	[thread overview]
Message-ID: <20170607103242.16008-3-enric.balletbo@collabora.com> (raw)
In-Reply-To: <20170607103242.16008-1-enric.balletbo@collabora.com>

The driver doesn't have a OF device ID table and so if devices are
registered via OF, module autoloading won't work.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
 drivers/regulator/tps65217-regulator.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c
index 5324dc9..2c05360 100644
--- a/drivers/regulator/tps65217-regulator.c
+++ b/drivers/regulator/tps65217-regulator.c
@@ -263,9 +263,16 @@ static int tps65217_regulator_probe(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id tps65217_regulator_match_table[] = {
+	{ .compatible = "ti,tps65217-pmic", },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, tps65217_regulator_match_table);
+
 static struct platform_driver tps65217_regulator_driver = {
 	.driver = {
 		.name = "tps65217-pmic",
+		.of_match_table = tps65217_regulator_match_table,
 	},
 	.probe = tps65217_regulator_probe,
 };
-- 
2.9.3

  parent reply	other threads:[~2017-06-07 10:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07 10:32 [PATCH 1/4] dt-bindings: tps65217: Update binding documentation Enric Balletbo i Serra
2017-06-07 10:32 ` [PATCH 2/4] ARM: dts: tps65217: Add backlight and pmic device Enric Balletbo i Serra
2017-06-07 10:32 ` Enric Balletbo i Serra [this message]
2017-06-07 10:32 ` [PATCH 4/4] mfd: tps65217: Instantiate sub-devices from device tree Enric Balletbo i Serra
2017-06-07 16:05   ` Grygorii Strashko
2017-06-08 13:16     ` Enric Balletbo Serra
2017-06-08 17:11       ` Grygorii Strashko
2017-06-08 21:35         ` Enric Balletbo Serra
2017-06-08 22:30           ` Javier Martinez Canillas
2017-06-08 23:47             ` Grygorii Strashko
2017-06-09  0:00               ` Javier Martinez Canillas
2017-06-09  9:55                 ` Enric Balletbo Serra
2017-06-09 14:03 ` [PATCH 1/4] dt-bindings: tps65217: Update binding documentation Rob Herring
2017-06-09 22:30   ` Enric Balletbo Serra
2017-06-13 14:43     ` Rob Herring

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=20170607103242.16008-3-enric.balletbo@collabora.com \
    --to=enric.balletbo@collabora.com \
    --cc=daniel.thompson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=javier@dowhile0.org \
    --cc=jingoohan1@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    --cc=rpurdie@rpsys.net \
    --cc=tony@atomide.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®