Lines Matching refs:np
224 if (tbp->cooling_device == cdev->np) { in of_thermal_bind()
252 if (tbp->cooling_device == cdev->np) { in of_thermal_unbind()
459 struct device_node *np, *child, *sensor_np; in thermal_zone_of_sensor_register() local
462 np = of_find_node_by_name(NULL, "thermal-zones"); in thermal_zone_of_sensor_register()
463 if (!np) in thermal_zone_of_sensor_register()
467 of_node_put(np); in thermal_zone_of_sensor_register()
473 for_each_child_of_node(np, child) { in thermal_zone_of_sensor_register()
492 sensor_specs.np->name, sensor_specs.args_count); in thermal_zone_of_sensor_register()
497 if (sensor_specs.np == sensor_np && id == sensor_id) { in thermal_zone_of_sensor_register()
503 of_node_put(sensor_specs.np); in thermal_zone_of_sensor_register()
507 of_node_put(sensor_specs.np); in thermal_zone_of_sensor_register()
511 of_node_put(np); in thermal_zone_of_sensor_register()
573 static int thermal_of_populate_bind_params(struct device_node *np, in thermal_of_populate_bind_params() argument
585 ret = of_property_read_u32(np, "contribution", &prop); in thermal_of_populate_bind_params()
589 trip = of_parse_phandle(np, "trip", 0); in thermal_of_populate_bind_params()
597 if (trip == trips[i].np) { in thermal_of_populate_bind_params()
607 ret = of_parse_phandle_with_args(np, "cooling-device", "#cooling-cells", in thermal_of_populate_bind_params()
613 __tbp->cooling_device = cooling_spec.np; in thermal_of_populate_bind_params()
648 static int thermal_of_get_trip_type(struct device_node *np, in thermal_of_get_trip_type() argument
654 err = of_property_read_string(np, "type", &t); in thermal_of_get_trip_type()
677 static int thermal_of_populate_trip(struct device_node *np, in thermal_of_populate_trip() argument
683 ret = of_property_read_u32(np, "temperature", &prop); in thermal_of_populate_trip()
690 ret = of_property_read_u32(np, "hysteresis", &prop); in thermal_of_populate_trip()
697 ret = thermal_of_get_trip_type(np, &trip->type); in thermal_of_populate_trip()
704 trip->np = np; in thermal_of_populate_trip()
705 of_node_get(np); in thermal_of_populate_trip()
725 thermal_of_build_thermal_zone(struct device_node *np) in thermal_of_build_thermal_zone() argument
732 if (!np) { in thermal_of_build_thermal_zone()
741 ret = of_property_read_u32(np, "polling-delay-passive", &prop); in thermal_of_build_thermal_zone()
748 ret = of_property_read_u32(np, "polling-delay", &prop); in thermal_of_build_thermal_zone()
756 child = of_get_child_by_name(np, "trips"); in thermal_of_build_thermal_zone()
782 child = of_get_child_by_name(np, "cooling-maps"); in thermal_of_build_thermal_zone()
818 of_node_put(tz->trips[i].np); in thermal_of_build_thermal_zone()
836 of_node_put(tz->trips[i].np); in of_thermal_free_zone()
855 struct device_node *np, *child; in of_parse_thermal_zones() local
859 np = of_find_node_by_name(NULL, "thermal-zones"); in of_parse_thermal_zones()
860 if (!np) { in of_parse_thermal_zones()
865 for_each_child_of_node(np, child) { in of_parse_thermal_zones()
908 of_node_put(np); in of_parse_thermal_zones()
914 of_node_put(np); in of_parse_thermal_zones()
932 struct device_node *np, *child; in of_thermal_destroy_zones() local
934 np = of_find_node_by_name(NULL, "thermal-zones"); in of_thermal_destroy_zones()
935 if (!np) { in of_thermal_destroy_zones()
940 for_each_child_of_node(np, child) { in of_thermal_destroy_zones()
956 of_node_put(np); in of_thermal_destroy_zones()