1.1 --- a/pkg/devices/lib/gpio/include/gpio-jz4730.h Fri Sep 22 21:56:34 2023 +0200
1.2 +++ b/pkg/devices/lib/gpio/include/gpio-jz4730.h Sun Sep 24 01:53:43 2023 +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 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2017, 2018, 2023 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 @@ -117,6 +117,11 @@
1.13
1.14 void _config_pad(unsigned bitmap, unsigned func, unsigned value);
1.15
1.16 + // Paired register field access.
1.17 +
1.18 + void _get_pin_value(unsigned pin, uint32_t reg_upper, uint32_t reg_lower,
1.19 + unsigned *value);
1.20 +
1.21 public:
1.22 Gpio_jz4730_chip(l4_addr_t start, l4_addr_t end,
1.23 unsigned nr_pins);
1.24 @@ -136,6 +141,7 @@
1.25 void config_pull(unsigned pin, unsigned mode);
1.26 void config_pad(unsigned pin, unsigned func, unsigned value);
1.27 void config_get(unsigned pin, unsigned reg, unsigned *value);
1.28 + void config_pad_get(unsigned pin, unsigned *func, unsigned *value);
1.29
1.30 // Multiple pin configuration methods.
1.31
1.32 @@ -172,6 +178,7 @@
1.33 void jz4730_gpio_config_pull(void *gpio, unsigned pin, unsigned mode);
1.34 void jz4730_gpio_config_pad(void *gpio, unsigned pin, unsigned func, unsigned value);
1.35 void jz4730_gpio_config_get(void *gpio, unsigned pin, unsigned reg, unsigned *value);
1.36 +void jz4730_gpio_config_pad_get(void *gpio, unsigned pin, unsigned *func, unsigned *value);
1.37
1.38 void jz4730_gpio_multi_setup(void *gpio, Pin_slice const *mask, unsigned mode, unsigned outvalues);
1.39 void jz4730_gpio_multi_config_pull(void *gpio, Pin_slice const *mask, unsigned mode);