Sorry for delaying things, i've had a lot on my minds lately!! Thank you for reminding me!! /Bo ________________________________________ Från: Jakub Kicinski [kubakici@xxxxx] Skickat: den 28 maj 2015 15:28 Till: Bo Svangård Kopia: greg@xxxxxxxxx; linux-serial@xxxxxxxxxxxxxxx; peter@xxxxxxxxxxxxxxxxxx Ämne: Re: [PATCH] serial: sc16is7xx, adjust register address to regmap_raw_read/write to enable secondary UART On Thu, 23 Apr 2015 13:23:54 +0200, Jakub Kiciński wrote: > On Wed, 22 Apr 2015 14:27:26 +0200, bo.svangard@xxxxxxxxxxxxxx wrote: > > From: Bo Svangård <bo.svangard@xxxxxxxxxxxxxx> > > > > Calls to regmap_raw_read/write needed register rewrite in a > > similar way as calls to regmap_read/write already had. > > This enables reading/writing the serial datastream to the device. > > > > Signed-off-by: Bo Svangård <bo.svangard@xxxxxxxxxxxxxx> > > --- > > --- > > drivers/tty/serial/sc16is7xx.c | 9 ++++++--- > > 1 file changed, 6 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c > > index 468354e..a4fd862 100644 > > --- a/drivers/tty/serial/sc16is7xx.c > > +++ b/drivers/tty/serial/sc16is7xx.c > > @@ -495,8 +495,9 @@ static void sc16is7xx_handle_rx(struct uart_port *port, unsigned int rxlen, > > bytes_read = 1; > > } else { > > regcache_cache_bypass(s->regmap, true); > > - regmap_raw_read(s->regmap, SC16IS7XX_RHR_REG, > > - s->buf, rxlen); > > + regmap_raw_read(s->regmap, > > + (SC16IS7XX_RHR_REG << SC16IS7XX_REG_SHIFT) | port->line, > > + s->buf, rxlen); > > regcache_cache_bypass(s->regmap, false); > > bytes_read = rxlen; > > } > > @@ -578,7 +579,9 @@ static void sc16is7xx_handle_tx(struct uart_port *port) > > xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); > > } > > regcache_cache_bypass(s->regmap, true); > > - regmap_raw_write(s->regmap, SC16IS7XX_THR_REG, s->buf, to_send); > > + regmap_raw_write(s->regmap, > > + (SC16IS7XX_THR_REG << SC16IS7XX_REG_SHIFT) | port->line, > > + s->buf, to_send); > > regcache_cache_bypass(s->regmap, false); > > } > > > > Seems to me it would be cleaner if you provided wrapper functions > similar sc16is7xx_port_(read|write|update) for FIFO access. Your > calls already take 3 lines and you go over 80 chars. Ping. What are your plans on this. Are you going to post a new version of this patch or should I take over? Thanks, Kuba -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html