Immutable branch between MFD and MediaTek due for the v5.11 merge window

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAl+2LToACgkQUa+KL4f8
 d2GwtxAAqMu4ZSIbmyh4EjJPWazqMXxblNEmLK/HU/RZJoAS9e24zXA8z4TfXiWt
 KJAEPulqMbo4PK3o5b8qGCyhRx6RsGaF/4YzEzMRoBywR3w8/TZ/S2W8FTD6cnzo
 9SkRZjfbBTsaMhOgfppZybMpVxEfk4HKGUKHJrnb50j+wC/OsK3PnjqBitiia8IC
 1GRFxvygnzXFZot+F1fFNHH4xmCpA7ghDw0+snQhGdpJxm/FQWEC+nmJfmGvjW9C
 kW5yJeKGu6Afn9Yvo6GGVlsuBVbbRlD5c1RM6bHEqneWXcXLhKdZTv7Cl8p2cFF6
 xGX+t0HaK+bIOMAZnehB8kKkzZKXQYZAdpiJ/iD8EMblWTXSAKk/W/QVh6YtizBy
 cCUI9d2YTp2CfqkwvNmDhPI7gqf+eaY8lIibP2yeMhjpzkXWLTZxbhZP8sbhl0qA
 UKJtQlaKS/3CQJxxmkC5UOTiWhmDJ6OA6JiRjKwl8zn1KHu/eE2zruLhiXo4S2oR
 4kOubSlVNUrBNv/liRCLNucc2MIcydEjBb7K62KV43LCvotgAKz0OvbcicEsCsJz
 6IGql3fQpf+Uog3jv3QMeSHjJXHSkmLBC1t65NcoVj27u/lILnyx3CGFHIODUmBP
 XxujJClJb/tPKYxoWux8jiZJUppNxIWeB6w9UvQjWj74C6pZ80Q=
 =NmIH
 -----END PGP SIGNATURE-----

Merge tag 'ib-mfd-mediatek-v5.11' into HEAD

Immutable branch between MFD and MediaTek due for the v5.11 merge window
This commit is contained in:
Matthias Brugger 2020-11-27 12:04:26 +01:00
commit 63e5dcc033
2 changed files with 29 additions and 0 deletions

View File

@ -255,6 +255,24 @@ struct regmap *syscon_regmap_lookup_by_phandle_args(struct device_node *np,
}
EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_phandle_args);
/*
* It behaves the same as syscon_regmap_lookup_by_phandle() except where
* there is no regmap phandle. In this case, instead of returning -ENODEV,
* the function returns NULL.
*/
struct regmap *syscon_regmap_lookup_by_phandle_optional(struct device_node *np,
const char *property)
{
struct regmap *regmap;
regmap = syscon_regmap_lookup_by_phandle(np, property);
if (IS_ERR(regmap) && PTR_ERR(regmap) == -ENODEV)
return NULL;
return regmap;
}
EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_phandle_optional);
static int syscon_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;

View File

@ -28,6 +28,9 @@ extern struct regmap *syscon_regmap_lookup_by_phandle_args(
const char *property,
int arg_count,
unsigned int *out_args);
extern struct regmap *syscon_regmap_lookup_by_phandle_optional(
struct device_node *np,
const char *property);
#else
static inline struct regmap *device_node_to_regmap(struct device_node *np)
{
@ -59,6 +62,14 @@ static inline struct regmap *syscon_regmap_lookup_by_phandle_args(
{
return ERR_PTR(-ENOTSUPP);
}
static inline struct regmap *syscon_regmap_lookup_by_phandle_optional(
struct device_node *np,
const char *property)
{
return NULL;
}
#endif
#endif /* __LINUX_MFD_SYSCON_H__ */