Lines Matching refs:np

128 static void __init make_sensor_label(struct device_node *np,  in make_sensor_label()  argument
140 if (!of_property_read_u32(np, "ibm,pir", &id)) { in make_sensor_label()
161 if (!of_property_read_u32(np, "ibm,chip-id", &id)) in make_sensor_label()
239 static int get_sensor_type(struct device_node *np) in get_sensor_type() argument
245 if (of_device_is_compatible(np, sensor_groups[type].compatible)) in get_sensor_type()
252 if (!of_device_is_compatible(np, "ibm,opal-sensor")) in get_sensor_type()
255 if (of_property_read_string(np, "sensor-type", &str)) in get_sensor_type()
286 struct device_node *opal, *np; in populate_attr_groups() local
290 for_each_child_of_node(opal, np) { in populate_attr_groups()
293 if (np->name == NULL) in populate_attr_groups()
296 type = get_sensor_type(np); in populate_attr_groups()
305 if (!of_property_read_string(np, "label", &label)) in populate_attr_groups()
352 struct device_node *opal, *np; in create_device_attrs() local
367 for_each_child_of_node(opal, np) { in create_device_attrs()
372 if (np->name == NULL) in create_device_attrs()
375 type = get_sensor_type(np); in create_device_attrs()
383 if (of_property_read_u32(np, "sensor-id", &sensor_id) && in create_device_attrs()
384 of_property_read_u32(np, "sensor-data", &sensor_id)) { in create_device_attrs()
387 np->name); in create_device_attrs()
400 attr_name = parse_opal_node_name(np->name, type, &opal_index); in create_device_attrs()
415 if (!of_property_read_string(np, "label", &label)) { in create_device_attrs()
426 make_sensor_label(np, &sdata[count], label); in create_device_attrs()