boards: swan_r5: fix discharge gpio configuration
The 3V3 bus seems to have a resistor connected to an MCU pin to discharge the bus by pulling the discharge line low while in open-drain mode. The board code was using non-existing GPIO flags (see previous commit for more details). This patch makes it clear that this GPIO is for discharging and uses GPIO attributes appropriately. Since the regulator is enabled by default, discharging is disabled. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
01b833e2ed
commit
e049cc7621
|
@ -9,16 +9,16 @@
|
|||
|
||||
static int board_swan_init(const struct device *dev)
|
||||
{
|
||||
const struct gpio_dt_spec gpio6 =
|
||||
GPIO_DT_SPEC_GET(DT_PATH(zephyr_user), no_pull_gpios);
|
||||
const struct gpio_dt_spec dischrg =
|
||||
GPIO_DT_SPEC_GET(DT_PATH(zephyr_user), dischrg_gpios);
|
||||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
if (!device_is_ready(gpio6.port)) {
|
||||
if (!device_is_ready(dischrg.port)) {
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
(void)gpio_pin_configure_dt(&gpio6, (GPIO_NOPULL | GPIO_MODE_ANALOG));
|
||||
(void)gpio_pin_configure_dt(&dischrg, GPIO_OUTPUT_INACTIVE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
|
||||
zephyr,user {
|
||||
no-pull-gpios = <&gpioe 6 GPIO_PUSH_PULL>;
|
||||
dischrg-gpios = <&gpioe 6 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
|
||||
};
|
||||
|
||||
supply-3v3 {
|
||||
|
|
Loading…
Reference in a new issue