Lines Matching +full:10 +full:m
21 struct max1600 *m; in max1600_init() local
39 m = devm_kzalloc(dev, sizeof(*m), GFP_KERNEL); in max1600_init()
40 if (!m) in max1600_init()
43 m->dev = dev; in max1600_init()
44 m->code = code; in max1600_init()
51 m->gpio[i] = devm_gpiod_get(dev, name, GPIOD_OUT_LOW); in max1600_init()
53 m->gpio[i] = devm_gpiod_get_optional(dev, name, in max1600_init()
55 if (!m->gpio[i]) in max1600_init()
58 if (IS_ERR(m->gpio[i])) in max1600_init()
59 return PTR_ERR(m->gpio[i]); in max1600_init()
62 *ptr = m; in max1600_init()
68 int max1600_configure(struct max1600 *m, unsigned int vcc, unsigned int vpp) in max1600_configure() argument
73 if (m->gpio[MAX1600_GPIO_0VPP]) { in max1600_configure()
84 dev_err(m->dev, "unrecognised Vpp %u.%uV\n", in max1600_configure()
85 vpp / 10, vpp % 10); in max1600_configure()
90 dev_err(m->dev, "no VPP control\n"); in max1600_configure()
104 dev_err(m->dev, "unrecognised Vcc %u.%uV\n", in max1600_configure()
105 vcc / 10, vcc % 10); in max1600_configure()
109 if (m->code == MAX1600_CODE_HIGH) { in max1600_configure()
118 return gpiod_set_array_value_cansleep(n, m->gpio, NULL, values); in max1600_configure()