Lines Matching +full:connected +full:- +full:ground
1 // SPDX-License-Identifier: GPL-2.0
8 * Author: yanglsh@embest-tech.com
18 #include <linux/mfd/rohm-bd71815.h>
33 ret = regmap_read(bd71815->regmap, BD71815_REG_GPO, &val); in bd71815gpo_get()
49 return regmap_set_bits(bd71815->regmap, BD71815_REG_GPO, bit); in bd71815gpo_set()
51 return regmap_clear_bits(bd71815->regmap, BD71815_REG_GPO, bit); in bd71815gpo_set()
61 return regmap_update_bits(bdgpio->regmap, in bd71815_gpio_set_config()
66 return regmap_update_bits(bdgpio->regmap, in bd71815_gpio_set_config()
73 return -ENOTSUPP; in bd71815_gpio_set_config()
102 * connected to the ground is a bad idea. Thus we do not support it by default.
103 * OTOH - the original driver written by colleagues at Embest did support
109 * "rohm,enable-hidden-gpo".
118 if (gc->parent && device_property_present(gc->parent, in bd71815_init_valid_mask()
119 "rohm,enable-hidden-gpo")) in bd71815_init_valid_mask()
136 dev = &pdev->dev; in gpo_bd71815_probe()
137 /* The device-tree and regmap come from MFD => use parent for that */ in gpo_bd71815_probe()
138 parent = dev->parent; in gpo_bd71815_probe()
142 return -ENOMEM; in gpo_bd71815_probe()
144 g->chip = bd71815gpo_chip; in gpo_bd71815_probe()
149 * to 1 if "rohm,enable-hidden-gpo" is not given. in gpo_bd71815_probe()
156 if (device_property_present(parent, "rohm,enable-hidden-gpo")) in gpo_bd71815_probe()
157 g->chip.ngpio = 2; in gpo_bd71815_probe()
159 g->chip.ngpio = 1; in gpo_bd71815_probe()
161 g->chip.init_valid_mask = bd71815_init_valid_mask; in gpo_bd71815_probe()
162 g->chip.base = -1; in gpo_bd71815_probe()
163 g->chip.parent = parent; in gpo_bd71815_probe()
164 g->regmap = dev_get_regmap(parent, NULL); in gpo_bd71815_probe()
165 g->dev = dev; in gpo_bd71815_probe()
167 return devm_gpiochip_add_data(dev, &g->chip, g); in gpo_bd71815_probe()
172 .name = "bd71815-gpo",
178 MODULE_ALIAS("platform:bd71815-gpo");
180 MODULE_AUTHOR("Peter Yang <yanglsh@embest-tech.com>");