Lines Matching +full:int +full:- +full:map +full:- +full:mask

1 // SPDX-License-Identifier: GPL-2.0-or-later
18 static struct regmap *map; variable
21 static u32 mask; variable
26 regmap_update_bits(map, offset, mask, value); in syscon_poweroff()
33 static int syscon_poweroff_probe(struct platform_device *pdev) in syscon_poweroff_probe()
35 int mask_err, value_err; in syscon_poweroff_probe()
37 map = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, "regmap"); in syscon_poweroff_probe()
38 if (IS_ERR(map)) { in syscon_poweroff_probe()
39 dev_err(&pdev->dev, "unable to get syscon"); in syscon_poweroff_probe()
40 return PTR_ERR(map); in syscon_poweroff_probe()
43 if (of_property_read_u32(pdev->dev.of_node, "offset", &offset)) { in syscon_poweroff_probe()
44 dev_err(&pdev->dev, "unable to read 'offset'"); in syscon_poweroff_probe()
45 return -EINVAL; in syscon_poweroff_probe()
48 value_err = of_property_read_u32(pdev->dev.of_node, "value", &value); in syscon_poweroff_probe()
49 mask_err = of_property_read_u32(pdev->dev.of_node, "mask", &mask); in syscon_poweroff_probe()
51 dev_err(&pdev->dev, "unable to read 'value' and 'mask'"); in syscon_poweroff_probe()
52 return -EINVAL; in syscon_poweroff_probe()
57 value = mask; in syscon_poweroff_probe()
58 mask = 0xFFFFFFFF; in syscon_poweroff_probe()
60 /* support value without mask*/ in syscon_poweroff_probe()
61 mask = 0xFFFFFFFF; in syscon_poweroff_probe()
65 dev_err(&pdev->dev, "pm_power_off already claimed for %ps", in syscon_poweroff_probe()
67 return -EBUSY; in syscon_poweroff_probe()
75 static int syscon_poweroff_remove(struct platform_device *pdev) in syscon_poweroff_remove()
84 { .compatible = "syscon-poweroff" },
92 .name = "syscon-poweroff",
97 static int __init syscon_poweroff_register(void) in syscon_poweroff_register()