Lines Matching refs:np
45 struct device_node *np = NULL; in sunxi_ctp_startup() local
51 np = data->node; in sunxi_ctp_startup()
53 if (!np) { in sunxi_ctp_startup()
55 np = of_find_node_by_name(NULL, data->np_name); in sunxi_ctp_startup()
57 np = of_find_node_by_name(NULL, "ctp"); in sunxi_ctp_startup()
60 if (!np) { in sunxi_ctp_startup()
65 if (!of_device_is_available(np)) { in sunxi_ctp_startup()
71 client = of_find_i2c_device_by_node(np); in sunxi_ctp_startup()
76 pdev = of_find_device_by_node(np); in sunxi_ctp_startup()
85 ret = of_property_read_u32(np, "ctp_twi_id", &data->twi_id); in sunxi_ctp_startup()
91 ret = of_property_read_string(np, "ctp_fw_idx", &idx); in sunxi_ctp_startup()
96 ret = of_property_read_string(np, ctp_name, &data->name); in sunxi_ctp_startup()
98 ret = of_property_read_string(np, "ctp_name", &data->name); in sunxi_ctp_startup()
102 ret = of_property_read_string(np, "ctp_power_ldo", &data->ctp_power); in sunxi_ctp_startup()
106 ret = of_property_read_u32(np, "ctp_power_ldo_vol", in sunxi_ctp_startup()
111 data->ctp_power_io.gpio = of_get_named_gpio_flags(np, "ctp_power_io", 0, in sunxi_ctp_startup()
116 data->wakeup_gpio.gpio = of_get_named_gpio_flags(np, "ctp_wakeup", 0, in sunxi_ctp_startup()
121 ret = of_property_read_u32(np, "ctp_screen_max_x", &data->screen_max_x); in sunxi_ctp_startup()
125 ret = of_property_read_u32(np, "ctp_screen_max_y", &data->screen_max_y); in sunxi_ctp_startup()
129 ret = of_property_read_u32(np, "ctp_revert_x_flag", in sunxi_ctp_startup()
134 ret = of_property_read_u32(np, "ctp_revert_y_flag", in sunxi_ctp_startup()
139 ret = of_property_read_u32(np, "ctp_exchange_x_y_flag", in sunxi_ctp_startup()
144 data->irq_gpio.gpio = of_get_named_gpio_flags(np, "ctp_int_port", 0, in sunxi_ctp_startup()
151 ret = of_property_read_u32(np, "ctp_gesture_wakeup", &(data->ctp_gesture_wakeup)); in sunxi_ctp_startup()
157 data->key_light_gpio.gpio = of_get_named_gpio(np, "ctp_light", 0); in sunxi_ctp_startup()
290 struct device_node *np = NULL; in sunxi_gsensor_startup() local
294 np = data->node; in sunxi_gsensor_startup()
296 if (!np) { in sunxi_gsensor_startup()
298 np = of_find_node_by_name(NULL, data->np_name); in sunxi_gsensor_startup()
300 np = of_find_node_by_name(NULL, "gsensor"); in sunxi_gsensor_startup()
304 if (!np) { in sunxi_gsensor_startup()
310 if (!of_device_is_available(np)) { in sunxi_gsensor_startup()
316 client = of_find_i2c_device_by_node(np); in sunxi_gsensor_startup()
321 pdev = of_find_device_by_node(np); in sunxi_gsensor_startup()
332 ret = of_property_read_u32(np, "gsensor_twi_id", &data->twi_id); in sunxi_gsensor_startup()
339 ret = of_property_read_u32(np, "gsensor_vcc_io_val", in sunxi_gsensor_startup()
392 struct device_node *np = NULL; in sunxi_gyr_startup() local
394 np = of_find_node_by_name(NULL, "gy"); in sunxi_gyr_startup()
395 if (!np) { in sunxi_gyr_startup()
401 if (!of_device_is_available(np)) { in sunxi_gyr_startup()
408 ret = of_property_read_u32(np, "gy_twi_id", &data->twi_id); in sunxi_gyr_startup()
462 struct device_node *np = NULL; in sunxi_ecompass_startup() local
464 np = of_find_node_by_name(NULL, "compass"); in sunxi_ecompass_startup()
465 if (!np) { in sunxi_ecompass_startup()
471 if (!of_device_is_available(np)) { in sunxi_ecompass_startup()
478 ret = of_property_read_u32(np, "compass_twi_id", &data->twi_id); in sunxi_ecompass_startup()
550 struct device_node *np = NULL; in sunxi_ls_startup() local
554 np = data->node; in sunxi_ls_startup()
555 if (!np) { in sunxi_ls_startup()
557 np = of_find_node_by_name(NULL, data->np_name); in sunxi_ls_startup()
559 np = of_find_node_by_name(NULL, "lightsensor"); in sunxi_ls_startup()
563 if (!np) { in sunxi_ls_startup()
569 if (!of_device_is_available(np)) { in sunxi_ls_startup()
575 client = of_find_i2c_device_by_node(np); in sunxi_ls_startup()
580 pdev = of_find_device_by_node(np); in sunxi_ls_startup()
590 ret = of_property_read_u32(np, "ls_twi_id", &data->twi_id); in sunxi_ls_startup()
596 data->irq_gpio.gpio = of_get_named_gpio(np, "ls_int", 0); in sunxi_ls_startup()
602 of_property_read_string(np, "ls_vcc", &data->sensor_power); in sunxi_ls_startup()
681 struct device_node *np = NULL; in sunxi_motor_startup() local
688 np = of_find_node_by_name(NULL, "motor_para"); in sunxi_motor_startup()
689 if (!np) { in sunxi_motor_startup()
695 if (of_device_is_available(np)) in sunxi_motor_startup()
707 dev->of_node = np; in sunxi_motor_startup()
712 data->motor_gpio.gpio = of_get_named_gpio_flags(np, "motor_shake", 0, in sunxi_motor_startup()
717 ret = of_property_read_string(np, "motor_ldo", &data->ldo); in sunxi_motor_startup()
721 pdev = of_find_device_by_node(np); in sunxi_motor_startup()
737 ret = of_property_read_u32(np, "motor_ldo_voltage", &data->ldo_voltage); in sunxi_motor_startup()