3 * Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
5 * SPDX-License-Identifier: GPL-2.0+
10 #include <fdt_support.h>
11 #include <asm-generic/gpio.h>
14 int fdt_disable_by_ofname(void *rw_fdt_blob, char *ofname)
16 int offset = fdt_path_offset(rw_fdt_blob, ofname);
18 return fdt_status_disabled(rw_fdt_blob, offset);
21 bool dm_i2c_simple_probe(struct udevice *bus, uint chip_addr)
25 return !dm_i2c_probe(bus, chip_addr, DM_I2C_CHIP_RD_ADDRESS |
26 DM_I2C_CHIP_WR_ADDRESS, &dev);
29 int request_gpio_by_name(struct gpio_desc *gpio, const char *gpio_dev_name,
30 uint offset, char *gpio_name)
32 struct udevice *gpio_dev = NULL;
34 if (uclass_get_device_by_name(UCLASS_GPIO, gpio_dev_name, &gpio_dev))
38 gpio->offset = offset;
41 return dm_gpio_request(gpio, gpio_name);