On 10/07/2017 06:07 AM, Linus Walleij wrote:
I mean that you add unsigned long *line_valid_mask; to struct gpio_chip using the same type of logic as .irq_valid_mask. The mask should be optional.
Hmmm okay
Then the operation gpiod_get[_index]() will FAIL if the line is not valid.
Just to be clear, you want gpiod_get_index() to check line_valid_mask (if present) and return -ENODEV if not valid?
There is no need to check on every operation, there should be no way to get a handle on the pin any other way. All new code should be using descriptors at this point so we only need to design for that case.
Ok, I will check this. -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html