[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230525154946.98829ff5bda64d7c723ed6ff@hugovil.com>
Date: Thu, 25 May 2023 15:49:46 -0400
From: Hugo Villeneuve <hugo@...ovil.com>
To: andy.shevchenko@...il.com
Cc: gregkh@...uxfoundation.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
jirislaby@...nel.org, jringle@...dpoint.com,
tomasz.mon@...lingroup.com, l.perczak@...lintechnologies.com,
linux-serial@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
Hugo Villeneuve <hvilleneuve@...onoff.com>
Subject: Re: [PATCH v3 11/11] serial: sc16is7xx: add dump registers function
On Thu, 25 May 2023 14:26:43 +0300
andy.shevchenko@...il.com wrote:
> Thu, May 25, 2023 at 12:03:25AM -0400, Hugo Villeneuve kirjoitti:
> > From: Hugo Villeneuve <hvilleneuve@...onoff.com>
> >
> > With this driver, it is very hard to debug the registers using
> > the /sys/kernel/debug/regmap interface.
> >
> > The main reason is that bits 0 and 1 of the register address
> > correspond to the channels bits, so the register address itself starts
> > at bit 2, so we must 'mentally' shift each register address by 2 bits
> > to get its offset.
> >
> > Also, only channels 0 and 1 are supported, so combinations of bits
> > 0 and 1 being 10b and 11b are invalid, and the display of these
> > registers is useless.
> >
> > For example:
> >
> > cat /sys/kernel/debug/regmap/spi0.0/registers
> > 04: 10 -> Port 0, register offset 1
> > 05: 10 -> Port 1, register offset 1
> > 06: 00 -> Port 2, register offset 1 -> invalid
> > 07: 00 -> port 3, register offset 1 -> invalid
> > ...
> >
> > Add a debug module parameter to call a custom dump function for each
> > port registers after the probe phase to help debug.
>
> Not sure about this. Can we rather create an abstract mapping on regmap?
> (Something like gpio-pca953x.c has)
Hi,
maybe we can, but more like they do in the driver max310x.c (single, dual and quad UART versions).
I will look into it, but it will probably be a patch that affects a lot of the code, and that I would like to submit separately after this serie, and so I will probably simply drop this current patch (11/11) since it will not be needed anymore.
Hugo.
Powered by blists - more mailing lists