Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1400310

Re: [PATCH 6/6] pinctrl: tegra: Add driver to configure voltage and power state of io pads

From Jon Hunter <jonathanh@nvidia.com>
Newsgroups linux.kernel
Subject Re: [PATCH 6/6] pinctrl: tegra: Add driver to configure voltage and power state of io pads
Date 2016-05-12 21:50 +0200
Message-ID <ry4Mp-3PW-1@gated-at.bofh.it> (permalink)
References <ruliO-3kM-17@gated-at.bofh.it> <ruliP-3kM-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 02/05/16 13:17, Laxman Dewangan wrote:
> NVIDIA Tegra210 supports the IO pads which can operate at 1.8V
> or 3.3V I/O voltage levels. Also the IO pads can be configured
> for power down state if it is not used. SW needs to configure the
> voltage level of IO pads based on IO rail voltage and its power
> state based on platform usage.
> 
> The voltage and power state configurations of pads are provided
> through pin control frameworks. Add pin control driver for Tegra's
> IO pads' voltage and power state configurations.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> 
> ---
> Changes from V1:
> - Use the generic pincontrol property for low power enable/disable.
> - sync with latest and remove all MODULE* macros
> - Use renamed APIs form PMC
> ---
>  drivers/pinctrl/tegra/Makefile                  |   1 +
>  drivers/pinctrl/tegra/pinctrl-tegra210-io-pad.c | 301 ++++++++++++++++++++++++
>  2 files changed, 302 insertions(+)
>  create mode 100644 drivers/pinctrl/tegra/pinctrl-tegra210-io-pad.c

[snip]

> +static int tegra_io_pad_pinconf_get(struct pinctrl_dev *pctldev,
> +				    unsigned int pin, unsigned long *config)
> +{
> +	struct tegra_io_pads_info *tiopi = pinctrl_dev_get_drvdata(pctldev);
> +	int param = pinconf_to_config_param(*config);
> +	struct tegra_io_pads_cfg_info *pad_cfg = &tiopi->pads_cfg[pin];
> +	int pad_id = pad_cfg->pad_id;
> +	int arg = 0;
> +	int ret;
> +
> +	switch (param) {
> +	case TEGRA_IO_PAD_POWER_SOURCE_VOLTAGE:
> +		ret = tegra_io_pads_get_configured_voltage(pad_id);
> +		if (ret < 0)
> +			return ret;
> +		arg = (ret =  3300000) ? 1 : 0;

This should be (ret == 3300000).

Cheers
Jon

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 6/6] pinctrl: tegra: Add driver to configure voltage and power state of io pads Laxman Dewangan <ldewangan@nvidia.com> - 2016-05-02 14:40 +0200
  Re: [PATCH 6/6] pinctrl: tegra: Add driver to configure voltage and  power state of io pads Linus Walleij <linus.walleij@linaro.org> - 2016-05-11 11:20 +0200
    Re: [PATCH 6/6] pinctrl: tegra: Add driver to configure voltage and  power state of io pads Stephen Warren <swarren@wwwdotorg.org> - 2016-05-11 18:10 +0200
      Re: [PATCH 6/6] pinctrl: tegra: Add driver to configure voltage and  power state of io pads Jon Hunter <jonathanh@nvidia.com> - 2016-05-12 12:40 +0200
  Re: [PATCH 6/6] pinctrl: tegra: Add driver to configure voltage and  power state of io pads Javier Martinez Canillas <javier@dowhile0.org> - 2016-05-12 21:10 +0200
  Re: [PATCH 6/6] pinctrl: tegra: Add driver to configure voltage and  power state of io pads Jon Hunter <jonathanh@nvidia.com> - 2016-05-12 21:50 +0200

csiph-web