• Home
  • Raw
  • Download

Lines Matching full:hd

43 	struct hd44780 *hd = lcd->drvdata;  in hd44780_backlight()  local
45 if (hd->pins[PIN_CTRL_BL]) in hd44780_backlight()
46 gpiod_set_value_cansleep(hd->pins[PIN_CTRL_BL], on); in hd44780_backlight()
49 static void hd44780_strobe_gpio(struct hd44780 *hd) in hd44780_strobe_gpio() argument
54 gpiod_set_value_cansleep(hd->pins[PIN_CTRL_E], 1); in hd44780_strobe_gpio()
59 gpiod_set_value_cansleep(hd->pins[PIN_CTRL_E], 0); in hd44780_strobe_gpio()
63 static void hd44780_write_gpio8(struct hd44780 *hd, u8 val, unsigned int rs) in hd44780_write_gpio8() argument
72 if (hd->pins[PIN_CTRL_RW]) { in hd44780_write_gpio8()
78 gpiod_set_array_value_cansleep(n, &hd->pins[PIN_DATA0], values); in hd44780_write_gpio8()
80 hd44780_strobe_gpio(hd); in hd44780_write_gpio8()
84 static void hd44780_write_gpio4(struct hd44780 *hd, u8 val, unsigned int rs) in hd44780_write_gpio4() argument
94 if (hd->pins[PIN_CTRL_RW]) { in hd44780_write_gpio4()
100 gpiod_set_array_value_cansleep(n, &hd->pins[PIN_DATA4], in hd44780_write_gpio4()
103 hd44780_strobe_gpio(hd); in hd44780_write_gpio4()
110 gpiod_set_array_value_cansleep(n, &hd->pins[PIN_DATA4], in hd44780_write_gpio4()
113 hd44780_strobe_gpio(hd); in hd44780_write_gpio4()
119 struct hd44780 *hd = lcd->drvdata; in hd44780_write_cmd_gpio8() local
121 hd44780_write_gpio8(hd, cmd, 0); in hd44780_write_cmd_gpio8()
130 struct hd44780 *hd = lcd->drvdata; in hd44780_write_data_gpio8() local
132 hd44780_write_gpio8(hd, data, 1); in hd44780_write_data_gpio8()
147 struct hd44780 *hd = lcd->drvdata; in hd44780_write_cmd_gpio4() local
149 hd44780_write_gpio4(hd, cmd, 0); in hd44780_write_cmd_gpio4()
159 struct hd44780 *hd = lcd->drvdata; in hd44780_write_cmd_raw_gpio4() local
167 if (hd->pins[PIN_CTRL_RW]) { in hd44780_write_cmd_raw_gpio4()
173 gpiod_set_array_value_cansleep(n, &hd->pins[PIN_DATA4], in hd44780_write_cmd_raw_gpio4()
176 hd44780_strobe_gpio(hd); in hd44780_write_cmd_raw_gpio4()
182 struct hd44780 *hd = lcd->drvdata; in hd44780_write_data_gpio4() local
184 hd44780_write_gpio4(hd, data, 1); in hd44780_write_data_gpio4()
202 struct hd44780 *hd; in hd44780_probe() local
225 hd = lcd->drvdata; in hd44780_probe()
228 hd->pins[base + i] = devm_gpiod_get_index(dev, "data", i, in hd44780_probe()
230 if (IS_ERR(hd->pins[base + i])) { in hd44780_probe()
231 ret = PTR_ERR(hd->pins[base + i]); in hd44780_probe()
236 hd->pins[PIN_CTRL_E] = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW); in hd44780_probe()
237 if (IS_ERR(hd->pins[PIN_CTRL_E])) { in hd44780_probe()
238 ret = PTR_ERR(hd->pins[PIN_CTRL_E]); in hd44780_probe()
242 hd->pins[PIN_CTRL_RS] = devm_gpiod_get(dev, "rs", GPIOD_OUT_HIGH); in hd44780_probe()
243 if (IS_ERR(hd->pins[PIN_CTRL_RS])) { in hd44780_probe()
244 ret = PTR_ERR(hd->pins[PIN_CTRL_RS]); in hd44780_probe()
249 hd->pins[PIN_CTRL_RW] = devm_gpiod_get_optional(dev, "rw", in hd44780_probe()
251 if (IS_ERR(hd->pins[PIN_CTRL_RW])) { in hd44780_probe()
252 ret = PTR_ERR(hd->pins[PIN_CTRL_RW]); in hd44780_probe()
256 hd->pins[PIN_CTRL_BL] = devm_gpiod_get_optional(dev, "backlight", in hd44780_probe()
258 if (IS_ERR(hd->pins[PIN_CTRL_BL])) { in hd44780_probe()
259 ret = PTR_ERR(hd->pins[PIN_CTRL_BL]); in hd44780_probe()