Lines Matching refs:np

228 		if (tbp->cooling_device == cdev->np) {  in of_thermal_bind()
257 if (tbp->cooling_device == cdev->np) { in of_thermal_unbind()
464 struct device_node *np, *child, *sensor_np; in thermal_zone_of_sensor_register() local
467 np = of_find_node_by_name(NULL, "thermal-zones"); in thermal_zone_of_sensor_register()
468 if (!np) in thermal_zone_of_sensor_register()
472 of_node_put(np); in thermal_zone_of_sensor_register()
478 for_each_child_of_node(np, child) { in thermal_zone_of_sensor_register()
497 sensor_specs.np->name, sensor_specs.args_count); in thermal_zone_of_sensor_register()
502 if (sensor_specs.np == sensor_np && id == sensor_id) { in thermal_zone_of_sensor_register()
508 of_node_put(sensor_specs.np); in thermal_zone_of_sensor_register()
512 of_node_put(sensor_specs.np); in thermal_zone_of_sensor_register()
516 of_node_put(np); in thermal_zone_of_sensor_register()
578 static int thermal_of_populate_bind_params(struct device_node *np, in thermal_of_populate_bind_params() argument
590 ret = of_property_read_u32(np, "contribution", &prop); in thermal_of_populate_bind_params()
594 trip = of_parse_phandle(np, "trip", 0); in thermal_of_populate_bind_params()
602 if (trip == trips[i].np) { in thermal_of_populate_bind_params()
612 ret = of_parse_phandle_with_args(np, "cooling-device", "#cooling-cells", in thermal_of_populate_bind_params()
618 __tbp->cooling_device = cooling_spec.np; in thermal_of_populate_bind_params()
653 static int thermal_of_get_trip_type(struct device_node *np, in thermal_of_get_trip_type() argument
659 err = of_property_read_string(np, "type", &t); in thermal_of_get_trip_type()
682 static int thermal_of_populate_trip(struct device_node *np, in thermal_of_populate_trip() argument
688 ret = of_property_read_u32(np, "temperature", &prop); in thermal_of_populate_trip()
695 ret = of_property_read_u32(np, "hysteresis", &prop); in thermal_of_populate_trip()
702 ret = thermal_of_get_trip_type(np, &trip->type); in thermal_of_populate_trip()
709 trip->np = np; in thermal_of_populate_trip()
710 of_node_get(np); in thermal_of_populate_trip()
730 thermal_of_build_thermal_zone(struct device_node *np) in thermal_of_build_thermal_zone() argument
737 if (!np) { in thermal_of_build_thermal_zone()
746 ret = of_property_read_u32(np, "polling-delay-passive", &prop); in thermal_of_build_thermal_zone()
753 ret = of_property_read_u32(np, "polling-delay", &prop); in thermal_of_build_thermal_zone()
765 ret = of_property_read_u32_array(np, "coefficients", coef, 2); in thermal_of_build_thermal_zone()
775 child = of_get_child_by_name(np, "trips"); in thermal_of_build_thermal_zone()
801 child = of_get_child_by_name(np, "cooling-maps"); in thermal_of_build_thermal_zone()
837 of_node_put(tz->trips[i].np); in thermal_of_build_thermal_zone()
855 of_node_put(tz->trips[i].np); in of_thermal_free_zone()
874 struct device_node *np, *child; in of_parse_thermal_zones() local
878 np = of_find_node_by_name(NULL, "thermal-zones"); in of_parse_thermal_zones()
879 if (!np) { in of_parse_thermal_zones()
884 for_each_child_of_node(np, child) { in of_parse_thermal_zones()
939 of_node_put(np); in of_parse_thermal_zones()
945 of_node_put(np); in of_parse_thermal_zones()
963 struct device_node *np, *child; in of_thermal_destroy_zones() local
965 np = of_find_node_by_name(NULL, "thermal-zones"); in of_thermal_destroy_zones()
966 if (!np) { in of_thermal_destroy_zones()
971 for_each_child_of_node(np, child) { in of_thermal_destroy_zones()
987 of_node_put(np); in of_thermal_destroy_zones()