Skip to content

Commit ec6026c

Browse files
mniestrojcarlescufi
authored andcommitted
modem: remove 'modem_pin' abstraction
All drivers using 'modem_pin' abstraction were converted already, so remove its implementation now. Signed-off-by: Marcin Niestroj <[email protected]>
1 parent 41c618d commit ec6026c

File tree

4 files changed

+2
-111
lines changed

4 files changed

+2
-111
lines changed

drivers/modem/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ zephyr_library()
55
zephyr_library_sources_ifdef(CONFIG_MODEM_RECEIVER modem_receiver.c)
66
zephyr_library_sources_ifdef(CONFIG_MODEM_SHELL modem_shell.c)
77

8-
zephyr_library_sources_ifdef(CONFIG_MODEM_CONTEXT
9-
modem_context.c
10-
modem_pin.c
11-
)
8+
zephyr_library_sources_ifdef(CONFIG_MODEM_CONTEXT modem_context.c)
129

1310
zephyr_library_sources_ifdef(CONFIG_MODEM_IFACE_UART_INTERRUPT modem_iface_uart_interrupt.c)
1411
zephyr_library_sources_ifdef(CONFIG_MODEM_IFACE_UART_ASYNC modem_iface_uart_async.c)

drivers/modem/modem_context.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -128,22 +128,9 @@ struct modem_context *modem_context_from_id(int id)
128128

129129
int modem_context_register(struct modem_context *ctx)
130130
{
131-
int ret;
132-
133131
if (!ctx) {
134132
return -EINVAL;
135133
}
136134

137-
ret = modem_context_get(ctx);
138-
if (ret < 0) {
139-
return ret;
140-
}
141-
142-
ret = modem_pin_init(ctx);
143-
if (ret < 0) {
144-
LOG_ERR("modem pin init error: %d", ret);
145-
return ret;
146-
}
147-
148-
return 0;
135+
return modem_context_get(ctx);
149136
}

drivers/modem/modem_context.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@
2424
extern "C" {
2525
#endif
2626

27-
#define MODEM_PIN(name_, pin_, flags_) { \
28-
.dev_name = name_, \
29-
.pin = pin_, \
30-
.init_flags = flags_ \
31-
}
32-
3327
struct modem_iface {
3428
const struct device *dev;
3529

@@ -49,13 +43,6 @@ struct modem_cmd_handler {
4943
void *cmd_handler_data;
5044
};
5145

52-
struct modem_pin {
53-
const struct device *gpio_port_dev;
54-
char *dev_name;
55-
gpio_pin_t pin;
56-
gpio_flags_t init_flags;
57-
};
58-
5946
struct modem_context {
6047
/* modem data */
6148
char *data_manufacturer;
@@ -73,9 +60,6 @@ struct modem_context {
7360
#endif
7461
int *data_rssi;
7562
bool is_automatic_oper;
76-
/* pin config */
77-
struct modem_pin *pins;
78-
size_t pins_len;
7963

8064
/* interface config */
8165
struct modem_iface iface;
@@ -137,12 +121,6 @@ struct modem_context *modem_context_from_iface_dev(const struct device *dev);
137121
*/
138122
int modem_context_register(struct modem_context *ctx);
139123

140-
/* pin config functions */
141-
int modem_pin_read(struct modem_context *ctx, uint32_t pin);
142-
int modem_pin_write(struct modem_context *ctx, uint32_t pin, uint32_t value);
143-
int modem_pin_config(struct modem_context *ctx, uint32_t pin, bool enable);
144-
int modem_pin_init(struct modem_context *ctx);
145-
146124
#ifdef __cplusplus
147125
}
148126
#endif

drivers/modem/modem_pin.c

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)