Lines Matching +full:pass +full:- +full:1
1 // SPDX-License-Identifier: MIT
13 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
32 struct ast_device *ast = to_ast_device(i2c->dev); in ast_i2c_setsda()
37 ujcrb7 = ((data & 0x01) ? 0 : 1) << 2; in ast_i2c_setsda()
48 struct ast_device *ast = to_ast_device(i2c->dev); in ast_i2c_setscl()
53 ujcrb7 = ((clock & 0x01) ? 0 : 1); in ast_i2c_setscl()
64 struct ast_device *ast = to_ast_device(i2c->dev); in ast_i2c_getsda()
65 uint32_t val, val2, count, pass; in ast_i2c_getsda() local
68 pass = 0; in ast_i2c_getsda()
73 pass++; in ast_i2c_getsda()
75 pass = 0; in ast_i2c_getsda()
78 } while ((pass < 5) && (count++ < 0x10000)); in ast_i2c_getsda()
80 return val & 1 ? 1 : 0; in ast_i2c_getsda()
86 struct ast_device *ast = to_ast_device(i2c->dev); in ast_i2c_getscl()
87 uint32_t val, val2, count, pass; in ast_i2c_getscl() local
90 pass = 0; in ast_i2c_getscl()
95 pass++; in ast_i2c_getscl()
97 pass = 0; in ast_i2c_getscl()
100 } while ((pass < 5) && (count++ < 0x10000)); in ast_i2c_getscl()
102 return val & 1 ? 1 : 0; in ast_i2c_getscl()
109 i2c_del_adapter(&i2c->adapter); in ast_i2c_release()
122 i2c->adapter.owner = THIS_MODULE; in ast_i2c_create()
123 i2c->adapter.class = I2C_CLASS_DDC; in ast_i2c_create()
124 i2c->adapter.dev.parent = dev->dev; in ast_i2c_create()
125 i2c->dev = dev; in ast_i2c_create()
126 i2c_set_adapdata(&i2c->adapter, i2c); in ast_i2c_create()
127 snprintf(i2c->adapter.name, sizeof(i2c->adapter.name), in ast_i2c_create()
129 i2c->adapter.algo_data = &i2c->bit; in ast_i2c_create()
131 i2c->bit.udelay = 20; in ast_i2c_create()
132 i2c->bit.timeout = 2; in ast_i2c_create()
133 i2c->bit.data = i2c; in ast_i2c_create()
134 i2c->bit.setsda = ast_i2c_setsda; in ast_i2c_create()
135 i2c->bit.setscl = ast_i2c_setscl; in ast_i2c_create()
136 i2c->bit.getsda = ast_i2c_getsda; in ast_i2c_create()
137 i2c->bit.getscl = ast_i2c_getscl; in ast_i2c_create()
138 ret = i2c_bit_add_bus(&i2c->adapter); in ast_i2c_create()