@@ -1062,21 +1062,6 @@ int gpiod_line_event_read_fd_multiple(int fd, struct gpiod_line_event *events,
* Functions that didn't fit anywhere else.
*/
-/**
- * @brief Get a GPIO line handle by GPIO chip description and offset.
- * @param device String describing the gpiochip.
- * @param offset The offset of the GPIO line.
- * @return GPIO line handle or NULL if an error occurred.
- *
- * This routine provides a shorter alternative to calling
- * ::gpiod_chip_open_lookup and ::gpiod_chip_get_line.
- *
- * If this function succeeds, the caller is responsible for closing the
- * associated GPIO chip.
- */
-struct gpiod_line *
-gpiod_line_get(const char *device, unsigned int offset) GPIOD_API;
-
/**
* @brief Find a GPIO line by its name.
* @param name Name of the GPIO line.
@@ -378,24 +378,6 @@ int gpiod_line_request_bulk_both_edges_events_flags(
GPIOD_LINE_REQUEST_EVENT_BOTH_EDGES);
}
-struct gpiod_line *gpiod_line_get(const char *device, unsigned int offset)
-{
- struct gpiod_chip *chip;
- struct gpiod_line *line;
-
- chip = gpiod_chip_open_lookup(device);
- if (!chip)
- return NULL;
-
- line = gpiod_chip_get_line(chip, offset);
- if (!line) {
- gpiod_chip_close(chip);
- return NULL;
- }
-
- return line;
-}
-
struct gpiod_line *gpiod_line_find(const char *name)
{
struct gpiod_chip_iter *iter;
@@ -716,27 +716,6 @@ GPIOD_TEST_CASE(output_value_caching, 0, { 8 })
g_assert_cmpint(gpiod_test_chip_get_value(0, 2), ==, 0);
}
-GPIOD_TEST_CASE(get_line_helper, 0, { 16, 16, 32, 16 })
-{
- g_autoptr(gpiod_chip_struct) chip = NULL;
- struct gpiod_line *line;
-
- line = gpiod_line_get(gpiod_test_chip_name(2), 18);
- g_assert_nonnull(line);
- gpiod_test_return_if_failed();
- chip = gpiod_line_get_chip(line);
- g_assert_cmpint(gpiod_line_offset(line), ==, 18);
-}
-
-GPIOD_TEST_CASE(get_line_helper_invalid_offset, 0, { 16, 16, 32, 16 })
-{
- struct gpiod_line *line;
-
- line = gpiod_line_get(gpiod_test_chip_name(3), 18);
- g_assert_null(line);
- g_assert_cmpint(errno, ==, EINVAL);
-}
-
GPIOD_TEST_CASE(find_good, GPIOD_TEST_FLAG_NAMED_LINES, { 16, 16, 32, 16 })
{
g_autoptr(gpiod_chip_struct) chip = NULL;