Merge branch 'for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio into i2c/for-4.15
Refactor i2c-gpio and its users to use gpiod. Done by GPIO maintainer LinusW.
This commit is contained in:
@@ -3264,8 +3264,21 @@ int gpiod_configure_flags(struct gpio_desc *desc, const char *con_id,
|
||||
|
||||
if (lflags & GPIO_ACTIVE_LOW)
|
||||
set_bit(FLAG_ACTIVE_LOW, &desc->flags);
|
||||
|
||||
if (lflags & GPIO_OPEN_DRAIN)
|
||||
set_bit(FLAG_OPEN_DRAIN, &desc->flags);
|
||||
else if (dflags & GPIOD_FLAGS_BIT_OPEN_DRAIN) {
|
||||
/*
|
||||
* This enforces open drain mode from the consumer side.
|
||||
* This is necessary for some busses like I2C, but the lookup
|
||||
* should *REALLY* have specified them as open drain in the
|
||||
* first place, so print a little warning here.
|
||||
*/
|
||||
set_bit(FLAG_OPEN_DRAIN, &desc->flags);
|
||||
gpiod_warn(desc,
|
||||
"enforced open drain please flag it properly in DT/ACPI DSDT/board file\n");
|
||||
}
|
||||
|
||||
if (lflags & GPIO_OPEN_SOURCE)
|
||||
set_bit(FLAG_OPEN_SOURCE, &desc->flags);
|
||||
if (lflags & GPIO_SLEEP_MAY_LOOSE_VALUE)
|
||||
|
||||
Reference in New Issue
Block a user