[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <CSOGQIRNP61G.1Q2A4ZXB43YYQ@burritosblues>
Date: Wed, 17 May 2023 11:58:57 +0200
From: "Esteban Blanc" <eblanc@...libre.com>
To: "Andy Shevchenko" <andy.shevchenko@...il.com>
Cc: <linus.walleij@...aro.org>, <lgirdwood@...il.com>,
<broonie@...nel.org>, <a.zummo@...ertech.it>,
<alexandre.belloni@...tlin.com>, <linux-kernel@...r.kernel.org>,
<linux-gpio@...r.kernel.org>, <linux-rtc@...r.kernel.org>,
<jpanis@...libre.com>, <jneanne@...libre.com>,
<aseketeli@...libre.com>, <sterzik@...com>, <u-kumar1@...com>
Subject: Re: [PATCH v4 2/3] pinctrl: tps6594: Add driver for TPS6594 pinctrl
and GPIOs
On Tue May 16, 2023 at 6:48 PM CEST, Andy Shevchenko wrote:
> On Tue, May 16, 2023 at 4:05 PM Esteban Blanc <eblanc@...libre.com> wrote:
> > On Fri May 12, 2023 at 7:07 PM CEST, wrote:
> > > Fri, May 12, 2023 at 04:17:54PM +0200, Esteban Blanc kirjoitti:
...
> > > > -#define TPS6594_REG_GPIOX_CONF(gpio_inst) (0x31 + (gpio_inst))
> > > > +#define TPS6594_REG_GPIO1_CONF 0x31
> > > > +#define TPS6594_REG_GPIOX_CONF(gpio_inst) (TPS6594_REG_GPIO1_CONF + (gpio_inst))
> > >
> > > Why? The original code with parameter 0 will issue the same.
> >
> > I felt that replacing 0x31 with a constant would make the computation
> > in TPS6594_REG_GPIOX_CONFIG more understandable. What do you think?
>
> The question is why that register is so special that you need to have
> it as a constant explicitly?
It is not special, it's just the first one of the serie of config
registers. I felt like just having 0x31 without context was a bit weird
Best regards,
--
Esteban Blanc
BayLibre
Powered by blists - more mailing lists