diff options
Diffstat (limited to 'drivers/regulator/pfuze.c')
-rw-r--r-- | drivers/regulator/pfuze.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/drivers/regulator/pfuze.c b/drivers/regulator/pfuze.c index 1983ec91f6..3e8890b10c 100644 --- a/drivers/regulator/pfuze.c +++ b/drivers/regulator/pfuze.c @@ -1,17 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2017 Sascha Hauer, Pengutronix - * - * 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; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * */ #include <common.h> @@ -21,13 +10,12 @@ #include <errno.h> #include <malloc.h> #include <of.h> -#include <regmap.h> +#include <linux/regmap.h> #include <mfd/pfuze.h> #include <i2c/i2c.h> #include <poweroff.h> -#include <mach/imx6.h> #define DRIVERNAME "pfuze" @@ -52,7 +40,7 @@ #define PFUZE100_VGENxSTBY BIT(5) struct pfuze { - struct device_d *dev; + struct device *dev; struct regmap *map; struct i2c_client *client; int revision; @@ -155,7 +143,7 @@ static const struct regmap_config pfuze_regmap_i2c_config = { .max_register = 127, }; -static int __init pfuze_probe(struct device_d *dev) +static int __init pfuze_probe(struct device *dev) { int ret; @@ -176,7 +164,7 @@ static int __init pfuze_probe(struct device_d *dev) if (pfuze_init_callback) pfuze_init_callback(pfuze_dev->map); - if (of_property_read_bool(dev->device_node, + if (of_property_read_bool(dev->of_node, "fsl,pmic-stby-poweroff")) return poweroff_handler_register_fn(pfuze_power_off_prepare); @@ -198,8 +186,9 @@ static __maybe_unused struct of_device_id pfuze_dt_ids[] = { { .compatible = "fsl,pfuze3001" }, { } }; +MODULE_DEVICE_TABLE(of, pfuze_dt_ids); -static struct driver_d pfuze_i2c_driver = { +static struct driver pfuze_i2c_driver = { .name = "pfuze-i2c", .probe = pfuze_probe, .id_table = pfuze_ids, |