1.1 --- a/pkg/devices/lib/gpio/include/gpio-jz4730.h Sat Apr 27 23:46:28 2024 +0200
1.2 +++ b/pkg/devices/lib/gpio/include/gpio-jz4730.h Sun Apr 28 18:37:08 2024 +0200
1.3 @@ -2,7 +2,7 @@
1.4 * GPIO driver for Ingenic JZ4730.
1.5 * (See below for additional copyright and licensing notices.)
1.6 *
1.7 - * Copyright (C) 2017, 2018, 2023 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2017, 2018, 2023, 2024 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -78,8 +78,9 @@
1.13 private:
1.14 Hw::Register_block<32> _regs;
1.15
1.16 - l4_addr_t _start, _end;
1.17 + l4_addr_t _start;
1.18 unsigned _nr_pins;
1.19 + struct gpio_port *_pull_config;
1.20
1.21 // Convenience method for obtaining the bit corresponding to a pin.
1.22
1.23 @@ -123,8 +124,7 @@
1.24 unsigned *value);
1.25
1.26 public:
1.27 - Gpio_jz4730_chip(l4_addr_t start, l4_addr_t end,
1.28 - unsigned nr_pins);
1.29 + Gpio_jz4730_chip(l4_addr_t start, uint8_t port_number);
1.30
1.31 // Obtain the number of pins.
1.32
1.33 @@ -172,7 +172,7 @@
1.34
1.35 EXTERN_C_BEGIN
1.36
1.37 -void *jz4730_gpio_init(l4_addr_t start, l4_addr_t end, unsigned pins);
1.38 +void *jz4730_gpio_init(l4_addr_t start, uint8_t port_number);
1.39
1.40 void jz4730_gpio_setup(void *gpio, unsigned pin, unsigned mode, int value);
1.41 void jz4730_gpio_config_pull(void *gpio, unsigned pin, unsigned mode);