From: Hui Wang <jason77.wang@gmail.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Hui Wang <jason77.wang@gmail.com>,
davem@davemloft.net, shawn.guo@linaro.org,
linux-can@vger.kernel.org
Subject: Re: [PATCH 4/4] can: flexcan: add transceiver switch support when use device tree
Date: Wed, 27 Jun 2012 17:55:35 +0800 [thread overview]
Message-ID: <4FEAD897.5070408@gmail.com> (raw)
In-Reply-To: <4FEAC3AA.500@pengutronix.de>
Marc Kleine-Budde wrote:
> On 06/27/2012 10:19 AM, Hui Wang wrote:
>
>> Some platforms (like i.MX6) has an external PHY, the PHY is operated
>> by some gpios. If the system registers a platform_data, we can
>> set a callback function pointer to pdata->transceiver_switch to
>> implement PHY switch. If we use device tree, we couldn't pass
>> platform_data to the driver, so i move the switch function to the
>> driver and add device tree entries to let user set which gpios
>> are used to operate PHY.
>>
>> This design doesn't break existing platforms, if a platform doesn't
>> need PHY switch, it doesn't need to set dt entries just as before,
>> if a platform has platform_data, the pdata->transceiver_switch has
>> higher priority.
>>
>> Cc: linux-can@vger.kernel.org
>> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
>> Cc: David S. Miller <davem@davemloft.net>
>> Cc: Shawn Guo <shawn.guo@linaro.org>
>> Signed-off-by: Hui Wang <jason77.wang@gmail.com>
>>
>
> please coordinate whith Shawn Guo, he has posted a similar patch some
> days ago. http://www.spinics.net/lists/netdev/msg202442.html
>
> Marc
>
>
After read and compared with his patch:
1. Shawn use gpio_is_valid(gpio) instead of (gpio >= 0), it is good.
2. Shawn add a flag to record active level, it is good.
3. Shawn only add 1 gpio, this is not enough for imx6 sabre lite board.
4. Shawn forget to call gpio_release()
Shawn, what about your opinion?
Regards,
Hui.
next prev parent reply other threads:[~2012-06-27 9:55 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-27 8:19 [PATCH 0/4] can: flexcan: upgrade the flexcan.c to support i.MX6 Hui Wang
2012-06-27 8:19 ` [PATCH 1/4] can: flexcan: use be32_to_cpup to handle the value of dt entry Hui Wang
2012-06-27 8:19 ` [PATCH 2/4] can: flexcan: add hardware controller version support Hui Wang
2012-06-27 8:19 ` [PATCH 3/4] can: flexcan: add ipg and ser clocks support Hui Wang
2012-06-27 8:19 ` [PATCH 4/4] can: flexcan: add transceiver switch support when use device tree Hui Wang
2012-06-27 8:26 ` Marc Kleine-Budde
2012-06-27 9:55 ` Hui Wang [this message]
2012-06-27 10:02 ` Marc Kleine-Budde
2012-06-27 11:22 ` Shawn Guo
2012-06-27 11:46 ` Marc Kleine-Budde
2012-06-28 1:53 ` Hui Wang
2012-06-27 8:45 ` [PATCH 3/4] can: flexcan: add ipg and ser clocks support Marc Kleine-Budde
2012-06-27 8:27 ` [PATCH 2/4] can: flexcan: add hardware controller version support Marc Kleine-Budde
2012-06-27 8:56 ` Wolfgang Grandegger
2012-06-27 9:43 ` Wolfgang Grandegger
2012-06-27 9:51 ` Marc Kleine-Budde
2012-06-27 10:13 ` Hui Wang
2012-06-27 10:24 ` Marc Kleine-Budde
2012-06-27 10:57 ` Wolfgang Grandegger
2012-06-27 8:38 ` [PATCH 1/4] can: flexcan: use be32_to_cpup to handle the value of dt entry Marc Kleine-Budde
2012-06-27 9:07 ` Wolfgang Grandegger
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=4FEAD897.5070408@gmail.com \
--to=jason77.wang@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=shawn.guo@linaro.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).