Lines Matching full:lcd2s
3 * Console driver for LCD2S 4x20 character displays connected through i2c.
7 * This is a driver allowing you to use a LCD2S 4x20 from Modtronix
99 struct lcd2s_data *lcd2s = lcd->drvdata; in lcd2s_print() local
102 lcd2s_i2c_master_send(lcd2s->i2c, buf, sizeof(buf)); in lcd2s_print()
108 struct lcd2s_data *lcd2s = lcd->drvdata; in lcd2s_gotoxy() local
111 lcd2s_i2c_master_send(lcd2s->i2c, buf, sizeof(buf)); in lcd2s_gotoxy()
118 struct lcd2s_data *lcd2s = lcd->drvdata; in lcd2s_home() local
120 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_CUR_RESET); in lcd2s_home()
126 struct lcd2s_data *lcd2s = lcd->drvdata; in lcd2s_init_display() local
129 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_DISPLAY_ON); in lcd2s_init_display()
130 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_BACKLIGHT_OFF); in lcd2s_init_display()
131 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_CUR_MOVES_FWD); in lcd2s_init_display()
132 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_CUR_BLINK_OFF); in lcd2s_init_display()
133 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_CUR_UL_OFF); in lcd2s_init_display()
134 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_CLEAR); in lcd2s_init_display()
141 struct lcd2s_data *lcd2s = lcd->drvdata; in lcd2s_shift_cursor() local
144 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_MOV_CUR_LEFT); in lcd2s_shift_cursor()
146 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_MOV_CUR_RIGHT); in lcd2s_shift_cursor()
153 struct lcd2s_data *lcd2s = lcd->drvdata; in lcd2s_shift_display() local
156 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_SHIFT_LEFT); in lcd2s_shift_display()
158 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_SHIFT_RIGHT); in lcd2s_shift_display()
165 struct lcd2s_data *lcd2s = lcd->drvdata; in lcd2s_backlight() local
168 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_BACKLIGHT_ON); in lcd2s_backlight()
170 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_BACKLIGHT_OFF); in lcd2s_backlight()
175 struct lcd2s_data *lcd2s = lcd->drvdata; in lcd2s_display() local
178 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_DISPLAY_ON); in lcd2s_display()
180 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_DISPLAY_OFF); in lcd2s_display()
187 struct lcd2s_data *lcd2s = lcd->drvdata; in lcd2s_cursor() local
190 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_CUR_UL_ON); in lcd2s_cursor()
192 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_CUR_UL_OFF); in lcd2s_cursor()
199 struct lcd2s_data *lcd2s = lcd->drvdata; in lcd2s_blink() local
202 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_CUR_BLINK_ON); in lcd2s_blink()
204 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_CUR_BLINK_OFF); in lcd2s_blink()
228 struct lcd2s_data *lcd2s = lcd->drvdata; in lcd2s_redefine_char() local
260 lcd2s_i2c_master_send(lcd2s->i2c, buf, sizeof(buf)); in lcd2s_redefine_char()
266 struct lcd2s_data *lcd2s = lcd->drvdata; in lcd2s_clear_display() local
269 lcd2s_i2c_smbus_write_byte(lcd2s->i2c, LCD2S_CMD_CLEAR); in lcd2s_clear_display()
293 struct lcd2s_data *lcd2s; in lcd2s_i2c_probe() local
301 lcd2s = devm_kzalloc(&i2c->dev, sizeof(*lcd2s), GFP_KERNEL); in lcd2s_i2c_probe()
302 if (!lcd2s) in lcd2s_i2c_probe()
314 lcd->drvdata = lcd2s; in lcd2s_i2c_probe()
315 lcd2s->i2c = i2c; in lcd2s_i2c_probe()
316 lcd2s->charlcd = lcd; in lcd2s_i2c_probe()
331 err = charlcd_register(lcd2s->charlcd); in lcd2s_i2c_probe()
335 i2c_set_clientdata(i2c, lcd2s); in lcd2s_i2c_probe()
339 charlcd_free(lcd2s->charlcd); in lcd2s_i2c_probe()
345 struct lcd2s_data *lcd2s = i2c_get_clientdata(i2c); in lcd2s_i2c_remove() local
347 charlcd_unregister(lcd2s->charlcd); in lcd2s_i2c_remove()
348 charlcd_free(lcd2s->charlcd); in lcd2s_i2c_remove()
352 { "lcd2s", 0 },
358 { .compatible = "modtronix,lcd2s" },
365 .name = "lcd2s",
374 MODULE_DESCRIPTION("LCD2S character display driver");