Skip to content

Commit a73ddb5

Browse files
committed
drivers: gpio_gecko: 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 0fc9da6 commit a73ddb5

File tree

1 file changed

+0
-47
lines changed

1 file changed

+0
-47
lines changed

drivers/gpio/gpio_gecko.c

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -160,51 +160,6 @@ static int gpio_gecko_configure(struct device *dev,
160160
return 0;
161161
}
162162

163-
static int gpio_gecko_write(struct device *dev,
164-
int access_op, u32_t pin, u32_t value)
165-
{
166-
const struct gpio_gecko_config *config = dev->config->config_info;
167-
GPIO_P_TypeDef *gpio_base = config->gpio_base;
168-
169-
if (access_op == GPIO_ACCESS_BY_PIN) {
170-
if (value) {
171-
/* Set the data output for the corresponding pin.
172-
* Writing zeros to the other bits leaves the data
173-
* output unchanged for the other pins.
174-
*/
175-
GPIO_PinOutSet(config->gpio_index, pin);
176-
} else {
177-
/* Clear the data output for the corresponding pin.
178-
* Writing zeros to the other bits leaves the data
179-
* output unchanged for the other pins.
180-
*/
181-
GPIO_PinOutClear(config->gpio_index, pin);
182-
}
183-
} else { /* GPIO_ACCESS_BY_PORT */
184-
/* Write the data output for all the pins */
185-
gpio_base->DOUT = value;
186-
}
187-
188-
return 0;
189-
}
190-
191-
static int gpio_gecko_read(struct device *dev,
192-
int access_op, u32_t pin, u32_t *value)
193-
{
194-
const struct gpio_gecko_config *config = dev->config->config_info;
195-
GPIO_P_TypeDef *gpio_base = config->gpio_base;
196-
197-
*value = gpio_base->DIN;
198-
199-
if (access_op == GPIO_ACCESS_BY_PIN) {
200-
*value = (*value & BIT(pin)) >> pin;
201-
}
202-
203-
/* nothing more to do for GPIO_ACCESS_BY_PORT */
204-
205-
return 0;
206-
}
207-
208163
static int gpio_gecko_port_get_raw(struct device *dev, u32_t *value)
209164
{
210165
const struct gpio_gecko_config *config = dev->config->config_info;
@@ -373,8 +328,6 @@ static void gpio_gecko_common_isr(void *arg)
373328

374329
static const struct gpio_driver_api gpio_gecko_driver_api = {
375330
.config = gpio_gecko_configure,
376-
.write = gpio_gecko_write,
377-
.read = gpio_gecko_read,
378331
.port_get_raw = gpio_gecko_port_get_raw,
379332
.port_set_masked_raw = gpio_gecko_port_set_masked_raw,
380333
.port_set_bits_raw = gpio_gecko_port_set_bits_raw,

0 commit comments

Comments
 (0)