Skip to content

Commit 0fc9da6

Browse files
committed
drivers: gpio_mcux: remove outdated driver functions
The access-oriented GPIO read and write system calls have been replaced with new API. Remove the old implementation. Signed-off-by: Peter Bigot <[email protected]>
1 parent de5a327 commit 0fc9da6

File tree

1 file changed

+0
-47
lines changed

1 file changed

+0
-47
lines changed

drivers/gpio/gpio_mcux.c

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -179,51 +179,6 @@ static int gpio_mcux_configure(struct device *dev,
179179
return 0;
180180
}
181181

182-
static int gpio_mcux_write(struct device *dev,
183-
int access_op, u32_t pin, u32_t value)
184-
{
185-
const struct gpio_mcux_config *config = dev->config->config_info;
186-
GPIO_Type *gpio_base = config->gpio_base;
187-
188-
if (access_op == GPIO_ACCESS_BY_PIN) {
189-
if (value) {
190-
/* Set the data output for the corresponding pin.
191-
* Writing zeros to the other bits leaves the data
192-
* output unchanged for the other pins.
193-
*/
194-
gpio_base->PSOR = BIT(pin);
195-
} else {
196-
/* Clear the data output for the corresponding pin.
197-
* Writing zeros to the other bits leaves the data
198-
* output unchanged for the other pins.
199-
*/
200-
gpio_base->PCOR = BIT(pin);
201-
}
202-
} else { /* GPIO_ACCESS_BY_PORT */
203-
/* Write the data output for all the pins */
204-
gpio_base->PDOR = value;
205-
}
206-
207-
return 0;
208-
}
209-
210-
static int gpio_mcux_read(struct device *dev,
211-
int access_op, u32_t pin, u32_t *value)
212-
{
213-
const struct gpio_mcux_config *config = dev->config->config_info;
214-
GPIO_Type *gpio_base = config->gpio_base;
215-
216-
*value = gpio_base->PDIR;
217-
218-
if (access_op == GPIO_ACCESS_BY_PIN) {
219-
*value = (*value & BIT(pin)) >> pin;
220-
}
221-
222-
/* nothing more to do for GPIO_ACCESS_BY_PORT */
223-
224-
return 0;
225-
}
226-
227182
static int gpio_mcux_port_get_raw(struct device *dev, u32_t *value)
228183
{
229184
const struct gpio_mcux_config *config = dev->config->config_info;
@@ -357,8 +312,6 @@ static void gpio_mcux_port_isr(void *arg)
357312

358313
static const struct gpio_driver_api gpio_mcux_driver_api = {
359314
.config = gpio_mcux_configure,
360-
.write = gpio_mcux_write,
361-
.read = gpio_mcux_read,
362315
.port_get_raw = gpio_mcux_port_get_raw,
363316
.port_set_masked_raw = gpio_mcux_port_set_masked_raw,
364317
.port_set_bits_raw = gpio_mcux_port_set_bits_raw,

0 commit comments

Comments
 (0)