Commit dd2be639 authored by Matti Vaittinen's avatar Matti Vaittinen Committed by Mark Brown

regulator/mfd: bd718xx: rename bd71837/bd71847 common instances

Rename parts of code that support both BD71837 and BD71847 to BD718XX.
Signed-off-by: default avatarMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Acked-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 18e4b55f
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// //
// Copyright (C) 2018 ROHM Semiconductors // Copyright (C) 2018 ROHM Semiconductors
// //
// ROHM BD71837MWV PMIC driver // ROHM BD71837MWV and BD71847MWV PMIC driver
// //
// Datasheet available from // Datasheet for BD71837MWV available from
// https://www.rohm.com/datasheet/BD71837MWV/bd71837mwv-e // https://www.rohm.com/datasheet/BD71837MWV/bd71837mwv-e
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
...@@ -30,7 +30,7 @@ static struct gpio_keys_platform_data bd718xx_powerkey_data = { ...@@ -30,7 +30,7 @@ static struct gpio_keys_platform_data bd718xx_powerkey_data = {
.name = "bd718xx-pwrkey", .name = "bd718xx-pwrkey",
}; };
static struct mfd_cell bd71837_mfd_cells[] = { static struct mfd_cell bd718xx_mfd_cells[] = {
{ {
.name = "gpio-keys", .name = "gpio-keys",
.platform_data = &bd718xx_powerkey_data, .platform_data = &bd718xx_powerkey_data,
...@@ -40,20 +40,20 @@ static struct mfd_cell bd71837_mfd_cells[] = { ...@@ -40,20 +40,20 @@ static struct mfd_cell bd71837_mfd_cells[] = {
{ .name = "bd718xx-pmic", }, { .name = "bd718xx-pmic", },
}; };
static const struct regmap_irq bd71837_irqs[] = { static const struct regmap_irq bd718xx_irqs[] = {
REGMAP_IRQ_REG(BD71837_INT_SWRST, 0, BD71837_INT_SWRST_MASK), REGMAP_IRQ_REG(BD718XX_INT_SWRST, 0, BD718XX_INT_SWRST_MASK),
REGMAP_IRQ_REG(BD71837_INT_PWRBTN_S, 0, BD71837_INT_PWRBTN_S_MASK), REGMAP_IRQ_REG(BD718XX_INT_PWRBTN_S, 0, BD718XX_INT_PWRBTN_S_MASK),
REGMAP_IRQ_REG(BD71837_INT_PWRBTN_L, 0, BD71837_INT_PWRBTN_L_MASK), REGMAP_IRQ_REG(BD718XX_INT_PWRBTN_L, 0, BD718XX_INT_PWRBTN_L_MASK),
REGMAP_IRQ_REG(BD71837_INT_PWRBTN, 0, BD71837_INT_PWRBTN_MASK), REGMAP_IRQ_REG(BD718XX_INT_PWRBTN, 0, BD718XX_INT_PWRBTN_MASK),
REGMAP_IRQ_REG(BD71837_INT_WDOG, 0, BD71837_INT_WDOG_MASK), REGMAP_IRQ_REG(BD718XX_INT_WDOG, 0, BD718XX_INT_WDOG_MASK),
REGMAP_IRQ_REG(BD71837_INT_ON_REQ, 0, BD71837_INT_ON_REQ_MASK), REGMAP_IRQ_REG(BD718XX_INT_ON_REQ, 0, BD718XX_INT_ON_REQ_MASK),
REGMAP_IRQ_REG(BD71837_INT_STBY_REQ, 0, BD71837_INT_STBY_REQ_MASK), REGMAP_IRQ_REG(BD718XX_INT_STBY_REQ, 0, BD718XX_INT_STBY_REQ_MASK),
}; };
static struct regmap_irq_chip bd71837_irq_chip = { static struct regmap_irq_chip bd718xx_irq_chip = {
.name = "bd71837-irq", .name = "bd718xx-irq",
.irqs = bd71837_irqs, .irqs = bd718xx_irqs,
.num_irqs = ARRAY_SIZE(bd71837_irqs), .num_irqs = ARRAY_SIZE(bd718xx_irqs),
.num_regs = 1, .num_regs = 1,
.irq_reg_stride = 1, .irq_reg_stride = 1,
.status_base = BD718XX_REG_IRQ, .status_base = BD718XX_REG_IRQ,
...@@ -73,7 +73,7 @@ static const struct regmap_access_table volatile_regs = { ...@@ -73,7 +73,7 @@ static const struct regmap_access_table volatile_regs = {
.n_yes_ranges = 1, .n_yes_ranges = 1,
}; };
static const struct regmap_config bd71837_regmap_config = { static const struct regmap_config bd718xx_regmap_config = {
.reg_bits = 8, .reg_bits = 8,
.val_bits = 8, .val_bits = 8,
.volatile_table = &volatile_regs, .volatile_table = &volatile_regs,
...@@ -81,10 +81,10 @@ static const struct regmap_config bd71837_regmap_config = { ...@@ -81,10 +81,10 @@ static const struct regmap_config bd71837_regmap_config = {
.cache_type = REGCACHE_RBTREE, .cache_type = REGCACHE_RBTREE,
}; };
static int bd71837_i2c_probe(struct i2c_client *i2c, static int bd718xx_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id) const struct i2c_device_id *id)
{ {
struct bd71837 *bd71837; struct bd718xx *bd718xx;
int ret; int ret;
if (!i2c->irq) { if (!i2c->irq) {
...@@ -92,33 +92,33 @@ static int bd71837_i2c_probe(struct i2c_client *i2c, ...@@ -92,33 +92,33 @@ static int bd71837_i2c_probe(struct i2c_client *i2c,
return -EINVAL; return -EINVAL;
} }
bd71837 = devm_kzalloc(&i2c->dev, sizeof(struct bd71837), GFP_KERNEL); bd718xx = devm_kzalloc(&i2c->dev, sizeof(struct bd718xx), GFP_KERNEL);
if (!bd71837) if (!bd718xx)
return -ENOMEM; return -ENOMEM;
bd71837->chip_irq = i2c->irq; bd718xx->chip_irq = i2c->irq;
bd71837->chip_type = (unsigned int)(uintptr_t) bd718xx->chip_type = (unsigned int)
of_device_get_match_data(&i2c->dev); of_device_get_match_data(&i2c->dev);
bd71837->dev = &i2c->dev; bd718xx->dev = &i2c->dev;
dev_set_drvdata(&i2c->dev, bd71837); dev_set_drvdata(&i2c->dev, bd718xx);
bd71837->regmap = devm_regmap_init_i2c(i2c, &bd71837_regmap_config); bd718xx->regmap = devm_regmap_init_i2c(i2c, &bd718xx_regmap_config);
if (IS_ERR(bd71837->regmap)) { if (IS_ERR(bd718xx->regmap)) {
dev_err(&i2c->dev, "regmap initialization failed\n"); dev_err(&i2c->dev, "regmap initialization failed\n");
return PTR_ERR(bd71837->regmap); return PTR_ERR(bd718xx->regmap);
} }
ret = devm_regmap_add_irq_chip(&i2c->dev, bd71837->regmap, ret = devm_regmap_add_irq_chip(&i2c->dev, bd718xx->regmap,
bd71837->chip_irq, IRQF_ONESHOT, 0, bd718xx->chip_irq, IRQF_ONESHOT, 0,
&bd71837_irq_chip, &bd71837->irq_data); &bd718xx_irq_chip, &bd718xx->irq_data);
if (ret) { if (ret) {
dev_err(&i2c->dev, "Failed to add irq_chip\n"); dev_err(&i2c->dev, "Failed to add irq_chip\n");
return ret; return ret;
} }
/* Configure short press to 10 milliseconds */ /* Configure short press to 10 milliseconds */
ret = regmap_update_bits(bd71837->regmap, ret = regmap_update_bits(bd718xx->regmap,
BD718XX_REG_PWRONCONFIG0, BD718XX_REG_PWRONCONFIG0,
BD718XX_PWRBTN_PRESS_DURATION_MASK, BD718XX_PWRBTN_PRESS_DURATION_MASK,
BD718XX_PWRBTN_SHORT_PRESS_10MS); BD718XX_PWRBTN_SHORT_PRESS_10MS);
...@@ -129,7 +129,7 @@ static int bd71837_i2c_probe(struct i2c_client *i2c, ...@@ -129,7 +129,7 @@ static int bd71837_i2c_probe(struct i2c_client *i2c,
} }
/* Configure long press to 10 seconds */ /* Configure long press to 10 seconds */
ret = regmap_update_bits(bd71837->regmap, ret = regmap_update_bits(bd718xx->regmap,
BD718XX_REG_PWRONCONFIG1, BD718XX_REG_PWRONCONFIG1,
BD718XX_PWRBTN_PRESS_DURATION_MASK, BD718XX_PWRBTN_PRESS_DURATION_MASK,
BD718XX_PWRBTN_LONG_PRESS_10S); BD718XX_PWRBTN_LONG_PRESS_10S);
...@@ -140,7 +140,7 @@ static int bd71837_i2c_probe(struct i2c_client *i2c, ...@@ -140,7 +140,7 @@ static int bd71837_i2c_probe(struct i2c_client *i2c,
return ret; return ret;
} }
ret = regmap_irq_get_virq(bd71837->irq_data, BD71837_INT_PWRBTN_S); ret = regmap_irq_get_virq(bd718xx->irq_data, BD718XX_INT_PWRBTN_S);
if (ret < 0) { if (ret < 0) {
dev_err(&i2c->dev, "Failed to get the IRQ\n"); dev_err(&i2c->dev, "Failed to get the IRQ\n");
...@@ -149,17 +149,17 @@ static int bd71837_i2c_probe(struct i2c_client *i2c, ...@@ -149,17 +149,17 @@ static int bd71837_i2c_probe(struct i2c_client *i2c,
button.irq = ret; button.irq = ret;
ret = devm_mfd_add_devices(bd71837->dev, PLATFORM_DEVID_AUTO, ret = devm_mfd_add_devices(bd718xx->dev, PLATFORM_DEVID_AUTO,
bd71837_mfd_cells, bd718xx_mfd_cells,
ARRAY_SIZE(bd71837_mfd_cells), NULL, 0, ARRAY_SIZE(bd718xx_mfd_cells), NULL, 0,
regmap_irq_get_domain(bd71837->irq_data)); regmap_irq_get_domain(bd718xx->irq_data));
if (ret) if (ret)
dev_err(&i2c->dev, "Failed to create subdevices\n"); dev_err(&i2c->dev, "Failed to create subdevices\n");
return ret; return ret;
} }
static const struct of_device_id bd71837_of_match[] = { static const struct of_device_id bd718xx_of_match[] = {
{ {
.compatible = "rohm,bd71837", .compatible = "rohm,bd71837",
.data = (void *)BD718XX_TYPE_BD71837, .data = (void *)BD718XX_TYPE_BD71837,
...@@ -170,30 +170,30 @@ static const struct of_device_id bd71837_of_match[] = { ...@@ -170,30 +170,30 @@ static const struct of_device_id bd71837_of_match[] = {
}, },
{ } { }
}; };
MODULE_DEVICE_TABLE(of, bd71837_of_match); MODULE_DEVICE_TABLE(of, bd718xx_of_match);
static struct i2c_driver bd71837_i2c_driver = { static struct i2c_driver bd718xx_i2c_driver = {
.driver = { .driver = {
.name = "rohm-bd718x7", .name = "rohm-bd718x7",
.of_match_table = bd71837_of_match, .of_match_table = bd718xx_of_match,
}, },
.probe = bd71837_i2c_probe, .probe = bd718xx_i2c_probe,
}; };
static int __init bd71837_i2c_init(void) static int __init bd718xx_i2c_init(void)
{ {
return i2c_add_driver(&bd71837_i2c_driver); return i2c_add_driver(&bd718xx_i2c_driver);
} }
/* Initialise early so consumer devices can complete system boot */ /* Initialise early so consumer devices can complete system boot */
subsys_initcall(bd71837_i2c_init); subsys_initcall(bd718xx_i2c_init);
static void __exit bd71837_i2c_exit(void) static void __exit bd718xx_i2c_exit(void)
{ {
i2c_del_driver(&bd71837_i2c_driver); i2c_del_driver(&bd718xx_i2c_driver);
} }
module_exit(bd71837_i2c_exit); module_exit(bd718xx_i2c_exit);
MODULE_AUTHOR("Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>"); MODULE_AUTHOR("Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>");
MODULE_DESCRIPTION("ROHM BD71837 Power Management IC driver"); MODULE_DESCRIPTION("ROHM BD71837/BD71847 Power Management IC driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
// Copyright (C) 2018 ROHM Semiconductors // Copyright (C) 2018 ROHM Semiconductors
// bd71837-regulator.c ROHM BD71837MWV regulator driver // bd71837-regulator.c ROHM BD71837MWV/BD71847MWV regulator driver
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/err.h> #include <linux/err.h>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
struct bd718xx_pmic { struct bd718xx_pmic {
struct bd718xx_regulator_data *rdata; struct bd718xx_regulator_data *rdata;
struct bd71837 *mfd; struct bd718xx *mfd;
struct platform_device *pdev; struct platform_device *pdev;
struct regulator_dev *rdev[BD718XX_REGULATOR_AMOUNT]; struct regulator_dev *rdev[BD718XX_REGULATOR_AMOUNT];
}; };
...@@ -30,11 +30,11 @@ struct bd718xx_pmic { ...@@ -30,11 +30,11 @@ struct bd718xx_pmic {
* 10: 2.50mV/usec 10mV 4uS * 10: 2.50mV/usec 10mV 4uS
* 11: 1.25mV/usec 10mV 8uS * 11: 1.25mV/usec 10mV 8uS
*/ */
static int bd71837_buck1234_set_ramp_delay(struct regulator_dev *rdev, static int bd718xx_buck1234_set_ramp_delay(struct regulator_dev *rdev,
int ramp_delay) int ramp_delay)
{ {
struct bd718xx_pmic *pmic = rdev_get_drvdata(rdev); struct bd718xx_pmic *pmic = rdev_get_drvdata(rdev);
struct bd71837 *mfd = pmic->mfd; struct bd718xx *mfd = pmic->mfd;
int id = rdev->desc->id; int id = rdev->desc->id;
unsigned int ramp_value = BUCK_RAMPRATE_10P00MV; unsigned int ramp_value = BUCK_RAMPRATE_10P00MV;
...@@ -124,7 +124,7 @@ static struct regulator_ops bd718xx_dvs_buck_regulator_ops = { ...@@ -124,7 +124,7 @@ static struct regulator_ops bd718xx_dvs_buck_regulator_ops = {
.set_voltage_sel = regulator_set_voltage_sel_regmap, .set_voltage_sel = regulator_set_voltage_sel_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap, .get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_time_sel = regulator_set_voltage_time_sel, .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_ramp_delay = bd71837_buck1234_set_ramp_delay, .set_ramp_delay = bd718xx_buck1234_set_ramp_delay,
}; };
/* /*
...@@ -378,7 +378,7 @@ static const struct bd718xx_regulator_data bd71847_regulators[] = { ...@@ -378,7 +378,7 @@ static const struct bd718xx_regulator_data bd71847_regulators[] = {
.desc = { .desc = {
.name = "buck5", .name = "buck5",
.of_match = of_match_ptr("BUCK5"), .of_match = of_match_ptr("BUCK5"),
.regulators_node = of_match_ptr("regulators"), .regulators_node = of_match_ptr("regulators"),
.id = BD718XX_BUCK5, .id = BD718XX_BUCK5,
.ops = &bd718xx_buck_regulator_nolinear_ops, .ops = &bd718xx_buck_regulator_nolinear_ops,
.type = REGULATOR_VOLTAGE, .type = REGULATOR_VOLTAGE,
...@@ -404,7 +404,7 @@ static const struct bd718xx_regulator_data bd71847_regulators[] = { ...@@ -404,7 +404,7 @@ static const struct bd718xx_regulator_data bd71847_regulators[] = {
.id = BD718XX_BUCK6, .id = BD718XX_BUCK6,
.ops = &bd718xx_buck_regulator_ops, .ops = &bd718xx_buck_regulator_ops,
.type = REGULATOR_VOLTAGE, .type = REGULATOR_VOLTAGE,
.n_voltages = BD71837_4TH_NODVS_BUCK_VOLTAGE_NUM, .n_voltages = BD718XX_4TH_NODVS_BUCK_VOLTAGE_NUM,
.linear_ranges = bd718xx_4th_nodvs_buck_volts, .linear_ranges = bd718xx_4th_nodvs_buck_volts,
.n_linear_ranges = .n_linear_ranges =
ARRAY_SIZE(bd718xx_4th_nodvs_buck_volts), ARRAY_SIZE(bd718xx_4th_nodvs_buck_volts),
...@@ -732,7 +732,7 @@ static const struct bd718xx_regulator_data bd71837_regulators[] = { ...@@ -732,7 +732,7 @@ static const struct bd718xx_regulator_data bd71837_regulators[] = {
.id = BD718XX_BUCK8, .id = BD718XX_BUCK8,
.ops = &bd718xx_buck_regulator_ops, .ops = &bd718xx_buck_regulator_ops,
.type = REGULATOR_VOLTAGE, .type = REGULATOR_VOLTAGE,
.n_voltages = BD71837_4TH_NODVS_BUCK_VOLTAGE_NUM, .n_voltages = BD718XX_4TH_NODVS_BUCK_VOLTAGE_NUM,
.linear_ranges = bd718xx_4th_nodvs_buck_volts, .linear_ranges = bd718xx_4th_nodvs_buck_volts,
.n_linear_ranges = .n_linear_ranges =
ARRAY_SIZE(bd718xx_4th_nodvs_buck_volts), ARRAY_SIZE(bd718xx_4th_nodvs_buck_volts),
...@@ -923,7 +923,7 @@ struct bd718xx_pmic_inits { ...@@ -923,7 +923,7 @@ struct bd718xx_pmic_inits {
unsigned int r_amount; unsigned int r_amount;
}; };
static int bd71837_probe(struct platform_device *pdev) static int bd718xx_probe(struct platform_device *pdev)
{ {
struct bd718xx_pmic *pmic; struct bd718xx_pmic *pmic;
struct regulator_config config = { 0 }; struct regulator_config config = { 0 };
...@@ -1027,15 +1027,15 @@ static int bd71837_probe(struct platform_device *pdev) ...@@ -1027,15 +1027,15 @@ static int bd71837_probe(struct platform_device *pdev)
return err; return err;
} }
static struct platform_driver bd71837_regulator = { static struct platform_driver bd718xx_regulator = {
.driver = { .driver = {
.name = "bd718xx-pmic", .name = "bd718xx-pmic",
}, },
.probe = bd71837_probe, .probe = bd718xx_probe,
}; };
module_platform_driver(bd71837_regulator); module_platform_driver(bd718xx_regulator);
MODULE_AUTHOR("Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>"); MODULE_AUTHOR("Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>");
MODULE_DESCRIPTION("BD71837 voltage regulator driver"); MODULE_DESCRIPTION("BD71837/BD71847 voltage regulator driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
/* SPDX-License-Identifier: GPL-2.0-or-later */ /* SPDX-License-Identifier: GPL-2.0-or-later */
/* Copyright (C) 2018 ROHM Semiconductors */ /* Copyright (C) 2018 ROHM Semiconductors */
#ifndef __LINUX_MFD_BD71837_H__ #ifndef __LINUX_MFD_BD718XX_H__
#define __LINUX_MFD_BD71837_H__ #define __LINUX_MFD_BD718XX_H__
#include <linux/regmap.h> #include <linux/regmap.h>
...@@ -40,7 +40,7 @@ enum { ...@@ -40,7 +40,7 @@ enum {
#define BD718XX_DVS_BUCK_VOLTAGE_NUM 0x3D #define BD718XX_DVS_BUCK_VOLTAGE_NUM 0x3D
#define BD718XX_1ST_NODVS_BUCK_VOLTAGE_NUM 0x08 #define BD718XX_1ST_NODVS_BUCK_VOLTAGE_NUM 0x08
#define BD71837_4TH_NODVS_BUCK_VOLTAGE_NUM 0x3D #define BD718XX_4TH_NODVS_BUCK_VOLTAGE_NUM 0x3D
#define BD718XX_LDO1_VOLTAGE_NUM 0x04 #define BD718XX_LDO1_VOLTAGE_NUM 0x04
#define BD718XX_LDO2_VOLTAGE_NUM 0x02 #define BD718XX_LDO2_VOLTAGE_NUM 0x02
...@@ -183,7 +183,7 @@ enum { ...@@ -183,7 +183,7 @@ enum {
#define BD71837_BUCK4_VRMON130 0x80 #define BD71837_BUCK4_VRMON130 0x80
#define BD71837_LDO7_VRMON80 0x40 #define BD71837_LDO7_VRMON80 0x40
/* BD71837_REG_IRQ bits */ /* BD718XX_REG_IRQ bits */
#define IRQ_SWRST 0x40 #define IRQ_SWRST 0x40
#define IRQ_PWRON_S 0x20 #define IRQ_PWRON_S 0x20
#define IRQ_PWRON_L 0x10 #define IRQ_PWRON_L 0x10
...@@ -192,31 +192,31 @@ enum { ...@@ -192,31 +192,31 @@ enum {
#define IRQ_ON_REQ 0x02 #define IRQ_ON_REQ 0x02
#define IRQ_STBY_REQ 0x01 #define IRQ_STBY_REQ 0x01
/* BD71837_REG_OUT32K bits */ /* BD718XX_REG_OUT32K bits */
#define BD71837_OUT32K_EN 0x01 #define BD718XX_OUT32K_EN 0x01
/* BD71837 gated clock rate */ /* BD7183XX gated clock rate */
#define BD71837_CLK_RATE 32768 #define BD718XX_CLK_RATE 32768
/* ROHM BD71837 irqs */ /* ROHM BD718XX irqs */
enum { enum {
BD71837_INT_STBY_REQ, BD718XX_INT_STBY_REQ,
BD71837_INT_ON_REQ, BD718XX_INT_ON_REQ,
BD71837_INT_WDOG, BD718XX_INT_WDOG,
BD71837_INT_PWRBTN, BD718XX_INT_PWRBTN,
BD71837_INT_PWRBTN_L, BD718XX_INT_PWRBTN_L,
BD71837_INT_PWRBTN_S, BD718XX_INT_PWRBTN_S,
BD71837_INT_SWRST BD718XX_INT_SWRST
}; };
/* ROHM BD71837 interrupt masks */ /* ROHM BD718XX interrupt masks */
#define BD71837_INT_SWRST_MASK 0x40 #define BD718XX_INT_SWRST_MASK 0x40
#define BD71837_INT_PWRBTN_S_MASK 0x20 #define BD718XX_INT_PWRBTN_S_MASK 0x20
#define BD71837_INT_PWRBTN_L_MASK 0x10 #define BD718XX_INT_PWRBTN_L_MASK 0x10
#define BD71837_INT_PWRBTN_MASK 0x8 #define BD718XX_INT_PWRBTN_MASK 0x8
#define BD71837_INT_WDOG_MASK 0x4 #define BD718XX_INT_WDOG_MASK 0x4
#define BD71837_INT_ON_REQ_MASK 0x2 #define BD718XX_INT_ON_REQ_MASK 0x2
#define BD71837_INT_STBY_REQ_MASK 0x1 #define BD718XX_INT_STBY_REQ_MASK 0x1
/* Register write induced reset settings */ /* Register write induced reset settings */
...@@ -226,13 +226,13 @@ enum { ...@@ -226,13 +226,13 @@ enum {
* write 1 to it we will trigger the action. So always write 0 to it when * write 1 to it we will trigger the action. So always write 0 to it when
* changning SWRESET action - no matter what we read from it. * changning SWRESET action - no matter what we read from it.
*/ */
#define BD71837_SWRESET_TYPE_MASK 7 #define BD718XX_SWRESET_TYPE_MASK 7
#define BD71837_SWRESET_TYPE_DISABLED 0 #define BD718XX_SWRESET_TYPE_DISABLED 0
#define BD71837_SWRESET_TYPE_COLD 4 #define BD718XX_SWRESET_TYPE_COLD 4
#define BD71837_SWRESET_TYPE_WARM 6 #define BD718XX_SWRESET_TYPE_WARM 6
#define BD71837_SWRESET_RESET_MASK 1 #define BD718XX_SWRESET_RESET_MASK 1
#define BD71837_SWRESET_RESET 1 #define BD718XX_SWRESET_RESET 1
/* Poweroff state transition conditions */ /* Poweroff state transition conditions */
...@@ -320,7 +320,7 @@ enum { ...@@ -320,7 +320,7 @@ enum {
struct bd718xx_pmic; struct bd718xx_pmic;
struct bd718xx_clk; struct bd718xx_clk;
struct bd71837 { struct bd718xx {
unsigned int chip_type; unsigned int chip_type;
struct device *dev; struct device *dev;
struct regmap *regmap; struct regmap *regmap;
...@@ -333,4 +333,4 @@ struct bd71837 { ...@@ -333,4 +333,4 @@ struct bd71837 {
struct bd718xx_clk *clk; struct bd718xx_clk *clk;
}; };
#endif /* __LINUX_MFD_BD71837_H__ */ #endif /* __LINUX_MFD_BD718XX_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment