summaryrefslogtreecommitdiff
path: root/drivers/regulator/tps51632-regulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/tps51632-regulator.c')
-rw-r--r--drivers/regulator/tps51632-regulator.c32
1 files changed, 4 insertions, 28 deletions
diff --git a/drivers/regulator/tps51632-regulator.c b/drivers/regulator/tps51632-regulator.c
index a15e415e61d5..3a384bf9d2c5 100644
--- a/drivers/regulator/tps51632-regulator.c
+++ b/drivers/regulator/tps51632-regulator.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/*
* tps51632-regulator.c -- TI TPS51632
*
@@ -7,20 +8,6 @@
* Copyright (c) 2012, NVIDIA Corporation.
*
* Author: Laxman Dewangan <ldewangan@nvidia.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation version 2.
- *
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
- * whether express or implied; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA
*/
#include <linux/err.h>
@@ -29,7 +16,6 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
@@ -213,7 +199,7 @@ static const struct regmap_config tps51632_regmap_config = {
.readable_reg = is_read_reg,
.volatile_reg = is_volatile_reg,
.max_register = TPS51632_MAX_REG - 1,
- .cache_type = REGCACHE_RBTREE,
+ .cache_type = REGCACHE_MAPLE,
};
#if defined(CONFIG_OF)
@@ -260,8 +246,7 @@ static struct tps51632_regulator_platform_data *
}
#endif
-static int tps51632_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int tps51632_probe(struct i2c_client *client)
{
struct tps51632_regulator_platform_data *pdata;
struct regulator_dev *rdev;
@@ -269,16 +254,6 @@ static int tps51632_probe(struct i2c_client *client,
int ret;
struct regulator_config config = { };
- if (client->dev.of_node) {
- const struct of_device_id *match;
- match = of_match_device(of_match_ptr(tps51632_of_match),
- &client->dev);
- if (!match) {
- dev_err(&client->dev, "Error: No device match found\n");
- return -ENODEV;
- }
- }
-
tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL);
if (!tps)
return -ENOMEM;
@@ -365,6 +340,7 @@ MODULE_DEVICE_TABLE(i2c, tps51632_id);
static struct i2c_driver tps51632_i2c_driver = {
.driver = {
.name = "tps51632",
+ .probe_type = PROBE_PREFER_ASYNCHRONOUS,
.of_match_table = of_match_ptr(tps51632_of_match),
},
.probe = tps51632_probe,