Searched refs:ds2404_gpio (Results 1 - 1 of 1) sorted by relevance

/linux-4.1.27/drivers/rtc/
H A Drtc-ds2404.c44 struct ds2404_gpio { struct
50 struct ds2404_gpio *gpio;
55 static struct ds2404_gpio ds2404_gpio[] = { variable in typeref:struct:ds2404_gpio
66 ds2404_gpio[DS2404_RST].gpio = pdata->gpio_rst; ds2404_gpio_map()
67 ds2404_gpio[DS2404_CLK].gpio = pdata->gpio_clk; ds2404_gpio_map()
68 ds2404_gpio[DS2404_DQ].gpio = pdata->gpio_dq; ds2404_gpio_map()
70 for (i = 0; i < ARRAY_SIZE(ds2404_gpio); i++) { ds2404_gpio_map()
71 err = gpio_request(ds2404_gpio[i].gpio, ds2404_gpio[i].name); ds2404_gpio_map()
74 ds2404_gpio[i].name, err); ds2404_gpio_map()
78 gpio_direction_output(ds2404_gpio[i].gpio, 1); ds2404_gpio_map()
81 chip->gpio = ds2404_gpio; ds2404_gpio_map()
86 gpio_free(ds2404_gpio[i].gpio); ds2404_gpio_map()
94 for (i = 0; i < ARRAY_SIZE(ds2404_gpio); i++) ds2404_gpio_unmap()
95 gpio_free(ds2404_gpio[i].gpio); ds2404_gpio_unmap()
105 gpio_set_value(ds2404_gpio[DS2404_RST].gpio, 0); ds2404_reset()
107 gpio_set_value(ds2404_gpio[DS2404_RST].gpio, 1); ds2404_reset()
108 gpio_set_value(ds2404_gpio[DS2404_CLK].gpio, 0); ds2404_reset()
109 gpio_direction_output(ds2404_gpio[DS2404_DQ].gpio, 0); ds2404_reset()
117 gpio_direction_output(ds2404_gpio[DS2404_DQ].gpio, 1); ds2404_write_byte()
119 gpio_set_value(ds2404_gpio[DS2404_DQ].gpio, byte & (1 << i)); ds2404_write_byte()
121 gpio_set_value(ds2404_gpio[DS2404_CLK].gpio, 1); ds2404_write_byte()
123 gpio_set_value(ds2404_gpio[DS2404_CLK].gpio, 0); ds2404_write_byte()
133 gpio_direction_input(ds2404_gpio[DS2404_DQ].gpio); ds2404_read_byte()
136 gpio_set_value(ds2404_gpio[DS2404_CLK].gpio, 0); ds2404_read_byte()
138 if (gpio_get_value(ds2404_gpio[DS2404_DQ].gpio)) ds2404_read_byte()
140 gpio_set_value(ds2404_gpio[DS2404_CLK].gpio, 1); ds2404_read_byte()
191 gpio_direction_input(ds2404_gpio[DS2404_DQ].gpio); ds2404_write_memory()
192 while (gpio_get_value(ds2404_gpio[DS2404_DQ].gpio)) ds2404_write_memory()

Completed in 32 milliseconds