Lines Matching full:hd

42 	struct hd44780 *hd = lcd->drvdata;  in hd44780_backlight()  local
44 if (hd->pins[PIN_CTRL_BL]) in hd44780_backlight()
45 gpiod_set_value_cansleep(hd->pins[PIN_CTRL_BL], on); in hd44780_backlight()
48 static void hd44780_strobe_gpio(struct hd44780 *hd) in hd44780_strobe_gpio() argument
53 gpiod_set_value_cansleep(hd->pins[PIN_CTRL_E], 1); in hd44780_strobe_gpio()
58 gpiod_set_value_cansleep(hd->pins[PIN_CTRL_E], 0); in hd44780_strobe_gpio()
62 static void hd44780_write_gpio8(struct hd44780 *hd, u8 val, unsigned int rs) in hd44780_write_gpio8() argument
69 n = hd->pins[PIN_CTRL_RW] ? 10 : 9; in hd44780_write_gpio8()
72 gpiod_set_array_value_cansleep(n, &hd->pins[PIN_DATA0], NULL, values); in hd44780_write_gpio8()
74 hd44780_strobe_gpio(hd); in hd44780_write_gpio8()
78 static void hd44780_write_gpio4(struct hd44780 *hd, u8 val, unsigned int rs) in hd44780_write_gpio4() argument
86 n = hd->pins[PIN_CTRL_RW] ? 6 : 5; in hd44780_write_gpio4()
89 gpiod_set_array_value_cansleep(n, &hd->pins[PIN_DATA4], NULL, values); in hd44780_write_gpio4()
91 hd44780_strobe_gpio(hd); in hd44780_write_gpio4()
98 gpiod_set_array_value_cansleep(n, &hd->pins[PIN_DATA4], NULL, values); in hd44780_write_gpio4()
100 hd44780_strobe_gpio(hd); in hd44780_write_gpio4()
106 struct hd44780 *hd = lcd->drvdata; in hd44780_write_cmd_gpio8() local
108 hd44780_write_gpio8(hd, cmd, 0); in hd44780_write_cmd_gpio8()
117 struct hd44780 *hd = lcd->drvdata; in hd44780_write_data_gpio8() local
119 hd44780_write_gpio8(hd, data, 1); in hd44780_write_data_gpio8()
134 struct hd44780 *hd = lcd->drvdata; in hd44780_write_cmd_gpio4() local
136 hd44780_write_gpio4(hd, cmd, 0); in hd44780_write_cmd_gpio4()
146 struct hd44780 *hd = lcd->drvdata; in hd44780_write_cmd_raw_gpio4() local
151 n = hd->pins[PIN_CTRL_RW] ? 6 : 5; in hd44780_write_cmd_raw_gpio4()
154 gpiod_set_array_value_cansleep(n, &hd->pins[PIN_DATA4], NULL, values); in hd44780_write_cmd_raw_gpio4()
156 hd44780_strobe_gpio(hd); in hd44780_write_cmd_raw_gpio4()
162 struct hd44780 *hd = lcd->drvdata; in hd44780_write_data_gpio4() local
164 hd44780_write_gpio4(hd, data, 1); in hd44780_write_data_gpio4()
182 struct hd44780 *hd; in hd44780_probe() local
205 hd = lcd->drvdata; in hd44780_probe()
208 hd->pins[base + i] = devm_gpiod_get_index(dev, "data", i, in hd44780_probe()
210 if (IS_ERR(hd->pins[base + i])) { in hd44780_probe()
211 ret = PTR_ERR(hd->pins[base + i]); in hd44780_probe()
216 hd->pins[PIN_CTRL_E] = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW); in hd44780_probe()
217 if (IS_ERR(hd->pins[PIN_CTRL_E])) { in hd44780_probe()
218 ret = PTR_ERR(hd->pins[PIN_CTRL_E]); in hd44780_probe()
222 hd->pins[PIN_CTRL_RS] = devm_gpiod_get(dev, "rs", GPIOD_OUT_HIGH); in hd44780_probe()
223 if (IS_ERR(hd->pins[PIN_CTRL_RS])) { in hd44780_probe()
224 ret = PTR_ERR(hd->pins[PIN_CTRL_RS]); in hd44780_probe()
229 hd->pins[PIN_CTRL_RW] = devm_gpiod_get_optional(dev, "rw", in hd44780_probe()
231 if (IS_ERR(hd->pins[PIN_CTRL_RW])) { in hd44780_probe()
232 ret = PTR_ERR(hd->pins[PIN_CTRL_RW]); in hd44780_probe()
236 hd->pins[PIN_CTRL_BL] = devm_gpiod_get_optional(dev, "backlight", in hd44780_probe()
238 if (IS_ERR(hd->pins[PIN_CTRL_BL])) { in hd44780_probe()
239 ret = PTR_ERR(hd->pins[PIN_CTRL_BL]); in hd44780_probe()