mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 07:36:10 -04:00
power: reset: syscon-poweroff: get regmap from parent node
Just like syscon-reboot device, the syscon-poweroff is supposed to be a child of syscon node, thus we can take the same approach as syscon-poweroff: deprecate the 'regmap' field in favor of taking it from the parent's node. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230901120057.47018-3-krzysztof.kozlowski@linaro.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
committed by
Sebastian Reichel
parent
6f9c8a1338
commit
92bbb93aaa
@@ -37,8 +37,11 @@ static int syscon_poweroff_probe(struct platform_device *pdev)
|
||||
|
||||
map = syscon_regmap_lookup_by_phandle(dev->of_node, "regmap");
|
||||
if (IS_ERR(map)) {
|
||||
dev_err(dev, "unable to get syscon");
|
||||
return PTR_ERR(map);
|
||||
map = syscon_node_to_regmap(dev->parent->of_node);
|
||||
if (IS_ERR(map)) {
|
||||
dev_err(dev, "unable to get syscon");
|
||||
return PTR_ERR(map);
|
||||
}
|
||||
}
|
||||
|
||||
if (of_property_read_u32(dev->of_node, "offset", &offset)) {
|
||||
|
||||
Reference in New Issue
Block a user