Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1362933
| From | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB |
| Date | 2016-03-22 20:50 +0100 |
| Message-ID | <rfAts-Np-5@gated-at.bofh.it> (permalink) |
| References | (4 earlier) <rf7rr-5J5-1@gated-at.bofh.it> <rf8Qy-6S7-13@gated-at.bofh.it> <rfa5Y-7FH-27@gated-at.bofh.it> <rfesW-2eY-13@gated-at.bofh.it> <rfvDs-5NV-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello Sebastian,
On Tue, Mar 22, 2016 at 03:34:23PM +0100, Sebastian Frias wrote:
> I think we are in a deadlock :-)
> I'm going to reply inline below, but I will also send a different email
> to Daniel with a small recap.
> I think he should share the intent of the "reset" mechanism he
> introduced, in particular if it is mandatory.
The things I said in my mail are valid in general, not only for the
at803x phy.
Let me repeat them once more:
Preconditions:
- Some of the devices a given driver handles have a reset line and
others don't.
- A non-empty subset (maybe all) of the devices that have a reset line
require that this reset line is used.
Then the way to handle this in the driver should be done as follows:
unless reset_handling_not_necessary():
gpio = gpiod_get_optional("reset")
if IS_ERR(gpio):
return PTR_ERR(gpio)
Checking for -ENOSYS or GPIOLIB=n is not allowed because the device
you're currently handling might need the GPIO, so you must not continue
without the ability to control the line.
So the options you have (as you have a phy that doesn't need the reset
handling):
- enable GPIOLIB (either in your .config or introduce a Kconfig
dependency)
- improve reset_handling_not_necessary() to return true for your case
There is nothing else.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Uwe Kleine-König <u.kleine-koenig@pengutronix.de> - 2016-03-18 14:00 +0100
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Sebastian Frias <sf84@laposte.net> - 2016-03-18 17:20 +0100
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Uwe Kleine-König <u.kleine-koenig@pengutronix.de> - 2016-03-18 20:20 +0100
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Mason <slash.tmp@free.fr> - 2016-03-18 20:40 +0100
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Uwe Kleine-König <u.kleine-koenig@pengutronix.de> - 2016-03-18 21:20 +0100
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Mason <slash.tmp@free.fr> - 2016-03-18 21:50 +0100
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Måns Rullgård <mans@mansr.com> - 2016-03-19 11:10 +0100
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Sebastian Frias <sf84@laposte.net> - 2016-03-21 13:50 +0100
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Uwe Kleine-König <u.kleine-koenig@pengutronix.de> - 2016-03-21 15:20 +0100
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Sebastian Frias <sf84@laposte.net> - 2016-03-21 16:40 +0100
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Uwe Kleine-König <u.kleine-koenig@pengutronix.de> - 2016-03-21 21:20 +0100
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Sebastian Frias <sf84@laposte.net> - 2016-03-22 15:40 +0100
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Uwe Kleine-König <u.kleine-koenig@pengutronix.de> - 2016-03-22 20:50 +0100
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Mason <slash.tmp@free.fr> - 2016-03-23 11:20 +0100
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-03-23 11:40 +0100
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Sebastian Frias <sf84@laposte.net> - 2016-03-23 12:00 +0100
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Sebastian Frias <sf84@laposte.net> - 2016-03-23 11:20 +0100
[PATCH] net: phy: at803x: Request 'reset' GPIO only for AT8030 PHY Sebastian Frias <sf84@laposte.net> - 2016-03-23 11:50 +0100
Re: [PATCH] net: phy: at803x: Request 'reset' GPIO only for AT8030 PHY David Miller <davem@davemloft.net> - 2016-03-23 18:50 +0100
Re: [PATCH] net: phy: at803x: Request 'reset' GPIO only for AT8030 PHY Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-03-23 20:50 +0100
Re: [PATCH] net: phy: at803x: Request 'reset' GPIO only for AT8030 PHY Sebastian Frias <sf84@laposte.net> - 2016-03-24 11:00 +0100
Re: [PATCH] net: phy: at803x: Request 'reset' GPIO only for AT8030 PHY Sebastian Frias <sf84@laposte.net> - 2016-03-24 11:20 +0100
Re: [PATCH] net: phy: at803x: Request 'reset' GPIO only for AT8030 PHY Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-03-24 14:50 +0100
Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB Sebastian Frias <sf84@laposte.net> - 2016-03-22 15:40 +0100
csiph-web