mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
The last patch in this series makes the flags parameter for the various
gpiod_get* functions mandatory and so allows to remove an ugly cpp hack introduced in commit39b2bbe3d7(gpio: add flags argument to gpiod_get*() functions) for v3.17-rc1. The other nine commits fix the last remaining users of these functions that don't pass flags yet. (Only etraxfs-uart wasn't fixed; this driver's use of the gpiod functions needs fixing anyhow.) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABCgAGBQJVmj+OAAoJEMH8FHityuwJHGcH/A5bSLcdaFCMcrYceYD/odzR X/mer/CcW/uWG0sUha2pZjT172szSrm0/Bk+SaY5Ub0c6ssCpKRGhtqZNVWWz44V duRQGkYEFODHSed1XnKQyKwr6nLyhjmj8RuP5GokjcsBZyl4onj+NHgmpH5aQBYC 4NyFpIXcSS4jCwj4nsZu4Y2xLAgu/t5oVzqDheqTyZ9imgaR8hbyminKhN+wFfrI FKukShQ5AQPVs7pGEqeY0wgJp+keOIYLukLwvgZw+S7MxixXaPiSK1Ez9DPY9CFo f+NkDV6GIe4OAOGFsL9dCxR0sO6mF7C5PpYuDUBtISi3JHNAvW+Ri7FKPeSDikA= =ixJj -----END PGP SIGNATURE----- Merge tag 'gpiod-flags-for-4.3' of git://git.pengutronix.de/git/ukl/linux into devel The last patch in this series makes the flags parameter for the various gpiod_get* functions mandatory and so allows to remove an ugly cpp hack introduced in commit39b2bbe3d7(gpio: add flags argument to gpiod_get*() functions) for v3.17-rc1. The other nine commits fix the last remaining users of these functions that don't pass flags yet. (Only etraxfs-uart wasn't fixed; this driver's use of the gpiod functions needs fixing anyhow.)
This commit is contained in:
commit
2563606ce4
13 changed files with 88 additions and 155 deletions
|
|
@ -59,13 +59,13 @@ static int devm_gpiod_match_array(struct device *dev, void *res, void *data)
|
|||
* automatically disposed on driver detach. See gpiod_get() for detailed
|
||||
* information about behavior and return values.
|
||||
*/
|
||||
struct gpio_desc *__must_check __devm_gpiod_get(struct device *dev,
|
||||
struct gpio_desc *__must_check devm_gpiod_get(struct device *dev,
|
||||
const char *con_id,
|
||||
enum gpiod_flags flags)
|
||||
{
|
||||
return devm_gpiod_get_index(dev, con_id, 0, flags);
|
||||
}
|
||||
EXPORT_SYMBOL(__devm_gpiod_get);
|
||||
EXPORT_SYMBOL(devm_gpiod_get);
|
||||
|
||||
/**
|
||||
* devm_gpiod_get_optional - Resource-managed gpiod_get_optional()
|
||||
|
|
@ -77,13 +77,13 @@ EXPORT_SYMBOL(__devm_gpiod_get);
|
|||
* are automatically disposed on driver detach. See gpiod_get_optional() for
|
||||
* detailed information about behavior and return values.
|
||||
*/
|
||||
struct gpio_desc *__must_check __devm_gpiod_get_optional(struct device *dev,
|
||||
struct gpio_desc *__must_check devm_gpiod_get_optional(struct device *dev,
|
||||
const char *con_id,
|
||||
enum gpiod_flags flags)
|
||||
{
|
||||
return devm_gpiod_get_index_optional(dev, con_id, 0, flags);
|
||||
}
|
||||
EXPORT_SYMBOL(__devm_gpiod_get_optional);
|
||||
EXPORT_SYMBOL(devm_gpiod_get_optional);
|
||||
|
||||
/**
|
||||
* devm_gpiod_get_index - Resource-managed gpiod_get_index()
|
||||
|
|
@ -96,7 +96,7 @@ EXPORT_SYMBOL(__devm_gpiod_get_optional);
|
|||
* automatically disposed on driver detach. See gpiod_get_index() for detailed
|
||||
* information about behavior and return values.
|
||||
*/
|
||||
struct gpio_desc *__must_check __devm_gpiod_get_index(struct device *dev,
|
||||
struct gpio_desc *__must_check devm_gpiod_get_index(struct device *dev,
|
||||
const char *con_id,
|
||||
unsigned int idx,
|
||||
enum gpiod_flags flags)
|
||||
|
|
@ -120,7 +120,7 @@ struct gpio_desc *__must_check __devm_gpiod_get_index(struct device *dev,
|
|||
|
||||
return desc;
|
||||
}
|
||||
EXPORT_SYMBOL(__devm_gpiod_get_index);
|
||||
EXPORT_SYMBOL(devm_gpiod_get_index);
|
||||
|
||||
/**
|
||||
* devm_get_gpiod_from_child - get a GPIO descriptor from a device's child node
|
||||
|
|
@ -182,10 +182,10 @@ EXPORT_SYMBOL(devm_get_gpiod_from_child);
|
|||
* gpiod_get_index_optional() for detailed information about behavior and
|
||||
* return values.
|
||||
*/
|
||||
struct gpio_desc *__must_check __devm_gpiod_get_index_optional(struct device *dev,
|
||||
struct gpio_desc *__must_check devm_gpiod_get_index_optional(struct device *dev,
|
||||
const char *con_id,
|
||||
unsigned int index,
|
||||
enum gpiod_flags flags)
|
||||
enum gpiod_flags flags)
|
||||
{
|
||||
struct gpio_desc *desc;
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ struct gpio_desc *__must_check __devm_gpiod_get_index_optional(struct device *de
|
|||
|
||||
return desc;
|
||||
}
|
||||
EXPORT_SYMBOL(__devm_gpiod_get_index_optional);
|
||||
EXPORT_SYMBOL(devm_gpiod_get_index_optional);
|
||||
|
||||
/**
|
||||
* devm_gpiod_get_array - Resource-managed gpiod_get_array()
|
||||
|
|
|
|||
|
|
@ -1902,12 +1902,12 @@ EXPORT_SYMBOL_GPL(gpiod_count);
|
|||
* dev, -ENOENT if no GPIO has been assigned to the requested function, or
|
||||
* another IS_ERR() code if an error occurred while trying to acquire the GPIO.
|
||||
*/
|
||||
struct gpio_desc *__must_check __gpiod_get(struct device *dev, const char *con_id,
|
||||
struct gpio_desc *__must_check gpiod_get(struct device *dev, const char *con_id,
|
||||
enum gpiod_flags flags)
|
||||
{
|
||||
return gpiod_get_index(dev, con_id, 0, flags);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__gpiod_get);
|
||||
EXPORT_SYMBOL_GPL(gpiod_get);
|
||||
|
||||
/**
|
||||
* gpiod_get_optional - obtain an optional GPIO for a given GPIO function
|
||||
|
|
@ -1919,13 +1919,13 @@ EXPORT_SYMBOL_GPL(__gpiod_get);
|
|||
* the requested function it will return NULL. This is convenient for drivers
|
||||
* that need to handle optional GPIOs.
|
||||
*/
|
||||
struct gpio_desc *__must_check __gpiod_get_optional(struct device *dev,
|
||||
struct gpio_desc *__must_check gpiod_get_optional(struct device *dev,
|
||||
const char *con_id,
|
||||
enum gpiod_flags flags)
|
||||
{
|
||||
return gpiod_get_index_optional(dev, con_id, 0, flags);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__gpiod_get_optional);
|
||||
EXPORT_SYMBOL_GPL(gpiod_get_optional);
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -1982,7 +1982,7 @@ static int gpiod_configure_flags(struct gpio_desc *desc, const char *con_id,
|
|||
* requested function and/or index, or another IS_ERR() code if an error
|
||||
* occurred while trying to acquire the GPIO.
|
||||
*/
|
||||
struct gpio_desc *__must_check __gpiod_get_index(struct device *dev,
|
||||
struct gpio_desc *__must_check gpiod_get_index(struct device *dev,
|
||||
const char *con_id,
|
||||
unsigned int idx,
|
||||
enum gpiod_flags flags)
|
||||
|
|
@ -2031,7 +2031,7 @@ struct gpio_desc *__must_check __gpiod_get_index(struct device *dev,
|
|||
|
||||
return desc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__gpiod_get_index);
|
||||
EXPORT_SYMBOL_GPL(gpiod_get_index);
|
||||
|
||||
/**
|
||||
* fwnode_get_named_gpiod - obtain a GPIO from firmware node
|
||||
|
|
@ -2100,7 +2100,7 @@ EXPORT_SYMBOL_GPL(fwnode_get_named_gpiod);
|
|||
* specified index was assigned to the requested function it will return NULL.
|
||||
* This is convenient for drivers that need to handle optional GPIOs.
|
||||
*/
|
||||
struct gpio_desc *__must_check __gpiod_get_index_optional(struct device *dev,
|
||||
struct gpio_desc *__must_check gpiod_get_index_optional(struct device *dev,
|
||||
const char *con_id,
|
||||
unsigned int index,
|
||||
enum gpiod_flags flags)
|
||||
|
|
@ -2115,7 +2115,7 @@ struct gpio_desc *__must_check __gpiod_get_index_optional(struct device *dev,
|
|||
|
||||
return desc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__gpiod_get_index_optional);
|
||||
EXPORT_SYMBOL_GPL(gpiod_get_index_optional);
|
||||
|
||||
/**
|
||||
* gpiod_hog - Hog the specified GPIO desc given the provided flags
|
||||
|
|
|
|||
Loading…
Reference in a new issue