Lines Matching full:limits

73  * struct w1_uart_limits - limits for 1-Wire operations
107 const struct w1_uart_limits *limits, in w1_uart_set_config() argument
115 w1cfg->baudrate = serdev_device_set_baudrate(serdev, limits->baudrate); in w1_uart_set_config()
121 bits_low = to_ns(limits->bit_min_us) / bit_ns; in w1_uart_set_config()
125 if (low_ns < to_ns(limits->bit_min_us)) in w1_uart_set_config()
128 if (low_ns > to_ns(limits->bit_max_us)) in w1_uart_set_config()
132 if (limits->sample_us > 0 && in w1_uart_set_config()
133 bit_ns * BITS_PER_BYTE < low_ns + to_ns(limits->sample_us)) in w1_uart_set_config()
139 if (to_ns(limits->cycle_us) > packet_ns) in w1_uart_set_config()
141 (to_ns(limits->cycle_us) - packet_ns) / NSEC_PER_USEC; in w1_uart_set_config()
152 * - limits for sample time 60us-75us, use 65us
159 struct w1_uart_limits limits = { .baudrate = 9600, in w1_uart_set_config_reset() local
165 of_property_read_u32(np, "reset-bps", &limits.baudrate); in w1_uart_set_config_reset()
167 return w1_uart_set_config(serdev, &limits, &w1dev->cfg_reset); in w1_uart_set_config_reset()
180 struct w1_uart_limits limits = { .baudrate = 115200, in w1_uart_set_config_touch_0() local
186 of_property_read_u32(np, "write-0-bps", &limits.baudrate); in w1_uart_set_config_touch_0()
188 return w1_uart_set_config(serdev, &limits, &w1dev->cfg_touch_0); in w1_uart_set_config_touch_0()
194 * - limits for sample time 5us-15us, use 15us
201 struct w1_uart_limits limits = { .baudrate = 115200, in w1_uart_set_config_touch_1() local
207 of_property_read_u32(np, "write-1-bps", &limits.baudrate); in w1_uart_set_config_touch_1()
209 return w1_uart_set_config(serdev, &limits, &w1dev->cfg_touch_1); in w1_uart_set_config_touch_1()