···255255}256256EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_phandle_args);257257258258+/*259259+ * It behaves the same as syscon_regmap_lookup_by_phandle() except where260260+ * there is no regmap phandle. In this case, instead of returning -ENODEV,261261+ * the function returns NULL.262262+ */263263+struct regmap *syscon_regmap_lookup_by_phandle_optional(struct device_node *np,264264+ const char *property)265265+{266266+ struct regmap *regmap;267267+268268+ regmap = syscon_regmap_lookup_by_phandle(np, property);269269+ if (IS_ERR(regmap) && PTR_ERR(regmap) == -ENODEV)270270+ return NULL;271271+272272+ return regmap;273273+}274274+EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_phandle_optional);275275+258276static int syscon_probe(struct platform_device *pdev)259277{260278 struct device *dev = &pdev->dev;