Вторник, 11 марта 2014, 14:44 -04:00 от Jon Ringle <jon@xxxxxxxxxx>: > > I left out some relevant functions (sc16is7xx_port_read(), > sc16is7xx_port_write(), sc16is7xx_port_update()) in my previous email... > > On Mon, 10 Mar 2014, Alexander Shiyan wrote: > > > Понедельник, 10 марта 2014, 7:50 -04:00 от Jon Ringle <jon@xxxxxxxxxx>: > > > > > > On Mon, 10 Mar 2014, Alexander Shiyan wrote: > > I do not understand why you chose the sccnxp driver as a template. > > Use as a template max310x driver from linux-next branch. > > I'm sure it will be better. Here are the approximate changes: > #define SC16IS7XX_REG_SHIFT 3 #define SC16IS7XX_REG_SHIFT 2 > static u8 sc16is7xx_port_read(struct uart_port *port, u8 reg) > { > struct sc16is7xx_port *s = dev_get_drvdata(port->dev); > unsigned int val = 0; > > regmap_read(s->regmap, reg << SC16IS7XX_REG_SHIFT, &val); regmap_read(s->regmap, (reg << SC16IS7XX_REG_SHIFT) | port->index, &val); Same for "write" and "update". > static struct regmap_config regcfg = { > .reg_bits = 8, .reg_bits = 7, > .reg_stride = (1 << SC16IS7XX_REG_SHIFT), Kill this line (.reg_stride), but add: .pad_bits = 1, --- ��.n��������+%������w��{.n�����{��ǫ����{ay�ʇڙ���f���h������_�(�階�ݢj"��������G����?���&��