/* This file is part of the Simba project.  */
int board_pin_string_to_device_index(const char *str_p)
/* This file is part of the Simba project.  */
int board_pin_string_to_device_index(const char *str_p)
{
    long pin;
    if (std_strtol(&str_p[0], &pin) == NULL) {
        return (-ENODEV);
    }
    if ((pin < 0) || (pin >= PIN_DEVICE_MAX)) {
        return (-ENODEV);
    }
    return (pin);
}