Lines Matching +full:co +full:- +full:located

1 // SPDX-License-Identifier: GPL-2.0
7 * Copyright 2014 Embest Technology Co. Ltd. Inc.
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 ret = regmap_set_bits(bd71815->regmap, BD71815_REG_GPO, bit); in bd71815gpo_set()
51 ret = regmap_clear_bits(bd71815->regmap, BD71815_REG_GPO, bit); in bd71815gpo_set()
54 dev_warn(bd71815->dev, "failed to toggle GPO\n"); in bd71815gpo_set()
64 return regmap_update_bits(bdgpio->regmap, in bd71815_gpio_set_config()
69 return regmap_update_bits(bdgpio->regmap, in bd71815_gpio_set_config()
76 return -ENOTSUPP; in bd71815_gpio_set_config()
102 * located at the center of IC is hard to use on PCB (due to the location). It
106 * OTOH - the original driver written by colleagues at Embest did support
112 * "rohm,enable-hidden-gpo".
121 if (gc->parent && device_property_present(gc->parent, in bd71815_init_valid_mask()
122 "rohm,enable-hidden-gpo")) in bd71815_init_valid_mask()
139 dev = &pdev->dev; in gpo_bd71815_probe()
140 /* The device-tree and regmap come from MFD => use parent for that */ in gpo_bd71815_probe()
141 parent = dev->parent; in gpo_bd71815_probe()
145 return -ENOMEM; in gpo_bd71815_probe()
147 g->chip = bd71815gpo_chip; in gpo_bd71815_probe()
152 * to 1 if "rohm,enable-hidden-gpo" is not given. in gpo_bd71815_probe()
159 if (device_property_present(parent, "rohm,enable-hidden-gpo")) in gpo_bd71815_probe()
160 g->chip.ngpio = 2; in gpo_bd71815_probe()
162 g->chip.ngpio = 1; in gpo_bd71815_probe()
164 g->chip.init_valid_mask = bd71815_init_valid_mask; in gpo_bd71815_probe()
165 g->chip.base = -1; in gpo_bd71815_probe()
166 g->chip.parent = parent; in gpo_bd71815_probe()
167 g->regmap = dev_get_regmap(parent, NULL); in gpo_bd71815_probe()
168 g->dev = dev; in gpo_bd71815_probe()
170 return devm_gpiochip_add_data(dev, &g->chip, g); in gpo_bd71815_probe()
175 .name = "bd71815-gpo",
181 MODULE_ALIAS("platform:bd71815-gpo");
183 MODULE_AUTHOR("Peter Yang <yanglsh@embest-tech.com>");