All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Claudiu Beznea <claudiu.beznea@microchip.com>
Subject: Re: [PATCH] pcmcia: at91_cf: switch to using gpiod API
Date: Sat, 24 Sep 2022 21:54:43 -0700	[thread overview]
Message-ID: <Yy/fE9lUmWTpsyTL@google.com> (raw)
In-Reply-To: <Yy8RcC2QHdws26ha@owl.dominikbrodowski.net>

On Sat, Sep 24, 2022 at 04:17:20PM +0200, Dominik Brodowski wrote:
> Am Sat, Sep 24, 2022 at 01:42:37PM +0200 schrieb Alexandre Belloni:
> > On 24/09/2022 10:33:29+0200, Arnd Bergmann wrote:
> > > On Sat, Sep 24, 2022, at 8:04 AM, Dmitry Torokhov wrote:
> > > > This patch switches the driver to use newer gpiod API instead of legacy
> > > > gpio API. This moves us closer to the goal of stopping exporting
> > > > OF-specific APIs of gpiolib.
> > > >
> > > > While at it, stop using module-global for regmap.
> > > >
> > > > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > 
> > > This looks good to me overall. Three comments:
> > > 
> > > > @@ -63,7 +62,7 @@ struct at91_cf_socket {
> > > > 
> > > >  static inline int at91_cf_present(struct at91_cf_socket *cf)
> > > >  {
> > > > -	return !gpio_get_value(cf->board->det_pin);
> > > > +	return gpiod_get_value(cf->board->det_pin);
> > > >  }
> > > 
> > > a) The change in polarity looks wrong here, I can't really tell
> > > from the patch. If this is intentional, maybe explain it in
> > > the changelog. With that addressed (either way)

Oh, yes, you are right. I at first thought that card detect pin might be
active low, was not able to confirm it, but forgot to restore polarity.

Anyway, I think this does not matter given Dominik's patch below.

> > > 
> > > Reviewed-by: Arnd Bergmann <arnd@arndb.de>
> > > 
> > > 
> > > b) In case you are doing more patches like this one at the moment,
> > > note that I'm in the process of removing all unused board files
> > > for arch/arm/, which will in turn make a lot of drivers unused.
> > > I should be able to provide a branch soon, which can be used to
> > > identify drivers that don't have DT support any more and don't
> > > have any board files. Rather than converting them to gpio
> > > descriptors, we can probably just remove those drivers.
> > > 
> > > c) I'm not sure about the state of the at91_cf driver. Apparently
> > > we used to have three drivers for the same hardware (pcmcia,
> > > pata and ide), and only the pcmcia driver remained in the tree
> > > after drivers/ide/ was removed and pata_at91 did not get converted
> > > to DT. I think in the long run we will remove the pcmcia layer,
> > > so if you are actually trying to use this hardware, we may want to
> > > revive the pata variant and drop this one instead.

Nope, I am interested in dropping legacy gpio API, that is all.

> > > There is no dts file in tree that actually declares either of them,
> > > so chances are that nobody is actually using the CF slot on at91
> > > any more.
> > > 
> > 
> > I'm pretty sure it is broken since eaa9a21dd14b ("pcmcia: at91_cf: Use
> > syscon to configure the MC/smc") as this change has never been tested.
> 
> Well, that's a pretty strong reason to remove this driver. May I get ACKs on
> this patch, please?

Not sure if this is worth anything, but

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Thanks.

-- 
Dmitry

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Claudiu Beznea <claudiu.beznea@microchip.com>
Subject: Re: [PATCH] pcmcia: at91_cf: switch to using gpiod API
Date: Sat, 24 Sep 2022 21:54:43 -0700	[thread overview]
Message-ID: <Yy/fE9lUmWTpsyTL@google.com> (raw)
In-Reply-To: <Yy8RcC2QHdws26ha@owl.dominikbrodowski.net>

On Sat, Sep 24, 2022 at 04:17:20PM +0200, Dominik Brodowski wrote:
> Am Sat, Sep 24, 2022 at 01:42:37PM +0200 schrieb Alexandre Belloni:
> > On 24/09/2022 10:33:29+0200, Arnd Bergmann wrote:
> > > On Sat, Sep 24, 2022, at 8:04 AM, Dmitry Torokhov wrote:
> > > > This patch switches the driver to use newer gpiod API instead of legacy
> > > > gpio API. This moves us closer to the goal of stopping exporting
> > > > OF-specific APIs of gpiolib.
> > > >
> > > > While at it, stop using module-global for regmap.
> > > >
> > > > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > 
> > > This looks good to me overall. Three comments:
> > > 
> > > > @@ -63,7 +62,7 @@ struct at91_cf_socket {
> > > > 
> > > >  static inline int at91_cf_present(struct at91_cf_socket *cf)
> > > >  {
> > > > -	return !gpio_get_value(cf->board->det_pin);
> > > > +	return gpiod_get_value(cf->board->det_pin);
> > > >  }
> > > 
> > > a) The change in polarity looks wrong here, I can't really tell
> > > from the patch. If this is intentional, maybe explain it in
> > > the changelog. With that addressed (either way)

Oh, yes, you are right. I at first thought that card detect pin might be
active low, was not able to confirm it, but forgot to restore polarity.

Anyway, I think this does not matter given Dominik's patch below.

> > > 
> > > Reviewed-by: Arnd Bergmann <arnd@arndb.de>
> > > 
> > > 
> > > b) In case you are doing more patches like this one at the moment,
> > > note that I'm in the process of removing all unused board files
> > > for arch/arm/, which will in turn make a lot of drivers unused.
> > > I should be able to provide a branch soon, which can be used to
> > > identify drivers that don't have DT support any more and don't
> > > have any board files. Rather than converting them to gpio
> > > descriptors, we can probably just remove those drivers.
> > > 
> > > c) I'm not sure about the state of the at91_cf driver. Apparently
> > > we used to have three drivers for the same hardware (pcmcia,
> > > pata and ide), and only the pcmcia driver remained in the tree
> > > after drivers/ide/ was removed and pata_at91 did not get converted
> > > to DT. I think in the long run we will remove the pcmcia layer,
> > > so if you are actually trying to use this hardware, we may want to
> > > revive the pata variant and drop this one instead.

Nope, I am interested in dropping legacy gpio API, that is all.

> > > There is no dts file in tree that actually declares either of them,
> > > so chances are that nobody is actually using the CF slot on at91
> > > any more.
> > > 
> > 
> > I'm pretty sure it is broken since eaa9a21dd14b ("pcmcia: at91_cf: Use
> > syscon to configure the MC/smc") as this change has never been tested.
> 
> Well, that's a pretty strong reason to remove this driver. May I get ACKs on
> this patch, please?

Not sure if this is worth anything, but

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Thanks.

-- 
Dmitry

  reply	other threads:[~2022-09-25  4:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-24  6:04 [PATCH] pcmcia: at91_cf: switch to using gpiod API Dmitry Torokhov
2022-09-24  6:04 ` Dmitry Torokhov
2022-09-24  8:33 ` Arnd Bergmann
2022-09-24  8:33   ` Arnd Bergmann
2022-09-24 11:42   ` Alexandre Belloni
2022-09-24 11:42     ` Alexandre Belloni
2022-09-24 14:17     ` Dominik Brodowski
2022-09-24 14:17       ` Dominik Brodowski
2022-09-25  4:54       ` Dmitry Torokhov [this message]
2022-09-25  4:54         ` Dmitry Torokhov
2022-09-25 12:24       ` Linus Walleij
2022-09-25 12:24         ` Linus Walleij
2022-09-26 15:26         ` Nicolas Ferre
2022-09-26 15:26           ` Nicolas Ferre
2022-09-25 18:09       ` Alexandre Belloni
2022-09-25 18:09         ` Alexandre Belloni
2022-09-25 19:06       ` Arnd Bergmann
2022-09-25 19:06         ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yy/fE9lUmWTpsyTL@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=arnd@arndb.de \
    --cc=claudiu.beznea@microchip.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.