All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Fabio Estevam <festevam@gmail.com>
Cc: shawn.guo@linaro.org, linux-can@vger.kernel.org,
	Fabio Estevam <fabio.estevam@freescale.com>
Subject: Re: [PATCH 1/2] flexcan: Use a regulator to control the CAN transceiver
Date: Mon, 10 Jun 2013 18:59:19 +0200	[thread overview]
Message-ID: <51B605E7.6080903@pengutronix.de> (raw)
In-Reply-To: <1370460445-15386-1-git-send-email-festevam@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2511 bytes --]

On 06/05/2013 09:27 PM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Instead of using a GPIO to turn on/off the CAN transceiver, it is better to
> use a regulator as some systems may use a PMIC to power the CAN transceiver.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

I'm preparing a patch to remove the usage of flexcan_platform_data from
the imx tree. Can you add that patch to your series and remove
"linux/can/platform/flexcan.h" from the source tree in this patch?

> ---
>  .../devicetree/bindings/net/can/fsl-flexcan.txt    |  2 +
>  arch/arm/boot/dts/imx28-evk.dts                    | 11 +++++
>  arch/arm/mach-mxs/mach-mxs.c                       | 54 ++--------------------
>  drivers/net/can/flexcan.c                          | 24 +++++-----
>  4 files changed, 29 insertions(+), 62 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
> index 8ff324e..56d6cc3 100644
> --- a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
> +++ b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
> @@ -16,6 +16,8 @@ Optional properties:
>  
>  - clock-frequency : The oscillator frequency driving the flexcan device
>  
> +- xceiver-supply: Regulator that powers the CAN transceiver
> +
>  Example:
>  
>  	can@1c000 {
> diff --git a/arch/arm/boot/dts/imx28-evk.dts b/arch/arm/boot/dts/imx28-evk.dts
> index 3637bf3..dff42b3 100644
> --- a/arch/arm/boot/dts/imx28-evk.dts
> +++ b/arch/arm/boot/dts/imx28-evk.dts
> @@ -155,6 +155,7 @@
>  			can0: can@80032000 {
>  				pinctrl-names = "default";
>  				pinctrl-0 = <&can0_pins_a>;
> +				xceiver-supply = <&reg_can_3v3>;
>  				status = "okay";
>  			};
>  
> @@ -319,6 +320,16 @@
>  			gpio = <&gpio3 30 0>;
>  			enable-active-high;
>  		};
> +
> +		reg_can_3v3: can-3v3 {
> +			compatible = "regulator-fixed";
> +			regulator-name = "can-3v3";
> +			regulator-min-microvolt = <3300000>;
> +			regulator-max-microvolt = <3300000>;
> +			gpio = <&gpio2 13 0>;

Can you convert GPIO2_13 from a hog gpio to a normal pinctl gpio?

Looks good otherwise.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

  parent reply	other threads:[~2013-06-10 16:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05 19:27 [PATCH 1/2] flexcan: Use a regulator to control the CAN transceiver Fabio Estevam
2013-06-05 19:27 ` [PATCH 2/2] flexcan: Enable/Disable the CAN regulator in probe/remove Fabio Estevam
2013-06-10 17:02   ` Marc Kleine-Budde
2013-06-10 19:05     ` Fabio Estevam
2013-06-10 20:39       ` Marc Kleine-Budde
2013-06-10 20:49         ` Fabio Estevam
2013-06-10 23:35           ` Marc Kleine-Budde
2013-06-06  5:21 ` [PATCH 1/2] flexcan: Use a regulator to control the CAN transceiver Marc Kleine-Budde
2013-06-10 16:59 ` Marc Kleine-Budde [this message]
2013-06-10 17:03   ` Fabio Estevam
2013-06-11  2:38   ` Fabio Estevam
2013-06-12  9:39     ` Marc Kleine-Budde
2013-06-12 11:42 ` Shawn Guo
2013-06-12 12:06   ` Marc Kleine-Budde

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=51B605E7.6080903@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=fabio.estevam@freescale.com \
    --cc=festevam@gmail.com \
    --cc=linux-can@vger.kernel.org \
    --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 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.