aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/extres
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2018-06-15 13:14:45 +0000
committerKyle Evans <kevans@FreeBSD.org>2018-06-15 13:14:45 +0000
commite5f97ff2cc244b2c708c911dde97759479d712b8 (patch)
tree01d592b201260bb083ae0699f328081c71f35146 /sys/dev/extres
parent43b223f42e5ee5dcc7fec0aa2beaf1c6ee0322d1 (diff)
Notes
Diffstat (limited to 'sys/dev/extres')
-rw-r--r--sys/dev/extres/regulator/regulator.c14
-rw-r--r--sys/dev/extres/regulator/regulator.h2
-rw-r--r--sys/dev/extres/regulator/regulator_fixed.c4
3 files changed, 0 insertions, 20 deletions
diff --git a/sys/dev/extres/regulator/regulator.c b/sys/dev/extres/regulator/regulator.c
index 378172353480..fa294867b571 100644
--- a/sys/dev/extres/regulator/regulator.c
+++ b/sys/dev/extres/regulator/regulator.c
@@ -507,20 +507,6 @@ struct regnode_std_param *regnode_get_stdparam(struct regnode *regnode)
return (&regnode->std_param);
}
-void
-regnode_enable_cnt_inc(struct regnode *regnode)
-{
-
- regnode->enable_cnt++;
-}
-
-void
-regnode_enable_cnt_dec(struct regnode *regnode)
-{
-
- regnode->enable_cnt--;
-}
-
void regnode_topo_unlock(void)
{
diff --git a/sys/dev/extres/regulator/regulator.h b/sys/dev/extres/regulator/regulator.h
index 2f35edca455c..7ef6524df35a 100644
--- a/sys/dev/extres/regulator/regulator.h
+++ b/sys/dev/extres/regulator/regulator.h
@@ -106,8 +106,6 @@ int regnode_get_flags(struct regnode *regnode);
void *regnode_get_softc(struct regnode *regnode);
device_t regnode_get_device(struct regnode *regnode);
struct regnode_std_param *regnode_get_stdparam(struct regnode *regnode);
-void regnode_enable_cnt_inc(struct regnode *regnode);
-void regnode_enable_cnt_dec(struct regnode *regnode);
void regnode_topo_unlock(void);
void regnode_topo_xlock(void);
void regnode_topo_slock(void);
diff --git a/sys/dev/extres/regulator/regulator_fixed.c b/sys/dev/extres/regulator/regulator_fixed.c
index bb98bb6a4631..1438181eafe5 100644
--- a/sys/dev/extres/regulator/regulator_fixed.c
+++ b/sys/dev/extres/regulator/regulator_fixed.c
@@ -156,8 +156,6 @@ regnode_fixed_init(struct regnode *regnode)
if (sc->gpio_open_drain)
flags |= GPIO_PIN_OPENDRAIN;
enable = sc->param->boot_on || sc->param->always_on;
- if (enable)
- regnode_enable_cnt_inc(regnode);
if (!sc->param->enable_active_high)
enable = !enable;
rv = GPIO_PIN_SET(pin->dev, pin->pin, enable);
@@ -196,14 +194,12 @@ regnode_fixed_enable(struct regnode *regnode, bool enable, int *udelay)
return (0);
pin = &sc->gpio_entry->gpio_pin;
if (enable) {
- regnode_enable_cnt_inc(regnode);
sc->gpio_entry->enable_cnt++;
if (sc->gpio_entry->enable_cnt > 1)
return (0);
} else {
KASSERT(sc->gpio_entry->enable_cnt > 0,
("Invalid enable count"));
- regnode_enable_cnt_dec(regnode);
sc->gpio_entry->enable_cnt--;
if (sc->gpio_entry->enable_cnt >= 1)
return (0);